diff options
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_text_frag.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_text_frag.glsl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_text_frag.glsl b/source/blender/gpu/shaders/gpu_shader_text_frag.glsl new file mode 100644 index 00000000000..7ff90ad4f21 --- /dev/null +++ b/source/blender/gpu/shaders/gpu_shader_text_frag.glsl @@ -0,0 +1,15 @@ + +flat in vec4 color_flat; +noperspective in vec2 texCoord_interp; +out vec4 fragColor; + +uniform sampler2D glyph; + +void main() +{ + // input color replaces texture color + fragColor.rgb = color_flat.rgb; + + // modulate input alpha & texture alpha + fragColor.a = color_flat.a * texture(glyph, texCoord_interp).r; +} |