COSC-3P98-Final-Project/include/shaders/text.frag

21 lines
467 B
GLSL
Raw Permalink Normal View History

2023-02-15 00:49:27 -05:00
#ifdef __cplusplus
#include <string>
std::string shader_text_frag = R"("
#version 300 es
precision mediump float;
in vec2 texture_coords;
out vec4 FragColor;
uniform sampler2D character;
2023-02-17 10:55:21 -05:00
uniform vec4 text_color;
uniform vec4 background_color;
2023-02-15 00:49:27 -05:00
void main() {
2023-02-17 10:55:21 -05:00
FragColor = text_color * vec4(1.0, 1.0, 1.0, texture(character, texture_coords).r);
//FragColor = vec4(0.0, 1.0, 0.0, 1.0) * vec4(1.0, 1.0, 1.0, texture(character, texture_coords).r);
2023-02-15 00:49:27 -05:00
}
")";
#endif