Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/shaders/gpu_shader_3D_polyline_frag.glsl
| #pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl) | #pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl) | ||||
| void main() | void main() | ||||
| { | { | ||||
| #ifdef CLIP | #ifdef CLIP | ||||
| if (interp.clip < 0.0) { | if (interp.clip < 0.0) { | ||||
| discard; | discard; | ||||
| } | } | ||||
| #endif | #endif | ||||
| fragColor = interp.color; | fragColor = interp.final_color; | ||||
| if (lineSmooth) { | if (lineSmooth) { | ||||
| fragColor.a *= clamp((lineWidth + SMOOTH_WIDTH) * 0.5 - abs(interp.smoothline), 0.0, 1.0); | fragColor.a *= clamp((lineWidth + SMOOTH_WIDTH) * 0.5 - abs(interp.smoothline), 0.0, 1.0); | ||||
| } | } | ||||
| fragColor = blender_srgb_to_framebuffer_space(fragColor); | fragColor = blender_srgb_to_framebuffer_space(fragColor); | ||||
| } | } | ||||