Shadow Vertex Shader transformations
Aren't these transformations the same? When I use ftransform() to get the vertices into shadow clip space, everything looks ok. However, when I manually apply the Model, View and Projection Matrices all entities' shadows look really wrong while the blocks' shadows stay the same. With wrong I mean that the entities' shadows are in the incorrect position and when I move the player they jump around wildly.
4 Replies
Ok, sooooo....
I used gl_ModelViewMatrix and gl_ProjectionMatrix and now it works properly. I still don't understand why using shadowProjection and shadowModelView was leading to unexpected results though
If this is in the shadow program, the correct matrices to use are the
gl_
ones, not the shadow ones. The shadow ones are when you are outside of the shadow program.Both the shaderLABS Discord server and https://shaders.properties/ have resources regarding that if you're interested.
Thanks
I'll check it out