Sign in to follow this  
7Days

edge detection filter GLSL

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this