float xll_mod_f_f( float x, float y ) { float d = x / y; float f = fract (abs(d)) * y; return d >= 0.0 ? f : -f; } vec2 xll_mod_vf2_vf2( vec2 x, vec2 y ) { vec2 d = x / y; vec2 f = fract (abs(d)) * y; return vec2 (d.x >= 0.0 ? f.x : -f.x, d.y >= 0.0 ? f.y : -f.y); } vec3 xll_mod_vf3_vf3( vec3 x, vec3 y ) { vec3 d = x / y; vec3 f = fract (abs(d)) * y; return vec3 (d.x >= 0.0 ? f.x : -f.x, d.y >= 0.0 ? f.y : -f.y, d.z >= 0.0 ? f.z : -f.z); } vec4 xll_mod_vf4_vf4( vec4 x, vec4 y ) { vec4 d = x / y; vec4 f = fract (abs(d)) * y; return vec4 (d.x >= 0.0 ? f.x : -f.x, d.y >= 0.0 ? f.y : -f.y, d.z >= 0.0 ? f.z : -f.z, d.w >= 0.0 ? f.w : -f.w); } float xll_saturate_f( float x) { return clamp( x, 0.0, 1.0); } vec2 xll_saturate_vf2( vec2 x) { return clamp( x, 0.0, 1.0); } vec3 xll_saturate_vf3( vec3 x) { return clamp( x, 0.0, 1.0); } vec4 xll_saturate_vf4( vec4 x) { return clamp( x, 0.0, 1.0); } mat2 xll_saturate_mf2x2(mat2 m) { return mat2( clamp(m[0], 0.0, 1.0), clamp(m[1], 0.0, 1.0)); } mat3 xll_saturate_mf3x3(mat3 m) { return mat3( clamp(m[0], 0.0, 1.0), clamp(m[1], 0.0, 1.0), clamp(m[2], 0.0, 1.0)); } mat4 xll_saturate_mf4x4(mat4 m) { return mat4( clamp(m[0], 0.0, 1.0), clamp(m[1], 0.0, 1.0), clamp(m[2], 0.0, 1.0), clamp(m[3], 0.0, 1.0)); } #line 29 struct v2f { highp vec4 pos; highp vec2 uv; lowp vec4 color; }; #line 5 struct appdata_full { highp vec4 vertex; highp vec4 tangent; highp vec3 normal; highp vec4 texcoord; highp vec4 texcoord1; highp vec4 color; }; #line 1 uniform highp mat4 glstate_matrix_mvp; uniform highp vec4 _Time; uniform highp vec3 _WorldSpaceCameraPos; uniform highp mat4 _World2Object; #line 14 uniform highp float _FadeOutDistNear; uniform highp float _FadeOutDistFar; uniform highp float _Multiplier; uniform highp float _Bias; #line 18 uniform highp float _TimeOnDuration; uniform highp float _TimeOffDuration; uniform highp float _BlinkingTimeOffsScale; uniform highp float _SizeGrowStartDist; #line 22 uniform highp float _SizeGrowEndDist; uniform highp float _MaxGrowSize; uniform highp float _NoiseAmount; uniform highp float _VerticalBillboarding; #line 26 uniform highp vec4 _Color; #line 35 #line 64 #line 57 highp float CalcDistScale( in highp float dist ) { #line 59 highp float distScale = min( (max( (dist - _SizeGrowStartDist), 0.0) / _SizeGrowEndDist), 1.0); return ((distScale * distScale) * _MaxGrowSize); } #line 42 highp float CalcFadeOutFactor( in highp float dist ) { #line 44 highp float nfadeout = xll_saturate_f((dist / _FadeOutDistNear)); highp float ffadeout = (1.0 - xll_saturate_f((max( (dist - _FadeOutDistFar), 0.0) * 0.2))); ffadeout *= ffadeout; #line 49 nfadeout *= nfadeout; nfadeout *= nfadeout; nfadeout *= ffadeout; #line 54 return nfadeout; } #line 35 void CalcOrthonormalBasis( in highp vec3 dir, out highp vec3 right, out highp vec3 up ) { up = (( (abs(dir.y) > 0.999) ) ? ( vec3( 0.0, 0.0, 1.0) ) : ( vec3( 0.0, 1.0, 0.0) )); right = normalize(cross( up, dir)); #line 39 up = cross( dir, right); } #line 64 v2f xlat_main( in appdata_full v ) { v2f o; highp vec3 centerOffs = (vec3( (vec2( 0.5) - v.color.xy), 0.0) * v.texcoord1.xyy); #line 68 highp vec3 centerLocal = (v.vertex.xyz + centerOffs.xyz); highp vec3 viewerLocal = vec3( (_World2Object * vec4( _WorldSpaceCameraPos, 1.0))); highp vec3 localDir = (viewerLocal - centerLocal); #line 72 localDir.y = mix( 0.0, localDir.y, _VerticalBillboarding); highp float localDirLength = length(localDir); highp vec3 rightLocal; #line 76 highp vec3 upLocal; CalcOrthonormalBasis( (localDir / localDirLength), rightLocal, upLocal); #line 80 highp float distScale = (CalcDistScale( localDirLength) * v.color.w); highp vec3 BBNormal = ((rightLocal * v.normal.x) + (upLocal * v.normal.y)); highp vec3 BBLocalPos = ((centerLocal - ((rightLocal * centerOffs.x) + (upLocal * centerOffs.y))) + (BBNormal * distScale)); #line 84 highp float time = (_Time.y + (_BlinkingTimeOffsScale * v.color.z)); highp float fracTime = xll_mod_f_f( time, (_TimeOnDuration + _TimeOffDuration)); highp float wave = (smoothstep( 0.0, (_TimeOnDuration * 0.25), fracTime) * (1.0 - smoothstep( (_TimeOnDuration * 0.75), _TimeOnDuration, fracTime))); highp float noiseTime = (time * (6.283185 / _TimeOnDuration)); #line 88 highp float noise = (sin(noiseTime) * ((0.5 * cos(((noiseTime * 0.6366) + 56.7272))) + 0.5)); highp float noiseWave = ((_NoiseAmount * noise) + (1.0 - _NoiseAmount)); wave = (( (_NoiseAmount < 0.01) ) ? ( wave ) : ( noiseWave )); #line 92 wave += _Bias; o.uv = v.texcoord.xy; o.pos = (glstate_matrix_mvp * vec4( BBLocalPos, 1.0)); #line 96 o.color = (((CalcFadeOutFactor( localDirLength) * _Color) * _Multiplier) * wave); return o; } attribute highp vec4 xlat_attrib_POSITION; attribute highp vec4 TANGENT; attribute highp vec3 xlat_attrib_NORMAL; attribute highp vec4 xlat_attrib_TEXCOORD0; attribute highp vec4 xlat_attrib_TEXCOORD1; attribute highp vec4 xlat_attrib_COLOR; varying highp vec4 xlv_SV_POSITION; varying highp vec2 xlv_TEXCOORD0; varying lowp vec4 xlv_TEXCOORD1; void main() { v2f 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); xlv_SV_POSITION = vec4(xl_retval.pos); xlv_TEXCOORD0 = vec2(xl_retval.uv); xlv_TEXCOORD1 = vec4(xl_retval.color); } // uniforms: // _Bias: type 9 arrsize 0 // _BlinkingTimeOffsScale: type 9 arrsize 0 // _Color: type 12 arrsize 0 // _FadeOutDistFar: type 9 arrsize 0 // _FadeOutDistNear: type 9 arrsize 0 // _MaxGrowSize: type 9 arrsize 0 // _Multiplier: type 9 arrsize 0 // _NoiseAmount: type 9 arrsize 0 // _SizeGrowEndDist: type 9 arrsize 0 // _SizeGrowStartDist: type 9 arrsize 0 // _Time: type 12 arrsize 0 // _TimeOffDuration: type 9 arrsize 0 // _TimeOnDuration: type 9 arrsize 0 // _VerticalBillboarding: type 9 arrsize 0 // _World2Object: type 21 arrsize 0 // _WorldSpaceCameraPos: type 11 arrsize 0 // glstate_matrix_mvp: type 21 arrsize 0