bgfx/3rdparty/glsl-optimizer/tests/fragment/zun-Surface_Slices3-out.txt

60 lines
1.7 KiB
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
uniform vec4 _LightShadowData;
2014-02-11 02:06:13 -05:00
uniform vec4 _LightSplitsFar;
uniform vec4 _LightSplitsNear;
uniform vec4 _ProjectionParams;
uniform sampler2D _ShadowMapTexture;
2012-10-07 23:41:18 -04:00
void main ()
{
vec2 tmpvar_1;
tmpvar_1 = gl_TexCoord[4].xy;
vec3 tmpvar_2;
tmpvar_2 = gl_TexCoord[5].xyz;
vec4 res_3;
2014-10-11 15:32:43 -04:00
vec4 weights_4;
float x_5;
x_5 = (fract((
2014-02-11 02:06:13 -05:00
(tmpvar_2.y + (tmpvar_2.z * 0.1))
* 5.0)) - 0.5);
2014-10-11 15:32:43 -04:00
if ((x_5 < 0.0)) {
2012-10-07 23:41:18 -04:00
discard;
};
2014-10-11 15:32:43 -04:00
weights_4 = (vec4(greaterThanEqual (tmpvar_1.xxxx, _LightSplitsNear)) * vec4(lessThan (tmpvar_1.xxxx, _LightSplitsFar)));
2012-10-07 23:41:18 -04:00
vec4 tmpvar_6;
tmpvar_6.w = 1.0;
2014-02-11 02:06:13 -05:00
tmpvar_6.xyz = (((
2014-10-11 15:32:43 -04:00
(gl_TexCoord[0].xyz * weights_4.x)
2014-02-11 02:06:13 -05:00
+
2014-10-11 15:32:43 -04:00
(gl_TexCoord[1].xyz * weights_4.y)
) + (gl_TexCoord[2].xyz * weights_4.z)) + (gl_TexCoord[3].xyz * weights_4.w));
2012-10-07 23:41:18 -04:00
vec4 tmpvar_7;
tmpvar_7 = texture2D (_ShadowMapTexture, tmpvar_6.xy);
float tmpvar_8;
if ((tmpvar_7.x < tmpvar_6.z)) {
tmpvar_8 = _LightShadowData.x;
} else {
tmpvar_8 = 1.0;
};
res_3.x = clamp ((tmpvar_8 + clamp (tmpvar_1.y, 0.0, 1.0)), 0.0, 1.0);
res_3.y = 1.0;
vec2 enc_9;
2014-10-11 15:32:43 -04:00
enc_9 = (vec2(1.0, 255.0) * (1.0 - (tmpvar_1.xxxx * _ProjectionParams.w)).x);
2012-10-07 23:41:18 -04:00
vec2 tmpvar_10;
2014-10-11 15:32:43 -04:00
tmpvar_10 = fract(enc_9);
2012-10-07 23:41:18 -04:00
enc_9.y = tmpvar_10.y;
enc_9.x = (tmpvar_10.x - (tmpvar_10.y * 0.00392157));
res_3.zw = enc_9;
gl_FragData[0] = res_3;
}
2014-02-11 02:06:13 -05:00
2014-10-11 15:32:43 -04:00
// stats: 31 alu 2 tex 2 flow
// inputs: 1
// #0: gl_TexCoord (high float) 4x1 [6] loc 4
// uniforms: 4 (total size: 0)
// #0: _LightShadowData (high float) 4x1 [-1]
// #1: _LightSplitsFar (high float) 4x1 [-1]
// #2: _LightSplitsNear (high float) 4x1 [-1]
// #3: _ProjectionParams (high float) 4x1 [-1]
// textures: 1
// #0: _ShadowMapTexture (high 2d) 0x0 [-1]