mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
31 lines
653 B
Text
31 lines
653 B
Text
uniform sampler2D maintex;
|
|
uniform float factor;
|
|
varying vec2 uv;
|
|
void main ()
|
|
{
|
|
vec2 coord_1;
|
|
vec4 tmpvar_2;
|
|
tmpvar_2 = texture2D (maintex, uv);
|
|
coord_1 = tmpvar_2.xy;
|
|
bool tmpvar_3;
|
|
tmpvar_3 = (tmpvar_2.w >= 0.5);
|
|
if (!(tmpvar_3)) {
|
|
coord_1.x = (tmpvar_2.x + factor);
|
|
};
|
|
if (tmpvar_3) {
|
|
coord_1.y = (tmpvar_2.y + factor);
|
|
};
|
|
vec4 tmpvar_4;
|
|
tmpvar_4.zw = vec2(0.0, 0.0);
|
|
tmpvar_4.xy = coord_1;
|
|
gl_FragColor = tmpvar_4;
|
|
}
|
|
|
|
|
|
// stats: 5 alu 1 tex 2 flow
|
|
// inputs: 1
|
|
// #0: uv (high float) 2x1 [-1]
|
|
// uniforms: 1 (total size: 0)
|
|
// #0: factor (high float) 1x1 [-1]
|
|
// textures: 1
|
|
// #0: maintex (high 2d) 0x0 [-1]
|