yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
2f21fcce
main
1#version 110 2varying vec2 tex_coord ; 3 4void main (void ) 5{ 6vec4 white = vec4 (1.0 ); 7vec4 black = vec4 (0.2 ); 8vec4 color = white ; 9 10// First, cut out our circle 11float x = tex_coord .x * 2.0 - 1.0 ; 12float y = tex_coord .y * 2.0 - 1.0 ; 13 14float radius = sqrt (x * x + y * y ); 15if (radius > 1.0 ) { 16if (radius > 1.1 ) { 17++ color ; 18 } 19 20gl_FragColor = color ; 21 22if (radius > 1.2 ) { 23++ color ; 24 } 25 26 } 27 28discard ; 29 30// If we're near an edge, darken us a tiny bit 31if (radius >=0.75 ) 32color -= abs (pow (radius ,16.0 )/2.0 ); 33 34gl_FragColor = color ; 35 36}