There was a Full Shading bool that was shared across the WP, VP and TP modes. This commit makes some changes: - Replace the bool with a factor. This gives the user more control on the visibility. - Also draw it on top of the Material and Rendered mode so the user can control what he needs. In certain cases you don't want to see the final rendered material, but the actual texture. - Removed the skipping of objects when in paint modes. As now the paint modes are blended.
18 lines
344 B
GLSL
18 lines
344 B
GLSL
|
|
in vec3 finalColor;
|
|
|
|
out vec4 fragColor;
|
|
uniform float alpha = 1.0;
|
|
vec3 linear_to_srgb_attrib(vec3 c) {
|
|
c = max(c, vec3(0.0));
|
|
vec3 c1 = c * 12.92;
|
|
vec3 c2 = 1.055 * pow(c, vec3(1.0 / 2.4)) - 0.055;
|
|
return mix(c1, c2, step(vec3(0.0031308), c));
|
|
}
|
|
|
|
void main()
|
|
{
|
|
fragColor.rgb = linear_to_srgb_attrib(finalColor);
|
|
fragColor.a = alpha;
|
|
}
|