bgfx/3rdparty/glsl-optimizer/tests/fragment/zun-Hidden_TerrainEngine_Splatmap_Lightmap-AddPass1-out.txt
2014-10-11 12:32:43 -07:00

43 lines
1.3 KiB
Plaintext

uniform sampler2D _Control;
uniform sampler2D _LightBuffer;
uniform sampler2D _Splat0;
uniform sampler2D _Splat1;
uniform sampler2D _Splat2;
uniform sampler2D _Splat3;
uniform vec4 unity_Ambient;
void main ()
{
vec4 tmpvar_1;
tmpvar_1 = gl_TexCoord[0];
vec4 tmpvar_2;
tmpvar_2 = gl_TexCoord[1];
vec4 light_3;
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));
light_3 = -(log2(texture2DProj (_LightBuffer, gl_TexCoord[3])));
light_3.xyz = (light_3.xyz + unity_Ambient.xyz);
vec4 c_6;
c_6.xyz = (col_4 * light_3.xyz);
c_6.w = 0.0;
gl_FragData[0] = c_6;
}
// stats: 12 alu 6 tex 0 flow
// inputs: 1
// #0: gl_TexCoord (high float) 4x1 [4] loc 4
// uniforms: 1 (total size: 0)
// #0: unity_Ambient (high float) 4x1 [-1]
// textures: 6
// #0: _Control (high 2d) 0x0 [-1]
// #1: _LightBuffer (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]