Shaders now are managed by a manger that can do hot reloading and it also will detect a bad shader and use an ERROR shader so you know it's busted visually.

This commit is contained in:
Zed A. Shaw 2025-04-13 17:11:21 -04:00
parent a5b8e411e3
commit 35ced58cc9
14 changed files with 144 additions and 13 deletions

View file

@ -0,0 +1,18 @@
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform float u_duration;
uniform float u_time;
uniform float u_time_end;
uniform sampler2D texture;
uniform bool is_shape;
void main() {
if(is_shape) {
vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
gl_FragColor = gl_Color * color;
} else {
vec4 pixel = texture2D(texture, gl_TexCoord[0].xy);
vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
gl_FragColor = gl_Color * color * pixel;
}
}