dust3d/thirdparty/instant-meshes/instant-meshes-dust3d/resources/shader_flowline.frag

18 lines
294 B
GLSL

#version 330
precision lowp float;
in fData {
vec4 color;
} frag;
out vec4 outColor;
uniform float alpha;
void main() {
vec3 result = frag.color.rgb;
if (abs(frag.color.a-0.5) < 0.1)
result *= smoothstep(0, 1, abs(frag.color.a-0.5)/0.1) * 0.5 + 0.5;
outColor = vec4(result, alpha);
}