Files
test/source/blender/gpu/shaders/gpu_shader_3D_polyline_frag.glsl
Clément Foucault 2a7a01b339 GPUShader: Port polyline shaders to use shaderCreateInfo
This should have no functional changes.
2022-05-01 23:54:41 +02:00

16 lines
343 B
GLSL

#pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)
void main()
{
#ifdef CLIP
if (interp.clip < 0.0) {
discard;
}
#endif
fragColor = interp.color;
if (lineSmooth) {
fragColor.a *= clamp((lineWidth + SMOOTH_WIDTH) * 0.5 - abs(interp.smoothline), 0.0, 1.0);
}
fragColor = blender_srgb_to_framebuffer_space(fragColor);
}