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

23 lines
424 B
GLSL
Raw Permalink Normal View History

#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;
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));
}
")";
#endif