11 static constexpr
const char* vertex = R
"(uniform mat4 u_matrix;
13 layout (location = 0) in vec2 a_pos;
17 gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);
20 v_pos.y = 1.0 - a_pos.y;
23 static constexpr
const char* fragment = R
"(uniform sampler2D u_image;
24 uniform sampler2D u_color_ramp;
25 uniform float u_opacity;
29 float t = texture(u_image, v_pos).r;
30 vec4 color = texture(u_color_ramp, vec2(t, 0.5));
31 fragColor = color * u_opacity;
33 #ifdef OVERDRAW_INSPECTOR
34 fragColor = vec4(0.0);
@ OpenGL
The OpenGL API backend.
BuiltIn
This enum is used with the ShaderSource template to select source code for the desired program and gr...
Select shader source based on a program type and a desired graphics API.