Jump to content
  • Advertisement
Sign in to follow this  
7Days

edge detection filter GLSL

This topic is 4438 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

Hi, I would like to perform a edge detection filter. I have an image that I passed as a texture to my fragment shader. I would like to apply on it a 3*3 filter. My questionis: how canI have access to the coeff of my texture to apply on it the filter???

Share this post


Link to post
Share on other sites
Advertisement
You can pass the coefs of the filter as uniform variables into a fragment shader. I assume that is the question.

If your question is how to get the coef's of the texture... well, the same what you would in any fragment shader, with gl_TexCoord[]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!