Skip to content

Conversation

@GSterbrant
Copy link
Contributor

Fixes #4971

Shadow map tries to output to wNormal which is an unused attribute. This cause a chain of event which begins with a uniform matrix_normal being unused but not stripped out of the shader code.

@GSterbrant GSterbrant added bug Something isn't working area: graphics Graphics related issue labels Jan 16, 2023
@GSterbrant GSterbrant self-assigned this Jan 16, 2023
Copy link
Contributor

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
Can you please test this with omni a spot shadows for both WebGL1 and WebGL2 .. just making sure we don't do manual slope bias or something similar on GL1 that uses normals. Try both clustered, but especially non-clustered lighting.

@GSterbrant
Copy link
Contributor Author

GSterbrant commented Jan 17, 2023

Tested GL1, GL2, clustered, non clustered and all looks good. We use the derivatives on depth for the polygon offset stuff on GL1 🙂.

@GSterbrant GSterbrant merged commit 64bb365 into main Jan 17, 2023
@GSterbrant GSterbrant deleted the gsterbrant_fix_shadow_map_uses_vertex_normals branch January 17, 2023 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove dependency of shadow vertex shader on matrix_normal

3 participants