yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
3357d870
main-tot
1#version 310 es 2#extension GL_EXT_tessellation_shader : require 3#extension GL_EXT_gpu_shader5 : require 4 5layout ( triangles , equal_spacing ) in ; 6 7layout ( location = 0 ) in highp vec2 in_te_position [] ; 8 9layout ( location = 0 ) out mediump vec4 in_f_color ; 10 11precise gl_Position ; 12 13void main ( void ) { 14highp vec2 pos = gl_TessCoord . x * in_te_position [ 0 ] + 15gl_TessCoord . y * in_te_position [ 1 ] + 16gl_TessCoord . z * in_te_position [ 2 ] ; 17 18highp float f = 19sqrt ( 3.0 * min ( gl_TessCoord . x , min ( gl_TessCoord . y , gl_TessCoord . z ))) * 200.5 + 210.5 ; 22in_f_color = vec4 ( gl_TessCoord * f , 1.0 ) ; 23 24// Offset the position slightly, based on the parity of the bits in the float 25// representation. 26// This is done to detect possible small differences in edge vertex positions 27// between patches. 28uvec2 bits = floatBitsToUint ( pos ) ; 29uint numBits = 0u ; 30for ( uint i = 0u ; i < 32u ; i ++ ) 31numBits += 32(( bits [ 0 ] << i ) & 1u ) + (( bits [ 1 ] << i ) & 1u ) ; 33pos += float ( numBits & 1u ) * 0.04 ; 34 35gl_Position = vec4 ( pos , 0.0 , 1.0 ) ; 36}