pixel replacement shader


    Nov 11 2013 | 3:33 pm
    hi everybody , i'm looking for a GPU-based way to replace an image with another , these images are applied to a videoplane .
    the way i need it to work is :
    -the current image is displayed -the next image will totally replace it , pixels after pixels , from the bottom right to the top left . -the new pixels are applied with a (y) axis priority , -when the first column is replaced , then it's time for the second column ... -from right to left i have had a look on the subtex.3d example patch , but can't figure out how to apply my simple need , cleanly ! i'm not sure this shader is the good one .
    i have tried a non-GPU manner , involving some getcell and setcell messages given to jit.matrixes , but it's not working "OK" , as soon as i'm working with many videoplanes (and i have to) .
    i think the best way would be to use a shader , is there a shader , already existing , that could work as i need ? would you have any clue ?
    her is a patch that tries to show my needs , with white pixels replacing black ones (or black replacing white) .
    (there's a loadbang , please click the "setall 255" message if just copy-pasted)
    if someone could help .... thanks Matthieu

    • Nov 11 2013 | 8:00 pm
      you could probably work this out with jit.gl.pix
      here's a basic patch to get you started:
    • Nov 11 2013 | 8:19 pm
      hi Rob , one more time , thanks !
      that does the trick 100% .
      great great great
      Matthieu