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

Fixed Subtract blend mode of Forward+ and Mobile renderers #77520

Merged
merged 1 commit into from May 26, 2023

Conversation

allenwp
Copy link
Contributor

@allenwp allenwp commented May 26, 2023

Changed Subtract blend mode of Forward+ and Mobile renderers to match behaviour of the Godot 3 and Compatibility renderers.

The OpenGL implementation has used GL_FUNC_REVERSE_SUBTRACT for a long time, but the new RenderingDevice abstraction used by the Vulkan renderers had been mistakenly set to BLEND_OP_SUBTRACT instead of BLEND_OP_REVERSE_SUBTRACT.

Fixes #77448

… behaviour of the Godot 3 and Compatibility renderers

The OpenGL implementation has used GL_FUNC_REVERSE_SUBTRACT for a long time, but the new RenderingDevice abstraction used by the Vulkan renderers had been mistakenly set to BLEND_OP_SUBTRACT instead of BLEND_OP_REVERSE_SUBTRACT.

Fixes godotengine#77448
@allenwp allenwp requested review from a team as code owners May 26, 2023 14:55
@akien-mga akien-mga added this to the 4.1 milestone May 26, 2023
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Note for production team: This technically breaks compatibility as it will change the behaviour of any material using BLEND_MODE_SUB. However, the break in compatibility is needed to make this feature work properly. Accordingly, I have not tagged this to cherrypick to 4.0, it should be merged for 4.1 only

@akien-mga akien-mga merged commit 8267dbb into godotengine:master May 26, 2023
13 checks passed
@akien-mga
Copy link
Member

Thanks!

@allenwp allenwp deleted the subtract-blend-mode-fix branch May 26, 2023 16:18
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.

Subtract blend mode produces different results with different renderers
3 participants