yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
538231d8
main
1#version 140 2 3#extension GL_ARB_fragment_coord_conventions : require 4#extension GL_ARB_explicit_attrib_location : enable 5 6#ifdef GL_ES 7precision mediump float ; 8#endif 9 10in vec4 i; 11 12layout (origin_upper_left,pixel_center_integer) in vec4 gl_FragCoord; 13layout (location = 0 ) out vec4 myColor; 14 15const float eps = 0.001 ; 16 17void main() 18{ 19myColor = vec4( 0.2 ); 20if (gl_FragCoord. y >= 10 ) { 21myColor. b = 0.8 ; 22} 23if (gl_FragCoord. y == trunc(gl_FragCoord. y )) { 24myColor. g = 0.8 ; 25} 26if (gl_FragCoord. x == trunc(gl_FragCoord. x )) { 27myColor. r = 0.8 ; 28} 29 30vec4 diff = gl_FragCoord - i; 31if (abs(diff. z ) > eps) 32myColor. b = 0.5 ; 33if (abs(diff. w ) > eps) 34myColor. a = 0.5 ; 35 36}