2023-04-01 15:48:31 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
#include <string>
|
|
|
|
std::string shader_frag = R"("
|
|
|
|
#version 460
|
2023-04-02 14:52:03 -04:00
|
|
|
precision mediump float;
|
2023-04-01 15:48:31 -04:00
|
|
|
|
|
|
|
in vec2 uv_;
|
2023-04-02 14:52:03 -04:00
|
|
|
in float index;
|
2023-04-01 15:48:31 -04:00
|
|
|
|
|
|
|
out vec4 out_color;
|
|
|
|
|
2023-04-02 14:52:03 -04:00
|
|
|
uniform mediump sampler2DArray texture_array;
|
|
|
|
|
2023-04-01 15:48:31 -04:00
|
|
|
void main() {
|
2023-04-02 14:52:03 -04:00
|
|
|
//out_color = vec4(uv_, 0.0, 1.0);
|
|
|
|
out_color = texture(texture_array, vec3(uv_, index));
|
|
|
|
|
2023-04-04 22:02:11 -04:00
|
|
|
// discard disables early depth testing!
|
|
|
|
//if (out_color.a < 0.1)
|
|
|
|
// discard;
|
2023-04-01 15:48:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
")";
|
|
|
|
#endif
|