my code to activate/deactivate rod cells.
Code:
float EColorSaturation = grayadaptation < 0.2 ? (grayadaptation < 0.15 ? 0.2 : lerp(-4.21, 25.19, grayadaptation)) : 1.67;
rodcell.y = grayadaptation < 0.2 ? (grayadaptation < 0.15 ? 2.0 : lerp(5.0, -15.0, grayadaptation)) : 1;
rodcell.x = grayadaptation < 0.2 ? (grayadaptation < 0.15 ? 1.8 : lerp(4.2, -11.8, grayadaptation)) : 1;
color.z *= rodcell.y;
color.y *= rodcell.x;
or use power function:
Code:
rodcell.x = grayadaptation < 0.15 ? 0.78 : lerp(0.12, 4.52, grayadaptation);
rodcell.y = grayadaptation < 0.15 ? 0.7 : lerp(-0.2, 5.8, grayadaptation);
color.y = grayadaptation < 0.2 ? pow(color.y, rodcell.x) : color.y;
color.z = grayadaptation < 0.2 ? pow(color.z, rodcell.y) : color.z;
I forgot to turn on adaptation so it didn't work
It deals with which set of cells used to detect colour and brightness but it still doesn't solve the problem with saturation of objects individually.
About saturation of brighter objects, there is a colour code called HSB and another one called HSL.
They are based on hue (the colour), saturation (colour strength) and brightness (lightness for the other one).
But since it will be down to the codes for object shading. I don't think I can change that with enbeffect.fx