Fix T74438: Overlay: Loose verts and particle not draw in some conditions
This was caused by a missing output variable for lineOutput. This triggered some undefined behavior.
This commit is contained in:
parent
4d0d43ce8e
commit
3912a2a227
Notes:
blender-bot
2023-02-14 10:21:15 +01:00
Referenced by issue #74438, Mac OS draws object made from only vertices differently from Windows (object 'Display as' mode set to 'WIRE').
|
@ -1,7 +1,8 @@
|
|||
|
||||
in vec4 finalColor;
|
||||
|
||||
out vec4 fragColor;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
layout(location = 1) out vec4 lineOutput;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
@ -9,7 +10,13 @@ void main()
|
|||
float dist = max(centered.x, centered.y);
|
||||
|
||||
float fac = dist * dist * 4.0;
|
||||
fragColor = mix(colorEditMeshMiddle, finalColor, 0.45 + fac * 0.65);
|
||||
/* Non linear blend. */
|
||||
vec4 col1 = sqrt(colorEditMeshMiddle);
|
||||
vec4 col2 = sqrt(finalColor);
|
||||
fragColor = mix(col1, col2, 0.45 + fac * 0.65);
|
||||
fragColor *= fragColor;
|
||||
|
||||
lineOutput = vec4(0.0);
|
||||
|
||||
/* Make the effect more like a fresnel by offsetting
|
||||
* the depth and creating mini-spheres.
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
|
||||
in vec4 finalColor;
|
||||
|
||||
out vec4 fragColor;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
layout(location = 1) out vec4 lineOutput;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
@ -13,4 +14,6 @@ void main()
|
|||
/* Nice sphere falloff. */
|
||||
float intensity = sqrt(1.0 - dist * 2.0) * 0.5 + 0.5;
|
||||
fragColor = finalColor * vec4(intensity, intensity, intensity, 1.0);
|
||||
|
||||
lineOutput = vec4(0.0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue