Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shadow map using vertex normals. #4985

Merged
merged 1 commit into from
Jan 17, 2023

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 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove dependency of shadow vertex shader on matrix_normal
2 participants