#forced srgb ruining colors
1 messages · Page 1 of 1 (latest)
: source_color seemed to fix it
cant wait to color pick it later and find out its still wrong
it is
if the hint_normal displays it brighter that means that the scene is being rendered as srgb
is there a way to disable that?
if not then this should be a setting
because you cant round trip srgb to linear losslessly
you can always make linear look like any other colorspace
why does so much crap force srgb with no option to disable it
Have you looked at the texture's import settings ?
Does your environment has gamma correction ?
even with an unshaded material, it might still apply gamma correction afterwards
import settings doesnt have anything for texture color space
and i dont think im doing any gamma stuff since i can get blender to match gimp colors exactly
yeah no godot renders in srgb not linear
if you do
ALBEDO = vec3(0.5,0.5,0.5);
then you get
0.851, 0.851, 0.851
if i do albedo = 0.5 then i expect to get 0.5 back
not literally more then a quarter more
oh it gets even fuckier
shader code = 0.5
viewport display = 0.851
game display = 0.737
i want to recreate 3ds materials
and i cant do that pixel perfectly if the colors are constantly being hijacked to be srgb
This is the environment post-processing your scene
yor spatial shader outputs the right color
then the scene environment perform some configurable post processing
in the editor there is a togglable default environment to preview meshes with some lighting even if the scene doesn't have lighting
yo can toggle it and configure it here
with the environment i also have the "incorrect" color :
with the environment off i have the right color
It's the tonemapping algorithm that seem to be doing that
🤔
since you have a different value in your in-game scene, check the tonemapping settings of your environment
Linear seems good
the most i can get is 188
in editor and in game
i have those first ones disabled and a worldenvironment node with the tonemap set to linear
wonder if this is a 4.5.1 thing
forward+?
yes, my mesh material is a simple Spatial material with shading mode to Unshaded and albedo to 128,128,128
yep
ah yes i reproduce the bug with your shader
whats the difference?
on the right it's a default spatial material
this is mind boggling
i understand your frustration
it looks like a bug to me because the documentation explicitely says :
🤦♂️ found it
this works
conversion though
srgb to linear is in most cases ive seen lossy
Maybe you can avoid having ANY post processing effects by setting a custom compositor in the environment
well at least now we understand the issue, good luck finding a workaround.
(i wonder if does 2D rendering has the same issue ?)
2D rendering seems to be linear, and draws exactly the colors of the texture. Godot converts automatically everything to srgb for 3D
here is the exact issue you have, discussed in 2022
https://github.com/godotengine/godot/issues/57325
here is another relevant post from stackoverflow :
https://stackoverflow.com/questions/61051747/linear-gamma-v-s-srgb-texture-workflow-in-godot
I don't know how much this helps, but I had a similar issue with coloring when it comes to GPU particles and its shader. I ended up having to create a gradient texture 1d with the whole thing a solid color of what I desired. I don't know why, but godot really struggles with sRGB conversions.
It makes sense that the compatibility renderer doesn't do it since it uses OpenGL instead of Vulkan.
One of the main developers of Godot explained the behavior in the stackoverflow post i shared previously :
This is intended, since the Vulkan renderer uses bindless textures. sRGB conversion is now done directly when rendering the texture rather than when importing it. This allows using the same texture in both 2D and 3D contexts and having it look correct in both. Likewise, in Godot 4.0, you'll be able to use the same texture with and without filtering without having to make a copy of it.