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

Only perform modelview transform on tangent and binormal when vertex shader is in local space #82892

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

clayjohn
Copy link
Member

@clayjohn clayjohn commented Oct 6, 2023

This doesn't fix a reported issue. Most likely because world_vertex_coords is totally unusable right now (until #82886 is merged).

In master when tangents are used, the tangents and binormals go through a model-to-view space transformation regardless of what space they are in. Therefore, when using skip_vertex_transform, or world_vertex_coords the tangent and binormal will end up in a completely wrong coordinate space and will look totally wrong.

This appears to have come from a typo in the early days of rewriting the renderer for Godot 4.0 8cee770#diff-ab6440873ccc60605b6c0f0bbc3e3bc2d94b7c8238824321a579fb868aebf5cb

@clayjohn clayjohn added this to the 4.2 milestone Oct 6, 2023
@clayjohn clayjohn requested a review from a team as a code owner October 6, 2023 04:11
@akien-mga akien-mga merged commit c05f521 into godotengine:master Oct 6, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@clayjohn clayjohn deleted the tangent-binormal-transform branch October 11, 2023 17:16
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.

2 participants