Fix T48663: The Soft Light blend type layer make the color darker in the
3D view There was a misusage of the `outcol` and `texcol` params. The actual formula should have been: incol = facm * outcol + fact * ((one - outcol) * texcol * outcol + outcol * scr); To make sure the result is consistent with material mode, reuse the material blend function (mix_soft), similarly to what most other texture blend modes do.
This commit is contained in:
parent
4cbefde47c
commit
e4efa16b00
Notes:
blender-bot
2023-02-14 07:49:09 +01:00
Referenced by issue #48663, The Soft Light blend type layer make the color darker in the 3D view
|
@ -1142,14 +1142,10 @@ void mtex_rgb_color(vec3 outcol, vec3 texcol, float fact, float facg, out vec3 i
|
|||
|
||||
void mtex_rgb_soft(vec3 outcol, vec3 texcol, float fact, float facg, out vec3 incol)
|
||||
{
|
||||
float facm;
|
||||
vec4 col;
|
||||
|
||||
fact *= facg;
|
||||
facm = 1.0 - fact;
|
||||
|
||||
vec3 one = vec3(1.0);
|
||||
vec3 scr = one - (one - texcol) * (one - outcol);
|
||||
incol = facm * outcol + fact * ((one - texcol) * outcol * texcol + outcol * scr);
|
||||
mix_soft(fact * facg, vec4(outcol, 1.0), vec4(texcol, 1.0), col);
|
||||
incol.rgb = col.rgb;
|
||||
}
|
||||
|
||||
void mtex_rgb_linear(vec3 outcol, vec3 texcol, float fact, float facg, out vec3 incol)
|
||||
|
|
Loading…
Reference in New Issue