Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/shaders/gpu_shader_2D_nodelink_frag.glsl
| Show All 20 Lines | if ((isMainLine != 0) && (dashFactor < 1.0)) { | ||||
| float slope = 1.0 / (2.0 * t); | float slope = 1.0 / (2.0 * t); | ||||
| float unclamped_alpha = 1.0 - slope * (normalized_distance_triangle - dashFactor + t); | float unclamped_alpha = 1.0 - slope * (normalized_distance_triangle - dashFactor + t); | ||||
| float alpha = max(dashAlpha, min(unclamped_alpha, 1.0)); | float alpha = max(dashAlpha, min(unclamped_alpha, 1.0)); | ||||
| fragColor.a *= alpha; | fragColor.a *= alpha; | ||||
| } | } | ||||
| fragColor.a *= smoothstep(1.0, 0.1, abs(colorGradient)); | fragColor.a *= smoothstep(lineThickness, lineThickness - 0.6, abs(colorGradient)); | ||||
| } | } | ||||