void xll_clip_f(float x) { if ( x<0.0 ) discard; } void xll_clip_vf2(vec2 x) { if (any(lessThan(x,vec2(0.0)))) discard; } void xll_clip_vf3(vec3 x) { if (any(lessThan(x,vec3(0.0)))) discard; } void xll_clip_vf4(vec4 x) { if (any(lessThan(x,vec4(0.0)))) discard; } #line 11 struct v2f { highp vec4 pos; highp vec2 uv; highp vec3 color; highp vec3 backContrib; highp vec3 nl; highp vec3 nh; }; #line 7 uniform highp mat4 UNITY_MATRIX_IT_MV; uniform highp mat4 UNITY_MATRIX_MVP; uniform lowp vec4 UNITY_LIGHTMODEL_AMBIENT; #line 20 uniform highp vec4 _TerrainTreeLightColors[4]; uniform sampler2D _MainTex; uniform sampler2D _BumpSpecMap; #line 24 uniform sampler2D _TranslucencyMap; uniform lowp float _Cutoff; uniform lowp vec3 _TranslucencyColor; #line 28 uniform lowp vec4 _SpecColor; #line 30 lowp vec4 xlat_main( in v2f i ) { #line 32 lowp vec4 col = texture2D( _MainTex, i.uv); xll_clip_f((col.w - _Cutoff)); lowp vec3 albedo = (col.xyz * i.color); #line 37 mediump float specular = (texture2D( _BumpSpecMap, i.uv).x * 128.0); lowp vec4 trngls = texture2D( _TranslucencyMap, i.uv); mediump float gloss = trngls.w; #line 42 mediump vec3 light = (vec3( UNITY_LIGHTMODEL_AMBIENT) * albedo); mediump vec3 backContribs = (i.backContrib * trngls.z); #line 46 highp int j = 0; for ( ; (j < 3); (j++)) { mediump vec3 lightColor = _TerrainTreeLightColors[j].xyz; mediump vec3 translucencyColor = (backContribs[j] * _TranslucencyColor); #line 51 mediump float nl = i.nl[j]; mediump float nh = i.nh[j]; mediump float spec = (pow( nh, specular) * gloss); light += (((albedo * (translucencyColor + nl)) + (_SpecColor.xyz * spec)) * lightColor); } #line 57 lowp vec4 c; c.xyz = (light * 2.0); c.w = 1.0; return c; } varying highp vec4 xlv_SV_POSITION; varying highp vec2 xlv_TEXCOORD0; varying highp vec3 xlv_TEXCOORD1; varying highp vec3 xlv_TEXCOORD2; varying highp vec3 xlv_TEXCOORD3; varying highp vec3 xlv_TEXCOORD4; void main() { lowp vec4 xl_retval; v2f xlt_i; xlt_i.pos = vec4(xlv_SV_POSITION); xlt_i.uv = vec2(xlv_TEXCOORD0); xlt_i.color = vec3(xlv_TEXCOORD1); xlt_i.backContrib = vec3(xlv_TEXCOORD2); xlt_i.nl = vec3(xlv_TEXCOORD3); xlt_i.nh = vec3(xlv_TEXCOORD4); xl_retval = xlat_main( xlt_i); gl_FragData[0] = vec4(xl_retval); } // uniforms: // UNITY_LIGHTMODEL_AMBIENT: type 12 arrsize 0 // _BumpSpecMap: type 25 arrsize 0 // _Cutoff: type 9 arrsize 0 // _MainTex: type 25 arrsize 0 // _SpecColor: type 12 arrsize 0 // _TerrainTreeLightColors: type 12 arrsize 4 // _TranslucencyColor: type 11 arrsize 0 // _TranslucencyMap: type 25 arrsize 0