vec2 xll_matrixindex_mf2x2_i (mat2 m, int i) { vec2 v; v.x=m[0][i]; v.y=m[1][i]; return v; } vec3 xll_matrixindex_mf3x3_i (mat3 m, int i) { vec3 v; v.x=m[0][i]; v.y=m[1][i]; v.z=m[2][i]; return v; } vec4 xll_matrixindex_mf4x4_i (mat4 m, int i) { vec4 v; v.x=m[0][i]; v.y=m[1][i]; v.z=m[2][i]; v.w=m[3][i]; return v; } #line 10 struct appdata_full { highp vec4 vertex; highp vec4 tangent; highp vec3 normal; highp vec4 texcoord; highp vec4 texcoord1; highp vec4 color; }; #line 105 struct v2f_surf { highp vec4 pos; highp vec2 hip_pack0; highp vec4 lop_color; highp vec3 lightDir; highp vec3 viewDir; highp vec2 _LightCoord; }; #line 1 uniform highp mat4 glstate_matrix_mvp; uniform highp mat4 glstate_matrix_modelview0; uniform highp mat4 glstate_matrix_invtrans_modelview0; uniform highp vec4 _Time; #line 5 uniform highp vec4 _ProjectionParams; uniform highp vec4 unity_Scale; uniform highp vec3 _WorldSpaceCameraPos; uniform highp vec4 _WorldSpaceLightPos0; #line 9 uniform highp mat4 _Object2World; uniform highp mat4 _World2Object; #line 20 #line 25 #line 30 uniform highp vec4 _LightColor0; uniform highp vec4 _SpecColor; uniform highp mat4 _LightMatrix0; #line 42 uniform highp vec4 _Scale; uniform highp vec4 _SquashPlaneNormal; uniform highp float _SquashAmount; #line 52 uniform highp vec4 _Wind; #line 101 uniform highp vec4 _Color; uniform mediump vec3 _TranslucencyColor; uniform mediump float _TranslucencyViewDependency; uniform mediump float _ShadowStrength; #line 115 uniform highp vec4 _MainTex_ST; #line 20 highp vec3 ObjSpaceLightDir( in highp vec4 v ) { highp vec3 objSpaceLightPos = (_World2Object * _WorldSpaceLightPos0).xyz; return objSpaceLightPos.xyz; } #line 25 highp vec3 ObjSpaceViewDir( in highp vec4 v ) { highp vec3 objSpaceCameraPos = ((_World2Object * vec4( _WorldSpaceCameraPos.xyz, 1.0)).xyz * unity_Scale.w); return (objSpaceCameraPos - v.xyz); } #line 62 highp vec4 SmoothCurve( in highp vec4 x ) { #line 64 return ((x * x) * (3.0 - (2.0 * x))); } #line 66 highp vec4 TriangleWave( in highp vec4 x ) { #line 68 return abs(((fract((x + 0.5)) * 2.0) - 1.0)); } #line 70 highp vec4 SmoothTriangleWave( in highp vec4 x ) { #line 72 return SmoothCurve( TriangleWave( x)); } #line 74 highp vec4 AnimateVertex( in highp vec4 pos, in highp vec3 normal, in highp vec4 animParams ) { #line 76 highp float fDetailAmp = 0.1; highp float fBranchAmp = 0.3; highp float fObjPhase = dot( xll_matrixindex_mf4x4_i (_Object2World, 3).xyz, vec3( 1.0)); highp float fBranchPhase = (fObjPhase + animParams.x); #line 80 highp float fVtxPhase = dot( pos.xyz, vec3( (animParams.y + fBranchPhase))); highp vec2 vWavesIn = (_Time.yy + vec2( fVtxPhase, fBranchPhase)); highp vec4 vWaves = ((fract((vWavesIn.xxyy * vec4( 1.975, 0.793, 0.375, 0.193))) * 2.0) - 1.0); vWaves = SmoothTriangleWave( vWaves); #line 84 highp vec2 vWavesSum = (vWaves.xz + vWaves.yw); highp vec3 bend = ((animParams.y * fDetailAmp) * normal.xyz); bend.y = (animParams.w * fBranchAmp); pos.xyz += (((vWavesSum.xyx * bend) + ((_Wind.xyz * vWavesSum.y) * animParams.w)) * _Wind.w); #line 88 pos.xyz += (animParams.z * _Wind.xyz); return pos; } #line 53 void ExpandBillboard( in highp mat4 mat, inout highp vec4 pos, inout highp vec3 normal, inout highp vec4 tangent ) { highp float isBillboard = (1.0 - abs(tangent.w)); #line 56 highp vec3 norb = vec3( normalize((vec4( normal, 0.0) * mat))); highp vec3 tanb = vec3( normalize((vec4( tangent.xyz, 0.0) * mat))); pos += ((vec4( normal.xy, 0.0, 0.0) * mat) * isBillboard); normal = mix( normal, norb, vec3( isBillboard)); #line 60 tangent = mix( tangent, vec4( tanb, -1.0), vec4( isBillboard)); } #line 45 highp vec4 Squash( in highp vec4 pos ) { #line 47 highp vec3 planeNormal = _SquashPlaneNormal.xyz; highp vec3 projectedVertex = (pos.xyz - ((dot( planeNormal, vec3( pos)) + _SquashPlaneNormal.w) * planeNormal)); pos = vec4( mix( projectedVertex, pos.xyz, vec3( _SquashAmount)), 1.0); return pos; } #line 91 void TreeVertLeaf( inout appdata_full v ) { #line 93 ExpandBillboard( glstate_matrix_invtrans_modelview0, v.vertex, v.normal, v.tangent); v.vertex.xyz *= _Scale.xyz; v.vertex = AnimateVertex( v.vertex, v.normal, vec4( v.color.xy, v.texcoord1.xy)); v.vertex = Squash( v.vertex); #line 97 v.color = vec4( 1.0, 1.0, 1.0, v.color.w); v.normal = normalize(v.normal); v.tangent.xyz = normalize(v.tangent.xyz); } #line 116 v2f_surf xlat_main( in appdata_full v ) { v2f_surf o; #line 119 TreeVertLeaf( v); o.pos = (glstate_matrix_mvp * v.vertex); o.hip_pack0.xy = ((v.texcoord.xy * _MainTex_ST.xy) + _MainTex_ST.zw); o.lop_color = v.color; #line 123 highp vec3 binormal = (cross( v.normal, v.tangent.xyz) * v.tangent.w); highp mat3 rotation = mat3( v.tangent.x, v.tangent.y, v.tangent.z, binormal.x, binormal.y, binormal.z, v.normal.x, v.normal.y, v.normal.z); o.lightDir = (rotation * ObjSpaceLightDir( v.vertex)); o.viewDir = (rotation * ObjSpaceViewDir( v.vertex)); #line 127 o._LightCoord = (_LightMatrix0 * (_Object2World * v.vertex)).xy; return o; } in highp vec4 xlat_attrib_POSITION; in highp vec4 TANGENT; in highp vec3 xlat_attrib_NORMAL; in highp vec4 xlat_attrib_TEXCOORD0; in highp vec4 xlat_attrib_TEXCOORD1; in highp vec4 xlat_attrib_COLOR; out highp vec2 xlv_TEXCOORD0; out highp vec4 xlv_COLOR0; out highp vec3 xlv_TEXCOORD1; out highp vec3 xlv_TEXCOORD2; out highp vec2 xlv_TEXCOORD3; void main() { v2f_surf xl_retval; appdata_full xlt_v; xlt_v.vertex = vec4(xlat_attrib_POSITION); xlt_v.tangent = vec4(TANGENT); xlt_v.normal = vec3(xlat_attrib_NORMAL); xlt_v.texcoord = vec4(xlat_attrib_TEXCOORD0); xlt_v.texcoord1 = vec4(xlat_attrib_TEXCOORD1); xlt_v.color = vec4(xlat_attrib_COLOR); xl_retval = xlat_main( xlt_v); gl_Position = vec4(xl_retval.pos); xlv_TEXCOORD0 = vec2(xl_retval.hip_pack0); xlv_COLOR0 = vec4(xl_retval.lop_color); xlv_TEXCOORD1 = vec3(xl_retval.lightDir); xlv_TEXCOORD2 = vec3(xl_retval.viewDir); xlv_TEXCOORD3 = vec2(xl_retval._LightCoord); } // uniforms: // _LightMatrix0: type 21 arrsize 0 // _MainTex_ST: type 12 arrsize 0 // _Object2World: type 21 arrsize 0 // _Scale: type 12 arrsize 0 // _SquashAmount: type 9 arrsize 0 // _SquashPlaneNormal: type 12 arrsize 0 // _Time: type 12 arrsize 0 // _Wind: type 12 arrsize 0 // _World2Object: type 21 arrsize 0 // _WorldSpaceCameraPos: type 11 arrsize 0 // _WorldSpaceLightPos0: type 12 arrsize 0 // glstate_matrix_invtrans_modelview0: type 21 arrsize 0 // glstate_matrix_mvp: type 21 arrsize 0 // unity_Scale: type 12 arrsize 0