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

56 lines
1.7 KiB
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
uniform sampler2D _BumpMap;
2014-02-11 02:06:13 -05:00
uniform vec4 _Color;
uniform samplerCube _Cube;
uniform sampler2D _LightBuffer;
uniform sampler2D _MainTex;
uniform vec4 _ReflectColor;
uniform sampler2D unity_Lightmap;
uniform sampler2D unity_LightmapInd;
2012-10-07 23:41:18 -04:00
void main ()
{
vec4 tmpvar_1;
tmpvar_1 = gl_TexCoord[0];
vec4 tmpvar_2;
tmpvar_2 = gl_TexCoord[2];
vec4 tmpvar_3;
tmpvar_3 = gl_TexCoord[3];
vec4 tmpvar_4;
tmpvar_4 = gl_TexCoord[4];
vec3 tmpvar_5;
tmpvar_5 = gl_TexCoord[5].xyz;
vec4 col_6;
vec4 light_7;
vec3 tmpvar_8;
tmpvar_8.x = tmpvar_2.w;
tmpvar_8.y = tmpvar_3.w;
tmpvar_8.z = tmpvar_4.w;
vec4 tmpvar_9;
tmpvar_9 = texture2D (_MainTex, tmpvar_1.xy);
vec4 normal_10;
normal_10.xy = ((texture2D (_BumpMap, tmpvar_1.zw).wy * 2.0) - 1.0);
2014-02-11 02:06:13 -05:00
normal_10.z = sqrt(((1.0 -
(normal_10.x * normal_10.x)
) - (normal_10.y * normal_10.y)));
2012-10-07 23:41:18 -04:00
vec3 tmpvar_11;
tmpvar_11.x = dot (tmpvar_2.xyz, normal_10.xyz);
tmpvar_11.y = dot (tmpvar_3.xyz, normal_10.xyz);
tmpvar_11.z = dot (tmpvar_4.xyz, normal_10.xyz);
vec4 tmpvar_12;
2014-02-11 02:06:13 -05:00
tmpvar_12 = (textureCube (_Cube, (tmpvar_8 - (2.0 *
(dot (tmpvar_11, tmpvar_8) * tmpvar_11)
))) * tmpvar_9.w);
2012-10-07 23:41:18 -04:00
vec4 tmpvar_13;
tmpvar_13 = -(log2(texture2DProj (_LightBuffer, gl_TexCoord[1])));
light_7.w = tmpvar_13.w;
light_7.xyz = (tmpvar_13.xyz + mix ((2.0 * texture2D (unity_LightmapInd, tmpvar_5.xy).xyz), (2.0 * texture2D (unity_Lightmap, tmpvar_5.xy).xyz), vec3(clamp (tmpvar_5.z, 0.0, 1.0))));
vec4 c_14;
c_14.xyz = ((tmpvar_9 * _Color).xyz * light_7.xyz);
c_14.w = (tmpvar_12.w * _ReflectColor.w);
col_6.w = c_14.w;
col_6.xyz = (c_14.xyz + (tmpvar_12.xyz * _ReflectColor.xyz));
gl_FragData[0] = col_6;
}
2014-02-11 02:06:13 -05:00
// inputs: 1, stats: 27 alu 6 tex 0 flow