mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 02:55:36 -05:00
20 lines
361 B
Text
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.);
|
|
}
|
|
}
|