This commit is contained in:
Never Gude 2026-03-02 22:25:41 +01:00
parent 96f1792c09
commit 4fc1e20fdd
30 changed files with 1045 additions and 39 deletions

View file

@ -0,0 +1,27 @@
#extension GL_OES_standard_derivatives : enable
precision mediump float;
in vec2 uv;
in vec4 type_color;
out vec4 color;
void main(){
float x = (uv.x - 0.5) * 2.0;
float y = (uv.y - 0.5) * 2.0;
float r_squared = x * x + y * y;
float alpha = 1.0;
#ifdef GL_OES_standard_derivatives
float delta = fwidth(r_squared);
alpha = 1.0 - smoothstep(1.0 - delta, 1.0 + delta, r_squared);
color = vec4(type_color.rgb, alpha);
#else
if (r_squared <= 1.0){
color = type_color;
}
else{
color = vec4(0.0, 0.0, 0.0, 0.0);
}
#endif
}