-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Add adjustments and color correction to Compatibility renderer #91176
Conversation
@@ -1521,6 +1521,7 @@ void main() { | |||
if (alpha < alpha_scissor_threshold) { | |||
discard; | |||
} | |||
alpha = 1.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a bug that became more obvious as a result of enabling post effects.
This code matches the behaviour of the RD renderers:
godot/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl
Lines 1066 to 1068 in 11d3768
#if (defined(ALPHA_SCISSOR_USED) || defined(ALPHA_HASH_USED)) && !defined(ALPHA_ANTIALIASING_EDGE_USED) | |
alpha = 1.0; | |
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! Awesome to have the Compatibility renderer basically feature complete for 4.3 beta! |
@Bimbam360 sorry about that. A bug slipped through and the regular adjustments get disabled unless color correction texture is used. It's fixed already in master and will be fixed in beta 1 |
Thanks for adding this! After glow, this was the last feature missing that brings our project back to full v3 compatibility. |
Fixes: #66457
This is the last of the major features missing from the Compatibility renderer. The remaining features are long term projects (e.g. VoxelGI) or things that won't be supported (e.g. SDFGI).
Using adjustments forces using the post processing pass (which is bad for performance on mobile devices). Originally we wanted to implement this in the scene shader and only use the post processing pass with glow. However, the BCS effects are not suitable for multipass lighting. Brightness, saturation and color correction were broken, but acceptable, but contrast completely breaks to a degree that isn't acceptable. I.e. when using contrast any object with multipass lighting has the reverse of the contrast used.