BlackSheep 0 Report post Posted March 18, 2014 Hey everyone, I am trying to learn WebGL and would like to have shader that gives a mesh a gradient effect from top to bottom. For example, the bottom of a ball having no blue color and the top having all blue. I know I need to modify the fragment color with the y component of gl_Position but my implementations have thus far given me a black screen. Any help would be appreciated. Quote Share this post Link to post Share on other sites
Mefteg 23 Report post Posted March 19, 2014 Hello, It will help us to help you if you can give a link to your work and/or copy a part of your code in the thread. Quote Share this post Link to post Share on other sites