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

39 lines
1.1 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 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);
2014-10-11 15:32:43 -04:00
c_2 = (gl_LightModel.ambient * tmpvar_5);
c_2.xyz = (c_2.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
2014-10-11 15:32:43 -04:00
// stats: 19 alu 3 tex 0 flow
// inputs: 1
// #0: gl_TexCoord (high float) 4x1 [6] loc 4
// uniforms: 2 (total size: 0)
// #0: gl_LightModel (high other) 0x0 [-1]
// #1: _ReflectColor (high float) 4x1 [-1]
// textures: 3
// #0: _BumpMap (high 2d) 0x0 [-1]
// #1: _Cube (high cube) 0x0 [-1]
// #2: _MainTex (high 2d) 0x0 [-1]