├── .gitignore ├── Assets ├── Grass & dead leafs 01.meta ├── Grass & dead leafs 01 │ ├── Grass & dead leafs pattern 01.mat │ ├── Grass & dead leafs pattern 01.mat.meta │ ├── Materials.meta │ ├── Materials │ │ ├── diffuse.mat │ │ ├── diffuse.mat.meta │ │ ├── preview.mat │ │ └── preview.mat.meta │ ├── diffuse.tga │ ├── diffuse.tga.meta │ ├── normal.tga │ ├── normal.tga.meta │ ├── preview.jpg │ └── preview.jpg.meta ├── Mat.meta ├── Mat │ ├── GrassMat.mat │ └── GrassMat.mat.meta ├── Scene.meta ├── Scene │ ├── demo.unity │ └── demo.unity.meta ├── Script.meta ├── Script │ ├── GrassSpanner.cs │ └── GrassSpanner.cs.meta ├── Shader.meta ├── Shader │ ├── GrassGeometryShader.shader │ └── GrassGeometryShader.shader.meta ├── Texture.meta ├── Texture │ ├── Heightmap.png │ ├── Heightmap.png.meta │ ├── grassBlade.png │ ├── grassBlade.png.meta │ ├── grassBladeAlpha.png │ └── grassBladeAlpha.png.meta ├── skyb2.meta └── skyb2 │ ├── back.psd │ ├── back.psd.meta │ ├── bot.psd │ ├── bot.psd.meta │ ├── front.psd │ ├── front.psd.meta │ ├── l.psd │ ├── l.psd.meta │ ├── r.psd │ ├── r.psd.meta │ ├── sky,startday.mat │ ├── sky,startday.mat.meta │ ├── up.psd │ └── up.psd.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Visual Studio 2015 cache directory 9 | /.vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | 26 | # Unity3D generated meta files 27 | *.pidb.meta 28 | 29 | # Unity3D Generated File On Crash Reports 30 | sysinfo.txt 31 | 32 | # Builds 33 | *.apk 34 | *.unitypackage 35 | -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c8885fa7056db8469f8b6f77dc82fe3 3 | folderAsset: yes 4 | timeCreated: 1506438799 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01/Grass & dead leafs pattern 01.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Grass & dead leafs pattern 01 10 | m_Shader: {fileID: 2, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 2800000, guid: ae0e7acc3616ba441a70994eb662f6e3, type: 3} 23 | m_Scale: {x: 3, y: 3} 24 | m_Offset: {x: 0, y: 0} 25 | - _MainTex: 26 | m_Texture: {fileID: 2800000, guid: 46c9b2c471a59f24cbe88eae93a32f60, type: 3} 27 | m_Scale: {x: 3, y: 3} 28 | m_Offset: {x: 0, y: 0} 29 | m_Floats: 30 | - _Shininess: 0.078125 31 | m_Colors: 32 | - _Color: {r: 1, g: 1, b: 1, a: 1} 33 | - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 34 | -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01/Grass & dead leafs pattern 01.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 893960384de673345a82517892b28bc7 3 | labels: 4 | - Grass 5 | - Ground 6 | - Nature 7 | - Pattern 8 | - Terrain 9 | - Leafs 10 | timeCreated: 18446744011573954816 11 | NativeFormatImporter: 12 | mainObjectFileID: 0 13 | userData: 14 | assetBundleName: 15 | assetBundleVariant: 16 | -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 635e37c8329504a4390a1ab95006eb7f 3 | folderAsset: yes 4 | timeCreated: 1505825458 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01/Materials/diffuse.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: diffuse 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 2800000, guid: 46c9b2c471a59f24cbe88eae93a32f60, type: 3} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 1, b: 1, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01/Materials/diffuse.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1fef1f308891644a9182457cf346b4a 3 | timeCreated: 1506000958 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01/Materials/preview.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: preview 10 | m_Shader: {fileID: 2, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _MainTex: 26 | m_Texture: {fileID: 2800000, guid: 9f425c22a471a47459e192cb7dafd4c5, type: 3} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | m_Floats: [] 30 | m_Colors: 31 | - _Color: {r: 1, g: 1, b: 1, a: 1} 32 | -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01/Materials/preview.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d460b468d82a4bf4693f7e3f5d22f09e 3 | timeCreated: 1505825458 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01/diffuse.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenjd/Realistic-Real-Time-Grass-Rendering-With-Unity/856e814f48c3c6e73367ea9f34ab7666739aa4b4/Assets/Grass & dead leafs 01/diffuse.tga -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01/diffuse.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46c9b2c471a59f24cbe88eae93a32f60 3 | timeCreated: 18446744011573954816 4 | TextureImporter: 5 | fileIDToRecycleName: {} 6 | serializedVersion: 4 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | grayScaleToAlpha: 0 25 | generateCubemap: 6 26 | cubemapConvolution: 0 27 | seamlessCubemap: 0 28 | textureFormat: -1 29 | maxTextureSize: 1024 30 | textureSettings: 31 | serializedVersion: 2 32 | filterMode: 2 33 | aniso: -1 34 | mipBias: -1 35 | wrapU: -1 36 | wrapV: -1 37 | wrapW: -1 38 | nPOTScale: 1 39 | lightmap: 0 40 | compressionQuality: 50 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaUsage: 1 49 | alphaIsTransparency: 0 50 | spriteTessellationDetail: -1 51 | textureType: 0 52 | textureShape: 1 53 | maxTextureSizeSet: 0 54 | compressionQualitySet: 0 55 | textureFormatSet: 0 56 | platformSettings: 57 | - buildTarget: DefaultTexturePlatform 58 | maxTextureSize: 1024 59 | textureFormat: -1 60 | textureCompression: 1 61 | compressionQuality: 50 62 | crunchedCompression: 0 63 | allowsAlphaSplitting: 0 64 | overridden: 0 65 | - buildTarget: Web 66 | maxTextureSize: 512 67 | textureFormat: -1 68 | textureCompression: 1 69 | compressionQuality: 50 70 | crunchedCompression: 0 71 | allowsAlphaSplitting: 0 72 | overridden: 1 73 | - buildTarget: iPhone 74 | maxTextureSize: 256 75 | textureFormat: -1 76 | textureCompression: 1 77 | compressionQuality: 50 78 | crunchedCompression: 0 79 | allowsAlphaSplitting: 0 80 | overridden: 1 81 | - buildTarget: Android 82 | maxTextureSize: 256 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 1 89 | - buildTarget: BlackBerry 90 | maxTextureSize: 256 91 | textureFormat: -1 92 | textureCompression: 1 93 | compressionQuality: 50 94 | crunchedCompression: 0 95 | allowsAlphaSplitting: 0 96 | overridden: 1 97 | - buildTarget: Windows Store Apps 98 | maxTextureSize: 256 99 | textureFormat: -1 100 | textureCompression: 1 101 | compressionQuality: 50 102 | crunchedCompression: 0 103 | allowsAlphaSplitting: 0 104 | overridden: 1 105 | - buildTarget: WP8 106 | maxTextureSize: 256 107 | textureFormat: -1 108 | textureCompression: 1 109 | compressionQuality: 50 110 | crunchedCompression: 0 111 | allowsAlphaSplitting: 0 112 | overridden: 1 113 | spriteSheet: 114 | serializedVersion: 2 115 | sprites: [] 116 | outline: [] 117 | physicsShape: [] 118 | spritePackingTag: 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01/normal.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenjd/Realistic-Real-Time-Grass-Rendering-With-Unity/856e814f48c3c6e73367ea9f34ab7666739aa4b4/Assets/Grass & dead leafs 01/normal.tga -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01/normal.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae0e7acc3616ba441a70994eb662f6e3 3 | timeCreated: 18446744011573954816 4 | TextureImporter: 5 | fileIDToRecycleName: {} 6 | serializedVersion: 4 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 1 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 1 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | grayScaleToAlpha: 0 25 | generateCubemap: 6 26 | cubemapConvolution: 0 27 | seamlessCubemap: 0 28 | textureFormat: -1 29 | maxTextureSize: 1024 30 | textureSettings: 31 | serializedVersion: 2 32 | filterMode: 2 33 | aniso: -1 34 | mipBias: -1 35 | wrapU: -1 36 | wrapV: -1 37 | wrapW: -1 38 | nPOTScale: 1 39 | lightmap: 0 40 | compressionQuality: 50 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaUsage: 1 49 | alphaIsTransparency: 0 50 | spriteTessellationDetail: -1 51 | textureType: 1 52 | textureShape: 1 53 | maxTextureSizeSet: 0 54 | compressionQualitySet: 0 55 | textureFormatSet: 0 56 | platformSettings: 57 | - buildTarget: DefaultTexturePlatform 58 | maxTextureSize: 1024 59 | textureFormat: -1 60 | textureCompression: 1 61 | compressionQuality: 50 62 | crunchedCompression: 0 63 | allowsAlphaSplitting: 0 64 | overridden: 0 65 | - buildTarget: Web 66 | maxTextureSize: 512 67 | textureFormat: -1 68 | textureCompression: 1 69 | compressionQuality: 50 70 | crunchedCompression: 0 71 | allowsAlphaSplitting: 0 72 | overridden: 1 73 | - buildTarget: iPhone 74 | maxTextureSize: 256 75 | textureFormat: -1 76 | textureCompression: 1 77 | compressionQuality: 50 78 | crunchedCompression: 0 79 | allowsAlphaSplitting: 0 80 | overridden: 1 81 | - buildTarget: Android 82 | maxTextureSize: 256 83 | textureFormat: -1 84 | textureCompression: 1 85 | compressionQuality: 50 86 | crunchedCompression: 0 87 | allowsAlphaSplitting: 0 88 | overridden: 1 89 | - buildTarget: BlackBerry 90 | maxTextureSize: 256 91 | textureFormat: -1 92 | textureCompression: 1 93 | compressionQuality: 50 94 | crunchedCompression: 0 95 | allowsAlphaSplitting: 0 96 | overridden: 1 97 | - buildTarget: Windows Store Apps 98 | maxTextureSize: 256 99 | textureFormat: -1 100 | textureCompression: 1 101 | compressionQuality: 50 102 | crunchedCompression: 0 103 | allowsAlphaSplitting: 0 104 | overridden: 1 105 | - buildTarget: WP8 106 | maxTextureSize: 256 107 | textureFormat: -1 108 | textureCompression: 1 109 | compressionQuality: 50 110 | crunchedCompression: 0 111 | allowsAlphaSplitting: 0 112 | overridden: 1 113 | spriteSheet: 114 | serializedVersion: 2 115 | sprites: [] 116 | outline: [] 117 | physicsShape: [] 118 | spritePackingTag: 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01/preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenjd/Realistic-Real-Time-Grass-Rendering-With-Unity/856e814f48c3c6e73367ea9f34ab7666739aa4b4/Assets/Grass & dead leafs 01/preview.jpg -------------------------------------------------------------------------------- /Assets/Grass & dead leafs 01/preview.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f425c22a471a47459e192cb7dafd4c5 3 | timeCreated: 18446744011573954816 4 | TextureImporter: 5 | fileIDToRecycleName: {} 6 | serializedVersion: 4 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | grayScaleToAlpha: 0 25 | generateCubemap: 6 26 | cubemapConvolution: 0 27 | seamlessCubemap: 0 28 | textureFormat: -1 29 | maxTextureSize: 1024 30 | textureSettings: 31 | serializedVersion: 2 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapU: -1 36 | wrapV: -1 37 | wrapW: -1 38 | nPOTScale: 1 39 | lightmap: 0 40 | compressionQuality: 50 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaUsage: 1 49 | alphaIsTransparency: 0 50 | spriteTessellationDetail: -1 51 | textureType: 0 52 | textureShape: 1 53 | maxTextureSizeSet: 0 54 | compressionQualitySet: 0 55 | textureFormatSet: 0 56 | platformSettings: 57 | - buildTarget: DefaultTexturePlatform 58 | maxTextureSize: 1024 59 | textureFormat: -1 60 | textureCompression: 1 61 | compressionQuality: 50 62 | crunchedCompression: 0 63 | allowsAlphaSplitting: 0 64 | overridden: 0 65 | spriteSheet: 66 | serializedVersion: 2 67 | sprites: [] 68 | outline: [] 69 | physicsShape: [] 70 | spritePackingTag: 71 | userData: 72 | assetBundleName: 73 | assetBundleVariant: 74 | -------------------------------------------------------------------------------- /Assets/Mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 716f81577dd690847b6ce11756844fe5 3 | folderAsset: yes 4 | timeCreated: 1506438504 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Mat/GrassMat.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: GrassMat 10 | m_Shader: {fileID: 4800000, guid: f5d0fde071320ee40b730bbd84b1e07d, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _AlphaTex: 22 | m_Texture: {fileID: 2800000, guid: 1e713df6ae96f8940bd8a0558d66998f, type: 3} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _BumpMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailAlbedoMap: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailMask: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _DetailNormalMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _EmissionMap: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MainTex: 46 | m_Texture: {fileID: 2800000, guid: 7c7f9c703d75c4b4c8972723020033b6, type: 3} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _MetallicGlossMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _OcclusionMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | - _ParallaxMap: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | m_Floats: 62 | - _BumpScale: 1 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _GlossMapScale: 1 67 | - _Glossiness: 0.5 68 | - _GlossyReflections: 1 69 | - _Height: 3 70 | - _Metallic: 0 71 | - _Mode: 0 72 | - _OcclusionStrength: 1 73 | - _Parallax: 0.02 74 | - _SmoothnessTextureChannel: 0 75 | - _SpecularHighlights: 1 76 | - _SrcBlend: 1 77 | - _UVSec: 0 78 | - _Width: 0.05 79 | - _ZWrite: 1 80 | m_Colors: 81 | - _Color: {r: 1, g: 1, b: 1, a: 1} 82 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 83 | -------------------------------------------------------------------------------- /Assets/Mat/GrassMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd6d02eb25769ea4c8da44c7caccd45b 3 | timeCreated: 1506438854 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0facdb70ab8a2141889ec2bd1066a61 3 | folderAsset: yes 4 | timeCreated: 1506432268 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scene/demo.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 8 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 2100000, guid: c74745ae37e45d54cb8f33bb8481bf20, type: 2} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.29697776, g: 0.24607444, b: 0.23221657, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 0 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFiltering: 0 81 | m_PVRFilteringMode: 1 82 | m_PVRCulling: 1 83 | m_PVRFilteringGaussRadiusDirect: 1 84 | m_PVRFilteringGaussRadiusIndirect: 5 85 | m_PVRFilteringGaussRadiusAO: 2 86 | m_PVRFilteringAtrousColorSigma: 1 87 | m_PVRFilteringAtrousNormalSigma: 1 88 | m_PVRFilteringAtrousPositionSigma: 1 89 | m_LightingDataAsset: {fileID: 0} 90 | m_UseShadowmask: 1 91 | --- !u!196 &4 92 | NavMeshSettings: 93 | serializedVersion: 2 94 | m_ObjectHideFlags: 0 95 | m_BuildSettings: 96 | serializedVersion: 2 97 | agentTypeID: 0 98 | agentRadius: 0.5 99 | agentHeight: 2 100 | agentSlope: 45 101 | agentClimb: 0.4 102 | ledgeDropHeight: 0 103 | maxJumpAcrossDistance: 0 104 | minRegionArea: 2 105 | manualCellSize: 0 106 | cellSize: 0.16666667 107 | manualTileSize: 0 108 | tileSize: 256 109 | accuratePlacement: 0 110 | m_NavMeshData: {fileID: 0} 111 | --- !u!1 &300605075 112 | GameObject: 113 | m_ObjectHideFlags: 0 114 | m_PrefabParentObject: {fileID: 0} 115 | m_PrefabInternal: {fileID: 0} 116 | serializedVersion: 5 117 | m_Component: 118 | - component: {fileID: 300605081} 119 | - component: {fileID: 300605080} 120 | - component: {fileID: 300605079} 121 | - component: {fileID: 300605078} 122 | - component: {fileID: 300605077} 123 | - component: {fileID: 300605076} 124 | m_Layer: 0 125 | m_Name: Main Camera 126 | m_TagString: MainCamera 127 | m_Icon: {fileID: 0} 128 | m_NavMeshLayer: 0 129 | m_StaticEditorFlags: 0 130 | m_IsActive: 1 131 | --- !u!114 &300605076 132 | MonoBehaviour: 133 | m_ObjectHideFlags: 0 134 | m_PrefabParentObject: {fileID: 0} 135 | m_PrefabInternal: {fileID: 0} 136 | m_GameObject: {fileID: 300605075} 137 | m_Enabled: 1 138 | m_EditorHideFlags: 0 139 | m_Script: {fileID: 11500000, guid: 3ae3065a92d39f346909f6f07666e946, type: 3} 140 | m_Name: 141 | m_EditorClassIdentifier: 142 | heightMap: {fileID: 2800000, guid: 45e64b3e874365949ae291ac5232e39c, type: 3} 143 | terrainHeight: 10 144 | terrainSize: 64 145 | terrainMat: {fileID: 2100000, guid: c1fef1f308891644a9182457cf346b4a, type: 2} 146 | grassMat: {fileID: 2100000, guid: bd6d02eb25769ea4c8da44c7caccd45b, type: 2} 147 | --- !u!81 &300605077 148 | AudioListener: 149 | m_ObjectHideFlags: 0 150 | m_PrefabParentObject: {fileID: 0} 151 | m_PrefabInternal: {fileID: 0} 152 | m_GameObject: {fileID: 300605075} 153 | m_Enabled: 1 154 | --- !u!124 &300605078 155 | Behaviour: 156 | m_ObjectHideFlags: 0 157 | m_PrefabParentObject: {fileID: 0} 158 | m_PrefabInternal: {fileID: 0} 159 | m_GameObject: {fileID: 300605075} 160 | m_Enabled: 1 161 | --- !u!92 &300605079 162 | Behaviour: 163 | m_ObjectHideFlags: 0 164 | m_PrefabParentObject: {fileID: 0} 165 | m_PrefabInternal: {fileID: 0} 166 | m_GameObject: {fileID: 300605075} 167 | m_Enabled: 1 168 | --- !u!20 &300605080 169 | Camera: 170 | m_ObjectHideFlags: 0 171 | m_PrefabParentObject: {fileID: 0} 172 | m_PrefabInternal: {fileID: 0} 173 | m_GameObject: {fileID: 300605075} 174 | m_Enabled: 1 175 | serializedVersion: 2 176 | m_ClearFlags: 1 177 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 178 | m_NormalizedViewPortRect: 179 | serializedVersion: 2 180 | x: 0 181 | y: 0 182 | width: 1 183 | height: 1 184 | near clip plane: 0.3 185 | far clip plane: 1000 186 | field of view: 60 187 | orthographic: 0 188 | orthographic size: 5 189 | m_Depth: -1 190 | m_CullingMask: 191 | serializedVersion: 2 192 | m_Bits: 4294967295 193 | m_RenderingPath: -1 194 | m_TargetTexture: {fileID: 0} 195 | m_TargetDisplay: 0 196 | m_TargetEye: 3 197 | m_HDR: 1 198 | m_AllowMSAA: 1 199 | m_ForceIntoRT: 0 200 | m_OcclusionCulling: 1 201 | m_StereoConvergence: 10 202 | m_StereoSeparation: 0.022 203 | m_StereoMirrorMode: 0 204 | --- !u!4 &300605081 205 | Transform: 206 | m_ObjectHideFlags: 0 207 | m_PrefabParentObject: {fileID: 0} 208 | m_PrefabInternal: {fileID: 0} 209 | m_GameObject: {fileID: 300605075} 210 | m_LocalRotation: {x: -0.13624305, y: -0.28626698, z: 0.04116066, w: -0.9475204} 211 | m_LocalPosition: {x: 2.433277, y: 16.190313, z: -11.591764} 212 | m_LocalScale: {x: 1, y: 1, z: 1} 213 | m_Children: [] 214 | m_Father: {fileID: 0} 215 | m_RootOrder: 0 216 | m_LocalEulerAnglesHint: {x: 5.3, y: 28.5, z: 1.91} 217 | --- !u!1 &1992666827 218 | GameObject: 219 | m_ObjectHideFlags: 0 220 | m_PrefabParentObject: {fileID: 0} 221 | m_PrefabInternal: {fileID: 0} 222 | serializedVersion: 5 223 | m_Component: 224 | - component: {fileID: 1992666829} 225 | - component: {fileID: 1992666828} 226 | m_Layer: 0 227 | m_Name: Directional Light 228 | m_TagString: Untagged 229 | m_Icon: {fileID: 0} 230 | m_NavMeshLayer: 0 231 | m_StaticEditorFlags: 0 232 | m_IsActive: 1 233 | --- !u!108 &1992666828 234 | Light: 235 | m_ObjectHideFlags: 0 236 | m_PrefabParentObject: {fileID: 0} 237 | m_PrefabInternal: {fileID: 0} 238 | m_GameObject: {fileID: 1992666827} 239 | m_Enabled: 1 240 | serializedVersion: 8 241 | m_Type: 1 242 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 243 | m_Intensity: 1 244 | m_Range: 10 245 | m_SpotAngle: 30 246 | m_CookieSize: 10 247 | m_Shadows: 248 | m_Type: 2 249 | m_Resolution: -1 250 | m_CustomResolution: -1 251 | m_Strength: 1 252 | m_Bias: 0.05 253 | m_NormalBias: 0.4 254 | m_NearPlane: 0.2 255 | m_Cookie: {fileID: 0} 256 | m_DrawHalo: 0 257 | m_Flare: {fileID: 0} 258 | m_RenderMode: 0 259 | m_CullingMask: 260 | serializedVersion: 2 261 | m_Bits: 4294967295 262 | m_Lightmapping: 4 263 | m_AreaSize: {x: 1, y: 1} 264 | m_BounceIntensity: 1 265 | m_FalloffTable: 266 | m_Table[0]: 0 267 | m_Table[1]: 0 268 | m_Table[2]: 0 269 | m_Table[3]: 0 270 | m_Table[4]: 0 271 | m_Table[5]: 0 272 | m_Table[6]: 0 273 | m_Table[7]: 0 274 | m_Table[8]: 0 275 | m_Table[9]: 0 276 | m_Table[10]: 0 277 | m_Table[11]: 0 278 | m_Table[12]: 0 279 | m_ColorTemperature: 6570 280 | m_UseColorTemperature: 0 281 | m_ShadowRadius: 0 282 | m_ShadowAngle: 0 283 | --- !u!4 &1992666829 284 | Transform: 285 | m_ObjectHideFlags: 0 286 | m_PrefabParentObject: {fileID: 0} 287 | m_PrefabInternal: {fileID: 0} 288 | m_GameObject: {fileID: 1992666827} 289 | m_LocalRotation: {x: 0.8461303, y: 0.28467527, z: 0.4483831, w: -0.044453636} 290 | m_LocalPosition: {x: 0, y: 24.48, z: 5.3} 291 | m_LocalScale: {x: 1, y: 1, z: 1} 292 | m_Children: [] 293 | m_Father: {fileID: 0} 294 | m_RootOrder: 1 295 | m_LocalEulerAnglesHint: {x: -19.3, y: 129, z: 152.08301} 296 | -------------------------------------------------------------------------------- /Assets/Scene/demo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f20dd0874f3d4c243b1296e2cb2d85da 3 | timeCreated: 1506432286 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Script.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4e747b7aad0bf14db2081f75920a90f 3 | folderAsset: yes 4 | timeCreated: 1506432300 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Script/GrassSpanner.cs: -------------------------------------------------------------------------------- 1 | // 2 | // created by jiadong chen 3 | // http://www.chenjd.me 4 | // 5 | using UnityEngine; 6 | using System.Collections.Generic; 7 | 8 | using Random = System.Random; 9 | 10 | public class GrassSpanner : MonoBehaviour { 11 | 12 | 13 | #region 字段 14 | 15 | public Texture2D heightMap; 16 | public float terrainHeight; 17 | public int terrainSize = 250; 18 | public Material terrainMat; 19 | public Material grassMat; 20 | private List verts = new List(); 21 | private Random random; 22 | 23 | #endregion 24 | 25 | void Start() 26 | { 27 | this.random = new Random(); 28 | GenerateTerrain(); 29 | GenerateField(30, 50); 30 | } 31 | 32 | 33 | /// 34 | /// 生成地形 35 | /// 36 | private void GenerateTerrain() 37 | { 38 | List verts = new List(); 39 | List tris = new List(); 40 | 41 | for (int i = 0; i < this.terrainSize; i++) 42 | { 43 | for (int j = 0; j < this.terrainSize; j++) 44 | { 45 | verts.Add(new Vector3(i, heightMap.GetPixel(i, j).grayscale * this.terrainHeight , j)); 46 | if (i == 0 || j == 0) 47 | continue; 48 | tris.Add(terrainSize * i + j); 49 | tris.Add(terrainSize * i + j - 1); 50 | tris.Add(terrainSize * (i - 1) + j - 1); 51 | tris.Add(terrainSize * (i - 1) + j - 1); 52 | tris.Add(terrainSize * (i - 1) + j); 53 | tris.Add(terrainSize * i + j); 54 | } 55 | } 56 | 57 | Vector2[] uvs = new Vector2[verts.Count]; 58 | 59 | for (var i = 0; i < uvs.Length; i++) 60 | { 61 | uvs[i] = new Vector2(verts[i].x, verts[i].z); 62 | } 63 | 64 | GameObject plane = new GameObject("groundPlane"); 65 | plane.AddComponent(); 66 | MeshRenderer renderer = plane.AddComponent(); 67 | renderer.sharedMaterial = terrainMat; 68 | 69 | Mesh groundMesh = new Mesh(); 70 | groundMesh.vertices = verts.ToArray(); 71 | groundMesh.uv = uvs; 72 | groundMesh.triangles = tris.ToArray(); 73 | groundMesh.RecalculateNormals(); 74 | plane.GetComponent().mesh = groundMesh; 75 | 76 | this.verts.Clear(); 77 | } 78 | 79 | /// 80 | /// 生成草地 81 | /// 82 | /// 83 | /// 84 | private void GenerateField(int grassPatchRowCount, int grassCountPerPatch) 85 | { 86 | List indices = new List(); 87 | for (int i = 0; i < 65000; i++) 88 | { 89 | indices.Add(i); 90 | } 91 | 92 | Vector3 startPosition = new Vector3(0, 0, 0); 93 | Vector3 patchSize = new Vector3(terrainSize / grassPatchRowCount, 0, terrainSize / grassPatchRowCount); 94 | 95 | for (int x = 0; x < grassPatchRowCount; x++) 96 | { 97 | for (int y = 0; y < grassPatchRowCount; y++) 98 | { 99 | this.GenerateGrass(startPosition, patchSize, grassPatchRowCount); 100 | startPosition.x += patchSize.x; 101 | } 102 | 103 | startPosition.x = 0; 104 | startPosition.z += patchSize.z; 105 | } 106 | 107 | GameObject grassLayer; 108 | MeshFilter mf; 109 | MeshRenderer renderer; 110 | Mesh m; 111 | 112 | while (verts.Count > 65000) 113 | { 114 | m = new Mesh(); 115 | m.vertices = verts.GetRange(0, 65000).ToArray(); 116 | m.SetIndices(indices.ToArray(), MeshTopology.Points, 0); 117 | 118 | grassLayer = new GameObject("grassLayer"); 119 | mf = grassLayer.AddComponent(); 120 | renderer = grassLayer.AddComponent(); 121 | renderer.sharedMaterial = grassMat; 122 | mf.mesh = m; 123 | verts.RemoveRange(0, 65000); 124 | } 125 | 126 | m = new Mesh(); 127 | m.vertices = verts.ToArray(); 128 | m.SetIndices(indices.GetRange(0, verts.Count).ToArray(), MeshTopology.Points, 0); 129 | grassLayer = new GameObject("grassLayer"); 130 | mf = grassLayer.AddComponent(); 131 | renderer = grassLayer.AddComponent(); 132 | renderer.sharedMaterial = grassMat; 133 | mf.mesh = m; 134 | 135 | return; 136 | } 137 | 138 | private void GenerateGrass(Vector3 startPosition, Vector3 patchSize, int grassCountPerPatch) 139 | { 140 | for (var i = 0; i < grassCountPerPatch; i++) 141 | { 142 | var randomizedZDistance = (float)this.random.NextDouble() * patchSize.z; 143 | var randomizedXDistance = (float)this.random.NextDouble() * patchSize.x; 144 | 145 | int indexX = (int)((startPosition.x + randomizedXDistance)); 146 | int indexZ = (int)((startPosition.z + randomizedZDistance)); 147 | 148 | if (indexX >= terrainSize) 149 | { 150 | indexX = (int)terrainSize - 1; 151 | } 152 | 153 | if (indexZ >= terrainSize) 154 | { 155 | indexZ = (int)terrainSize - 1; 156 | } 157 | 158 | var currentPosition = new Vector3(startPosition.x + (randomizedXDistance), heightMap.GetPixel(indexX, indexZ).grayscale * (terrainHeight + 1), startPosition.z + randomizedZDistance); 159 | this.verts.Add(currentPosition); 160 | } 161 | } 162 | 163 | } 164 | -------------------------------------------------------------------------------- /Assets/Script/GrassSpanner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ae3065a92d39f346909f6f07666e946 3 | timeCreated: 1506432378 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97f431d72ac709742bc13d1c4b13e61b 3 | folderAsset: yes 4 | timeCreated: 1506438499 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shader/GrassGeometryShader.shader: -------------------------------------------------------------------------------- 1 | Shader "chenjd/Grass" { 2 | Properties{ 3 | 4 | _MainTex("Albedo (RGB)", 2D) = "white" {} 5 | _AlphaTex("Alpha (A)", 2D) = "white" {} 6 | _Height("Grass Height", float) = 3 7 | _Width("Grass Width", range(0, 0.1)) = 0.05 8 | 9 | } 10 | SubShader{ 11 | Cull off 12 | Tags{ "Queue" = "AlphaTest" "RenderType" = "TransparentCutout" "IgnoreProjector" = "True" } 13 | 14 | 15 | Pass 16 | { 17 | 18 | Cull OFF 19 | Tags{ "LightMode" = "ForwardBase" } 20 | AlphaToMask On 21 | 22 | 23 | CGPROGRAM 24 | 25 | #include "UnityCG.cginc" 26 | #pragma vertex vert 27 | #pragma fragment frag 28 | #pragma geometry geom 29 | #include "UnityLightingCommon.cginc" // 用来处理光照的一些效果 30 | 31 | #pragma target 4.0 32 | 33 | sampler2D _MainTex; 34 | sampler2D _AlphaTex; 35 | 36 | float _Height;//草的高度 37 | float _Width;//草的宽度 38 | struct v2g 39 | { 40 | float4 pos : SV_POSITION; 41 | float3 norm : NORMAL; 42 | float2 uv : TEXCOORD0; 43 | }; 44 | 45 | struct g2f 46 | { 47 | float4 pos : SV_POSITION; 48 | float3 norm : NORMAL; 49 | float2 uv : TEXCOORD0; 50 | }; 51 | 52 | 53 | static const float oscillateDelta = 0.05; 54 | 55 | 56 | v2g vert(appdata_full v) 57 | { 58 | v2g o; 59 | o.pos = v.vertex; 60 | o.norm = v.normal; 61 | o.uv = v.texcoord; 62 | 63 | return o; 64 | } 65 | 66 | g2f createGSOut() { 67 | g2f output; 68 | 69 | output.pos = float4(0, 0, 0, 0); 70 | output.norm = float3(0, 0, 0); 71 | output.uv= float2(0, 0); 72 | 73 | return output; 74 | } 75 | 76 | 77 | [maxvertexcount(30)] 78 | void geom(point v2g points[1], inout TriangleStream triStream) 79 | { 80 | 81 | float4 root = points[0].pos; 82 | 83 | const int vertexCount = 12; 84 | 85 | float random = sin(UNITY_HALF_PI * frac(root.x) + UNITY_HALF_PI * frac(root.z)); 86 | 87 | 88 | _Width = _Width + (random / 50); 89 | _Height = _Height +(random / 5); 90 | 91 | 92 | g2f v[vertexCount] = { 93 | createGSOut(), createGSOut(), createGSOut(), createGSOut(), 94 | createGSOut(), createGSOut(), createGSOut(), createGSOut(), 95 | createGSOut(), createGSOut(), createGSOut(), createGSOut() 96 | }; 97 | 98 | //处理纹理坐标 99 | float currentV = 0; 100 | float offsetV = 1.f /((vertexCount / 2) - 1); 101 | 102 | //处理当前的高度 103 | float currentHeightOffset = 0; 104 | float currentVertexHeight = 0; 105 | 106 | //风的影响系数 107 | float windCoEff = 0; 108 | 109 | for (int i = 0; i < vertexCount; i++) 110 | { 111 | v[i].norm = float3(0, 0, 1); 112 | 113 | if (fmod(i , 2) == 0) 114 | { 115 | v[i].pos = float4(root.x - _Width , root.y + currentVertexHeight, root.z, 1); 116 | v[i].uv = float2(0, currentV); 117 | } 118 | else 119 | { 120 | v[i].pos = float4(root.x + _Width , root.y + currentVertexHeight, root.z, 1); 121 | v[i].uv = float2(1, currentV); 122 | 123 | currentV += offsetV; 124 | currentVertexHeight = currentV * _Height; 125 | } 126 | 127 | float2 wind = float2(sin(_Time.x * UNITY_PI * 5), sin(_Time.x * UNITY_PI * 5)); 128 | wind.x += (sin(_Time.x + root.x / 25) + sin((_Time.x + root.x / 15) + 50)) * 0.5; 129 | wind.y += cos(_Time.x + root.z / 80); 130 | wind *= lerp(0.7, 1.0, 1.0 - random); 131 | 132 | float oscillationStrength = 2.5f; 133 | float sinSkewCoeff = random; 134 | float lerpCoeff = (sin(oscillationStrength * _Time.x + sinSkewCoeff) + 1.0) / 2; 135 | float2 leftWindBound = wind * (1.0 - oscillateDelta); 136 | float2 rightWindBound = wind * (1.0 + oscillateDelta); 137 | 138 | wind = lerp(leftWindBound, rightWindBound, lerpCoeff); 139 | 140 | float randomAngle = lerp(-UNITY_PI, UNITY_PI, random); 141 | float randomMagnitude = lerp(0, 1., random); 142 | float2 randomWindDir = float2(sin(randomAngle), cos(randomAngle)); 143 | wind += randomWindDir * randomMagnitude; 144 | 145 | float windForce = length(wind); 146 | 147 | v[i].pos.xz += wind.xy * windCoEff; 148 | v[i].pos.y -= windForce * windCoEff * 0.8; 149 | 150 | v[i].pos = UnityObjectToClipPos(v[i].pos); 151 | 152 | if (fmod(i, 2) == 1) { 153 | 154 | windCoEff += offsetV; 155 | } 156 | 157 | } 158 | 159 | for (int p = 0; p < (vertexCount - 2); p++) { 160 | triStream.Append(v[p]); 161 | triStream.Append(v[p + 2]); 162 | triStream.Append(v[p + 1]); 163 | } 164 | } 165 | 166 | 167 | half4 frag(g2f IN) : COLOR 168 | { 169 | fixed4 color = tex2D(_MainTex, IN.uv); 170 | fixed4 alpha = tex2D(_AlphaTex, IN.uv); 171 | 172 | half3 worldNormal = UnityObjectToWorldNormal(IN.norm); 173 | 174 | //ads 175 | fixed3 light; 176 | 177 | //ambient 178 | fixed3 ambient = ShadeSH9(half4(worldNormal, 1)); 179 | 180 | //diffuse 181 | fixed3 diffuseLight = saturate(dot(worldNormal, UnityWorldSpaceLightDir(IN.pos))) * _LightColor0; 182 | 183 | //specular Blinn-Phong 184 | fixed3 halfVector = normalize(UnityWorldSpaceLightDir(IN.pos) + WorldSpaceViewDir(IN.pos)); 185 | fixed3 specularLight = pow(saturate(dot(worldNormal, halfVector)), 15) * _LightColor0; 186 | 187 | light = ambient + diffuseLight + specularLight; 188 | 189 | return float4(color.rgb * light, alpha.g); 190 | 191 | } 192 | ENDCG 193 | 194 | } 195 | } 196 | } -------------------------------------------------------------------------------- /Assets/Shader/GrassGeometryShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5d0fde071320ee40b730bbd84b1e07d 3 | timeCreated: 1506089526 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Texture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9014ab02537d96d49bfa63cd77d7a4b9 3 | folderAsset: yes 4 | timeCreated: 1506438494 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Texture/Heightmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenjd/Realistic-Real-Time-Grass-Rendering-With-Unity/856e814f48c3c6e73367ea9f34ab7666739aa4b4/Assets/Texture/Heightmap.png -------------------------------------------------------------------------------- /Assets/Texture/Heightmap.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45e64b3e874365949ae291ac5232e39c 3 | timeCreated: 1505367531 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 1 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 128 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 128 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | - buildTarget: Android 70 | maxTextureSize: 128 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | spriteSheet: 78 | serializedVersion: 2 79 | sprites: [] 80 | outline: [] 81 | spritePackingTag: 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/Texture/grassBlade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenjd/Realistic-Real-Time-Grass-Rendering-With-Unity/856e814f48c3c6e73367ea9f34ab7666739aa4b4/Assets/Texture/grassBlade.png -------------------------------------------------------------------------------- /Assets/Texture/grassBlade.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c7f9c703d75c4b4c8972723020033b6 3 | timeCreated: 1506033215 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: -1 34 | aniso: -1 35 | mipBias: -1 36 | wrapU: -1 37 | wrapV: -1 38 | wrapW: -1 39 | nPOTScale: 1 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 0 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 100 49 | alphaUsage: 1 50 | alphaIsTransparency: 0 51 | spriteTessellationDetail: -1 52 | textureType: 0 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | textureFormat: -1 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | spriteSheet: 67 | serializedVersion: 2 68 | sprites: [] 69 | outline: [] 70 | physicsShape: [] 71 | spritePackingTag: 72 | userData: 73 | assetBundleName: 74 | assetBundleVariant: 75 | -------------------------------------------------------------------------------- /Assets/Texture/grassBladeAlpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenjd/Realistic-Real-Time-Grass-Rendering-With-Unity/856e814f48c3c6e73367ea9f34ab7666739aa4b4/Assets/Texture/grassBladeAlpha.png -------------------------------------------------------------------------------- /Assets/Texture/grassBladeAlpha.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e713df6ae96f8940bd8a0558d66998f 3 | timeCreated: 1505376909 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 0 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | - buildTarget: Android 70 | maxTextureSize: 2048 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | spriteSheet: 78 | serializedVersion: 2 79 | sprites: [] 80 | outline: [] 81 | spritePackingTag: 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/skyb2.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6edf69079f7ae3640860e57fbe529fd9 3 | folderAsset: yes 4 | timeCreated: 1505366510 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/skyb2/back.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenjd/Realistic-Real-Time-Grass-Rendering-With-Unity/856e814f48c3c6e73367ea9f34ab7666739aa4b4/Assets/skyb2/back.psd -------------------------------------------------------------------------------- /Assets/skyb2/back.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 040c95de3519b0e478ae9ab0bcbe41e6 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 4 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | sRGBTexture: 1 10 | linearTexture: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: 0.25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 6 23 | cubemapConvolution: 0 24 | seamlessCubemap: 0 25 | textureFormat: -1 26 | maxTextureSize: 2048 27 | textureSettings: 28 | filterMode: 2 29 | aniso: -1 30 | mipBias: -1 31 | wrapMode: 1 32 | nPOTScale: 1 33 | lightmap: 0 34 | compressionQuality: 50 35 | spriteMode: 0 36 | spriteExtrude: 1 37 | spriteMeshType: 1 38 | alignment: 0 39 | spritePivot: {x: 0.5, y: 0.5} 40 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 41 | spritePixelsToUnits: 100 42 | alphaUsage: 1 43 | alphaIsTransparency: 0 44 | spriteTessellationDetail: -1 45 | textureType: 0 46 | textureShape: 1 47 | maxTextureSizeSet: 0 48 | compressionQualitySet: 0 49 | textureFormatSet: 0 50 | platformSettings: 51 | - buildTarget: DefaultTexturePlatform 52 | maxTextureSize: 2048 53 | textureFormat: -1 54 | textureCompression: 1 55 | compressionQuality: 50 56 | crunchedCompression: 0 57 | allowsAlphaSplitting: 0 58 | overridden: 0 59 | spriteSheet: 60 | serializedVersion: 2 61 | sprites: [] 62 | outline: [] 63 | spritePackingTag: 64 | userData: 65 | assetBundleName: 66 | assetBundleVariant: 67 | -------------------------------------------------------------------------------- /Assets/skyb2/bot.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenjd/Realistic-Real-Time-Grass-Rendering-With-Unity/856e814f48c3c6e73367ea9f34ab7666739aa4b4/Assets/skyb2/bot.psd -------------------------------------------------------------------------------- /Assets/skyb2/bot.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5458bc6e230238941ba22149b96396a3 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 4 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | sRGBTexture: 1 10 | linearTexture: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: 0.25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 6 23 | cubemapConvolution: 0 24 | seamlessCubemap: 0 25 | textureFormat: -1 26 | maxTextureSize: 2048 27 | textureSettings: 28 | filterMode: 2 29 | aniso: -1 30 | mipBias: -1 31 | wrapMode: 1 32 | nPOTScale: 1 33 | lightmap: 0 34 | compressionQuality: 50 35 | spriteMode: 0 36 | spriteExtrude: 1 37 | spriteMeshType: 1 38 | alignment: 0 39 | spritePivot: {x: 0.5, y: 0.5} 40 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 41 | spritePixelsToUnits: 100 42 | alphaUsage: 1 43 | alphaIsTransparency: 0 44 | spriteTessellationDetail: -1 45 | textureType: 0 46 | textureShape: 1 47 | maxTextureSizeSet: 0 48 | compressionQualitySet: 0 49 | textureFormatSet: 0 50 | platformSettings: 51 | - buildTarget: DefaultTexturePlatform 52 | maxTextureSize: 2048 53 | textureFormat: -1 54 | textureCompression: 1 55 | compressionQuality: 50 56 | crunchedCompression: 0 57 | allowsAlphaSplitting: 0 58 | overridden: 0 59 | spriteSheet: 60 | serializedVersion: 2 61 | sprites: [] 62 | outline: [] 63 | spritePackingTag: 64 | userData: 65 | assetBundleName: 66 | assetBundleVariant: 67 | -------------------------------------------------------------------------------- /Assets/skyb2/front.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenjd/Realistic-Real-Time-Grass-Rendering-With-Unity/856e814f48c3c6e73367ea9f34ab7666739aa4b4/Assets/skyb2/front.psd -------------------------------------------------------------------------------- /Assets/skyb2/front.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21894595e997e904d9a231a42883cdc5 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 4 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | sRGBTexture: 1 10 | linearTexture: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: 0.25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 6 23 | cubemapConvolution: 0 24 | seamlessCubemap: 0 25 | textureFormat: -1 26 | maxTextureSize: 2048 27 | textureSettings: 28 | filterMode: 2 29 | aniso: -1 30 | mipBias: -1 31 | wrapMode: 1 32 | nPOTScale: 1 33 | lightmap: 0 34 | compressionQuality: 50 35 | spriteMode: 0 36 | spriteExtrude: 1 37 | spriteMeshType: 1 38 | alignment: 0 39 | spritePivot: {x: 0.5, y: 0.5} 40 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 41 | spritePixelsToUnits: 100 42 | alphaUsage: 1 43 | alphaIsTransparency: 0 44 | spriteTessellationDetail: -1 45 | textureType: 0 46 | textureShape: 1 47 | maxTextureSizeSet: 0 48 | compressionQualitySet: 0 49 | textureFormatSet: 0 50 | platformSettings: 51 | - buildTarget: DefaultTexturePlatform 52 | maxTextureSize: 2048 53 | textureFormat: -1 54 | textureCompression: 1 55 | compressionQuality: 50 56 | crunchedCompression: 0 57 | allowsAlphaSplitting: 0 58 | overridden: 0 59 | spriteSheet: 60 | serializedVersion: 2 61 | sprites: [] 62 | outline: [] 63 | spritePackingTag: 64 | userData: 65 | assetBundleName: 66 | assetBundleVariant: 67 | -------------------------------------------------------------------------------- /Assets/skyb2/l.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenjd/Realistic-Real-Time-Grass-Rendering-With-Unity/856e814f48c3c6e73367ea9f34ab7666739aa4b4/Assets/skyb2/l.psd -------------------------------------------------------------------------------- /Assets/skyb2/l.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86360358ee21cf24395944f9cac98ebd 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 4 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | sRGBTexture: 1 10 | linearTexture: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: 0.25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 6 23 | cubemapConvolution: 0 24 | seamlessCubemap: 0 25 | textureFormat: -1 26 | maxTextureSize: 2048 27 | textureSettings: 28 | filterMode: 2 29 | aniso: -1 30 | mipBias: -1 31 | wrapMode: 1 32 | nPOTScale: 1 33 | lightmap: 0 34 | compressionQuality: 50 35 | spriteMode: 0 36 | spriteExtrude: 1 37 | spriteMeshType: 1 38 | alignment: 0 39 | spritePivot: {x: 0.5, y: 0.5} 40 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 41 | spritePixelsToUnits: 100 42 | alphaUsage: 1 43 | alphaIsTransparency: 0 44 | spriteTessellationDetail: -1 45 | textureType: 0 46 | textureShape: 1 47 | maxTextureSizeSet: 0 48 | compressionQualitySet: 0 49 | textureFormatSet: 0 50 | platformSettings: 51 | - buildTarget: DefaultTexturePlatform 52 | maxTextureSize: 2048 53 | textureFormat: -1 54 | textureCompression: 1 55 | compressionQuality: 50 56 | crunchedCompression: 0 57 | allowsAlphaSplitting: 0 58 | overridden: 0 59 | spriteSheet: 60 | serializedVersion: 2 61 | sprites: [] 62 | outline: [] 63 | spritePackingTag: 64 | userData: 65 | assetBundleName: 66 | assetBundleVariant: 67 | -------------------------------------------------------------------------------- /Assets/skyb2/r.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenjd/Realistic-Real-Time-Grass-Rendering-With-Unity/856e814f48c3c6e73367ea9f34ab7666739aa4b4/Assets/skyb2/r.psd -------------------------------------------------------------------------------- /Assets/skyb2/r.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07c994a0512b203489bfeaf6a35a7055 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 4 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | sRGBTexture: 1 10 | linearTexture: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: 0.25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 6 23 | cubemapConvolution: 0 24 | seamlessCubemap: 0 25 | textureFormat: -1 26 | maxTextureSize: 2048 27 | textureSettings: 28 | filterMode: 2 29 | aniso: -1 30 | mipBias: -1 31 | wrapMode: 1 32 | nPOTScale: 1 33 | lightmap: 0 34 | compressionQuality: 50 35 | spriteMode: 0 36 | spriteExtrude: 1 37 | spriteMeshType: 1 38 | alignment: 0 39 | spritePivot: {x: 0.5, y: 0.5} 40 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 41 | spritePixelsToUnits: 100 42 | alphaUsage: 1 43 | alphaIsTransparency: 0 44 | spriteTessellationDetail: -1 45 | textureType: 0 46 | textureShape: 1 47 | maxTextureSizeSet: 0 48 | compressionQualitySet: 0 49 | textureFormatSet: 0 50 | platformSettings: 51 | - buildTarget: DefaultTexturePlatform 52 | maxTextureSize: 2048 53 | textureFormat: -1 54 | textureCompression: 1 55 | compressionQuality: 50 56 | crunchedCompression: 0 57 | allowsAlphaSplitting: 0 58 | overridden: 0 59 | spriteSheet: 60 | serializedVersion: 2 61 | sprites: [] 62 | outline: [] 63 | spritePackingTag: 64 | userData: 65 | assetBundleName: 66 | assetBundleVariant: 67 | -------------------------------------------------------------------------------- /Assets/skyb2/sky,startday.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: sky,startday 10 | m_Shader: {fileID: 104, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BackTex: 22 | m_Texture: {fileID: 2800000, guid: 040c95de3519b0e478ae9ab0bcbe41e6, type: 3} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DownTex: 26 | m_Texture: {fileID: 2800000, guid: 5458bc6e230238941ba22149b96396a3, type: 3} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _FrontTex: 30 | m_Texture: {fileID: 2800000, guid: 21894595e997e904d9a231a42883cdc5, type: 3} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _LeftTex: 34 | m_Texture: {fileID: 2800000, guid: 86360358ee21cf24395944f9cac98ebd, type: 3} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _MainTex: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _RightTex: 42 | m_Texture: {fileID: 2800000, guid: 07c994a0512b203489bfeaf6a35a7055, type: 3} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _UpTex: 46 | m_Texture: {fileID: 2800000, guid: 667c8e0cf5073484c876a0e0e17ba83b, type: 3} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | m_Floats: 50 | - _Exposure: 1 51 | - _Rotation: 0 52 | m_Colors: 53 | - _Color: {r: 1, g: 1, b: 1, a: 1} 54 | - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 55 | -------------------------------------------------------------------------------- /Assets/skyb2/sky,startday.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c74745ae37e45d54cb8f33bb8481bf20 3 | NativeFormatImporter: 4 | mainObjectFileID: -1 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/skyb2/up.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenjd/Realistic-Real-Time-Grass-Rendering-With-Unity/856e814f48c3c6e73367ea9f34ab7666739aa4b4/Assets/skyb2/up.psd -------------------------------------------------------------------------------- /Assets/skyb2/up.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 667c8e0cf5073484c876a0e0e17ba83b 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 4 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | sRGBTexture: 1 10 | linearTexture: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: 0.25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 6 23 | cubemapConvolution: 0 24 | seamlessCubemap: 0 25 | textureFormat: -1 26 | maxTextureSize: 2048 27 | textureSettings: 28 | filterMode: 2 29 | aniso: -1 30 | mipBias: -1 31 | wrapMode: 1 32 | nPOTScale: 1 33 | lightmap: 0 34 | compressionQuality: 50 35 | spriteMode: 0 36 | spriteExtrude: 1 37 | spriteMeshType: 1 38 | alignment: 0 39 | spritePivot: {x: 0.5, y: 0.5} 40 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 41 | spritePixelsToUnits: 100 42 | alphaUsage: 1 43 | alphaIsTransparency: 0 44 | spriteTessellationDetail: -1 45 | textureType: 0 46 | textureShape: 1 47 | maxTextureSizeSet: 0 48 | compressionQualitySet: 0 49 | textureFormatSet: 0 50 | platformSettings: 51 | - buildTarget: DefaultTexturePlatform 52 | maxTextureSize: 2048 53 | textureFormat: -1 54 | textureCompression: 1 55 | compressionQuality: 50 56 | crunchedCompression: 0 57 | allowsAlphaSplitting: 0 58 | overridden: 0 59 | spriteSheet: 60 | serializedVersion: 2 61 | sprites: [] 62 | outline: [] 63 | spritePackingTag: 64 | userData: 65 | assetBundleName: 66 | assetBundleVariant: 67 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 jiadong chen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_EnablePCM: 1 18 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 19 | m_AutoSimulation: 1 20 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_DefaultBehaviorMode: 0 10 | m_SpritePackerMode: 0 11 | m_SpritePackerPaddingPower: 1 12 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 13 | m_ProjectGenerationRootNamespace: 14 | m_UserGeneratedProjectSuffix: 15 | m_CollabEditorSettings: 16 | inProgressEnabled: 1 17 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | m_SettingNames: 89 | - Humanoid 90 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AlwaysShowColliders: 0 28 | m_ShowColliderSleep: 1 29 | m_ShowColliderContacts: 0 30 | m_ShowColliderAABB: 0 31 | m_ContactArrowScale: 0.2 32 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 33 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 34 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 35 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 36 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 37 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | productGUID: ca2aed6d3ffe2944ea56543c8ccee682 8 | AndroidProfiler: 0 9 | defaultScreenOrientation: 4 10 | targetDevice: 2 11 | useOnDemandResources: 0 12 | accelerometerFrequency: 60 13 | companyName: DefaultCompany 14 | productName: RealisticRealTimeGrassRendering 15 | defaultCursor: {fileID: 0} 16 | cursorHotspot: {x: 0, y: 0} 17 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 18 | m_ShowUnitySplashScreen: 1 19 | m_ShowUnitySplashLogo: 1 20 | m_SplashScreenOverlayOpacity: 1 21 | m_SplashScreenAnimation: 1 22 | m_SplashScreenLogoStyle: 1 23 | m_SplashScreenDrawMode: 0 24 | m_SplashScreenBackgroundAnimationZoom: 1 25 | m_SplashScreenLogoAnimationZoom: 1 26 | m_SplashScreenBackgroundLandscapeAspect: 1 27 | m_SplashScreenBackgroundPortraitAspect: 1 28 | m_SplashScreenBackgroundLandscapeUvs: 29 | serializedVersion: 2 30 | x: 0 31 | y: 0 32 | width: 1 33 | height: 1 34 | m_SplashScreenBackgroundPortraitUvs: 35 | serializedVersion: 2 36 | x: 0 37 | y: 0 38 | width: 1 39 | height: 1 40 | m_SplashScreenLogos: [] 41 | m_SplashScreenBackgroundLandscape: {fileID: 0} 42 | m_SplashScreenBackgroundPortrait: {fileID: 0} 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_MobileMTRendering: 0 53 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 54 | iosShowActivityIndicatorOnLoading: -1 55 | androidShowActivityIndicatorOnLoading: -1 56 | tizenShowActivityIndicatorOnLoading: -1 57 | iosAppInBackgroundBehavior: 0 58 | displayResolutionDialog: 1 59 | iosAllowHTTPDownload: 1 60 | allowedAutorotateToPortrait: 1 61 | allowedAutorotateToPortraitUpsideDown: 1 62 | allowedAutorotateToLandscapeRight: 1 63 | allowedAutorotateToLandscapeLeft: 1 64 | useOSAutorotation: 1 65 | use32BitDisplayBuffer: 1 66 | disableDepthAndStencilBuffers: 0 67 | defaultIsFullScreen: 1 68 | defaultIsNativeResolution: 1 69 | runInBackground: 0 70 | captureSingleScreen: 0 71 | muteOtherAudioSources: 0 72 | Prepare IOS For Recording: 0 73 | Force IOS Speakers When Recording: 0 74 | submitAnalytics: 1 75 | usePlayerLog: 1 76 | bakeCollisionMeshes: 0 77 | forceSingleInstance: 0 78 | resizableWindow: 0 79 | useMacAppStoreValidation: 0 80 | macAppStoreCategory: public.app-category.games 81 | gpuSkinning: 0 82 | graphicsJobs: 0 83 | xboxPIXTextureCapture: 0 84 | xboxEnableAvatar: 0 85 | xboxEnableKinect: 0 86 | xboxEnableKinectAutoTracking: 0 87 | xboxEnableFitness: 0 88 | visibleInBackground: 1 89 | allowFullscreenSwitch: 1 90 | graphicsJobMode: 0 91 | macFullscreenMode: 2 92 | d3d9FullscreenMode: 1 93 | d3d11FullscreenMode: 1 94 | xboxSpeechDB: 0 95 | xboxEnableHeadOrientation: 0 96 | xboxEnableGuest: 0 97 | xboxEnablePIXSampling: 0 98 | n3dsDisableStereoscopicView: 0 99 | n3dsEnableSharedListOpt: 1 100 | n3dsEnableVSync: 0 101 | ignoreAlphaClear: 0 102 | xboxOneResolution: 0 103 | xboxOneMonoLoggingLevel: 0 104 | xboxOneLoggingLevel: 1 105 | xboxOneDisableEsram: 0 106 | videoMemoryForVertexBuffers: 0 107 | psp2PowerMode: 0 108 | psp2AcquireBGM: 1 109 | wiiUTVResolution: 0 110 | wiiUGamePadMSAA: 1 111 | wiiUSupportsNunchuk: 0 112 | wiiUSupportsClassicController: 0 113 | wiiUSupportsBalanceBoard: 0 114 | wiiUSupportsMotionPlus: 0 115 | wiiUSupportsProController: 0 116 | wiiUAllowScreenCapture: 1 117 | wiiUControllerCount: 0 118 | m_SupportedAspectRatios: 119 | 4:3: 1 120 | 5:4: 1 121 | 16:10: 1 122 | 16:9: 1 123 | Others: 1 124 | bundleVersion: 1.0 125 | preloadedAssets: [] 126 | metroInputSource: 0 127 | m_HolographicPauseOnTrackingLoss: 1 128 | xboxOneDisableKinectGpuReservation: 0 129 | xboxOneEnable7thCore: 0 130 | vrSettings: 131 | cardboard: 132 | depthFormat: 0 133 | enableTransitionView: 0 134 | daydream: 135 | depthFormat: 0 136 | useSustainedPerformanceMode: 0 137 | hololens: 138 | depthFormat: 1 139 | protectGraphicsMemory: 0 140 | useHDRDisplay: 0 141 | targetPixelDensity: 0 142 | resolutionScalingMode: 0 143 | applicationIdentifier: {} 144 | buildNumber: {} 145 | AndroidBundleVersionCode: 1 146 | AndroidMinSdkVersion: 16 147 | AndroidTargetSdkVersion: 0 148 | AndroidPreferredInstallLocation: 1 149 | aotOptions: 150 | stripEngineCode: 1 151 | iPhoneStrippingLevel: 0 152 | iPhoneScriptCallOptimization: 0 153 | ForceInternetPermission: 0 154 | ForceSDCardPermission: 0 155 | CreateWallpaper: 0 156 | APKExpansionFiles: 0 157 | keepLoadedShadersAlive: 0 158 | StripUnusedMeshComponents: 0 159 | VertexChannelCompressionMask: 160 | serializedVersion: 2 161 | m_Bits: 238 162 | iPhoneSdkVersion: 988 163 | iOSTargetOSVersionString: 164 | tvOSSdkVersion: 0 165 | tvOSRequireExtendedGameController: 0 166 | tvOSTargetOSVersionString: 167 | uIPrerenderedIcon: 0 168 | uIRequiresPersistentWiFi: 0 169 | uIRequiresFullScreen: 1 170 | uIStatusBarHidden: 1 171 | uIExitOnSuspend: 0 172 | uIStatusBarStyle: 0 173 | iPhoneSplashScreen: {fileID: 0} 174 | iPhoneHighResSplashScreen: {fileID: 0} 175 | iPhoneTallHighResSplashScreen: {fileID: 0} 176 | iPhone47inSplashScreen: {fileID: 0} 177 | iPhone55inPortraitSplashScreen: {fileID: 0} 178 | iPhone55inLandscapeSplashScreen: {fileID: 0} 179 | iPadPortraitSplashScreen: {fileID: 0} 180 | iPadHighResPortraitSplashScreen: {fileID: 0} 181 | iPadLandscapeSplashScreen: {fileID: 0} 182 | iPadHighResLandscapeSplashScreen: {fileID: 0} 183 | appleTVSplashScreen: {fileID: 0} 184 | tvOSSmallIconLayers: [] 185 | tvOSLargeIconLayers: [] 186 | tvOSTopShelfImageLayers: [] 187 | tvOSTopShelfImageWideLayers: [] 188 | iOSLaunchScreenType: 0 189 | iOSLaunchScreenPortrait: {fileID: 0} 190 | iOSLaunchScreenLandscape: {fileID: 0} 191 | iOSLaunchScreenBackgroundColor: 192 | serializedVersion: 2 193 | rgba: 0 194 | iOSLaunchScreenFillPct: 100 195 | iOSLaunchScreenSize: 100 196 | iOSLaunchScreenCustomXibPath: 197 | iOSLaunchScreeniPadType: 0 198 | iOSLaunchScreeniPadImage: {fileID: 0} 199 | iOSLaunchScreeniPadBackgroundColor: 200 | serializedVersion: 2 201 | rgba: 0 202 | iOSLaunchScreeniPadFillPct: 100 203 | iOSLaunchScreeniPadSize: 100 204 | iOSLaunchScreeniPadCustomXibPath: 205 | iOSDeviceRequirements: [] 206 | iOSURLSchemes: [] 207 | iOSBackgroundModes: 0 208 | iOSMetalForceHardShadows: 0 209 | metalEditorSupport: 1 210 | metalAPIValidation: 1 211 | iOSRenderExtraFrameOnPause: 0 212 | appleDeveloperTeamID: 213 | iOSManualSigningProvisioningProfileID: 214 | tvOSManualSigningProvisioningProfileID: 215 | appleEnableAutomaticSigning: 0 216 | AndroidTargetDevice: 0 217 | AndroidSplashScreenScale: 0 218 | androidSplashScreen: {fileID: 0} 219 | AndroidKeystoreName: 220 | AndroidKeyaliasName: 221 | AndroidTVCompatibility: 1 222 | AndroidIsGame: 1 223 | androidEnableBanner: 1 224 | m_AndroidBanners: 225 | - width: 320 226 | height: 180 227 | banner: {fileID: 0} 228 | androidGamepadSupportLevel: 0 229 | resolutionDialogBanner: {fileID: 0} 230 | m_BuildTargetIcons: [] 231 | m_BuildTargetBatching: [] 232 | m_BuildTargetGraphicsAPIs: [] 233 | m_BuildTargetVRSettings: [] 234 | openGLRequireES31: 0 235 | openGLRequireES31AEP: 0 236 | webPlayerTemplate: APPLICATION:Default 237 | m_TemplateCustomTags: {} 238 | wiiUTitleID: 0005000011000000 239 | wiiUGroupID: 00010000 240 | wiiUCommonSaveSize: 4096 241 | wiiUAccountSaveSize: 2048 242 | wiiUOlvAccessKey: 0 243 | wiiUTinCode: 0 244 | wiiUJoinGameId: 0 245 | wiiUJoinGameModeMask: 0000000000000000 246 | wiiUCommonBossSize: 0 247 | wiiUAccountBossSize: 0 248 | wiiUAddOnUniqueIDs: [] 249 | wiiUMainThreadStackSize: 3072 250 | wiiULoaderThreadStackSize: 1024 251 | wiiUSystemHeapSize: 128 252 | wiiUTVStartupScreen: {fileID: 0} 253 | wiiUGamePadStartupScreen: {fileID: 0} 254 | wiiUDrcBufferDisabled: 0 255 | wiiUProfilerLibPath: 256 | playModeTestRunnerEnabled: 0 257 | actionOnDotNetUnhandledException: 1 258 | enableInternalProfiler: 0 259 | logObjCUncaughtExceptions: 1 260 | enableCrashReportAPI: 0 261 | cameraUsageDescription: 262 | locationUsageDescription: 263 | microphoneUsageDescription: 264 | switchNetLibKey: 265 | switchSocketMemoryPoolSize: 6144 266 | switchSocketAllocatorPoolSize: 128 267 | switchSocketConcurrencyLimit: 14 268 | switchScreenResolutionBehavior: 2 269 | switchUseCPUProfiler: 0 270 | switchApplicationID: 0x01004b9000490000 271 | switchNSODependencies: 272 | switchTitleNames_0: 273 | switchTitleNames_1: 274 | switchTitleNames_2: 275 | switchTitleNames_3: 276 | switchTitleNames_4: 277 | switchTitleNames_5: 278 | switchTitleNames_6: 279 | switchTitleNames_7: 280 | switchTitleNames_8: 281 | switchTitleNames_9: 282 | switchTitleNames_10: 283 | switchTitleNames_11: 284 | switchPublisherNames_0: 285 | switchPublisherNames_1: 286 | switchPublisherNames_2: 287 | switchPublisherNames_3: 288 | switchPublisherNames_4: 289 | switchPublisherNames_5: 290 | switchPublisherNames_6: 291 | switchPublisherNames_7: 292 | switchPublisherNames_8: 293 | switchPublisherNames_9: 294 | switchPublisherNames_10: 295 | switchPublisherNames_11: 296 | switchIcons_0: {fileID: 0} 297 | switchIcons_1: {fileID: 0} 298 | switchIcons_2: {fileID: 0} 299 | switchIcons_3: {fileID: 0} 300 | switchIcons_4: {fileID: 0} 301 | switchIcons_5: {fileID: 0} 302 | switchIcons_6: {fileID: 0} 303 | switchIcons_7: {fileID: 0} 304 | switchIcons_8: {fileID: 0} 305 | switchIcons_9: {fileID: 0} 306 | switchIcons_10: {fileID: 0} 307 | switchIcons_11: {fileID: 0} 308 | switchSmallIcons_0: {fileID: 0} 309 | switchSmallIcons_1: {fileID: 0} 310 | switchSmallIcons_2: {fileID: 0} 311 | switchSmallIcons_3: {fileID: 0} 312 | switchSmallIcons_4: {fileID: 0} 313 | switchSmallIcons_5: {fileID: 0} 314 | switchSmallIcons_6: {fileID: 0} 315 | switchSmallIcons_7: {fileID: 0} 316 | switchSmallIcons_8: {fileID: 0} 317 | switchSmallIcons_9: {fileID: 0} 318 | switchSmallIcons_10: {fileID: 0} 319 | switchSmallIcons_11: {fileID: 0} 320 | switchManualHTML: 321 | switchAccessibleURLs: 322 | switchLegalInformation: 323 | switchMainThreadStackSize: 1048576 324 | switchPresenceGroupId: 0x01004b9000490000 325 | switchLogoHandling: 0 326 | switchReleaseVersion: 0 327 | switchDisplayVersion: 1.0.0 328 | switchStartupUserAccount: 0 329 | switchTouchScreenUsage: 0 330 | switchSupportedLanguagesMask: 0 331 | switchLogoType: 0 332 | switchApplicationErrorCodeCategory: 333 | switchUserAccountSaveDataSize: 0 334 | switchUserAccountSaveDataJournalSize: 0 335 | switchApplicationAttribute: 0 336 | switchCardSpecSize: 4 337 | switchCardSpecClock: 25 338 | switchRatingsMask: 0 339 | switchRatingsInt_0: 0 340 | switchRatingsInt_1: 0 341 | switchRatingsInt_2: 0 342 | switchRatingsInt_3: 0 343 | switchRatingsInt_4: 0 344 | switchRatingsInt_5: 0 345 | switchRatingsInt_6: 0 346 | switchRatingsInt_7: 0 347 | switchRatingsInt_8: 0 348 | switchRatingsInt_9: 0 349 | switchRatingsInt_10: 0 350 | switchRatingsInt_11: 0 351 | switchLocalCommunicationIds_0: 0x01004b9000490000 352 | switchLocalCommunicationIds_1: 353 | switchLocalCommunicationIds_2: 354 | switchLocalCommunicationIds_3: 355 | switchLocalCommunicationIds_4: 356 | switchLocalCommunicationIds_5: 357 | switchLocalCommunicationIds_6: 358 | switchLocalCommunicationIds_7: 359 | switchParentalControl: 0 360 | switchAllowsScreenshot: 1 361 | switchDataLossConfirmation: 0 362 | switchSupportedNpadStyles: 3 363 | switchSocketConfigEnabled: 0 364 | switchTcpInitialSendBufferSize: 32 365 | switchTcpInitialReceiveBufferSize: 64 366 | switchTcpAutoSendBufferSizeMax: 256 367 | switchTcpAutoReceiveBufferSizeMax: 256 368 | switchUdpSendBufferSize: 9 369 | switchUdpReceiveBufferSize: 42 370 | switchSocketBufferEfficiency: 4 371 | ps4NPAgeRating: 12 372 | ps4NPTitleSecret: 373 | ps4NPTrophyPackPath: 374 | ps4ParentalLevel: 11 375 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 376 | ps4Category: 0 377 | ps4MasterVersion: 01.00 378 | ps4AppVersion: 01.00 379 | ps4AppType: 0 380 | ps4ParamSfxPath: 381 | ps4VideoOutPixelFormat: 0 382 | ps4VideoOutInitialWidth: 1920 383 | ps4VideoOutBaseModeInitialWidth: 1920 384 | ps4VideoOutReprojectionRate: 120 385 | ps4PronunciationXMLPath: 386 | ps4PronunciationSIGPath: 387 | ps4BackgroundImagePath: 388 | ps4StartupImagePath: 389 | ps4SaveDataImagePath: 390 | ps4SdkOverride: 391 | ps4BGMPath: 392 | ps4ShareFilePath: 393 | ps4ShareOverlayImagePath: 394 | ps4PrivacyGuardImagePath: 395 | ps4NPtitleDatPath: 396 | ps4RemotePlayKeyAssignment: -1 397 | ps4RemotePlayKeyMappingDir: 398 | ps4PlayTogetherPlayerCount: 0 399 | ps4EnterButtonAssignment: 1 400 | ps4ApplicationParam1: 0 401 | ps4ApplicationParam2: 0 402 | ps4ApplicationParam3: 0 403 | ps4ApplicationParam4: 0 404 | ps4DownloadDataSize: 0 405 | ps4GarlicHeapSize: 2048 406 | ps4ProGarlicHeapSize: 2560 407 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 408 | ps4pnSessions: 1 409 | ps4pnPresence: 1 410 | ps4pnFriends: 1 411 | ps4pnGameCustomData: 1 412 | playerPrefsSupport: 0 413 | restrictedAudioUsageRights: 0 414 | ps4UseResolutionFallback: 0 415 | ps4ReprojectionSupport: 0 416 | ps4UseAudio3dBackend: 0 417 | ps4SocialScreenEnabled: 0 418 | ps4ScriptOptimizationLevel: 0 419 | ps4Audio3dVirtualSpeakerCount: 14 420 | ps4attribCpuUsage: 0 421 | ps4PatchPkgPath: 422 | ps4PatchLatestPkgPath: 423 | ps4PatchChangeinfoPath: 424 | ps4PatchDayOne: 0 425 | ps4attribUserManagement: 0 426 | ps4attribMoveSupport: 0 427 | ps4attrib3DSupport: 0 428 | ps4attribShareSupport: 0 429 | ps4attribExclusiveVR: 0 430 | ps4disableAutoHideSplash: 0 431 | ps4videoRecordingFeaturesUsed: 0 432 | ps4contentSearchFeaturesUsed: 0 433 | ps4attribEyeToEyeDistanceSettingVR: 0 434 | ps4IncludedModules: [] 435 | monoEnv: 436 | psp2Splashimage: {fileID: 0} 437 | psp2NPTrophyPackPath: 438 | psp2NPSupportGBMorGJP: 0 439 | psp2NPAgeRating: 12 440 | psp2NPTitleDatPath: 441 | psp2NPCommsID: 442 | psp2NPCommunicationsID: 443 | psp2NPCommsPassphrase: 444 | psp2NPCommsSig: 445 | psp2ParamSfxPath: 446 | psp2ManualPath: 447 | psp2LiveAreaGatePath: 448 | psp2LiveAreaBackroundPath: 449 | psp2LiveAreaPath: 450 | psp2LiveAreaTrialPath: 451 | psp2PatchChangeInfoPath: 452 | psp2PatchOriginalPackage: 453 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 454 | psp2KeystoneFile: 455 | psp2MemoryExpansionMode: 0 456 | psp2DRMType: 0 457 | psp2StorageType: 0 458 | psp2MediaCapacity: 0 459 | psp2DLCConfigPath: 460 | psp2ThumbnailPath: 461 | psp2BackgroundPath: 462 | psp2SoundPath: 463 | psp2TrophyCommId: 464 | psp2TrophyPackagePath: 465 | psp2PackagedResourcesPath: 466 | psp2SaveDataQuota: 10240 467 | psp2ParentalLevel: 1 468 | psp2ShortTitle: Not Set 469 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 470 | psp2Category: 0 471 | psp2MasterVersion: 01.00 472 | psp2AppVersion: 01.00 473 | psp2TVBootMode: 0 474 | psp2EnterButtonAssignment: 2 475 | psp2TVDisableEmu: 0 476 | psp2AllowTwitterDialog: 1 477 | psp2Upgradable: 0 478 | psp2HealthWarning: 0 479 | psp2UseLibLocation: 0 480 | psp2InfoBarOnStartup: 0 481 | psp2InfoBarColor: 0 482 | psp2ScriptOptimizationLevel: 0 483 | psmSplashimage: {fileID: 0} 484 | splashScreenBackgroundSourceLandscape: {fileID: 0} 485 | splashScreenBackgroundSourcePortrait: {fileID: 0} 486 | spritePackerPolicy: 487 | webGLMemorySize: 256 488 | webGLExceptionSupport: 1 489 | webGLNameFilesAsHashes: 0 490 | webGLDataCaching: 0 491 | webGLDebugSymbols: 0 492 | webGLEmscriptenArgs: 493 | webGLModulesDirectory: 494 | webGLTemplate: APPLICATION:Default 495 | webGLAnalyzeBuildSize: 0 496 | webGLUseEmbeddedResources: 0 497 | webGLUseWasm: 0 498 | webGLCompressionFormat: 1 499 | scriptingDefineSymbols: {} 500 | platformArchitecture: {} 501 | scriptingBackend: {} 502 | incrementalIl2cppBuild: {} 503 | additionalIl2CppArgs: 504 | scriptingRuntimeVersion: 0 505 | apiCompatibilityLevelPerPlatform: {} 506 | m_RenderingPath: 1 507 | m_MobileRenderingPath: 1 508 | metroPackageName: RealisticRealTimeGrassRendering 509 | metroPackageVersion: 510 | metroCertificatePath: 511 | metroCertificatePassword: 512 | metroCertificateSubject: 513 | metroCertificateIssuer: 514 | metroCertificateNotAfter: 0000000000000000 515 | metroApplicationDescription: RealisticRealTimeGrassRendering 516 | wsaImages: {} 517 | metroTileShortName: 518 | metroCommandLineArgsFile: 519 | metroTileShowName: 0 520 | metroMediumTileShowName: 0 521 | metroLargeTileShowName: 0 522 | metroWideTileShowName: 0 523 | metroDefaultTileSize: 1 524 | metroTileForegroundText: 2 525 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 526 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 527 | a: 1} 528 | metroSplashScreenUseBackgroundColor: 0 529 | platformCapabilities: {} 530 | metroFTAName: 531 | metroFTAFileTypes: [] 532 | metroProtocolName: 533 | metroCompilationOverrides: 1 534 | tizenProductDescription: 535 | tizenProductURL: 536 | tizenSigningProfileName: 537 | tizenGPSPermissions: 0 538 | tizenMicrophonePermissions: 0 539 | tizenDeploymentTarget: 540 | tizenDeploymentTargetType: -1 541 | tizenMinOSVersion: 1 542 | n3dsUseExtSaveData: 0 543 | n3dsCompressStaticMem: 1 544 | n3dsExtSaveDataNumber: 0x12345 545 | n3dsStackSize: 131072 546 | n3dsTargetPlatform: 2 547 | n3dsRegion: 7 548 | n3dsMediaSize: 0 549 | n3dsLogoStyle: 3 550 | n3dsTitle: GameName 551 | n3dsProductCode: 552 | n3dsApplicationId: 0xFF3FF 553 | stvDeviceAddress: 554 | stvProductDescription: 555 | stvProductAuthor: 556 | stvProductAuthorEmail: 557 | stvProductLink: 558 | stvProductCategory: 0 559 | XboxOneProductId: 560 | XboxOneUpdateKey: 561 | XboxOneSandboxId: 562 | XboxOneContentId: 563 | XboxOneTitleId: 564 | XboxOneSCId: 565 | XboxOneGameOsOverridePath: 566 | XboxOnePackagingOverridePath: 567 | XboxOneAppManifestOverridePath: 568 | XboxOnePackageEncryption: 0 569 | XboxOnePackageUpdateGranularity: 2 570 | XboxOneDescription: 571 | XboxOneLanguage: 572 | - enus 573 | XboxOneCapability: [] 574 | XboxOneGameRating: {} 575 | XboxOneIsContentPackage: 0 576 | XboxOneEnableGPUVariability: 0 577 | XboxOneSockets: {} 578 | XboxOneSplashScreen: {fileID: 0} 579 | XboxOneAllowedProductIds: [] 580 | XboxOnePersistentLocalStorageSize: 0 581 | xboxOneScriptCompiler: 0 582 | vrEditorSettings: 583 | daydream: 584 | daydreamIconForeground: {fileID: 0} 585 | daydreamIconBackground: {fileID: 0} 586 | cloudServicesEnabled: {} 587 | facebookSdkVersion: 7.9.4 588 | apiCompatibilityLevel: 2 589 | cloudProjectId: 590 | projectName: 591 | organizationId: 592 | cloudEnabled: 0 593 | enableNativePlatformBackendsForNewInputSystem: 0 594 | disableOldInputManagerSupport: 0 595 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.1.0f3 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 2 136 | antiAliasing: 2 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSM: 5 183 | PSP2: 2 184 | Samsung TV: 2 185 | Standalone: 5 186 | Tizen: 2 187 | Web: 5 188 | WebGL: 3 189 | WiiU: 5 190 | Windows Store Apps: 5 191 | XboxOne: 5 192 | iPhone: 2 193 | tvOS: 2 194 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 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 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_Enabled: 0 14 | m_CaptureEditorExceptions: 1 15 | UnityPurchasingSettings: 16 | m_Enabled: 0 17 | m_TestMode: 0 18 | UnityAnalyticsSettings: 19 | m_Enabled: 0 20 | m_InitializeOnStartup: 1 21 | m_TestMode: 0 22 | m_TestEventUrl: 23 | m_TestConfigUrl: 24 | UnityAdsSettings: 25 | m_Enabled: 0 26 | m_InitializeOnStartup: 1 27 | m_TestMode: 0 28 | m_EnabledPlatforms: 4294967295 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Realistic-Real-Time-Grass-Rendering-With-Unity 2 | ![GitHub](https://img.shields.io/github/license/chenjd/Realistic-Real-Time-Grass-Rendering-With-Unity) 3 | ![](https://img.shields.io/badge/platform-win--64-brightgreen) 4 | ![](https://img.shields.io/badge/unity-5.6%2B-brightgreen) 5 | ### Description 6 | Realistic Real Time Grass Rendering With Unity. 7 | ![](http://images2017.cnblogs.com/blog/686199/201709/686199-20170924102024259-1948824515.jpg) 8 | Using the Geometry Shader to generate millions of grass on GPU. 9 | ![](http://images2017.cnblogs.com/blog/686199/201709/686199-20170924102841103-1853404544.png) 10 | 11 | ref:Edward Lee 12 | 13 | ### Article(Chinese) 14 | [利用GPU实现无尽草地的实时渲染](http://www.cnblogs.com/murongxiaopifu/p/7572703.html) 15 | 16 | ### Article(English) 17 | [Using the Geometry Shader In Unity To Generate Countless Of Grass On GPU](https://medium.com/chenjd-xyz/using-the-geometry-shader-in-unity-to-generate-countless-of-grass-on-gpu-4ca6d78b3de6) 18 | 19 | ### Requirement 20 | Unity 5.6+ 21 | 22 | ## Update 23 | Unity 2017.3 supports 32-bit index buffer. 24 | 25 | ### Ref 26 | 【1】[《Chapter 7. Rendering Countless Blades of Waving Grass》](https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch07.html) 27 | 28 | 【2】[《Rendering Grass Terrains in 29 | Real-Time with Dynamic Lighting》](http://kevinboulanger.net/publications/grassSiggraph2006ppt.pdf) 30 | 31 | 【3】[《REALISTIC REAL-TIME GRASS RENDERING》](http://illogictree.com/blog/projects/) 32 | 33 | 【4】[《Programming Guide for Direct3D 11》](https://msdn.microsoft.com/en-us/library/windows/desktop/mt787170(v=vs.85).aspx) 34 | --------------------------------------------------------------------------------