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 User-supplied Normals Being Ignored #100859

Merged

Conversation

StaydMcMuffin
Copy link
Contributor

Fixes: #100820

Due to an oversight on my part, user-supplied normals were being ignored in favor of interpolated vertex normals when normal maps were not also used. The relevant variable, geo_normal, is now initialized after user code instead of before, which is how I should have done it from the start.

Moves the initialization of the geo_normal value
to after the user shader code, so that the normal
supplied by the user is actually used instead of
the interpolated vertex normal.
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for fixing this so quick

@clayjohn clayjohn added this to the 4.4 milestone Dec 27, 2024
@Repiteo Repiteo merged commit 58b48a9 into godotengine:master Dec 30, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Dec 30, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: TBN Vector Fixes break writing sdf shader normals
3 participants