Gobligine/tools/shaders/xbr-lv2-noblend.cg.glsl
2016-05-26 01:57:32 +02:00

448 lines
17 KiB
GLSL

// GLSL shader autogenerated by cg2glsl.py.
#if defined(VERTEX)
#if __VERSION__ >= 130
#define COMPAT_VARYING out
#define COMPAT_ATTRIBUTE in
#define COMPAT_TEXTURE texture
#else
#define COMPAT_VARYING varying
#define COMPAT_ATTRIBUTE attribute
#define COMPAT_TEXTURE texture2D
#endif
#ifdef GL_ES
#define COMPAT_PRECISION mediump
#else
#define COMPAT_PRECISION
#endif
COMPAT_VARYING vec4 _t7;
COMPAT_VARYING vec4 _t6;
COMPAT_VARYING vec4 _t5;
COMPAT_VARYING vec4 _t4;
COMPAT_VARYING vec4 _t3;
COMPAT_VARYING vec4 _t2;
COMPAT_VARYING vec4 _t1;
COMPAT_VARYING vec2 _texCoord1;
COMPAT_VARYING vec4 _color1;
COMPAT_VARYING vec4 _position1;
struct input_dummy {
vec2 _video_size;
vec2 _texture_size;
vec2 _output_dummy_size;
};
struct out_vertex {
vec4 _position1;
vec4 _color1;
vec2 _texCoord1;
vec4 _t1;
vec4 _t2;
vec4 _t3;
vec4 _t4;
vec4 _t5;
vec4 _t6;
vec4 _t7;
};
out_vertex _ret_0;
input_dummy _IN1;
vec4 _r0006;
COMPAT_ATTRIBUTE vec4 gl_Vertex;
COMPAT_ATTRIBUTE vec4 COLOR;
COMPAT_ATTRIBUTE vec4 gl_MultiTexCoord0;
COMPAT_VARYING vec4 COL0;
COMPAT_VARYING vec4 TEX0;
COMPAT_VARYING vec4 TEX1;
COMPAT_VARYING vec4 TEX2;
COMPAT_VARYING vec4 TEX3;
COMPAT_VARYING vec4 TEX4;
COMPAT_VARYING vec4 TEX5;
COMPAT_VARYING vec4 TEX6;
COMPAT_VARYING vec4 TEX7;
uniform int FrameDirection;
uniform int FrameCount;
uniform COMPAT_PRECISION vec2 OutputSize;
uniform COMPAT_PRECISION vec2 TextureSize;
uniform COMPAT_PRECISION vec2 InputSize;
void main()
{
out_vertex _OUT;
vec2 _ps;
_r0006 = gl_Vertex.x*gl_ModelViewProjectionMatrix[0];
_r0006 = _r0006 + gl_Vertex.y*gl_ModelViewProjectionMatrix[1];
_r0006 = _r0006 + gl_Vertex.z*gl_ModelViewProjectionMatrix[2];
_r0006 = _r0006 + gl_Vertex.w*gl_ModelViewProjectionMatrix[3];
_ps = vec2(1.00000000E+00/TextureSize.x, 1.00000000E+00/TextureSize.y);
_OUT._t1 = gl_MultiTexCoord0.xxxy + vec4(-_ps.x, 0.00000000E+00, _ps.x, -2.00000000E+00*_ps.y);
_OUT._t2 = gl_MultiTexCoord0.xxxy + vec4(-_ps.x, 0.00000000E+00, _ps.x, -_ps.y);
_OUT._t3 = gl_MultiTexCoord0.xxxy + vec4(-_ps.x, 0.00000000E+00, _ps.x, 0.00000000E+00);
_OUT._t4 = gl_MultiTexCoord0.xxxy + vec4(-_ps.x, 0.00000000E+00, _ps.x, _ps.y);
_OUT._t5 = gl_MultiTexCoord0.xxxy + vec4(-_ps.x, 0.00000000E+00, _ps.x, 2.00000000E+00*_ps.y);
_OUT._t6 = gl_MultiTexCoord0.xyyy + vec4(-2.00000000E+00*_ps.x, -_ps.y, 0.00000000E+00, _ps.y);
_OUT._t7 = gl_MultiTexCoord0.xyyy + vec4(2.00000000E+00*_ps.x, -_ps.y, 0.00000000E+00, _ps.y);
_ret_0._position1 = _r0006;
_ret_0._color1 = COLOR;
_ret_0._texCoord1 = gl_MultiTexCoord0.xy;
_ret_0._t1 = _OUT._t1;
_ret_0._t2 = _OUT._t2;
_ret_0._t3 = _OUT._t3;
_ret_0._t4 = _OUT._t4;
_ret_0._t5 = _OUT._t5;
_ret_0._t6 = _OUT._t6;
_ret_0._t7 = _OUT._t7;
gl_Position = _r0006;
COL0 = COLOR;
TEX0.xy = gl_MultiTexCoord0.xy;
TEX1 = _OUT._t1;
TEX2 = _OUT._t2;
TEX3 = _OUT._t3;
TEX4 = _OUT._t4;
TEX5 = _OUT._t5;
TEX6 = _OUT._t6;
TEX7 = _OUT._t7;
return;
COL0 = _ret_0._color1;
TEX0.xy = _ret_0._texCoord1;
TEX1 = _ret_0._t1;
TEX2 = _ret_0._t2;
TEX3 = _ret_0._t3;
TEX4 = _ret_0._t4;
TEX5 = _ret_0._t5;
TEX6 = _ret_0._t6;
TEX7 = _ret_0._t7;
}
#elif defined(FRAGMENT)
#if __VERSION__ >= 130
#define COMPAT_VARYING in
#define COMPAT_TEXTURE texture
out vec4 FragColor;
#else
#define COMPAT_VARYING varying
#define FragColor gl_FragColor
#define COMPAT_TEXTURE texture2D
#endif
#ifdef GL_ES
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
#define COMPAT_PRECISION mediump
#else
#define COMPAT_PRECISION
#endif
COMPAT_VARYING vec4 _t7;
COMPAT_VARYING vec4 _t6;
COMPAT_VARYING vec4 _t5;
COMPAT_VARYING vec4 _t4;
COMPAT_VARYING vec4 _t3;
COMPAT_VARYING vec4 _t2;
COMPAT_VARYING vec4 _t1;
COMPAT_VARYING vec2 _texCoord;
COMPAT_VARYING vec4 _color;
struct input_dummy {
vec2 _video_size;
vec2 _texture_size;
vec2 _output_dummy_size;
};
struct out_vertex {
vec4 _color;
vec2 _texCoord;
vec4 _t1;
vec4 _t2;
vec4 _t3;
vec4 _t4;
vec4 _t5;
vec4 _t6;
vec4 _t7;
};
vec4 _ret_0;
float _TMP42;
vec3 _TMP35;
vec3 _TMP37;
vec3 _TMP39;
vec3 _TMP40;
vec3 _TMP38;
vec3 _TMP36;
vec3 _TMP29;
vec3 _TMP31;
vec3 _TMP33;
vec3 _TMP34;
vec3 _TMP32;
vec3 _TMP30;
bvec4 _TMP26;
bvec4 _TMP23;
vec4 _TMP20;
vec4 _TMP19;
vec4 _TMP18;
vec4 _TMP17;
vec4 _TMP16;
vec4 _TMP15;
vec4 _TMP14;
vec4 _TMP13;
vec4 _TMP12;
vec4 _TMP11;
vec4 _TMP10;
vec4 _TMP9;
vec4 _TMP8;
vec4 _TMP7;
vec4 _TMP6;
vec4 _TMP5;
vec4 _TMP4;
vec4 _TMP3;
vec4 _TMP2;
vec4 _TMP1;
vec4 _TMP0;
uniform sampler2D Texture;
input_dummy _IN1;
vec2 _x0061;
vec4 _r0105;
vec4 _r0115;
vec4 _r0125;
vec4 _r0135;
vec4 _r0145;
vec4 _r0155;
vec4 _TMP166;
vec4 _a0169;
vec4 _TMP170;
vec4 _a0173;
vec4 _TMP174;
vec4 _a0177;
vec4 _TMP178;
vec4 _a0181;
vec4 _TMP182;
vec4 _a0185;
vec4 _TMP188;
vec4 _a0191;
vec4 _TMP192;
vec4 _a0195;
vec4 _TMP196;
vec4 _a0199;
vec4 _TMP200;
vec4 _a0203;
vec4 _TMP204;
vec4 _a0207;
vec4 _TMP208;
vec4 _a0211;
vec4 _TMP212;
vec4 _a0215;
vec4 _TMP218;
vec4 _a0221;
vec4 _TMP222;
vec4 _a0225;
vec4 _TMP226;
vec4 _a0229;
vec4 _TMP232;
vec4 _a0235;
vec4 _TMP236;
vec4 _a0239;
vec4 _TMP240;
vec4 _a0243;
vec2 _r0245;
vec2 _a0251;
COMPAT_VARYING vec4 TEX0;
COMPAT_VARYING vec4 TEX1;
COMPAT_VARYING vec4 TEX2;
COMPAT_VARYING vec4 TEX3;
COMPAT_VARYING vec4 TEX4;
COMPAT_VARYING vec4 TEX5;
COMPAT_VARYING vec4 TEX6;
COMPAT_VARYING vec4 TEX7;
uniform int FrameDirection;
uniform int FrameCount;
uniform COMPAT_PRECISION vec2 OutputSize;
uniform COMPAT_PRECISION vec2 TextureSize;
uniform COMPAT_PRECISION vec2 InputSize;
void main()
{
bvec4 _edri;
bvec4 _edr;
bvec4 _edr_left;
bvec4 _edr_up;
bvec4 _px;
bvec4 _interp_restriction_lv1;
bvec4 _interp_restriction_lv2_left;
bvec4 _interp_restriction_lv2_up;
bvec4 _nc;
bvec4 _fx;
bvec4 _fx_left;
bvec4 _fx_up;
vec2 _fp;
vec4 _wd1;
vec4 _wd2;
vec2 _df12;
vec3 _res;
_x0061 = TEX0.xy*TextureSize;
_fp = fract(_x0061);
_TMP0 = COMPAT_TEXTURE(Texture, TEX1.xw);
_TMP1 = COMPAT_TEXTURE(Texture, TEX1.yw);
_TMP2 = COMPAT_TEXTURE(Texture, TEX1.zw);
_TMP3 = COMPAT_TEXTURE(Texture, TEX2.xw);
_TMP4 = COMPAT_TEXTURE(Texture, TEX2.yw);
_TMP5 = COMPAT_TEXTURE(Texture, TEX2.zw);
_TMP6 = COMPAT_TEXTURE(Texture, TEX3.xw);
_TMP7 = COMPAT_TEXTURE(Texture, TEX3.yw);
_TMP8 = COMPAT_TEXTURE(Texture, TEX3.zw);
_TMP9 = COMPAT_TEXTURE(Texture, TEX4.xw);
_TMP10 = COMPAT_TEXTURE(Texture, TEX4.yw);
_TMP11 = COMPAT_TEXTURE(Texture, TEX4.zw);
_TMP12 = COMPAT_TEXTURE(Texture, TEX5.xw);
_TMP13 = COMPAT_TEXTURE(Texture, TEX5.yw);
_TMP14 = COMPAT_TEXTURE(Texture, TEX5.zw);
_TMP15 = COMPAT_TEXTURE(Texture, TEX6.xy);
_TMP16 = COMPAT_TEXTURE(Texture, TEX6.xz);
_TMP17 = COMPAT_TEXTURE(Texture, TEX6.xw);
_TMP18 = COMPAT_TEXTURE(Texture, TEX7.xy);
_TMP19 = COMPAT_TEXTURE(Texture, TEX7.xz);
_TMP20 = COMPAT_TEXTURE(Texture, TEX7.xw);
_r0105.x = dot(_TMP4.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0105.y = dot(_TMP6.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0105.z = dot(_TMP10.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0105.w = dot(_TMP8.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0115.x = dot(_TMP5.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0115.y = dot(_TMP3.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0115.z = dot(_TMP9.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0115.w = dot(_TMP11.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0125.x = dot(_TMP7.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0125.y = dot(_TMP7.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0125.z = dot(_TMP7.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0125.w = dot(_TMP7.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0135.x = dot(_TMP20.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0135.y = dot(_TMP2.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0135.z = dot(_TMP15.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0135.w = dot(_TMP12.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0145.x = dot(_TMP14.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0145.y = dot(_TMP18.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0145.z = dot(_TMP0.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0145.w = dot(_TMP17.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0155.x = dot(_TMP13.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0155.y = dot(_TMP19.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0155.z = dot(_TMP1.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0155.w = dot(_TMP16.xyz, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_fx = bvec4((vec4( 1.00000000E+00, -1.00000000E+00, -1.00000000E+00, 1.00000000E+00)*_fp.y + vec4( 1.00000000E+00, 1.00000000E+00, -1.00000000E+00, -1.00000000E+00)*_fp.x).x > 1.50000000E+00, (vec4( 1.00000000E+00, -1.00000000E+00, -1.00000000E+00, 1.00000000E+00)*_fp.y + vec4( 1.00000000E+00, 1.00000000E+00, -1.00000000E+00, -1.00000000E+00)*_fp.x).y > 5.00000000E-01, (vec4( 1.00000000E+00, -1.00000000E+00, -1.00000000E+00, 1.00000000E+00)*_fp.y + vec4( 1.00000000E+00, 1.00000000E+00, -1.00000000E+00, -1.00000000E+00)*_fp.x).z > -5.00000000E-01, (vec4( 1.00000000E+00, -1.00000000E+00, -1.00000000E+00, 1.00000000E+00)*_fp.y + vec4( 1.00000000E+00, 1.00000000E+00, -1.00000000E+00, -1.00000000E+00)*_fp.x).w > 5.00000000E-01);
_fx_left = bvec4((vec4( 1.00000000E+00, -1.00000000E+00, -1.00000000E+00, 1.00000000E+00)*_fp.y + vec4( 5.00000000E-01, 2.00000000E+00, -5.00000000E-01, -2.00000000E+00)*_fp.x).x > 1.00000000E+00, (vec4( 1.00000000E+00, -1.00000000E+00, -1.00000000E+00, 1.00000000E+00)*_fp.y + vec4( 5.00000000E-01, 2.00000000E+00, -5.00000000E-01, -2.00000000E+00)*_fp.x).y > 1.00000000E+00, (vec4( 1.00000000E+00, -1.00000000E+00, -1.00000000E+00, 1.00000000E+00)*_fp.y + vec4( 5.00000000E-01, 2.00000000E+00, -5.00000000E-01, -2.00000000E+00)*_fp.x).z > -5.00000000E-01, (vec4( 1.00000000E+00, -1.00000000E+00, -1.00000000E+00, 1.00000000E+00)*_fp.y + vec4( 5.00000000E-01, 2.00000000E+00, -5.00000000E-01, -2.00000000E+00)*_fp.x).w > 0.00000000E+00);
_fx_up = bvec4((vec4( 1.00000000E+00, -1.00000000E+00, -1.00000000E+00, 1.00000000E+00)*_fp.y + vec4( 2.00000000E+00, 5.00000000E-01, -2.00000000E+00, -5.00000000E-01)*_fp.x).x > 2.00000000E+00, (vec4( 1.00000000E+00, -1.00000000E+00, -1.00000000E+00, 1.00000000E+00)*_fp.y + vec4( 2.00000000E+00, 5.00000000E-01, -2.00000000E+00, -5.00000000E-01)*_fp.x).y > 0.00000000E+00, (vec4( 1.00000000E+00, -1.00000000E+00, -1.00000000E+00, 1.00000000E+00)*_fp.y + vec4( 2.00000000E+00, 5.00000000E-01, -2.00000000E+00, -5.00000000E-01)*_fp.x).z > -1.00000000E+00, (vec4( 1.00000000E+00, -1.00000000E+00, -1.00000000E+00, 1.00000000E+00)*_fp.y + vec4( 2.00000000E+00, 5.00000000E-01, -2.00000000E+00, -5.00000000E-01)*_fp.x).w > 5.00000000E-01);
_interp_restriction_lv1 = bvec4(_r0125.x != _r0105.w && _r0125.x != _r0105.z, _r0125.y != _r0105.x && _r0125.y != _r0105.w, _r0125.z != _r0105.y && _r0125.z != _r0105.x, _r0125.w != _r0105.z && _r0125.w != _r0105.y);
_interp_restriction_lv2_left = bvec4(_r0125.x != _r0115.z && _r0105.y != _r0115.z, _r0125.y != _r0115.w && _r0105.z != _r0115.w, _r0125.z != _r0115.x && _r0105.w != _r0115.x, _r0125.w != _r0115.y && _r0105.x != _r0115.y);
_interp_restriction_lv2_up = bvec4(_r0125.x != _r0115.x && _r0105.x != _r0115.x, _r0125.y != _r0115.y && _r0105.y != _r0115.y, _r0125.z != _r0115.z && _r0105.z != _r0115.z, _r0125.w != _r0115.w && _r0105.w != _r0115.w);
_a0169 = _r0125 - _r0115;
_TMP166 = abs(_a0169);
_a0173 = _r0125 - _r0115.zwxy;
_TMP170 = abs(_a0173);
_a0177 = _r0115.wxyz - _r0155;
_TMP174 = abs(_a0177);
_a0181 = _r0115.wxyz - _r0155.yzwx;
_TMP178 = abs(_a0181);
_a0185 = _r0105.zwxy - _r0105.wxyz;
_TMP182 = abs(_a0185);
_wd1 = _TMP166 + _TMP170 + _TMP174 + _TMP178 + 4.00000000E+00*_TMP182;
_a0191 = _r0105.zwxy - _r0105.yzwx;
_TMP188 = abs(_a0191);
_a0195 = _r0105.zwxy - _r0145;
_TMP192 = abs(_a0195);
_a0199 = _r0105.wxyz - _r0135;
_TMP196 = abs(_a0199);
_a0203 = _r0105.wxyz - _r0105;
_TMP200 = abs(_a0203);
_a0207 = _r0125 - _r0115.wxyz;
_TMP204 = abs(_a0207);
_wd2 = _TMP188 + _TMP192 + _TMP196 + _TMP200 + 4.00000000E+00*_TMP204;
_edri = bvec4(_wd1.x <= _wd2.x && _interp_restriction_lv1.x, _wd1.y <= _wd2.y && _interp_restriction_lv1.y, _wd1.z <= _wd2.z && _interp_restriction_lv1.z, _wd1.w <= _wd2.w && _interp_restriction_lv1.w);
_edr = bvec4(_wd1.x < _wd2.x && _interp_restriction_lv1.x, _wd1.y < _wd2.y && _interp_restriction_lv1.y, _wd1.z < _wd2.z && _interp_restriction_lv1.z, _wd1.w < _wd2.w && _interp_restriction_lv1.w);
_edr = bvec4(_edr.x && (!_edri.y || !_edri.w), _edr.y && (!_edri.z || !_edri.x), _edr.z && (!_edri.w || !_edri.y), _edr.w && (!_edri.x || !_edri.z));
_a0211 = _r0105.wxyz - _r0115.zwxy;
_TMP208 = abs(_a0211);
_a0215 = _r0105.zwxy - _r0115;
_TMP212 = abs(_a0215);
_a0221 = _r0125 - _r0115;
_TMP218 = abs(_a0221);
_TMP23 = bvec4(_TMP218.x < 6.00000024E-01, _TMP218.y < 6.00000024E-01, _TMP218.z < 6.00000024E-01, _TMP218.w < 6.00000024E-01);
_edr_left = bvec4((2.00000000E+00*_TMP208).x <= _TMP212.x && _interp_restriction_lv2_left.x && _edr.x && !_edri.y && _TMP23.x, (2.00000000E+00*_TMP208).y <= _TMP212.y && _interp_restriction_lv2_left.y && _edr.y && !_edri.z && _TMP23.y, (2.00000000E+00*_TMP208).z <= _TMP212.z && _interp_restriction_lv2_left.z && _edr.z && !_edri.w && _TMP23.z, (2.00000000E+00*_TMP208).w <= _TMP212.w && _interp_restriction_lv2_left.w && _edr.w && !_edri.x && _TMP23.w);
_a0225 = _r0105.wxyz - _r0115.zwxy;
_TMP222 = abs(_a0225);
_a0229 = _r0105.zwxy - _r0115;
_TMP226 = abs(_a0229);
_a0235 = _r0125 - _r0115.zwxy;
_TMP232 = abs(_a0235);
_TMP26 = bvec4(_TMP232.x < 6.00000024E-01, _TMP232.y < 6.00000024E-01, _TMP232.z < 6.00000024E-01, _TMP232.w < 6.00000024E-01);
_edr_up = bvec4(_TMP222.x >= (2.00000000E+00*_TMP226).x && _interp_restriction_lv2_up.x && _edr.x && !_edri.w && _TMP26.x, _TMP222.y >= (2.00000000E+00*_TMP226).y && _interp_restriction_lv2_up.y && _edr.y && !_edri.x && _TMP26.y, _TMP222.z >= (2.00000000E+00*_TMP226).z && _interp_restriction_lv2_up.z && _edr.z && !_edri.y && _TMP26.z, _TMP222.w >= (2.00000000E+00*_TMP226).w && _interp_restriction_lv2_up.w && _edr.w && !_edri.z && _TMP26.w);
_nc = bvec4(_edr.x && (_fx.x || _edr_left.x && _fx_left.x || _edr_up.x && _fx_up.x), _edr.y && (_fx.y || _edr_left.y && _fx_left.y || _edr_up.y && _fx_up.y), _edr.z && (_fx.z || _edr_left.z && _fx_left.z || _edr_up.z && _fx_up.z), _edr.w && (_fx.w || _edr_left.w && _fx_left.w || _edr_up.w && _fx_up.w));
_a0239 = _r0125 - _r0105.wxyz;
_TMP236 = abs(_a0239);
_a0243 = _r0125 - _r0105.zwxy;
_TMP240 = abs(_a0243);
_px = bvec4(_TMP236.x <= _TMP240.x, _TMP236.y <= _TMP240.y, _TMP236.z <= _TMP240.z, _TMP236.w <= _TMP240.w);
if (_nc.x) {
if (_px.x) {
_TMP30 = _TMP8.xyz;
} else {
_TMP30 = _TMP10.xyz;
}
_TMP29 = _TMP30;
} else {
if (_nc.y) {
if (_px.y) {
_TMP32 = _TMP4.xyz;
} else {
_TMP32 = _TMP8.xyz;
}
_TMP31 = _TMP32;
} else {
if (_nc.z) {
if (_px.z) {
_TMP34 = _TMP6.xyz;
} else {
_TMP34 = _TMP4.xyz;
}
_TMP33 = _TMP34;
} else {
_TMP33 = _TMP7.xyz;
}
_TMP31 = _TMP33;
}
_TMP29 = _TMP31;
}
if (_nc.w) {
if (_px.w) {
_TMP36 = _TMP10.xyz;
} else {
_TMP36 = _TMP6.xyz;
}
_TMP35 = _TMP36;
} else {
if (_nc.z) {
if (_px.z) {
_TMP38 = _TMP6.xyz;
} else {
_TMP38 = _TMP4.xyz;
}
_TMP37 = _TMP38;
} else {
if (_nc.y) {
if (_px.y) {
_TMP40 = _TMP4.xyz;
} else {
_TMP40 = _TMP8.xyz;
}
_TMP39 = _TMP40;
} else {
_TMP39 = _TMP7.xyz;
}
_TMP37 = _TMP39;
}
_TMP35 = _TMP37;
}
_r0245.x = dot(_TMP29, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_r0245.y = dot(_TMP35, vec3( 2.12599993E-01, 7.15200007E-01, 7.22000003E-02));
_a0251 = _r0245 - _r0125.xy;
_df12 = abs(_a0251);
_TMP42 = float((_df12.y >= _df12.x));
_res = _TMP29 + _TMP42*(_TMP35 - _TMP29);
_ret_0 = vec4(_res.x, _res.y, _res.z, 1.00000000E+00);
FragColor = _ret_0;
return;
}
#endif