Login  Register

Re: Possible to use vertex shader without vbo?

Posted by Xerxes Rånby on May 28, 2015; 9:07am
URL: https://forum.jogamp.org/Possible-to-use-vertex-shader-without-vbo-tp4034532p4034535.html

sirus20x6 wrote
I have an erosion simulator that I'm working on and currently the map color is calculated on the cpu based on the z height. I would like to do this calculation on the gpu
I think you should do the color calculation in the fragment shader,
updating the color based on z depth is ideal if you want to do say a "fog" effect.
http://stackoverflow.com/a/17621928

updating the color based on y height is as easy.