I have this very simple cube. The only material it has is a single color diffuse BSDF, and the only light in the scene is a white sun light:
But to my surprise, the RGB values are not proportional:
0.447 / 0.682
is about 0.656
, but 0.612 / 0.816
is 0.75
!
I’ve checked the source code of diffuse BSDF:
#include "stdcycles.h"
shader node_diffuse_bsdf(color Color = 0.8,
float Roughness = 0.0,
normal Normal = N,
output closure color BSDF = 0)
{
if (Roughness == 0.0)
BSDF = Color * diffuse(Normal);
else
BSDF = Color * oren_nayar(Normal, Roughness);
}
It’s a very simple arithmetic operation. Just multiply the vertex color by the light. But as shown above, the final result is clearly not that simple. Otherwise the ratio between every color channel would remain the same.
What did I miss? Where is the “magic” happening?