Jump to content
  • Advertisement
Sign in to follow this  
lacabos

OpenGL Fragment Shader Distance Gradient

This topic is 3364 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I hope I am not repeating a question that already has been answered, but I've checked extensively. I currently am writing an openGL application that renders a 3d model of a brain. This model is at a high poly count, approximately 50,000. My problem is choosing a point, or vertex, at any point on this model and modulating an activation for this point in real-time. I currently have a vertex and fragment shader implemented in GLSL along with having the model render correctly but I cannot get the precision of the gradient I am looking for. Ideally, I would pass the point to a shader, have it calculate if a point is within the radius and then color out accordingly. Using the vertex shader I have a rough circle that has rough variations in color due to the vertex faces and not enough precision. Any help is greatly appreciated from anyone and everyone.

Share this post


Link to post
Share on other sites
Advertisement
I should add that this model does not have a texture, UV coords, associated because I had to export this anatomical model from MATLAB. No texture ever existed.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!