mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-11 00:31:28 -05:00
45 lines
1.5 KiB
Text
45 lines
1.5 KiB
Text
uniform sampler2D _Control;
|
|
uniform sampler2D _LightBuffer;
|
|
uniform sampler2D _Splat0;
|
|
uniform sampler2D _Splat1;
|
|
uniform sampler2D _Splat2;
|
|
uniform sampler2D _Splat3;
|
|
uniform sampler2D unity_Lightmap;
|
|
uniform sampler2D unity_LightmapInd;
|
|
void main ()
|
|
{
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = gl_TexCoord[0];
|
|
vec4 tmpvar_2;
|
|
tmpvar_2 = gl_TexCoord[1];
|
|
vec3 tmpvar_3;
|
|
tmpvar_3 = gl_TexCoord[4].xyz;
|
|
vec4 light_4;
|
|
vec3 col_5;
|
|
vec4 tmpvar_6;
|
|
tmpvar_6 = texture2D (_Control, tmpvar_1.xy);
|
|
col_5 = (tmpvar_6.x * texture2D (_Splat0, tmpvar_1.zw).xyz);
|
|
col_5 = (col_5 + (tmpvar_6.y * texture2D (_Splat1, tmpvar_2.xy).xyz));
|
|
col_5 = (col_5 + (tmpvar_6.z * texture2D (_Splat2, tmpvar_2.zw).xyz));
|
|
col_5 = (col_5 + (tmpvar_6.w * texture2D (_Splat3, gl_TexCoord[2].xy).xyz));
|
|
light_4 = -(log2(texture2DProj (_LightBuffer, gl_TexCoord[3])));
|
|
light_4.xyz = (light_4.xyz + mix ((2.0 * texture2D (unity_LightmapInd, tmpvar_3.xy).xyz), (2.0 * texture2D (unity_Lightmap, tmpvar_3.xy).xyz), vec3(clamp (tmpvar_3.z, 0.0, 1.0))));
|
|
vec4 c_7;
|
|
c_7.xyz = (col_5 * light_4.xyz);
|
|
c_7.w = 0.0;
|
|
gl_FragData[0] = c_7;
|
|
}
|
|
|
|
|
|
// stats: 16 alu 8 tex 0 flow
|
|
// inputs: 1
|
|
// #0: gl_TexCoord (high float) 4x1 [5] loc 4
|
|
// textures: 8
|
|
// #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]
|
|
// #6: unity_Lightmap (high 2d) 0x0 [-1]
|
|
// #7: unity_LightmapInd (high 2d) 0x0 [-1]
|