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

CanvasModulate color too bright when using 2D HDR #92796

Closed
reimgrab opened this issue Jun 5, 2024 · 5 comments · Fixed by #93802
Closed

CanvasModulate color too bright when using 2D HDR #92796

reimgrab opened this issue Jun 5, 2024 · 5 comments · Fixed by #93802

Comments

@reimgrab
Copy link

reimgrab commented Jun 5, 2024

Tested versions

Reproducible in 4.2.2
Not reproducible in 3.x

System information

Godot v4.2.2.stable.mono - Ubuntu 22.04.4 LTS 22.04 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1050 Ti (nvidia; 535.171.04) - Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz (4 Threads)

Issue description

When using a CanvasModulate with 2D HDR enabled the modulate color is too bright.
Modulate color 1, 1, 1, 255:
cm

The color should be converted to linear space to get similar results to a CanvasModulate without 2D HDR enabled.

Steps to reproduce

-Add Sprite to project
-Add CanvasModulate to project
-Set modulate color to anything besides pure black or white
-Compare 2D HDR enabled to disabled

Minimal reproduction project (MRP)

cm_mrp.zip

@Calinou
Copy link
Member

Calinou commented Jun 5, 2024

Can you test the latest master branch, now that #92444 was merged?

@reimgrab
Copy link
Author

reimgrab commented Jun 6, 2024

Not fixed in v4.3.beta.custom_build [e96ad5a].

@clayjohn
Copy link
Member

As the OP says, the canvas_modulate just needs to be converted to linear in canvas_render_items() before it is passed to the shader

@feiyue-z
Copy link
Contributor

I tried to convert the values in CanvasModulate from sRGB to linear but then I got this seemingly weird result.
I'm new to the project and I'm not quite sure if this is the expected behavior:
2D HDR off
Screenshot 2024-06-25 at 7 00 18 PM
2D HDR on
Screenshot 2024-06-25 at 6 58 32 PM

@reimgrab
Copy link
Author

reimgrab commented Jun 29, 2024

Did you restart the editor after switching to HDR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants