BlackSheep Posted March 18, 2014 Share 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 Link to comment Share on other sites More sharing options...
Mefteg Posted March 19, 2014 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.