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

28 lines
771 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 float _Shininess;
2012-10-07 23:41:18 -04:00
void main ()
{
vec4 res_1;
vec3 viewN_2;
vec4 normal_3;
normal_3.xy = ((texture2D (_BumpMap, gl_TexCoord[0].xy).wy * 2.0) - 1.0);
2014-02-11 02:06:13 -05:00
normal_3.z = sqrt(((1.0 -
(normal_3.x * normal_3.x)
) - (normal_3.y * normal_3.y)));
2012-10-07 23:41:18 -04:00
viewN_2.x = dot (gl_TexCoord[1].xyz, normal_3.xyz);
viewN_2.y = dot (gl_TexCoord[2].xyz, normal_3.xyz);
viewN_2.z = dot (gl_TexCoord[3].xyz, normal_3.xyz);
res_1.xyz = ((viewN_2 * vec3(0.5, 0.5, -0.5)) + 0.5);
res_1.w = _Shininess;
gl_FragData[0] = res_1;
}
2014-02-11 02:06:13 -05:00
2014-10-11 15:32:43 -04:00
// stats: 12 alu 1 tex 0 flow
// inputs: 1
// #0: gl_TexCoord (high float) 4x1 [4] loc 4
// uniforms: 1 (total size: 0)
// #0: _Shininess (high float) 1x1 [-1]
// textures: 1
// #0: _BumpMap (high 2d) 0x0 [-1]