Move part of rendered image

edited January 2016 in GLSL / Shaders

Hello, everyone!

I have strange task, but I can't understand how to make shader for it and I'm looking for some little help.

I have to move parts of rendered image on screen. For example consider we have a rectangle after render before shader apply (left part of image). The shader should take right part of rectangle and move it, replacing space with black color. Just like if you move selected part of image in Photoshop or GIMP. moveit

Is it possible to do with shaders?

Thank you

Tagged:

Answers

  • Use get() to get a rectangular section of an image, and save it to a PImage. Use fill(0) and rect() to draw over that section with a black rectangle. Use image() to draw the saved image in the new location.

  • Yes, it might work, but I don't think it will give me good fps. How to make shader for that?

  • With get() and image() solution I can achieve only 5 fps. That is not good performance. How to move part of PGraphics3D with shader?

Sign In or Register to comment.