//// BEGIN COMPILER 0 INFO LOG ////

//// END COMPILER 0 INFO LOG ////


//// BEGIN COMPILER 0 OBJ CODE ////
#extension GL_ARB_gpu_shader5 : enable
void initGlobals();
uniform vec3 _uiResolution;
uniform float _uiTime;
uniform float _uiTimeDelta;
uniform int _uiFrame;
uniform float _uiFrameRate;
uniform float _uiChannelTime[4];
uniform vec3 _uiChannelResolution[4];
uniform vec4 _uiMouse;
uniform sampler2D _uiChannel0;
uniform sampler2D _uiChannel1;
uniform sampler2D _uiChannel2;
uniform sampler2D _uiChannel3;
uniform vec4 _uiDate;
uniform float _uiSampleRate;
struct _uChannel {
vec3 _uresolution;
float _utime;
};
uniform _uChannel _uiChannel[4];
void _umainImage(out vec4 _uf, in vec2 _ug);
void main(){
initGlobals();
vec4 _ucolor = vec4(0.0, 0.0, 0.0, 1.0);
_umainImage(_ucolor, gl_FragCoord.xy);
(_ucolor.w = 1.0);
(gl_FragColor = _ucolor);
}
float _usdTorus(in vec3 _up, in vec2 _ut){
vec2 _uq = vec2((length(_up.xz) - _ut.x), _up.y);
return (length(_uq) - _ut.y);
}
vec3 _utri(in vec3 _ux){
return abs(((_ux - floor(_ux)) - 0.5));
}
float _udistort(in vec3 _up){
return dot((_utri((_up + (_uiTime * 0.25))) + sin(_utri((_up + (_uiTime * 0.25))))), vec3(0.66600001, 0.66600001, 0.66600001));
}
float _utrap;
float _umap(in vec3 _up){
(_up.z += 0.2);
(_up += (_udistort((_up * _udistort(_up))) * 0.1));
(_utrap = (dot(sin(_up), (1.0 - abs(_up))) * 1.2));
float _ud = ((-_usdTorus(_up, vec2(1.0, 0.69999999))) + (_udistort(_up) * 0.050000001));
return _ud;
}
vec3 _ucalcNormal(in vec3 _up){
vec2 _ue = vec2(0.0049999999, 0.0);
return normalize(vec3((_umap((_up + _ue.xyy)) - _umap((_up - _ue.xyy))), (_umap((_up + _ue.yxy)) - _umap((_up - _ue.yxy))), (_umap((_up + _ue.yyx)) - _umap((_up - _ue.yyx)))));
}
float _utrace(in vec3 _ur, in vec3 _ud, in float _ustart){
float _um = 0.0;
float _ut = _ustart;
for (int _ui = 0; (_ui < 100); (_ui++))
{
(_um = _umap((_ur + (_ud * _ut))));
(_ut += _um);
if (((_um < 0.0049999999) || (_ut > 40.0)))
{
break;
}
}
return _ut;
}
void _umainImage(out vec4 _uf, in vec2 _ug){
vec2 _uR = _uiResolution.xy;
vec2 _uu = (((_ug + _ug) - _uR) / _uR.y);
vec3 _ur = vec3(0.0, 0.0, 1.0);
vec3 _ud = normalize(vec3(_uu, -1));
vec3 _up = vec3(0.0, 0.0, 0.0);
vec3 _un = vec3(0.0, 0.0, 0.0);
vec3 _ucol = vec3(0.0, 0.0, 0.0);
(_ucol = vec3(0.0, 0.0, 0.0));
float _ut = _utrace(_ur, _ud, 0.0);
(_up = (_ur + (_ud * _ut)));
(_un = _ucalcNormal(_up));
if ((_ut < 40.0))
{
vec3 _uobjcol = vec3((_utrap / abs((1.0 - _utrap))), (_utrap * _utrap), (1.0 - _utrap));
vec3 _ulp = vec3(1.0, 3.0, 3.0);
vec3 _uld = (_ulp - _up);
float _ulen = length(_uld);
float _uatten = max(0.0, (1.0 / (_ulen * _ulen)));
(_uld /= _ulen);
float _uamb = 0.25;
float _udiff = max(0.0, dot(_uld, _un));
float _uspec = pow(max(0.0, dot(reflect((-_uld), _un), _ur)), 8.0);
float _uref = _utrace(_ur, reflect(_ud, _un), 0.024999999);
(_ucol = ((_uobjcol * ((((_udiff * 0.80000001) + (_uamb * 0.80000001)) + (0.1 * _uspec)) + (_uatten * 0.1))) * _uref));
}
(_uf = vec4(_ucol, 1));
}
void initGlobals(){
(_utrap = 0.0);
}

//// END COMPILER 0 OBJ CODE ////


