Archived

This topic is now archived and is closed to further replies.

Halo Vortex

Vertex shader and auto-coords-generation

Recommended Posts

I''ve done shadowmapping and it works fine when I have Display Lists and I call them one additional pass for shadow mapping textures, so all the geometry is the same and it has no Z-fighting. But when I have Vertex-shader geometry(for per-pixel lights), it''s MODELVIEW Transformation is slightly different from OpenGL''s native one, so z-fighting occures, therefore I have to make a simple shader to transform Geometry with a given Modelview(so, no-z-fighting), but ALSO just make OpenGL auto-generate teture coords. So how do I make pass auto-coordinates generation into the vertex shader and as well consider GL_TEXTURE_MATRIX, as it''s different from identity? Should I hand-code this process in a Vertex shader? But then, what should I do with these 4 matrix rows I pass into coords-generation? Just transform the vertex by them and take x.y as a texture coordnate? (GL_EYE_PLANE)?

Share this post


Link to post
Share on other sites