mirror of https://github.com/mosra/magnum.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
558 B
27 lines
558 B
#ifndef NEW_GLSL |
|
#define in varying |
|
#define fragmentColor gl_FragColor |
|
#endif |
|
|
|
#ifdef EXPLICIT_UNIFORM_LOCATION |
|
layout(location = 1) uniform vec3 color; |
|
#else |
|
uniform lowp vec3 color; |
|
#endif |
|
|
|
#ifdef EXPLICIT_TEXTURE_LAYER |
|
layout(binding = 16) uniform sampler2D fontTexture; |
|
#else |
|
uniform lowp sampler2D fontTexture; |
|
#endif |
|
|
|
in vec2 fragmentTextureCoordinates; |
|
|
|
#ifdef NEW_GLSL |
|
out vec4 fragmentColor; |
|
#endif |
|
|
|
void main() { |
|
lowp float intensity = texture(fontTexture, fragmentTextureCoordinates).r; |
|
fragmentColor = vec4(intensity*color, intensity); |
|
}
|
|
|