mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
17 lines
809 B
Text
17 lines
809 B
Text
mediump vec4 xlat_main( in highp vec4 uv );
|
|
mediump vec4 xlat_main( in highp vec4 uv ) {
|
|
mediump vec4 c;
|
|
c = vec4( 0.000000);
|
|
c += ( (uv.x > 0.500000) ) ? ( 0.900000 ) : ( 0.100000 );
|
|
c += ( (uv.x > 0.500000) ) ? ( vec4( 0.900000, 0.900000, 0.900000, 0.900000) ) : ( vec4( 0.100000, 0.100000, 0.100000, 0.100000) );
|
|
c.xyz += ( (uv.x > 0.500000) ) ? ( vec3( 0.900000, 0.900000, 0.900000) ) : ( vec3( 0.100000, 0.100000, 0.100000) );
|
|
c.xy += ( (uv.x > 0.500000) ) ? ( vec2( 0.900000, 0.900000) ) : ( vec2( 0.100000, 0.100000) );
|
|
c.x += ( bool( fract( uv.x ) ) ) ? ( 0.900000 ) : ( 0.100000 );
|
|
return c;
|
|
}
|
|
varying highp vec4 xlv_TEXCOORD0;
|
|
void main() {
|
|
mediump vec4 xl_retval;
|
|
xl_retval = xlat_main( vec4(xlv_TEXCOORD0));
|
|
gl_FragData[0] = vec4( xl_retval);
|
|
}
|