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

Avoid default fallback material when using world_vertex_coords #82886

Merged

Conversation

clayjohn
Copy link
Member

@clayjohn clayjohn commented Oct 6, 2023

This avoids z-fighting between the opaque shader and the depth prepass shader

I noticed this bug while looking at #82311

Edit: Fixes: #80917

Weirdly enough we already had the uses_world_coordinates property available, it just wasn't used at all, or set to the correct value.

Using the MRP from #82311

Before
Screenshot from 2023-10-05 19-10-30

After
Screenshot from 2023-10-05 19-10-42

This avoids z-fighting between the opaque shader and the depth prepass shader
@clayjohn clayjohn added bug cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Oct 6, 2023
@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 01:14
@akien-mga akien-mga changed the title Avoid default fallback material when using world_vertex_coords Avoid default fallback material when using world_vertex_coords Oct 6, 2023
@akien-mga akien-mga merged commit 670de08 into godotengine:master Oct 6, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@clayjohn clayjohn deleted the world_vertex_coords-zfighting branch October 6, 2023 21:02
@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Oct 24, 2023
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.3.

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.

GDShader Render_Mode world_vertex_coords requires referencing VERTEX
3 participants