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/gpu/shaders/gpu_shader_text_frag.glsl

23 lines
490 B
GLSL
Raw Normal View History

#if __VERSION__ == 120
flat varying vec4 color_flat;
noperspective varying vec2 texCoord_interp;
#define fragColor gl_FragColor
#else
flat in vec4 color_flat;
noperspective in vec2 texCoord_interp;
out vec4 fragColor;
#define texture2D texture
#endif
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 * texture2D(glyph, texCoord_interp).a;
}