I would like to add a texture Ts which color is scaled by a factor K (K between 0 and 1) to another texture Td. the result is the texture T = K*Ts + Td, so I just wan’t to scale Ts color not Td color.
My question is: Is it possible to do that with only 2 textures with blending or glsl shaders? I mean that I would like to read and write the same texture (T=Td) using FBO to render to the texture. I am not sure that it is a good thing to read and write a texture at the same time in a shader and in my opinion it is not possible to compute this with gl blending…
This is a simple solution, I will try to do this. I did not find the GL_CONSTANT_COLOR constant the first time, It varies following the specification versions…
Well, you could also have used glBlendFunc(GL_ONE,GL_ONE)
set the texture environment to GL_MODULATE (default) and draw the Ts texture with glColor4f(k,k,k,k).
Yes you are right but I think that I would have to draw Ts and Td at the same time using multitexturing in the Td texture ( R/W the same texture)
Nevertheless I tried to use glBlendColor function and it works…
In fact I did not see GL_ARB_imaging with glxinfo (on linux) but then with glewinfo, I have this:
GL_ARB_imaging OK [MISSING]
I don’t understand what it means but it seems to work correctly and I have seen that this extension is supported by many implementations…
Yes you are right, this explains why this extension is not in the extension string.
In any case the explanation of glew with OK [MISSED] is very ambiguous…