Hi all,
I'm trying to replace the fixed function texgen for a given effect by a
shader in order to remove the back projection problem. But I'm
struggling a bit to even get the texgen to work with shaders (once
that's done removing the back projection will be a cinch).
The original (fixed
I think you should use the texture matrix in the shader. Been experimenting
with the same lately and it seem to wok
-Nick
On Tue, Feb 9, 2010 at 4:32 PM, Jean-Sébastien Guay
jean-sebastien.g...@cm-labs.com wrote:
Hi all,
I'm trying to replace the fixed function texgen for a given effect by
Hi J-S --
Jean-Sébastien Guay wrote:
And then later, in the cull traversal, it does:
_texGen-setPlanesFromMatrix( someMatrix );
This works well on the fixed pipeline. Now my first question when
replacing this by shaders is: I understand I need to replace the
calculation by shader code
Hi Paul,
Or better yet:
gl_TexCoord[1] = texGen * gl_Vertex;
There is a lot of overlap between the object plane equations and the
texture matrix. Originally, the thinking behind the object plane
equations was that you might only be concerned with s and t, so it was
more efficient than
Hi Paul,
I've found the problem.
So you confirm that the fixed function fragment stage will not do
anything special when texgen is active, i.e. that it will only do:
vec4 col = texture2D( tex, gl_TexCoord[1].st );
?
Seems this was not correct, I had to do a transformation:
vec3 texCoord
5 matches
Mail list logo