Hi…
is thete a way to load 2 different textures to the fragment shader?
If not, I have a problem: I want to compare 2 different images in the shader, how can I do that?
thanks
Hi…
is thete a way to load 2 different textures to the fragment shader?
If not, I have a problem: I want to compare 2 different images in the shader, how can I do that?
thanks
I’ve just started writing fragment/vertex shaders, so take what I say with a grain of salt. :>
I think the texture loading should be separate from the fragment; I think the fragment shader should only compute depth value and/or color. Handling multiple textures in openGL is easy!
As far as your last question, you answered it yourself: If you want to compare 2 different textures, then just do it. After all, you’re in the fragment shader – use the freebies in the fragment and appropriate variables to handle the comparison.
I found the Orange Book has become my constant companion. If you have it, read Chapter 6. It’s very helpful. I’m currently finishing an anisotropic shader and I’m running tests tomorrow. Good luck on your stuff.
jade
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.