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

Use a full screen triangle for mipmap calculations in mobile renderer #91480

Merged
merged 1 commit into from
May 7, 2024

Conversation

clayjohn
Copy link
Member

@clayjohn clayjohn commented May 2, 2024

Fixes: #88786
Fixes: #88585
Fixes: #90818
Fixes: #91474

Regression introduced by #80311. What was happening here is that inside the shader we were expecting to render a full screen triangle. So we expect three points (0, 1, 2) to draw one triangle. Instead we pass an index array to draw a quad. So we draw the triangle with another triangle on top. BUT the triangle on top contains a vertex that is undefined because it results from an out of bound array access. Some hardware seems to just kill that triangle and work correctly (my intel iGPU does this). Other hardware sets that vertex to (0,0,0) (i.e. in the middle of the screen). Since the UVs of the second triangle don't make sense, you end up with that weird triangle floating at the top of the texture.

@clayjohn clayjohn added bug topic:rendering regression topic:3d cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels May 2, 2024
@clayjohn clayjohn added this to the 4.3 milestone May 2, 2024
@clayjohn clayjohn requested a review from a team as a code owner May 2, 2024 20:30
@akien-mga akien-mga merged commit 259d576 into godotengine:master May 7, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@clayjohn clayjohn deleted the Mobile-mipmaps-bug branch May 8, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment