Open chanoc1 opened 3 months ago
I have found more evidence towards this.
I had a more complicated setup to test this, but I found a way simpler one: override ColorGrading
shader entirely to return float4(1.0, 0, 0, 1.0);
, which should yield full unmodified red (when not set to "Legacy" enum).
However that is not the case, as the red you get instead is 204 0 0
But just like chanoc noticed, if you toggle mat_fullbright 1
on, suddenly, the red is 255 0 0
, just like how it's supposed to be.
There couldn't be a clearer evidence that something is wrong (instead of just potential shading interference where it shouldn't), this means that all tonemapping that isn't Legacy, is applied WITH legacy hable, or some sort of additional tonemapping, EVEN the facepunch's own custom tonemapping algorithms. And when working with LUTs, color grading, or just with tonemapping, this shit is not ideal. please fix
Describe the bug
It seems like tone mapping is always applied, even if it's commented out in
ColorGrading.shader
-- and the debug views also seem to receive tone mapping.To Reproduce
Camera
andPostProcess
component to a GameObject.PostProcess
's mode is set to anything but "Legacy."ColorGrading.shader
, and place it in the project'sshaders
directory.ColorGrading.shader
, comment out lines 452-456, to skip the tonemapping part of the shader entirely.generic
shader, with "Unlit" box checked) material's colors aren't 1:1 with it's texture.Camera
's "Background Color" set in the inspector.Expected behavior
With no tone mapping or post-processing, I expect an unlit material's colors to be the same as it's texture, and for the background color to match the value displayed in the inspector.
Media/Files
Model with an unlit material (using
generic
shader, with "Unlit" box checked) and a flat color background for testing.Albedo view mode with tone mapping disabled as per step 4. Everything looks good, colors are fine.
Lit view mode, with tone mapping still disabled as per step 4. Note how colors on the unlit material and the background have been affected.
Albedo view mode with no shader edit. Note how colors in this mode are affected by tonemapping.
Additional context
I might be reporting two issues in one. It seems like there's always some tone mapping happening regardless of the Tone Map component and
ColorGrading
shader -- and in addition, tone mapping is being applied to the debug views, misrepresenting materials' albedos.For context: I want my colors as close as they can be to the source art, so I'm trying to disable tone mapping (or just use a simple tone mapper that simply clamps values). I don't want the "filmic" or "photographic" look of the available tone mappers since I think they look bad with non photorealistic rendering.