2023-02-12 15:25:52 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
#include <string>
|
|
|
|
std::string shader_chunk_frag = R"("
|
|
|
|
#version 300 es
|
|
|
|
precision mediump float;
|
|
|
|
|
|
|
|
out vec4 FragColor;
|
|
|
|
|
2023-03-04 23:24:36 -05:00
|
|
|
in vec2 uv;
|
2023-03-05 00:01:54 -05:00
|
|
|
in float index;
|
2023-03-04 23:24:36 -05:00
|
|
|
|
|
|
|
uniform mediump sampler2DArray texturep_palette;
|
|
|
|
|
2023-02-12 15:25:52 -05:00
|
|
|
void main() {
|
|
|
|
/** if (gl_fragcoord * gl_fragcoord < vec2(5, 5))
|
|
|
|
FragColor = vec4(1.0f, 0.5f, 0.2f, 1.0f);
|
|
|
|
else
|
|
|
|
discard;*/
|
2023-03-05 00:01:54 -05:00
|
|
|
FragColor = texture(texturep_palette, vec3(uv, index));
|
2023-02-12 15:25:52 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
")";
|
|
|
|
#endif
|