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 Vertex Attribute Specification Octahedral #54768

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

The-O-King
Copy link
Contributor

@The-O-King The-O-King commented Nov 8, 2021

For octahedral compressed normals/tangents, we use vec4 in the shader
regardless of whether a normal/tangent does/doesn't exist

For the case where we only have a normal vector, we need to specify that
there are only two components being used when calling glVertexAttrib

Before we would always specify that there were 4 components, and used
offsets to determine where in the vertex buffer to read data from but
this doesn't work on all platforms

Bugsquad edit: Fixes #52399.

For octahedral compressed normals/tangents, we use vec4 in the shader
regardless of whether a normal/tangent does/doesn't exist

For the case where we only have a normal vector, we need to specify that
there are only two components being used when calling glVertexAttrib

Before we would always specify that there were 4 components, and used
offsets to determine where in the vertex buffer to read data from but
this doesn't work on all platforms
@akien-mga akien-mga merged commit 2f942ab into godotengine:3.x Nov 8, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.4.1.

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.

4 participants