mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
30 lines
743 B
Text
30 lines
743 B
Text
uniform float _Angle;
|
|
uniform vec4 _CenterRadius;
|
|
uniform sampler2D _MainTex;
|
|
void main ()
|
|
{
|
|
vec2 tmpvar_1;
|
|
tmpvar_1 = gl_TexCoord[1].xy;
|
|
vec2 uv_2;
|
|
vec2 x_3;
|
|
x_3 = (tmpvar_1 / _CenterRadius.zw);
|
|
float tmpvar_4;
|
|
tmpvar_4 = max (0.0, (1.0 - sqrt(
|
|
dot (x_3, x_3)
|
|
)));
|
|
float tmpvar_5;
|
|
tmpvar_5 = ((tmpvar_4 * tmpvar_4) * _Angle);
|
|
float tmpvar_6;
|
|
tmpvar_6 = sin(tmpvar_5);
|
|
float tmpvar_7;
|
|
tmpvar_7 = cos(tmpvar_5);
|
|
uv_2.x = ((tmpvar_7 * tmpvar_1.x) - (tmpvar_6 * tmpvar_1.y));
|
|
uv_2.y = ((tmpvar_6 * tmpvar_1.x) + (tmpvar_7 * tmpvar_1.y));
|
|
vec2 tmpvar_8;
|
|
tmpvar_8 = (uv_2 + _CenterRadius.xy);
|
|
uv_2 = tmpvar_8;
|
|
gl_FragData[0] = texture2D (_MainTex, tmpvar_8);
|
|
}
|
|
|
|
|
|
// inputs: 1, stats: 16 alu 1 tex 0 flow
|