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 undefined alpha_scissor in standard shader #95536

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

jsjtxietian
Copy link
Contributor

Fixes #95514

@jsjtxietian jsjtxietian requested a review from a team as a code owner August 15, 2024 03:44
@akien-mga akien-mga added bug topic:rendering cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Aug 15, 2024
@akien-mga akien-mga added this to the 4.4 milestone Aug 15, 2024
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, this fixes the shader compilation error.

Testing project: Non-Overlapping Transprancy 2.zip

However, in terms of visuals, it still doesn't look as I'd expect it to. I would expect the shadow opacity to affect the alpha scissor threshold (and ideally not force alpha transparency if alpha scissor transparency is chosen, so you can avoid transparency sorting issues inherent to alpha transparency).

The same goes for alpha hash, although I don't expect this one to be needed as often in this scenario.

Transparency = Alpha (or Disabled, as alpha is forced here)

image

Transparency = Alpha Scissor

image

Transparency = Alpha Hash

image

Transparency = Depth Prepass

image

With an alpha albedo texture applied:

Transparency = Alpha

image

Transparency = Alpha Scissor (threshold = 0.2)

image

Transparency = Alpha Hash

image

Transparency = Depth Prepass

image

@clayjohn
Copy link
Member

@Calinou Can you open an issue with the extra things you noticed? I think this PR should just be for fixing the compilation error

@Calinou
Copy link
Member

Calinou commented Aug 16, 2024

@Calinou Can you open an issue with the extra things you noticed? I think this PR should just be for fixing the compilation error

Done: #95602

@akien-mga akien-mga merged commit 851d0a7 into godotengine:master Aug 16, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@jsjtxietian jsjtxietian deleted the rename-alpha-scissor branch August 16, 2024 13:11
@akien-mga
Copy link
Member

Cherry-picked for 4.3.1.

@akien-mga akien-mga removed the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Sep 16, 2024
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.

StandardMaterial3D reports errors in some settings combinations
4 participants