mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 17:18:12 -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;
|
|
vec3 x1;
|
|
x1.x = dot (unity_SHAr, tmpvar_4);
|
|
x1.y = dot (unity_SHAg, tmpvar_4);
|
|
x1.z = dot (unity_SHAb, tmpvar_4);
|
|
vec4 tmpvar_5;
|
|
tmpvar_5 = (tmpvar_3.xyzz * tmpvar_3.yzzx);
|
|
x2.x = dot (unity_SHBr, tmpvar_5);
|
|
x2.y = dot (unity_SHBg, tmpvar_5);
|
|
x2.z = dot (unity_SHBb, tmpvar_5);
|
|
gl_Position = tmpvar_1;
|
|
vec4 tmpvar_6;
|
|
tmpvar_6.yzw = vec3(0.0, 0.0, 0.0);
|
|
tmpvar_6.x = tmpvar_1.z;
|
|
xlv_FOG = tmpvar_6;
|
|
vec4 tmpvar_7;
|
|
tmpvar_7.zw = vec2(0.0, 0.0);
|
|
tmpvar_7.xy = ((gl_MultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
|
|
gl_TexCoord[0] = tmpvar_7;
|
|
vec4 tmpvar_8;
|
|
tmpvar_8.w = 0.0;
|
|
tmpvar_8.xyz = tmpvar_3;
|
|
gl_TexCoord[1] = tmpvar_8;
|
|
vec4 tmpvar_9;
|
|
tmpvar_9.w = 0.0;
|
|
tmpvar_9.xyz = ((x1 + x2) + (unity_SHC.xyz * ((tmpvar_3.x * tmpvar_3.x) - (tmpvar_3.y * tmpvar_3.y))));
|
|
gl_TexCoord[2] = tmpvar_9;
|
|
}
|
|
|