mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 11:05:36 -05:00
25 lines
500 B
Text
25 lines
500 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;
|
|
}
|
|
|
|
|
|
// inputs: 1, stats: 5 alu 1 tex 2 flow
|