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.
No description
4 Replies
plastic.wav
plastic.wavOP2w ago
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
hardester
hardester2w ago
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.
hardester
hardester2w ago
Both the shaderLABS Discord server and https://shaders.properties/ have resources regarding that if you're interested.
Iris Docs
Home
Get started building shaders.
plastic.wav
plastic.wavOP2w ago
Thanks I'll check it out

Did you find this page helpful?