mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-12 09:11:18 -05:00
53 lines
1.5 KiB
Text
53 lines
1.5 KiB
Text
varying vec4 xlv_FOG;
|
|
uniform vec4 unity_Scale;
|
|
uniform vec4 unity_SHC;
|
|
uniform vec4 unity_SHBr;
|
|
uniform vec4 unity_SHBg;
|
|
uniform vec4 unity_SHBb;
|
|
uniform vec4 unity_SHAr;
|
|
uniform vec4 unity_SHAg;
|
|
uniform vec4 unity_SHAb;
|
|
uniform mat4 _Object2World;
|
|
uniform vec4 _MainTex_ST;
|
|
void main ()
|
|
{
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = (gl_ModelViewProjectionMatrix * gl_Vertex);
|
|
mat3 tmpvar_2;
|
|
tmpvar_2[0] = _Object2World[0].xyz;
|
|
tmpvar_2[1] = _Object2World[1].xyz;
|
|
tmpvar_2[2] = _Object2World[2].xyz;
|
|
vec3 tmpvar_3;
|
|
tmpvar_3 = (tmpvar_2 * (gl_Normal * unity_Scale.w));
|
|
vec4 tmpvar_4;
|
|
tmpvar_4.w = 1.0;
|
|
tmpvar_4.xyz = tmpvar_3;
|
|
vec3 x2_5;
|
|
vec3 x1_6;
|
|
x1_6.x = dot (unity_SHAr, tmpvar_4);
|
|
x1_6.y = dot (unity_SHAg, tmpvar_4);
|
|
x1_6.z = dot (unity_SHAb, tmpvar_4);
|
|
vec4 tmpvar_7;
|
|
tmpvar_7 = (tmpvar_3.xyzz * tmpvar_3.yzzx);
|
|
x2_5.x = dot (unity_SHBr, tmpvar_7);
|
|
x2_5.y = dot (unity_SHBg, tmpvar_7);
|
|
x2_5.z = dot (unity_SHBb, tmpvar_7);
|
|
gl_Position = tmpvar_1;
|
|
vec4 tmpvar_8;
|
|
tmpvar_8.yzw = vec3(0.0, 0.0, 0.0);
|
|
tmpvar_8.x = tmpvar_1.z;
|
|
xlv_FOG = tmpvar_8;
|
|
vec4 tmpvar_9;
|
|
tmpvar_9.zw = vec2(0.0, 0.0);
|
|
tmpvar_9.xy = ((gl_MultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
|
|
gl_TexCoord[0] = tmpvar_9;
|
|
vec4 tmpvar_10;
|
|
tmpvar_10.w = 0.0;
|
|
tmpvar_10.xyz = tmpvar_3;
|
|
gl_TexCoord[1] = tmpvar_10;
|
|
vec4 tmpvar_11;
|
|
tmpvar_11.w = 0.0;
|
|
tmpvar_11.xyz = ((x1_6 + x2_5) + (unity_SHC.xyz * ((tmpvar_3.x * tmpvar_3.x) - (tmpvar_3.y * tmpvar_3.y))));
|
|
gl_TexCoord[2] = tmpvar_11;
|
|
}
|
|
|