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:
glUseProgramObjectARB(*direction);
// results for previous pass, stored in a RenderTexture
g_prtRayIntersection->EnableTextureTarget();
g_prtRayIntersection->Bind();
glUniform1iARB(sampler, 0);