mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
15 lines
290 B
Text
15 lines
290 B
Text
|
uniform sampler2D maintex;
|
||
|
uniform float factor;
|
||
|
varying vec2 uv;
|
||
|
void main()
|
||
|
{
|
||
|
vec4 c = texture2D (maintex, uv);
|
||
|
vec2 coord = c.xy;
|
||
|
bool cond = c.w >= 0.5;
|
||
|
if (!cond)
|
||
|
coord.x += factor;
|
||
|
if (cond)
|
||
|
coord.y += factor;
|
||
|
gl_FragColor = vec4(coord,0,0);
|
||
|
}
|