mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 17:18:12 -05:00
28 lines
787 B
Text
28 lines
787 B
Text
uniform vec4 _Color;
|
|
uniform samplerCube _Cube;
|
|
uniform sampler2D _LightBuffer;
|
|
uniform sampler2D _MainTex;
|
|
uniform vec4 _ReflectColor;
|
|
uniform vec4 unity_Ambient;
|
|
void main ()
|
|
{
|
|
vec4 col_1;
|
|
vec4 light_2;
|
|
vec4 tmpvar_3;
|
|
tmpvar_3 = texture2D (_MainTex, gl_TexCoord[0].xy);
|
|
vec4 tmpvar_4;
|
|
tmpvar_4 = (textureCube (_Cube, gl_TexCoord[1].xyz) * tmpvar_3.w);
|
|
vec4 tmpvar_5;
|
|
tmpvar_5 = -(log2(texture2DProj (_LightBuffer, gl_TexCoord[2])));
|
|
light_2.w = tmpvar_5.w;
|
|
light_2.xyz = (tmpvar_5.xyz + unity_Ambient.xyz);
|
|
vec4 c_6;
|
|
c_6.xyz = ((tmpvar_3 * _Color).xyz * light_2.xyz);
|
|
c_6.w = (tmpvar_4.w * _ReflectColor.w);
|
|
col_1.w = c_6.w;
|
|
col_1.xyz = (c_6.xyz + (tmpvar_4.xyz * _ReflectColor.xyz));
|
|
gl_FragData[0] = col_1;
|
|
}
|
|
|
|
|
|
// inputs: 1, stats: 9 alu 3 tex 0 flow
|