71 lines
2.2 KiB
Plaintext
71 lines
2.2 KiB
Plaintext
uniform mat4 glstate_matrix_mvp;
|
|
attribute vec4 attrVertex;
|
|
attribute vec3 attrNormal;
|
|
attribute vec4 attrTangent;
|
|
uniform highp mat4 _Object2World;
|
|
uniform highp mat4 _World2Object;
|
|
uniform highp vec3 _WorldSpaceCameraPos;
|
|
uniform lowp vec4 _WorldSpaceLightPos0;
|
|
uniform highp vec4 unity_Scale;
|
|
varying lowp vec3 varWorldN;
|
|
varying lowp vec3 varLightDir;
|
|
varying lowp vec3 varViewDir;
|
|
void main ()
|
|
{
|
|
lowp vec3 tmpvar_1;
|
|
lowp vec3 tmpvar_2;
|
|
lowp vec3 tmpvar_3;
|
|
highp mat3 tmpvar_4;
|
|
tmpvar_4[0] = _Object2World[0].xyz;
|
|
tmpvar_4[1] = _Object2World[1].xyz;
|
|
tmpvar_4[2] = _Object2World[2].xyz;
|
|
highp vec3 tmpvar_5;
|
|
tmpvar_5 = (tmpvar_4 * attrNormal);
|
|
tmpvar_3 = tmpvar_5;
|
|
highp vec3 tmpvar_6;
|
|
highp vec3 tmpvar_7;
|
|
highp vec3 tmpvar_8;
|
|
tmpvar_6 = attrTangent.xyz;
|
|
tmpvar_7 = (((attrNormal.yzx * attrTangent.zxy) - (attrNormal.zxy * attrTangent.yzx)) * attrTangent.w);
|
|
tmpvar_8 = attrNormal;
|
|
highp mat3 tmpvar_9;
|
|
tmpvar_9[0].x = tmpvar_6.x;
|
|
tmpvar_9[0].y = tmpvar_7.x;
|
|
tmpvar_9[0].z = tmpvar_8.x;
|
|
tmpvar_9[1].x = tmpvar_6.y;
|
|
tmpvar_9[1].y = tmpvar_7.y;
|
|
tmpvar_9[1].z = tmpvar_8.y;
|
|
tmpvar_9[2].x = tmpvar_6.z;
|
|
tmpvar_9[2].y = tmpvar_7.z;
|
|
tmpvar_9[2].z = tmpvar_8.z;
|
|
highp vec3 tmpvar_10;
|
|
tmpvar_10 = (tmpvar_9 * (_World2Object * _WorldSpaceLightPos0).xyz);
|
|
tmpvar_1 = tmpvar_10;
|
|
highp vec4 tmpvar_11;
|
|
tmpvar_11.w = 1.0;
|
|
tmpvar_11.xyz = _WorldSpaceCameraPos;
|
|
highp vec3 tmpvar_12;
|
|
tmpvar_12 = normalize((tmpvar_10 + normalize(
|
|
(tmpvar_9 * (((_World2Object * tmpvar_11).xyz * unity_Scale.w) - attrVertex.xyz))
|
|
)));
|
|
tmpvar_2 = tmpvar_12;
|
|
gl_Position = (glstate_matrix_mvp * attrVertex);
|
|
varWorldN = tmpvar_3;
|
|
varLightDir = tmpvar_1;
|
|
varViewDir = tmpvar_2;
|
|
}
|
|
|
|
|
|
// stats: 16 alu 0 tex 0 flow
|
|
// inputs: 3
|
|
// #0: attrVertex (high float) 4x1 [-1]
|
|
// #1: attrNormal (high float) 3x1 [-1]
|
|
// #2: attrTangent (high float) 4x1 [-1]
|
|
// uniforms: 6 (total size: 0)
|
|
// #0: glstate_matrix_mvp (high float) 4x4 [-1]
|
|
// #1: _Object2World (high float) 4x4 [-1]
|
|
// #2: _World2Object (high float) 4x4 [-1]
|
|
// #3: _WorldSpaceCameraPos (high float) 3x1 [-1]
|
|
// #4: _WorldSpaceLightPos0 (low float) 4x1 [-1]
|
|
// #5: unity_Scale (high float) 4x1 [-1]
|