bgfx/3rdparty/glsl-optimizer/tests/fragment/nested-inlining-in.txt
2012-10-07 20:41:18 -07:00

20 lines
361 B
Text

void xll_clip(float x) {
if ( x<0.0 ) discard;
}
uniform vec3 uniVal;
void main() {
vec2 val;
bool useZero = uniVal.x > 1.;
if (useZero){
gl_FragData[0] = vec4(0.);
}
else{
val = uniVal.xy;
xll_clip( (0.00100000 - val.x ) );
xll_clip( (0.00100000 - val.y ) );
gl_FragData[0] = vec4(1.);
}
}