bgfx/3rdparty/glsl-optimizer/tests/fragment/ternary-inES.txt

18 lines
809 B
Text
Raw Normal View History

2012-04-03 23:30:07 -04:00
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 );
2014-02-11 02:06:13 -05:00
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) );
2012-04-03 23:30:07 -04:00
c.x += ( bool( fract( uv.x ) ) ) ? ( 0.900000 ) : ( 0.100000 );
return c;
}
varying highp vec4 xlv_TEXCOORD0;
void main() {
mediump vec4 xl_retval;
2014-02-11 02:06:13 -05:00
xl_retval = xlat_main( vec4(xlv_TEXCOORD0));
gl_FragData[0] = vec4( xl_retval);
2012-04-03 23:30:07 -04:00
}