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 clear color's alpha value will affects 2D editor in Compatibility mode #81395

Conversation

jsjtxietian
Copy link
Contributor

Fixes #81382
As @clayjohn suggested, when the rt's transparency is false, force the alpha of the clear color to one.

… mode

When the rt's transparency is false, force the alpha of the clear color to one
@jsjtxietian jsjtxietian requested a review from a team as a code owner September 7, 2023 04:58
@akien-mga akien-mga added bug topic:rendering cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Sep 7, 2023
@akien-mga akien-mga added this to the 4.2 milestone Sep 7, 2023
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Clay is now on holiday, but this implements exactly what he suggested so I'm fairly confident approving it.

There might be other locations where we wrongly use alpha in the GLES3 renderer, but that might be for a later investigation.

@jsjtxietian
Copy link
Contributor Author

jsjtxietian commented Sep 7, 2023

I did some quick search, it seems only texture_storage.cpp in gles3 driver folder has a glClearColor call that might use a non-one alpha value. But that might be for a later investigation.

glClearColor(p_color.r, p_color.g, p_color.b, p_color.a);

@akien-mga akien-mga merged commit 8f3042e into godotengine:master Sep 7, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@jsjtxietian jsjtxietian deleted the fix-clear-color-alpha-value-affect-2d-editor-in-compatibility branch September 7, 2023 15:10
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.3.

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Oct 24, 2023
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.

Clear color alpha value affects 2D editor in Compatibility renderer
3 participants