You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
Usually you will never need to convert between linear and SRGB color spaces in user shaders. However, there are a lot of steps along the pipeline and sometimes its useful to use these to check your work. There are also cases where you do want want convert to and from SRGB. Occasionally, SRGB/linear bugs do happen in the actual engine, too, and these nodes can be used to diagnose.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add conversion functions, LinearToSRGB and SRGBToLinear, to the ColorFunc visual shader node.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Copy the linear/srgb functions used by godot, and add them to the ColorFunc node in visualshader.
If this enhancement will not be used often, can it be worked around with a few lines of script?
You could use an expression node with the conversion function. Or, the simple approximations pow(x, 2.2) and pow(x, .45) do work well enough for simple diagnosis of color space mismatches.
Is there a reason why this should be core and not an add-on in the asset library?
Extends the functionality of an existing node.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
Writing shaders
Describe the problem or limitation you are having in your project
Usually you will never need to convert between linear and SRGB color spaces in user shaders. However, there are a lot of steps along the pipeline and sometimes its useful to use these to check your work. There are also cases where you do want want convert to and from SRGB. Occasionally, SRGB/linear bugs do happen in the actual engine, too, and these nodes can be used to diagnose.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add conversion functions, LinearToSRGB and SRGBToLinear, to the ColorFunc visual shader node.
See also #9150.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Copy the linear/srgb functions used by godot, and add them to the ColorFunc node in visualshader.
If this enhancement will not be used often, can it be worked around with a few lines of script?
You could use an expression node with the conversion function. Or, the simple approximations
pow(x, 2.2)
andpow(x, .45)
do work well enough for simple diagnosis of color space mismatches.Is there a reason why this should be core and not an add-on in the asset library?
Extends the functionality of an existing node.
The text was updated successfully, but these errors were encountered: