GLSL RenderTexture

Hi I am trying to use Mark Harris RenderTexture class to perform some multi pass volume rendering.

I have to perform at least 3 passes and I will have to store each pass in a render-texture.

How do I send a RenderTexture down to a GLSL fragment shader, so that I can perform an operation as:

gl_FragColor = gl_Color - texture2D(rayintersection,gl_TexCoord[0].st);

I have without success tried to use the following:

// results for previous pass, stored in a RenderTexture
glUniform1iARB(sampler, 0);

might it be that you didn’t share display list shader programs and texture unit?

No, the RenderTexture class shares by default,
lists, textures, and program objects.

I have found the error :wink:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.