I create a simple 3D cube, I apply a SpatialMaterial with a red color (#ff4f4f). I create a second cube, with a ShaderMaterial, I put the red color to on albedo.
Why there are differents ?
Source code : https://we.tl/t-ZyIj6tvZxX
I forgot the result image !
I feel more like a bug, the color read from the picture or setting color can have different effects
Did you give it the color hint on the exported variable? If not IIRC it won't be color managed.
I found the root cause is the problem caused by the color space used
This is the reason for the different colors
Got it, GLSL and Godot don't use the same color space. Uniform can be used to make proper conversion.
No it's the hint after the uniform that tells godot to handle the color management. Otherwise you'll just have to manually do that in your shader yourself.