2024-01-02 02:38:56 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
#include <string>
|
|
|
|
const std::string shader_2d_textured_frag = R"("
|
|
|
|
#version 300 es
|
|
|
|
precision mediump float;
|
|
|
|
|
2024-05-04 03:15:43 -04:00
|
|
|
layout (location = 0) out vec4 FragColor;
|
2024-05-13 22:24:06 -04:00
|
|
|
//layout (location = 1) out vec4 OutMask;
|
2024-01-02 02:38:56 -05:00
|
|
|
in vec2 uv;
|
|
|
|
in vec2 pos;
|
|
|
|
|
|
|
|
uniform sampler2D tex;
|
|
|
|
uniform vec4 color;
|
|
|
|
uniform vec4 use_texture;
|
2024-05-13 22:24:06 -04:00
|
|
|
//uniform vec4 outline_color;
|
2024-01-02 02:38:56 -05:00
|
|
|
|
|
|
|
vec4 linear_iter(vec4 i, vec4 p, float factor){
|
|
|
|
return (i + p) * factor;
|
|
|
|
}
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
FragColor = (texture(tex, uv) * use_texture) + color;
|
2024-05-13 22:24:06 -04:00
|
|
|
//OutMask = outline_color;
|
|
|
|
//OutMask.a = FragColor.a;
|
2024-01-02 02:38:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
")";
|
|
|
|
#endif
|