Page MenuHome

Hue Saturation node not working properly in Eevee
Closed, ResolvedPublic


System Information
Operating system: Windows 7 64 bit
Graphics card: nvidia geforce gtx 1080

Blender Version
(2.80, 9fa408f51b7, blender2.8, 2018-12-10)

Short description of error
The "Hue Saturation Value" node doesn't work as expected in a World node tree, the highlights are washed out.

Exact steps for others to reproduce the error

  • In Eevee add a new World node tree.
  • Add an "Environment Texture" node, and connect it to the Background color.
  • Add a "Hue Saturation Value" node between the Environment and the Background.
  • Mute the "Hue Saturation Value" node, or switch to Cycles to see how the highlights are washed out.

NB: in Cycles works fine.

Event Timeline

Philipp Oeser (lichtwerk) lowered the priority of this task from 90 to 30.Dec 14 2018, 5:07 PM

Cannot reproduce here.

  • Could you try with the latest buildbot build?
  • If that still doesnt work, could you paste the output of running blender with the --debug-gpu commandline option?

Marking as incomplete until we have that tried...

The problem is still present with c7cc97c7b90 for Windows.

Philipp Oeser (lichtwerk) raised the priority of this task from 30 to 90.Jan 15 2019, 11:44 AM
Sebastian Parborg (zeddb) lowered the priority of this task from 90 to 50.

@Brecht Van Lommel (brecht), I'm not sure if this makes sense color management wise, but the following change seems to fix the issue:

diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 600aa23a50b..26529dce08a 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -858,7 +858,7 @@ void hue_sat(float hue, float sat, float value, float fac, vec4 col, out vec4 ou
 	hsv[0] = fract(hsv[0] + (hue - 0.5));
 	hsv[1] = clamp(hsv[1] * sat, 0.0, 1.0);
-	hsv[2] = clamp(hsv[2] * value, 0.0, 1.0);
+	hsv[2] = hsv[2] * value;
 	hsv_to_rgb(hsv, outcol);

That's correct, V should not be clamped.

I think you can just go ahead and commit this fix by the way.

Yep, will do, just doing something for the spring team right now.