80 lines
2.4 KiB
Plaintext
80 lines
2.4 KiB
Plaintext
uniform sampler2D _BumpSpecMap;
|
|
uniform vec4 _Color;
|
|
uniform float _Cutoff;
|
|
uniform vec4 _LightColor0;
|
|
uniform sampler2D _LightTexture0;
|
|
uniform sampler2D _MainTex;
|
|
uniform float _ShadowStrength;
|
|
uniform vec3 _TranslucencyColor;
|
|
uniform sampler2D _TranslucencyMap;
|
|
uniform float _TranslucencyViewDependency;
|
|
varying vec2 xlv_TEXCOORD0;
|
|
varying vec4 xlv_COLOR0;
|
|
varying vec3 xlv_TEXCOORD1;
|
|
varying vec3 xlv_TEXCOORD2;
|
|
varying vec2 xlv_TEXCOORD3;
|
|
void main ()
|
|
{
|
|
vec4 c_1;
|
|
vec4 tmpvar_2;
|
|
tmpvar_2 = texture2D (_MainTex, xlv_TEXCOORD0);
|
|
vec4 tmpvar_3;
|
|
tmpvar_3 = texture2D (_TranslucencyMap, xlv_TEXCOORD0);
|
|
vec4 tmpvar_4;
|
|
tmpvar_4 = texture2D (_BumpSpecMap, xlv_TEXCOORD0);
|
|
vec4 normal_5;
|
|
normal_5.xy = ((tmpvar_4.wy * 2.0) - 1.0);
|
|
normal_5.z = sqrt(((1.0 -
|
|
(normal_5.x * normal_5.x)
|
|
) - (normal_5.y * normal_5.y)));
|
|
float x_6;
|
|
x_6 = (tmpvar_2.w - _Cutoff);
|
|
if ((x_6 < 0.0)) {
|
|
discard;
|
|
};
|
|
vec3 tmpvar_7;
|
|
tmpvar_7 = normalize(xlv_TEXCOORD2);
|
|
vec4 c_8;
|
|
float tmpvar_9;
|
|
tmpvar_9 = dot (normal_5.xyz, xlv_TEXCOORD1);
|
|
c_8.xyz = (((tmpvar_2.xyz * _Color.xyz) * xlv_COLOR0.w) * ((
|
|
((mix (clamp (
|
|
-(tmpvar_9)
|
|
, 0.0, 1.0), clamp (
|
|
dot (tmpvar_7, -(xlv_TEXCOORD1))
|
|
, 0.0, 1.0), _TranslucencyViewDependency) * tmpvar_3.z) * _TranslucencyColor)
|
|
* 2.0) + max (0.0,
|
|
((tmpvar_9 * 0.6) + 0.4)
|
|
)));
|
|
c_8.xyz = ((c_8.xyz * _LightColor0.xyz) + (pow (
|
|
max (0.0, dot (normal_5.xyz, normalize((xlv_TEXCOORD1 + tmpvar_7))))
|
|
,
|
|
(tmpvar_4.x * 128.0)
|
|
) * (tmpvar_3.w * _Color.x)));
|
|
c_8.xyz = (c_8.xyz * mix (2.0, (texture2D (_LightTexture0, xlv_TEXCOORD3).w * 2.0), _ShadowStrength));
|
|
c_1.xyz = c_8.xyz;
|
|
c_1.w = tmpvar_2.w;
|
|
gl_FragData[0] = c_1;
|
|
}
|
|
|
|
|
|
// stats: 40 alu 5 tex 1 flow
|
|
// inputs: 5
|
|
// #0: xlv_TEXCOORD0 (high float) 2x1 [-1]
|
|
// #1: xlv_COLOR0 (high float) 4x1 [-1]
|
|
// #2: xlv_TEXCOORD1 (high float) 3x1 [-1]
|
|
// #3: xlv_TEXCOORD2 (high float) 3x1 [-1]
|
|
// #4: xlv_TEXCOORD3 (high float) 2x1 [-1]
|
|
// uniforms: 6 (total size: 0)
|
|
// #0: _Color (high float) 4x1 [-1]
|
|
// #1: _Cutoff (high float) 1x1 [-1]
|
|
// #2: _LightColor0 (high float) 4x1 [-1]
|
|
// #3: _ShadowStrength (high float) 1x1 [-1]
|
|
// #4: _TranslucencyColor (high float) 3x1 [-1]
|
|
// #5: _TranslucencyViewDependency (high float) 1x1 [-1]
|
|
// textures: 4
|
|
// #0: _BumpSpecMap (high 2d) 0x0 [-1]
|
|
// #1: _LightTexture0 (high 2d) 0x0 [-1]
|
|
// #2: _MainTex (high 2d) 0x0 [-1]
|
|
// #3: _TranslucencyMap (high 2d) 0x0 [-1]
|