Fixed 28-wireframe shader.

This commit is contained in:
Branimir Karadžić 2016-03-01 08:24:58 -08:00
parent 60319d0c52
commit 484b1f5199
3 changed files with 1 additions and 1 deletions

View file

@ -17,7 +17,7 @@ void main()
if (gl_FrontFacing) { opacity *= 0.5; } if (gl_FrontFacing) { opacity *= 0.5; }
vec3 fw = abs(dFdx(v_bc)) + abs(dFdy(v_bc)); vec3 fw = abs(dFdx(v_bc)) + abs(dFdy(v_bc));
vec3 val = smoothstep(vec3_splat(0.0), vec3_splat(fw*thickness), v_bc); vec3 val = smoothstep(vec3_splat(0.0), fw*thickness, v_bc);
float edge = min(min(val.x, val.y), val.z); // Gets to 0.0 around the edges. float edge = min(min(val.x, val.y), val.z); // Gets to 0.0 around the edges.
vec4 rgba = vec4(color, (1.0-edge)*opacity); vec4 rgba = vec4(color, (1.0-edge)*opacity);