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

32 lines
920 B
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 samplerCube _Cube;
uniform sampler2D _MainTex;
uniform vec4 _ReflectColor;
2012-10-07 23:41:18 -04:00
void main ()
{
vec3 tmpvar_1;
tmpvar_1 = gl_TexCoord[2].xyz;
vec4 c_2;
vec3 wn_3;
vec4 normal_4;
normal_4.xy = ((texture2D (_BumpMap, gl_TexCoord[1].xy).wy * 2.0) - 1.0);
2014-02-11 02:06:13 -05:00
normal_4.z = sqrt(((1.0 -
(normal_4.x * normal_4.x)
) - (normal_4.y * normal_4.y)));
2012-10-07 23:41:18 -04:00
vec4 tmpvar_5;
tmpvar_5 = texture2D (_MainTex, gl_TexCoord[0].xy);
wn_3.x = dot (gl_TexCoord[3].xyz, normal_4.xyz);
wn_3.y = dot (gl_TexCoord[4].xyz, normal_4.xyz);
wn_3.z = dot (gl_TexCoord[5].xyz, normal_4.xyz);
vec4 tmpvar_6;
tmpvar_6 = (gl_LightModel.ambient * tmpvar_5);
c_2.w = tmpvar_6.w;
c_2.xyz = (tmpvar_6.xyz * 2.0);
2014-02-11 02:06:13 -05:00
gl_FragData[0] = (c_2 + ((textureCube (_Cube,
(tmpvar_1 - (2.0 * (dot (wn_3, tmpvar_1) * wn_3)))
) * _ReflectColor) * tmpvar_5.w));
2012-10-07 23:41:18 -04:00
}
2014-02-11 02:06:13 -05:00
// inputs: 1, stats: 19 alu 3 tex 0 flow