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 incorrect vertex data size calculation in ImmediateMesh #83100

Merged

Conversation

kleonc
Copy link
Member

@kleonc kleonc commented Oct 10, 2023

Fixes #83083.

From #81138:

P = Vertex position
N = normal
T = tangent

// After this PR
PPPPNTNTNTNT

The issue was in ImmediateMesh the buffer was resized only for the PPPP part (normals/tangents were written out of the buffer bounds).

@theraot
Copy link
Contributor

theraot commented Oct 10, 2023

Tested. I can confirm that this fixes the problem at hand.

Addendum: I had to increase extra_cull_margin on my project, I'm guessing this is unrelated.

@clayjohn
Copy link
Member

For production team: This doesn't need to be cherrypicked as the bug is introduced by a PR that shouldn't be cherrypicked.

@akien-mga akien-mga merged commit d0301fc into godotengine:master Oct 10, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@kleonc kleonc deleted the immediate-mesh-vertex-buffer-size-fiz branch October 11, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Error: Size of vertex data provided (*) does not match expected (*)
4 participants