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

47 lines
1.4 KiB
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
uniform sampler2D _Control;
2014-02-11 02:06:13 -05:00
uniform vec4 _LightColor0;
uniform sampler2D _ShadowMapTexture;
uniform sampler2D _Splat0;
uniform sampler2D _Splat1;
uniform sampler2D _Splat2;
uniform sampler2D _Splat3;
uniform vec4 _WorldSpaceLightPos0;
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[1];
vec4 c_3;
2014-10-11 15:32:43 -04:00
vec3 col_4;
vec4 tmpvar_5;
tmpvar_5 = texture2D (_Control, tmpvar_1.xy);
col_4 = (tmpvar_5.x * texture2D (_Splat0, tmpvar_1.zw).xyz);
col_4 = (col_4 + (tmpvar_5.y * texture2D (_Splat1, tmpvar_2.xy).xyz));
col_4 = (col_4 + (tmpvar_5.z * texture2D (_Splat2, tmpvar_2.zw).xyz));
col_4 = (col_4 + (tmpvar_5.w * texture2D (_Splat3, gl_TexCoord[2].xy).xyz));
2012-10-07 23:41:18 -04:00
vec4 c_6;
2014-10-11 15:32:43 -04:00
c_6.xyz = ((col_4 * _LightColor0.xyz) * ((
2014-02-11 02:06:13 -05:00
max (0.0, dot (gl_TexCoord[3].xyz, _WorldSpaceLightPos0.xyz))
* texture2DProj (_ShadowMapTexture, gl_TexCoord[5]).x) * 2.0));
2012-10-07 23:41:18 -04:00
c_6.w = 0.0;
c_3.w = c_6.w;
2014-10-11 15:32:43 -04:00
c_3.xyz = (c_6.xyz + (col_4 * gl_TexCoord[4].xyz));
2012-10-07 23:41:18 -04:00
gl_FragData[0] = c_3;
}
2014-02-11 02:06:13 -05:00
2014-10-11 15:32:43 -04:00
// stats: 16 alu 6 tex 0 flow
// inputs: 1
// #0: gl_TexCoord (high float) 4x1 [6] loc 4
// uniforms: 2 (total size: 0)
// #0: _LightColor0 (high float) 4x1 [-1]
// #1: _WorldSpaceLightPos0 (high float) 4x1 [-1]
// textures: 6
// #0: _Control (high 2d) 0x0 [-1]
// #1: _ShadowMapTexture (high 2d) 0x0 [-1]
// #2: _Splat0 (high 2d) 0x0 [-1]
// #3: _Splat1 (high 2d) 0x0 [-1]
// #4: _Splat2 (high 2d) 0x0 [-1]
// #5: _Splat3 (high 2d) 0x0 [-1]