This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/draw/modes/shaders/overlay_face_wireframe_frag.glsl
Campbell Barton e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00

24 lines
440 B
GLSL

uniform vec3 wireColor;
uniform vec3 rimColor;
flat in float edgeSharpness;
in float facing;
out vec4 fragColor;
void main()
{
if (edgeSharpness < 0.0) {
discard;
}
float facing_clamped = clamp(abs(facing), 0.0, 1.0);
vec3 final_front_col = mix(rimColor, wireColor, 0.4);
vec3 final_rim_col = mix(rimColor, wireColor, 0.1);
fragColor.rgb = mix(final_rim_col, final_front_col, facing_clamped);
fragColor.a = 1.0f;
}