当前位置:   article > 正文

Unity3D 制作绿草地,草坪,模型表面生成草地,草地效果Shader实现 草着色器 Brute Force - Grass Shader_unity3d stylized grass shader 1.3.4怎么用

unity3d stylized grass shader 1.3.4怎么用

强大的草地着色器效果

仅提供学习使用
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
适用于 PC/Mac/Linux/Nintendo Switch 和移动设备的 Brute Force 交互式草着色器
与渲染管线 Standard ,URP 与 HDRP 兼容

  • 简单: 拖放材料
  • 优化: 每种材料的自定义 LoD 距离衰减
  • 动态自定义阴影: 可以接收和投射阴影的草
  • 交互性: 使用简单的粒子系统,您可以创建交互效果,例如鼠标/玩家位置上的轨迹
  • 定制: 完全可定制的草
  • 灯光支持: 4x 点灯和聚光灯支持
  • 地形: 使用纹理 Splat Map 绘制草。
  • VR 支持: 适用于多通道和单通道立体渲染
  • 毛皮: 也可以作为动物身上的简单毛皮
  • 外壳纹理: 草资产使用外壳纹理技术
其中一个好用的Shader
// MADE BY MATTHIEU HOULLIER
// Copyright 2021 BRUTE FORCE, all rights reserved.
// You are authorized to use this work if you have purchased the asset.
// Mail me at bruteforcegamesstudio@gmail.com if you have any questions or improvements you want.
Shader "BruteForce/InteractiveGrass"
{
	Properties
	{
		[Header(Tint Colors)]
		[Space]
		[MainColor]_Color("Tint Color",Color) = (0.5 ,0.5 ,0.5,1.0)
		_GroundColor("Tint Ground Color",Color) = (0.7 ,0.68 ,0.68,1.0)
		_SelfShadowColor("Shadow Color",Color) = (0.41 ,0.41 ,0.36,1.0)
		_ProjectedShadowColor("Projected Shadow Color",Color) = (0.45 ,0.42 ,0.04,1.0)
		_GrassShading("Grass Shading", Range(0.0, 1)) = 0.197
		_GrassSaturation("Grass Saturation", Float) = 2

		[Header(Textures)]
		[Space]
		[MainTexture]_MainTex("Color Grass", 2D) = "white" {}
		[NoScaleOffset]_GroundTex("Ground Texture", 2D) = "white" {}
		[NoScaleOffset]_NoGrassTex("No-Grass Texture", 2D) = "white" {}
		[NoScaleOffset]_GrassTex("Grass Pattern", 2D) = "white" {}
		[NoScaleOffset]_Noise("Noise Color", 2D) = "white" {}
		[NoScaleOffset]_Distortion("Distortion Wind", 2D) = "white" {}

		[Header(Geometry Values)]
		[Space]
		_NumberOfStacks("Number Of Stacks", Range(0, 17)) = 12
		[Toggle(USE_SS)] _UseSuperStack("Use Ultra Grass (expensive)", Float) = 0
		_OffsetValue("Offset Normal", Float) = 1
		_OffsetVector("Offset Vector", Vector) = (0,0,0)
		_FadeDistanceStart("Fade-Distance Start", Float) = 16
		_FadeDistanceEnd("Fade-Distance End", Float) = 26
		_MinimumNumberStacks("Minimum Number Of Stacks", Range(0, 17)) = 2
		[Toggle(USE_CS)] _UseCS("Near Camera Smoosh", Float) = 1
		_NearCameraSmoosh("Near Camera Smoosh", Float) = 0.5

		[Header(Rim Lighting)]
		[Space]
		_RimColor("Rim Color", Color) = (0.14, 0.18, 0.09, 1)
		_RimPower("Rim Power", Range(0.0, 8.0)) = 3.14
		_RimMin("Rim Min", Range(0,1)) = 0.241
		_RimMax("Rim Max", Range(0,1)) = 0.62

		[Header(Grass Values)]
		[Space]
		_GrassThinness("Grass Thinness", Range(0.01, 2)) = 0.4
		_GrassThinnessIntersection("Grass Thinness Intersection", Range(0.01, 2)) = 0.43
		_TilingN1("Tiling Of Grass", Float) = 6.06
		_WindMovement("Wind Movement Speed", Float) = 0.55
		_WindForce("Wind Force", Float) = 0.35
		_TilingN3("Wind Noise Tiling", Float) = 1
		_GrassCut("Grass Cut", Range(0, 1)) = 0
		_TilingN2("Tiling Of Noise Color", Float) = 0.05
		_NoisePower("Noise Power", Float) = 2
		[Toggle(USE_RT)] _UseRT("Use RenderTexture Effect", Float) = 1
		[Toggle(USE_S)] _UseShadow("Use Shadows", Float) = 1
		[Toggle(USE_SC)] _UseShadowCast("Use Shadow Casting", Float) = 1
		[Toggle(USE_VR)] _UseVR("Use For VR", Float) = 0

		[Header(Procedural Tiling)]
		[Space]
		[Toggle(USE_PR)] _UsePR("Use Procedural Tiling (Reduce performance)", Float) = 0
		_ProceduralDistance("Tile start distance", Float) = 5.5
		_ProceduralStrength("Tile Smoothness", Float) = 1.5
		[Space]
		[Toggle(USE_WC)] _UseWC("Use World Coordinates", Float) = 0
		_WorldScale("World Scale", Float) = 10
		_WorldRotation("World Rotation", Range(0, 360)) = 0
		[Space]
		[Toggle(USE_TP)] _UseTP("Use Triplanar", Float) = 0

		[Header(Lighting Parameters)]
		[Space]
		_LightIntensity("Additional Lights Intensity", Range(0.00, 4)) = 1
		[Toggle(USE_AL)] _UseAmbientLight("Use Ambient Light", Float) = 0

	}
		SubShader
		{
			Tags{"DisableBatching" = "true" }
			pass
			{
			Tags{ "LightMode" = "ForwardBase"}
			LOD 200
			ZWrite true
			CGPROGRAM

			#pragma target 4.5
			#pragma require geometry
            // excluded shader from OpenGL ES 2.0 because it uses non-square matrices, if you need it to work on ES 2.0 comment the line below
			#pragma exclude_renderers gles

			#pragma vertex vert
			#pragma fragment frag
			#pragma geometry geom
			#pragma multi_compile_fog
			#pragma multi_compile_fwdbase

			#pragma shader_feature USE_RT
			#pragma shader_feature USE_PR
			#pragma shader_feature USE_WC
			#pragma shader_feature USE_S
			#pragma shader_feature USE_SC
			#pragma shader_feature USE_AL
			#pragma shader_feature USE_VR
			#pragma shader_feature USE_TP
			#pragma shader_feature USE_SS
			#pragma shader_feature USE_CS

			//#define SHADOWS_SCREEN
			#include "AutoLight.cginc"
			//#include "Lighting.cginc"
			#include "UnityCG.cginc"
			#pragma multi_compile _ LIGHTMAP_ON

				uniform float4 _LightColor0;
				uniform sampler2D _LightTexture0;

				struct appdata
				{
					float4 vertex : POSITION;
					float2 uv : TEXCOORD0;
					float4 normal : NORMAL;
#ifdef USE_VR
					UNITY_VERTEX_INPUT_INSTANCE_ID
#endif
#ifdef LIGHTMAP_ON
					half4 texcoord1 : TEXCOORD1;
#endif
				};

				struct v2g
				{
					float2 uv : TEXCOORD0;
					float4 pos : SV_POSITION;
					float4 objPos : TEXCOORD1;
					float3 normal : TEXCOORD2;
					SHADOW_COORDS(4)
					UNITY_FOG_COORDS(5)

#ifdef USE_VR
					UNITY_VERTEX_INPUT_INSTANCE_ID
#endif
#ifdef LIGHTMAP_ON
					float2 lmap : TEXCOORD6;
#endif
				};

				struct g2f
				{
					float2 uv : TEXCOORD0;
					float4 pos : SV_POSITION;
					float3 worldPos : TEXCOORD1;
					half1 color : TEXCOORD2;
					float3 normal : TEXCOORD3;
					SHADOW_COORDS(4)
					UNITY_FOG_COORDS(5)
#ifdef USE_VR
					UNITY_VERTEX_INPUT_INSTANCE_ID
					UNITY_VERTEX_OUTPUT_STEREO
#endif
#ifdef LIGHTMAP_ON
					float2 lmap : TEXCOORD6;
#endif
				};

				struct SHADOW_VERTEX // This is needed for custom shadow casting
				{
					float4 vertex : POSITION;
				};
				// Render Texture Effects //
				uniform Texture2D _GlobalEffectRT;
				uniform float3 _Position;
				uniform float _OrthographicCamSize;
				uniform float _HasRT;

				int _NumberOfStacks, _MinimumNumberStacks;
				Texture2D _MainTex;
				Texture2D _NoGrassTex;
				float4 _MainTex_ST;
				Texture2D _Distortion;
				sampler2D _GrassTex;
				Texture2D _Noise;
				Texture2D _GroundTex;
				float _TilingN1;
				float _TilingN2, _WindForce;
				float4 _Color, _SelfShadowColor, _GroundColor, _ProjectedShadowColor;
				float4 _OffsetVector;
				float _TilingN3;
				float _WindMovement, _OffsetValue;
				half _GrassThinness, _GrassShading, _GrassThinnessIntersection, _GrassCut;
				half4 _RimColor;
				half _RimPower, _NoisePower, _GrassSaturation, _FadeDistanceStart, _FadeDistanceEnd, _WorldScale, _WorldRotation, _NearCameraSmoosh;
				half _RimMin, _RimMax;
				float _ProceduralDistance, _ProceduralStrength;
				SamplerState my_linear_repeat_sampler;
				SamplerState my_linear_clamp_sampler;

				float2 hash2D2D(float2 s)
				{
					//magic numbers
					return frac(sin(s)*4.5453);
				}

				//stochastic sampling
				float4 tex2DStochastic(sampler2D tex, float2 UV)
				{
					float4x3 BW_vx;
					float2 skewUV = mul(float2x2 (1.0, 0.0, -0.57735027, 1.15470054), UV * 3.464);

					//vertex IDs and barycentric coords
					float2 vxID = float2 (floor(skewUV));
					float3 barry = float3 (frac(skewUV), 0);
					barry.z = 1.0 - barry.x - barry.y;

					BW_vx = ((barry.z > 0) ?
						float4x3(float3(vxID, 0), float3(vxID + float2(0, 1), 0), float3(vxID + float2(1, 0), 0), barry.zyx) :
						float4x3(float3(vxID + float2 (1, 1), 0), float3(vxID + float2 (1, 0), 0), float3(vxID + float2 (0, 1), 0), float3(-barry.z, 1.0 - barry.y, 1.0 - barry.x)));

					//calculate derivatives to avoid triangular grid artifacts
					float2 dx = ddx(UV);
					float2 dy = ddy(UV);

					float4 stochasticTex = mul(tex2D(tex, UV + hash2D2D(BW_vx[0].xy), dx, dy), BW_vx[3].x) +
						mul(tex2D(tex, UV + hash2D2D(BW_vx[1].xy), dx, dy), BW_vx[3].y) +
						mul(tex2D(tex, UV + hash2D2D(BW_vx[2].xy), dx, dy), BW_vx[3].z);
					return stochasticTex;
				}

				v2g vert(appdata v)
				{
					v2g o;
#ifdef USE_VR
					UNITY_SETUP_INSTANCE_ID(v);
					UNITY_TRANSFER_INSTANCE_ID(v, o);
#endif
					o.objPos = v.vertex;
					o.pos = UnityObjectToClipPos(v.vertex);
					o.uv = TRANSFORM_TEX(v.uv, _MainTex);
#ifdef SHADOWS_SCREEN
					o._ShadowCoord = ComputeScreenPos(o.pos);
#endif
					o.normal = v.normal;
#ifdef LIGHTMAP_ON
					o.lmap = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw;
#endif
					UNITY_TRANSFER_FOG(o, o.pos);
					return o;
				}

				#define UnityObjectToWorld(o) mul(unity_ObjectToWorld, float4(o.xyz,1.0))
#ifdef USE_SS
				[instance(3)]
#else
				[instance(1)]
#endif
				[maxvertexcount(51)]
				void geom(triangle v2g input[3], uint InstanceID : SV_GSInstanceID, inout TriangleStream<g2f> tristream)
				{
					g2f o;
					SHADOW_VERTEX v;
					_OffsetValue *= 0.01;

#ifdef USE_SS
					float numInstance = 3;
#else
					float numInstance = 1;
#endif
					// Loop 3 times for the base ground geometry
					for (int j = 0; j < 3; j++)
					{
#ifdef USE_SS
						if (InstanceID > 0)
						{
							continue;
						}
#endif		
#ifdef USE_VR
						UNITY_SETUP_INSTANCE_ID(input[j]);
						UNITY_TRANSFER_INSTANCE_ID(input[j], o);
						UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
#endif
						o.uv = input[j].uv;
						o.pos = input[j].pos;
						o.color = 0.0 + _GrassCut;
						o.normal = normalize(mul(float4(input[j].normal, 0.0), unity_WorldToObject).xyz);
						o.worldPos = UnityObjectToWorld(input[j].objPos);
#ifdef SHADOWS_SCREEN
						o._ShadowCoord = input[j]._ShadowCoord;
#endif
						UNITY_TRANSFER_FOG(o, o.pos);
#ifdef LIGHTMAP_ON
						o.lmap = input[j].lmap.xy;
#endif
						tristream.Append(o);
					}
					tristream.RestartStrip();

					float dist = distance(_WorldSpaceCameraPos, UnityObjectToWorld((input[0].objPos / 3 + input[1].objPos / 3 + input[2].objPos / 3)));
					if (dist > 0)
					{
						int NumStacks = lerp(_NumberOfStacks + 1, 0, (dist - _FadeDistanceStart)*(1 / max(_FadeDistanceEnd - _FadeDistanceStart, 0.0001)));//Clamp because people will start dividing by 0
						_NumberOfStacks = min(clamp(NumStacks, clamp(_MinimumNumberStacks, 0, _NumberOfStacks), 17), _NumberOfStacks);
					}

					float4 P; // P is shadow coords new position
					float4 objSpace; // objSpace is the vertex new position
					float4 offsetNormalI = (_OffsetVector / numInstance * 0.01) * (InstanceID + 1);
					float thicknessModifier = 1;

					// Loop 3 times * numbersOfStacks for the grass
						for (float i = 1; i <= _NumberOfStacks; i++)
						{
							float4 offsetNormal = _OffsetVector * i*0.01;
							for (int ii = 0; ii < 3; ii++)
							{
#ifdef USE_VR
								UNITY_SETUP_INSTANCE_ID(input[ii]);
								UNITY_TRANSFER_INSTANCE_ID(input[ii], o);
								UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
#endif
#ifdef LIGHTMAP_ON
								o.lmap = input[ii].lmap.xy;
#endif
								float4 NewNormal = float4(normalize(input[ii].normal)* _OffsetValue, 0);
#ifdef USE_CS
								float dist = distance(_WorldSpaceCameraPos, UnityObjectToWorld(input[ii].objPos));

								if (dist > 0)
								{
									thicknessModifier = lerp(0.001, 1, saturate((dist - _NearCameraSmoosh) * 0.33));
								}
#endif
#ifdef SHADOWS_SCREEN
								//P = input[ii]._ShadowCoord + _OffsetVector * _NumberOfStacks*0.01;
								P = input[ii]._ShadowCoord;
#else
								//P =  _OffsetVector * _NumberOfStacks*0.01 ;
								P =  1 ;
#endif
								objSpace = float4(input[ii].objPos + NewNormal * thicknessModifier * i + offsetNormal * thicknessModifier -     (NewNormal * thicknessModifier  / numInstance) * (InstanceID + 1) - offsetNormalI * thicknessModifier);
								o.color = (i / (_NumberOfStacks - _GrassCut)) - ((1 * InstanceID) / (_NumberOfStacks * numInstance));
#ifdef USE_SS
								if (InstanceID <= 2 && _NumberOfStacks == 17 && i == 1)
								{
									o.color = 0.05;
								}
#endif
								o.uv = input[ii].uv;
								o.pos = UnityObjectToClipPos(objSpace);
#ifdef SHADOWS_SCREEN
								o._ShadowCoord = P;
#endif
								o.worldPos = UnityObjectToWorld(objSpace);
								o.normal = normalize(mul(float4(input[ii].normal, 0.0), unity_WorldToObject).xyz);

#if defined(USE_SC) && defined(USE_S)
								v.vertex = mul(unity_WorldToObject, UnityObjectToWorld(objSpace));
								TRANSFER_VERTEX_TO_FRAGMENT(o);
#endif
								UNITY_TRANSFER_FOG(o, o.pos);

								tristream.Append(o);
							}
							tristream.RestartStrip();
					}
				}
				half4 frag(g2f i) : SV_Target
				{
#ifdef USE_VR
					UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
#endif
				    //Calculate Distance to camera
					float dist = 1;
					float2 mainUV;
					//Setup Coordinate Space
#ifdef USE_WC
					mainUV = i.worldPos.xz/ max(_WorldScale,0.001); 

					float rotationAngle = _WorldRotation * UNITY_PI / 180.0;
					float sina, cosa;
					sincos(rotationAngle, sina, cosa);
					float2x2 m = float2x2(cosa, -sina, sina, cosa);
					mainUV = mul(m, mainUV.xy);
#else
					mainUV = i.uv;
#endif
#ifdef USE_PR
					dist = clamp(lerp(0, 1, (distance(_WorldSpaceCameraPos, i.worldPos)- _ProceduralDistance) / max(_ProceduralStrength,0.05)), 0, 1);
#endif
					float2 uv = i.worldPos.xz - _Position.xz;
					uv = uv / (_OrthographicCamSize * 2);
					uv += 0.5;

					float bRipple = 1;
#ifdef USE_RT
					if (_HasRT)
					{
						bRipple = 1 - clamp(_GlobalEffectRT.Sample(my_linear_clamp_sampler, uv).b * 5, 0, 2);
					}
#endif
					float2 dis = _Distortion.Sample(my_linear_repeat_sampler, mainUV *_TilingN3 + _Time.xx * 3 * _WindMovement);
					float displacementStrengh = 0.6* (((sin(_Time.y + dis * 5) + sin(_Time.y*0.5 + 1.051)) / 5.0) + 0.15*dis)*bRipple; //hmm math
					dis = dis * displacementStrengh*(i.color.r*1.3)*_WindForce*bRipple;

					float ripples = 0.25;
					float ripples2 = 0;
					float ripples3 = 0;
					float ripplesG = 0;
#ifdef USE_RT
					if (_HasRT)
					{
						// .b(lue) = Grass height / .r(ed) = Grass shadow / .g(reen) is unassigned you can put anything you want if you need a new effect
#ifdef USE_TP
						float3 rippleMain = _GlobalEffectRT.Sample(my_linear_clamp_sampler, float2((i.uv.x / _MainTex_ST.x) - _MainTex_ST.z, (i.uv.y / _MainTex_ST.y) - _MainTex_ST.w) + dis.xy * 0.04);
#else
						float3 rippleMain = _GlobalEffectRT.Sample(my_linear_clamp_sampler, uv + dis.xy * 0.04);
#endif
						ripples = (0.25 - rippleMain.z);
						ripples2 = (rippleMain.x);
						ripplesG = (0 - rippleMain.y);
						ripples3 = (0 - ripples2) * ripples2;
					}
#endif
					float3 normalDir = i.normal;
					float3 viewDir = normalize(_WorldSpaceCameraPos.xyz - i.worldPos.xyz);
					float rim = 1 - saturate(dot(viewDir, normalDir));
					float3 rimLight = pow(rim, _RimPower);
					rimLight = smoothstep(_RimMin, _RimMax, rimLight);
#ifdef USE_PR
					float3 grassPattern = lerp(tex2D(_GrassTex, mainUV *_TilingN1 + dis.xy), tex2DStochastic(_GrassTex, mainUV *_TilingN1 + dis.xy), dist);
#else
					float3 grassPattern = tex2D(_GrassTex, mainUV *_TilingN1 + dis.xy);
#endif
					float3 noise = _Noise.Sample(my_linear_repeat_sampler, mainUV * _TilingN2 + dis.xy) * _NoisePower;
					half4 col = _MainTex.Sample(my_linear_repeat_sampler, mainUV + dis.xy*0.09);
					half4 colGround = _GroundTex.Sample(my_linear_repeat_sampler, mainUV + dis.xy*0.05);
					half3 NoGrass = _NoGrassTex.Sample(my_linear_repeat_sampler, mainUV + dis.xy*0.05);
					NoGrass.r = saturate(NoGrass.r + ripplesG);
					half alpha = step(1 - ((col.x + col.y + col.z + grassPattern.x) * _GrassThinness)*((2 - i.color.r)*NoGrass.r*grassPattern.x)*saturate(ripples + 1)*saturate(ripples + 1), ((1 - i.color.r)*(ripples + 1))*(NoGrass.r*grassPattern.x)*_GrassThinness - dis.x * 5);
					alpha = lerp(alpha, alpha + (grassPattern.x*NoGrass.r*(1 - i.color.r))*_GrassThinnessIntersection, 1 - (NoGrass.r)*(ripples*NoGrass.r + 0.75));

					if (i.color.r >= 0.02)
					{
						if (alpha*(ripples3 + 1) - (i.color.r) < -0.02)discard;
					}
					_Color *= 2;
					col.xyz = (pow(col, _GrassSaturation) * _GrassSaturation)*float3(_Color.x, _Color.y, _Color.z);
					col.xyz *= saturate(lerp(_SelfShadowColor, 1, pow(i.color.x, 1.1)) + (_GrassShading  * (ripples * 1 + 1) - noise.x*dis.x * 2) + (1 - NoGrass.r) - noise.x*dis.x * 2);
					col.xyz *= _Color * (ripples*-0.1 + 1);
					col.xyz *= 1 - (ripples2*(1 - saturate(i.color.r - 0.7)));

					if (i.color.r < 0.02)
					{
						colGround.xyz *= ((1 - NoGrass.r)*_GroundColor*_GroundColor * 2);
						col.xyz = lerp(col.xyz, colGround.xyz, 1 - NoGrass.r);
					}

					col.xyz += _RimColor.rgb * pow(rimLight, _RimPower);
#ifdef USE_S
					half3 lm = 1;
#ifdef LIGHTMAP_ON
					lm = DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, i.lmap));
					col.rgb *= saturate(lm+0.1);
#else
					float shadowmap = LIGHT_ATTENUATION(i);
					half3 shadowmapColor = lerp(_ProjectedShadowColor, 1, shadowmap);
					col.xyz = col.xyz * saturate(shadowmapColor);
					if (_LightColor0.r+ _LightColor0.g+ _LightColor0.b > 0)
					{
						col.xyz *= _LightColor0;
					}
#endif				
#endif
#ifdef USE_AL
					col.rgb = saturate( col.rgb + (ShadeSH9(half4(i.normal, 1))-0.5)*0.5);
#endif
					UNITY_APPLY_FOG(i.fogCoord, col);
					return col;
				}
				ENDCG
			}
		// SHADOW CASTING PASS, this will redraw geometry so keep this pass disabled if you want to save performance
		// Keep it if you want depth for post process or if you're using deferred rendering
		Pass{
				Tags {"LightMode" = "ShadowCaster"}

			CGPROGRAM
			#pragma target 4.5
			#pragma require geometry
			#pragma vertex vert
			#pragma fragment frag
			#pragma geometry geom
			#pragma shader_feature USE_RT
			#pragma shader_feature USE_SC
			#pragma shader_feature USE_S
			#pragma shader_feature USE_WC
			#pragma shader_feature USE_VR
			#pragma shader_feature USE_TP
			#pragma shader_feature USE_SS
			#pragma shader_feature USE_CS
			#include "UnityCG.cginc"

		struct appdata
		{
			float4 vertex : POSITION;
			float2 uv : TEXCOORD0;
			float4 normal : NORMAL;
#ifdef USE_VR
			UNITY_VERTEX_INPUT_INSTANCE_ID
#endif
		};

		struct v2g
		{
			float2 uv : TEXCOORD0;
			float4 pos : SV_POSITION;
			float4 objPos : TEXCOORD1;
			float3 normal : TEXCOORD3;
#ifdef USE_VR
			UNITY_VERTEX_INPUT_INSTANCE_ID
#endif
		};

		struct g2f
		{
			float2 uv : TEXCOORD0;
			float3 worldPos : TEXCOORD1;
			float3 normal : TEXCOORD3;
			float1 color : TEXCOORD2;
			V2F_SHADOW_CASTER;
#ifdef USE_VR
			UNITY_VERTEX_INPUT_INSTANCE_ID
			UNITY_VERTEX_OUTPUT_STEREO
#endif
		};

		struct SHADOW_VERTEX
		{
			float4 vertex : POSITION;
		};

			Texture2D _MainTex;
			Texture2D _NoGrassTex;
			Texture2D _Noise;

			uniform Texture2D _GlobalEffectRT;
			uniform float3 _Position;
			uniform float _OrthographicCamSize;
			uniform float _HasRT;

			int _NumberOfStacks, _MinimumNumberStacks;
			float4 _MainTex_ST;
			Texture2D _Distortion;
			Texture2D _GrassTex;
			float _TilingN1;
			float _WindForce, _TilingN2;
			float4 _OffsetVector;
			float _TilingN3;
			float _WindMovement, _OffsetValue, _FadeDistanceStart, _FadeDistanceEnd, _WorldScale, _WorldRotation;
			half _GrassThinness, _GrassThinnessIntersection, _GrassCut, _NoisePower, _NearCameraSmoosh;
			SamplerState my_linear_repeat_sampler;
			SamplerState my_linear_clamp_sampler;

					v2g vert(appdata v)
					{
						v2g o;
#ifdef USE_VR
						UNITY_SETUP_INSTANCE_ID(v);
						UNITY_TRANSFER_INSTANCE_ID(v, o);
#endif
						o.objPos = v.vertex;
						o.pos = UnityObjectToClipPos(v.vertex);
						o.normal = v.normal;
						TRANSFER_SHADOW_CASTER_NORMALOFFSET(o)
						o.uv = TRANSFORM_TEX(v.uv, _MainTex);
						return o;
					}

					#define UnityObjectToWorld(o) mul(unity_ObjectToWorld, float4(o.xyz,1.0))
#ifdef USE_SS
					[instance(3)]
#else
					[instance(1)]
#endif
					[maxvertexcount(51)]
					void geom(triangle v2g input[3], uint InstanceID : SV_GSInstanceID, inout TriangleStream<g2f> tristream) {

						g2f o;

						SHADOW_VERTEX v;
						_OffsetValue *= 0.01;

#ifdef USE_SS
						float numInstance = 3;
#else
						float numInstance = 1;
#endif

						for (int j = 0; j < 3; j++)
						{
#ifdef USE_VR
							UNITY_SETUP_INSTANCE_ID(input[j]);
							UNITY_TRANSFER_INSTANCE_ID(input[j], o);
							UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
#endif
							o.uv = input[j].uv;
							o.pos = input[j].pos;
							o.color = float3(0 + _GrassCut, 0 + _GrassCut, 0 + _GrassCut);
							o.normal = normalize(mul(float4(input[j].normal, 0.0), unity_WorldToObject).xyz);
							o.worldPos = UnityObjectToWorld(input[j].objPos);

							tristream.Append(o);
						}
#if defined(USE_SC) && defined(USE_S)
						float4 P;
						float4 objSpace;
						tristream.RestartStrip();

						float dist = distance(_WorldSpaceCameraPos, UnityObjectToWorld((input[0].objPos / 3 + input[1].objPos / 3 + input[2].objPos / 3)));
						if (dist > 0)
						{
							int NumStacks = lerp(_NumberOfStacks + 1, 0, (dist - _FadeDistanceStart)*(1 / max(_FadeDistanceEnd - _FadeDistanceStart, 0.0001)));//Clamp because people will start dividing by 0
							_NumberOfStacks = min(clamp(NumStacks, clamp(_MinimumNumberStacks, 0, _NumberOfStacks), 17), _NumberOfStacks);
						}

						for (float i = 1; i <= _NumberOfStacks; i++)
						{
							float4 offsetNormal = _OffsetVector * i*0.01;
							float4 offsetNormalI = (_OffsetVector / numInstance * 0.01) * (InstanceID + 1);

							for (int ii = 0; ii < 3; ii++)
							{
#ifdef USE_VR
								UNITY_SETUP_INSTANCE_ID(input[ii]);
								UNITY_TRANSFER_INSTANCE_ID(input[ii], o);
								UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
#endif
								float thicknessModifier = 1;
#ifdef USE_CS
								float dist = distance(_WorldSpaceCameraPos, UnityObjectToWorld(input[ii].objPos));

								if (dist > 0)
								{
									thicknessModifier = lerp(0.001, 1, saturate((dist - _NearCameraSmoosh) * 0.33));
								}
#endif
								float4 NewNormal = float4(normalize(input[ii].normal) * _OffsetValue, 0);
								objSpace = float4(input[ii].objPos + NewNormal * thicknessModifier * i + offsetNormal * thicknessModifier - (NewNormal * thicknessModifier / numInstance) * (InstanceID + 1) - offsetNormalI * thicknessModifier);

								// Not a very good solution for shadow bias
								if (i >= _NumberOfStacks - 1)
								{
									objSpace -= unity_LightShadowBias.z;
								}
								o.color = (i / (_NumberOfStacks - _GrassCut)) - ((1 * InstanceID) / (_NumberOfStacks * numInstance));
#ifdef USE_SS
								if (InstanceID <= 2 && _NumberOfStacks == 17 && i == 1)
								{
									o.color = 0.05;
								}
#endif
								o.uv = input[ii].uv;
								o.pos = UnityObjectToClipPos(objSpace);
								o.worldPos = UnityObjectToWorld(objSpace);
								o.normal = normalize(mul(float4(input[ii].normal, 0.0), unity_WorldToObject).xyz);
								tristream.Append(o);
							}
							tristream.RestartStrip();
						}
#endif
					}

			float4 frag(g2f i) : SV_Target
			{
				float2 mainUV;

			//Setup Coordinate Space
#ifdef USE_WC
					mainUV = i.worldPos.xz / max(_WorldScale,0.001);

					float rotationAngle = _WorldRotation * UNITY_PI / 180.0;
					float sina, cosa;
					sincos(rotationAngle, sina, cosa);
					float2x2 m = float2x2(cosa, -sina, sina, cosa);
					mainUV = mul(m, mainUV.xy);
#else
					mainUV = i.uv;
#endif

#if defined(USE_SC) && defined(USE_S)
				float2 uv = i.worldPos.xz - _Position.xz;
				uv = uv / (_OrthographicCamSize * 2);
				uv += 0.5;

				float bRipple = 1;
#ifdef USE_RT
				if (_HasRT)
				{
					bRipple = 1 - clamp(_GlobalEffectRT.Sample(my_linear_clamp_sampler, uv).b * 5, 0, 2);
				}
#endif
				float2 dis = _Distortion.Sample(my_linear_repeat_sampler, mainUV * _TilingN3 + _Time.xx * 3 * _WindMovement);
				float displacementStrengh = 0.6* (((sin(_Time.y + dis * 5) + sin(_Time.y*0.5 + 1.051)) / 5.0) + 0.15*dis)*bRipple; //hmm math
				dis = dis * displacementStrengh*(i.color.r*1.3)*_WindForce*bRipple;

				float ripples = 0.25;
				float ripples2 = 0;
				float ripplesG = 0;
				float ripples3 = 0;

#ifdef USE_RT
				if (_HasRT)
				{
					// .b(lue) = Grass height / .r(ed) = Grass shadow / .g(reen) is unassigned you can put anything you want if you need a new effect
#ifdef USE_TP
					float3 rippleMain = _GlobalEffectRT.Sample(my_linear_clamp_sampler, float2((i.uv.x / _MainTex_ST.x) - _MainTex_ST.z, (i.uv.y / _MainTex_ST.y) - _MainTex_ST.w) + dis.xy * 0.04);
#else
					float3 rippleMain = _GlobalEffectRT.Sample(my_linear_clamp_sampler, uv + dis.xy * 0.04);
#endif
					ripples = (0.25 - rippleMain.z);
					ripples2 = (rippleMain.x);
					ripplesG = (0 - rippleMain.y);
					ripples3 = (0 - ripples2) * ripples2;
				}
#endif
				half4 col = _MainTex.Sample(my_linear_repeat_sampler, mainUV + dis.xy * 0.09);

				float3 noise = _Noise.Sample(my_linear_repeat_sampler, mainUV * _TilingN2 + dis.xy) * _NoisePower;
				float3 grassPattern = _GrassTex.Sample(my_linear_repeat_sampler, mainUV * _TilingN1 + dis.xy);
				half3 NoGrass = _NoGrassTex.Sample(my_linear_repeat_sampler, mainUV + dis.xy * 0.05);
				NoGrass.r = saturate(NoGrass.r + ripplesG);

				half alpha = step(1 - ((col.x + col.y + col.z + grassPattern.x) * _GrassThinness) * ((2 - i.color.r) * NoGrass.r * grassPattern.x) * saturate(ripples + 1) * saturate(ripples + 1), ((1 - i.color.r) * (ripples + 1)) * (NoGrass.r * grassPattern.x) * _GrassThinness - dis.x * 5);
				alpha = lerp(alpha, alpha + (grassPattern.x * NoGrass.r * (1 - i.color.r)) * _GrassThinnessIntersection, 1 - (NoGrass.r) * (ripples * NoGrass.r + 0.75));

				if (i.color.r >= 0.01)
				{
					if (alpha*(ripples3 + 1) - (i.color.r) < -0.02)discard;
				}
				SHADOW_CASTER_FRAGMENT(i)
				//return col; //For debugging
#else
			SHADOW_CASTER_FRAGMENT(i)
#endif
				}
				ENDCG
			}
			Pass{
			 Tags { "LightMode" = "ForwardAdd"}
			 // pass for additional light sources
			Blend OneMinusDstColor One // Additive

			CGPROGRAM

			#pragma target 4.5
			#pragma require geometry
			#pragma vertex vert
			#pragma fragment frag
			#pragma geometry geom
			#pragma shader_feature USE_RT
			#pragma shader_feature USE_WC
			#pragma shader_feature USE_VR
			#pragma shader_feature USE_SS
			#pragma shader_feature USE_CS

			#include "UnityCG.cginc"
			uniform float4 _LightColor0;
			uniform float4x4 unity_WorldToLight;
			uniform sampler2D _LightTexture0;

			Texture2D _MainTex;
			Texture2D _NoGrassTex;
			Texture2D _Noise;

			uniform Texture2D _GlobalEffectRT;
			uniform float3 _Position;
			uniform float _OrthographicCamSize;
			uniform float _HasRT;

			int _NumberOfStacks, _MinimumNumberStacks;
			float4 _MainTex_ST;
			Texture2D _Distortion;
			sampler2D _GrassTex;
			float _TilingN1;
			float _WindForce, _TilingN2;
			float4 _OffsetVector, _Color, _SelfShadowColor, _GroundColor;
			float _TilingN3;
			float _WindMovement, _OffsetValue, _FadeDistanceStart, _FadeDistanceEnd, _WorldScale, _WorldRotation;
			half _GrassThinness, _GrassThinnessIntersection, _GrassCut, _NoisePower;
			SamplerState my_linear_repeat_sampler;
			SamplerState my_linear_clamp_sampler;
			half _LightIntensity, _GrassSaturation, _GrassShading, _NearCameraSmoosh;

			Texture2D _GroundTex;

			  struct appdata
			  {
				  float4 vertex : POSITION;
				  float2 uv : TEXCOORD0;
				  float3 normal : NORMAL;
				  float4 worldPos : TEXCOORD1;
				  float4 posLight : TEXCOORD2;
#ifdef USE_VR
				  UNITY_VERTEX_INPUT_INSTANCE_ID
#endif
			  };

			  struct v2g {
				  float2 uv : TEXCOORD0;
				  float4 pos : SV_POSITION;
				 float3 normal : NORMAL;
				 float4 worldPos : TEXCOORD1;
				 float4 posLight : TEXCOORD2;
				 float4 objPos : TEXCOORD3;
#ifdef USE_VR
				 UNITY_VERTEX_INPUT_INSTANCE_ID
#endif
			  };

			  struct g2f {
				  float2 uv : TEXCOORD0;
				  float4 pos : SV_POSITION;
				  float4 worldPos : TEXCOORD1;
				  float4 posLight : TEXCOORD2;
				  float1 color : TEXCOORD3;
				  float3 normal : TEXCOORD4;
#ifdef USE_VR
				  UNITY_VERTEX_INPUT_INSTANCE_ID
				  UNITY_VERTEX_OUTPUT_STEREO
#endif
			  };

			  v2g vert(appdata v)
			  {
				  v2g o;

#ifdef USE_VR
				  UNITY_SETUP_INSTANCE_ID(v);
				  UNITY_TRANSFER_INSTANCE_ID(v, o);
#endif
				  float4x4 modelMatrix = unity_ObjectToWorld;
				  float4x4 modelMatrixInverse = unity_WorldToObject;
				  o.objPos = v.vertex;
				  o.worldPos = mul(modelMatrix, v.vertex);
				  o.posLight = mul(unity_WorldToLight, o.worldPos);
				  o.normal = v.normal;
				  o.pos = UnityObjectToClipPos(v.vertex);
				  o.uv = TRANSFORM_TEX(v.uv, _MainTex);

				  return o;
			  }

	#define UnityObjectToWorld(o) mul(unity_ObjectToWorld, float4(o.xyz,1.0))
#ifdef USE_SS
			  [instance(3)]
#else
			  [instance(1)]
#endif
			  [maxvertexcount(51)]
			  void geom(triangle v2g input[3], uint InstanceID : SV_GSInstanceID, inout TriangleStream<g2f> tristream) {

				  g2f o;

				  _OffsetValue *= 0.01;

#ifdef USE_SS
				  float numInstance = 3;
#else
				  float numInstance = 1;
#endif
				  for (int j = 0; j < 3; j++)
				  {
#ifdef USE_VR
					  UNITY_SETUP_INSTANCE_ID(input[j]);
					  UNITY_TRANSFER_INSTANCE_ID(input[j], o);
					  UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
#endif
					  o.uv = input[j].uv;
					  o.pos = input[j].pos;
					  o.color = float3(0 + _GrassCut, 0 + _GrassCut, 0 + _GrassCut);
					  o.normal = normalize(mul(float4(input[j].normal, 0.0), unity_WorldToObject).xyz);
					  o.worldPos = UnityObjectToWorld(input[j].objPos);
					  o.posLight = mul(unity_WorldToLight, input[j].worldPos);

					  tristream.Append(o);
				  }
				  float4 objSpace;
				  tristream.RestartStrip();

				  float dist = distance(_WorldSpaceCameraPos, UnityObjectToWorld((input[0].objPos / 3 + input[1].objPos / 3 + input[2].objPos / 3)));
				  if (dist > 0)
				  {
					  int NumStacks = lerp(_NumberOfStacks + 1, 0, (dist - _FadeDistanceStart)*(1 / max(_FadeDistanceEnd - _FadeDistanceStart, 0.0001)));//Clamp because people will start dividing by 0
					  _NumberOfStacks = min(clamp(NumStacks, clamp(_MinimumNumberStacks, 0, _NumberOfStacks), 17), _NumberOfStacks);
				  }

				  for (float i = 1; i <= _NumberOfStacks; i++)
				  {
					  float4 offsetNormal = _OffsetVector * i*0.01;
					  float4 offsetNormalI = (_OffsetVector / 1 * 0.01) * (0 + 1);

					  for (int ii = 0; ii < 3; ii++)
					  {
#ifdef USE_VR
						  UNITY_SETUP_INSTANCE_ID(input[ii]);
						  UNITY_TRANSFER_INSTANCE_ID(input[ii], o);
						  UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
#endif
						  float thicknessModifier = 1;
#ifdef USE_CS
						  float dist = distance(_WorldSpaceCameraPos, UnityObjectToWorld(input[ii].objPos));

						  if (dist > 0)
						  {
							  thicknessModifier = lerp(0.001, 1, saturate((dist - _NearCameraSmoosh) * 0.33));
						  }
#endif
						  float4 NewNormal = float4(normalize(input[ii].normal) * _OffsetValue, 0);
						  objSpace = float4(input[ii].objPos + NewNormal * thicknessModifier * i + offsetNormal * thicknessModifier - (NewNormal * thicknessModifier / numInstance) * (InstanceID + 1) - offsetNormalI * thicknessModifier);
						  o.color = (i / (_NumberOfStacks - _GrassCut)) - ((1 * InstanceID) / (_NumberOfStacks * numInstance));
#ifdef USE_SS
						  if (InstanceID <= 2 && _NumberOfStacks == 17 && i == 1)
						  {
							  o.color = 0.05;
						  }
#endif
						  o.uv = input[ii].uv;
						  o.pos = UnityObjectToClipPos(objSpace);
						  o.worldPos = UnityObjectToWorld(objSpace);
						  o.normal = normalize(mul(float4(input[ii].normal, 0.0), unity_WorldToObject).xyz);
						  o.posLight = mul(unity_WorldToLight, input[ii].worldPos);

						  tristream.Append(o);
					  }
					  tristream.RestartStrip();
				  }
			  }

			  float4 frag(g2f i) : COLOR
			  {
				  float2 mainUV;
			  //Setup Coordinate Space
  #ifdef USE_WC
					  mainUV = i.worldPos.xz / max(_WorldScale,0.001);

					  float rotationAngle = _WorldRotation * UNITY_PI / 180.0;
					  float sina, cosa;
					  sincos(rotationAngle, sina, cosa);
					  float2x2 m = float2x2(cosa, -sina, sina, cosa);
					  mainUV = mul(m, mainUV.xy);
  #else
					  mainUV = i.uv;
  #endif
				  float2 uv = i.worldPos.xz - _Position.xz;
					uv = uv / (_OrthographicCamSize * 2);
					uv += 0.5;

					float bRipple = 1;
	#ifdef USE_RT
					if (_HasRT)
					{
						bRipple = 1 - clamp(_GlobalEffectRT.Sample(my_linear_clamp_sampler, uv).b * 5, 0, 2);
					}
#endif

					float2 dis = _Distortion.Sample(my_linear_repeat_sampler, mainUV * _TilingN3 + _Time.xx * 3 * _WindMovement);
					float displacementStrengh = 0.6* (((sin(_Time.y + dis * 5) + sin(_Time.y*0.5 + 1.051)) / 5.0) + 0.15*dis)*bRipple; //hmm math
					dis = dis * displacementStrengh*(i.color.r*1.3)*_WindForce*bRipple;

					float ripples = 0.25;
					float ripples2 = 0;
					float ripplesG = 0;
					float ripples3 = 0;
	#ifdef USE_RT
					if (_HasRT)
					{
						// .b(lue) = Grass height / .r(ed) = Grass shadow / .g(reen) is unassigned you can put anything you want if you need a new effect
						float3 rippleMain = _GlobalEffectRT.Sample(my_linear_clamp_sampler, uv + dis.xy * 0.04);
						ripples = (0.25 - rippleMain.z);
						ripples2 = (rippleMain.x);
						ripplesG = (0 - rippleMain.y);
						ripples3 = (0 - ripples2) * ripples2;
					}
	#endif
					half4 col = _MainTex.Sample(my_linear_repeat_sampler, mainUV + dis.xy * 0.09);
					float3 noise = _Noise.Sample(my_linear_repeat_sampler, mainUV * _TilingN2 + dis.xy) * _NoisePower;
					float3 grassPattern = tex2D(_GrassTex, mainUV * _TilingN1 + dis.xy);
					half3 NoGrass = _NoGrassTex.Sample(my_linear_repeat_sampler, mainUV + dis.xy * 0.05);
					NoGrass.r = saturate(NoGrass.r + ripplesG);

					half alpha = step(1 - ((col.x + col.y + col.z + grassPattern.x) * _GrassThinness) * ((2 - i.color.r) * NoGrass.r * grassPattern.x) * saturate(ripples + 1) * saturate(ripples + 1), ((1 - i.color.r) * (ripples + 1)) * (NoGrass.r * grassPattern.x) * _GrassThinness - dis.x * 5);
					alpha = lerp(alpha, alpha + (grassPattern.x * NoGrass.r * (1 - i.color.r)) * _GrassThinnessIntersection, 1 - (NoGrass.r) * (ripples * NoGrass.r + 0.75));

					if (i.color.r >= 0.02)
					{
						if (alpha*(ripples3 + 1) - (i.color.r) < -0.02)discard;
					}

				 float3 normalDirection = normalize(i.normal);
				 float3 lightDirection;
				 float attenuation;
				 float cookieAttenuation = 1.0;

				 if (0.0 == _WorldSpaceLightPos0.w) // directional light
				 {
					attenuation = 1.0; // no attenuation
					lightDirection = normalize(_WorldSpaceLightPos0.xyz);
					cookieAttenuation = tex2D(_LightTexture0, i.posLight.xy).a;
				 }
				 else if (1.0 != unity_WorldToLight[3][3]) // spot light
				 {
					 attenuation = 1.0; // no attenuation
					 lightDirection = normalize(_WorldSpaceLightPos0.xyz);
					 cookieAttenuation = tex2D(_LightTexture0,i.posLight.xy / i.posLight.w + float2(0.5, 0.5)).a;
				 }
				 else // point light
				 {
					float3 vertexToLightSource = _WorldSpaceLightPos0.xyz - i.worldPos.xyz;
					lightDirection = normalize(vertexToLightSource);

					float3 lightCoord = mul(unity_WorldToLight, float4(i.worldPos.xyz, 1)).xyz;
					fixed atten = tex2D(_LightTexture0, dot(lightCoord, lightCoord).rr).UNITY_ATTEN_CHANNEL;
					half ndotl = saturate(dot(i.normal, lightDirection));
					attenuation = ndotl * atten;
				 }
				 float3 diffuseReflection = attenuation * _LightColor0.rgb  * max(0.0, dot(normalDirection, lightDirection));
				 float3 finalLightColor = cookieAttenuation * diffuseReflection*saturate(i.color.r + 0.5);
				 finalLightColor *= _LightIntensity;

				 _Color *= 2;
				 col.xyz = (pow(col, _GrassSaturation) * _GrassSaturation) * float3(_Color.x, _Color.y, _Color.z);
				 col.xyz *= saturate(lerp(_SelfShadowColor, 1, pow(i.color.x, 1.1)) + (_GrassShading * (ripples * 1 + 1) - noise.x * dis.x * 2) + (1 - NoGrass.r) - noise.x * dis.x * 2);
				 col.xyz *= _Color * (ripples * -0.1 + 1);
				 col.xyz *= 1 - (ripples2 * (1 - saturate(i.color.r - 0.7)));

				 half4 colGround = _GroundTex.Sample(my_linear_repeat_sampler, mainUV + dis.xy * 0.05);

				 if (i.color.r <= 0.01)
				 {
					 colGround.xyz *= ((1 - NoGrass.r) * _GroundColor * _GroundColor * 2);
					 col.xyz = lerp(col.xyz, colGround.xyz, 1 - NoGrass.r);
				 }

				 finalLightColor = saturate(finalLightColor * col.xyz);

				 return float4(finalLightColor, 1.0);
			  }

			ENDCG
			}
			
		}// Fallback "VertexLit"
}

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • 341
  • 342
  • 343
  • 344
  • 345
  • 346
  • 347
  • 348
  • 349
  • 350
  • 351
  • 352
  • 353
  • 354
  • 355
  • 356
  • 357
  • 358
  • 359
  • 360
  • 361
  • 362
  • 363
  • 364
  • 365
  • 366
  • 367
  • 368
  • 369
  • 370
  • 371
  • 372
  • 373
  • 374
  • 375
  • 376
  • 377
  • 378
  • 379
  • 380
  • 381
  • 382
  • 383
  • 384
  • 385
  • 386
  • 387
  • 388
  • 389
  • 390
  • 391
  • 392
  • 393
  • 394
  • 395
  • 396
  • 397
  • 398
  • 399
  • 400
  • 401
  • 402
  • 403
  • 404
  • 405
  • 406
  • 407
  • 408
  • 409
  • 410
  • 411
  • 412
  • 413
  • 414
  • 415
  • 416
  • 417
  • 418
  • 419
  • 420
  • 421
  • 422
  • 423
  • 424
  • 425
  • 426
  • 427
  • 428
  • 429
  • 430
  • 431
  • 432
  • 433
  • 434
  • 435
  • 436
  • 437
  • 438
  • 439
  • 440
  • 441
  • 442
  • 443
  • 444
  • 445
  • 446
  • 447
  • 448
  • 449
  • 450
  • 451
  • 452
  • 453
  • 454
  • 455
  • 456
  • 457
  • 458
  • 459
  • 460
  • 461
  • 462
  • 463
  • 464
  • 465
  • 466
  • 467
  • 468
  • 469
  • 470
  • 471
  • 472
  • 473
  • 474
  • 475
  • 476
  • 477
  • 478
  • 479
  • 480
  • 481
  • 482
  • 483
  • 484
  • 485
  • 486
  • 487
  • 488
  • 489
  • 490
  • 491
  • 492
  • 493
  • 494
  • 495
  • 496
  • 497
  • 498
  • 499
  • 500
  • 501
  • 502
  • 503
  • 504
  • 505
  • 506
  • 507
  • 508
  • 509
  • 510
  • 511
  • 512
  • 513
  • 514
  • 515
  • 516
  • 517
  • 518
  • 519
  • 520
  • 521
  • 522
  • 523
  • 524
  • 525
  • 526
  • 527
  • 528
  • 529
  • 530
  • 531
  • 532
  • 533
  • 534
  • 535
  • 536
  • 537
  • 538
  • 539
  • 540
  • 541
  • 542
  • 543
  • 544
  • 545
  • 546
  • 547
  • 548
  • 549
  • 550
  • 551
  • 552
  • 553
  • 554
  • 555
  • 556
  • 557
  • 558
  • 559
  • 560
  • 561
  • 562
  • 563
  • 564
  • 565
  • 566
  • 567
  • 568
  • 569
  • 570
  • 571
  • 572
  • 573
  • 574
  • 575
  • 576
  • 577
  • 578
  • 579
  • 580
  • 581
  • 582
  • 583
  • 584
  • 585
  • 586
  • 587
  • 588
  • 589
  • 590
  • 591
  • 592
  • 593
  • 594
  • 595
  • 596
  • 597
  • 598
  • 599
  • 600
  • 601
  • 602
  • 603
  • 604
  • 605
  • 606
  • 607
  • 608
  • 609
  • 610
  • 611
  • 612
  • 613
  • 614
  • 615
  • 616
  • 617
  • 618
  • 619
  • 620
  • 621
  • 622
  • 623
  • 624
  • 625
  • 626
  • 627
  • 628
  • 629
  • 630
  • 631
  • 632
  • 633
  • 634
  • 635
  • 636
  • 637
  • 638
  • 639
  • 640
  • 641
  • 642
  • 643
  • 644
  • 645
  • 646
  • 647
  • 648
  • 649
  • 650
  • 651
  • 652
  • 653
  • 654
  • 655
  • 656
  • 657
  • 658
  • 659
  • 660
  • 661
  • 662
  • 663
  • 664
  • 665
  • 666
  • 667
  • 668
  • 669
  • 670
  • 671
  • 672
  • 673
  • 674
  • 675
  • 676
  • 677
  • 678
  • 679
  • 680
  • 681
  • 682
  • 683
  • 684
  • 685
  • 686
  • 687
  • 688
  • 689
  • 690
  • 691
  • 692
  • 693
  • 694
  • 695
  • 696
  • 697
  • 698
  • 699
  • 700
  • 701
  • 702
  • 703
  • 704
  • 705
  • 706
  • 707
  • 708
  • 709
  • 710
  • 711
  • 712
  • 713
  • 714
  • 715
  • 716
  • 717
  • 718
  • 719
  • 720
  • 721
  • 722
  • 723
  • 724
  • 725
  • 726
  • 727
  • 728
  • 729
  • 730
  • 731
  • 732
  • 733
  • 734
  • 735
  • 736
  • 737
  • 738
  • 739
  • 740
  • 741
  • 742
  • 743
  • 744
  • 745
  • 746
  • 747
  • 748
  • 749
  • 750
  • 751
  • 752
  • 753
  • 754
  • 755
  • 756
  • 757
  • 758
  • 759
  • 760
  • 761
  • 762
  • 763
  • 764
  • 765
  • 766
  • 767
  • 768
  • 769
  • 770
  • 771
  • 772
  • 773
  • 774
  • 775
  • 776
  • 777
  • 778
  • 779
  • 780
  • 781
  • 782
  • 783
  • 784
  • 785
  • 786
  • 787
  • 788
  • 789
  • 790
  • 791
  • 792
  • 793
  • 794
  • 795
  • 796
  • 797
  • 798
  • 799
  • 800
  • 801
  • 802
  • 803
  • 804
  • 805
  • 806
  • 807
  • 808
  • 809
  • 810
  • 811
  • 812
  • 813
  • 814
  • 815
  • 816
  • 817
  • 818
  • 819
  • 820
  • 821
  • 822
  • 823
  • 824
  • 825
  • 826
  • 827
  • 828
  • 829
  • 830
  • 831
  • 832
  • 833
  • 834
  • 835
  • 836
  • 837
  • 838
  • 839
  • 840
  • 841
  • 842
  • 843
  • 844
  • 845
  • 846
  • 847
  • 848
  • 849
  • 850
  • 851
  • 852
  • 853
  • 854
  • 855
  • 856
  • 857
  • 858
  • 859
  • 860
  • 861
  • 862
  • 863
  • 864
  • 865
  • 866
  • 867
  • 868
  • 869
  • 870
  • 871
  • 872
  • 873
  • 874
  • 875
  • 876
  • 877
  • 878
  • 879
  • 880
  • 881
  • 882
  • 883
  • 884
  • 885
  • 886
  • 887
  • 888
  • 889
  • 890
  • 891
  • 892
  • 893
  • 894
  • 895
  • 896
  • 897
  • 898
  • 899
  • 900
  • 901
  • 902
  • 903
  • 904
  • 905
  • 906
  • 907
  • 908
  • 909
  • 910
  • 911
  • 912
  • 913
  • 914
  • 915
  • 916
  • 917
  • 918
  • 919
  • 920
  • 921
  • 922
  • 923
  • 924
  • 925
  • 926
  • 927
  • 928
  • 929
  • 930
  • 931
  • 932
  • 933
  • 934
  • 935
  • 936
  • 937
  • 938
  • 939
  • 940
  • 941
  • 942
  • 943
  • 944
  • 945
  • 946
  • 947
  • 948
  • 949
  • 950
  • 951
  • 952
  • 953
  • 954
  • 955
  • 956
  • 957
  • 958
  • 959
  • 960
  • 961
  • 962
  • 963
  • 964
  • 965
  • 966
  • 967
  • 968
  • 969
  • 970
  • 971
  • 972
  • 973
  • 974
  • 975
  • 976
  • 977
  • 978
  • 979
  • 980
  • 981
  • 982
  • 983
  • 984
  • 985
  • 986
  • 987
  • 988
  • 989
  • 990
  • 991
  • 992
  • 993
  • 994
  • 995
  • 996
  • 997
  • 998
  • 999
  • 1000
  • 1001
  • 1002
  • 1003
  • 1004
  • 1005
  • 1006
  • 1007
  • 1008
  • 1009
  • 1010
  • 1011
  • 1012
  • 1013
  • 1014
  • 1015
  • 1016
  • 1017
  • 1018
  • 1019
  • 1020
  • 1021
  • 1022
  • 1023
  • 1024
  • 1025
  • 1026
  • 1027
  • 1028
  • 1029
  • 1030
  • 1031
  • 1032
  • 1033
  • 1034
  • 1035
  • 1036
  • 1037
  • 1038
  • 1039
  • 1040
  • 1041
  • 1042
  • 1043
  • 1044
  • 1045
  • 1046
  • 1047
  • 1048
  • 1049
  • 1050
  • 1051
  • 1052
  • 1053
  • 1054
  • 1055
  • 1056
  • 1057

在这里插入图片描述

素材:
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

仅提供学习使用下载链接
请使用Unity商店进行下载: 点击链接

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/233319
推荐阅读
相关标签
  

闽ICP备14008679号