├── .gitattributes ├── .gitignore ├── LICENSE ├── Materials ├── Skybox_Mat.mat ├── Skybox_Mat.mat.meta ├── mat_renderFeature_Crosshatch.mat ├── mat_renderFeature_Crosshatch.mat.meta ├── mat_renderFeature_Test.mat └── mat_renderFeature_Test.mat.meta ├── README.md ├── Settings ├── Renderer_CustomRenderFeaturesDemo.asset ├── Renderer_CustomRenderFeaturesDemo.asset.meta ├── Renderer_Default.asset ├── Renderer_Default.asset.meta ├── URPSetup.asset ├── URPSetup.asset.meta ├── URPSetup_PostProcess_Global_CrossHatchinig.asset └── URPSetup_PostProcess_Global_CrossHatchinig.asset.meta └── Shaders ├── Crosshatch 1.mat ├── Crosshatch 1.mat.meta ├── Crosshatch.mat ├── Crosshatch.mat.meta ├── Crosshatch.shader ├── Crosshatch.shader.meta ├── Crosshatch.shadergraph ├── Crosshatch.shadergraph.meta ├── Functions.meta ├── Functions ├── LightInfo.asset ├── LightInfo.asset.meta ├── MakeFloat2.asset ├── MakeFloat2.asset.meta ├── MakeFloat3.asset └── MakeFloat3.asset.meta ├── Regular.mat └── Regular.mat.meta /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | Assets/AssetStoreTools* 7 | 8 | # Visual Studio 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 | *.opendb 26 | *.VC.db 27 | 28 | # Unity3D generated meta files 29 | *.pidb.meta 30 | *.pdb.meta 31 | 32 | # Unity3D Generated File On Crash Reports 33 | sysinfo.txt 34 | 35 | # Builds 36 | *.apk 37 | *.unitypackage 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Siva Vadlamani 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 | -------------------------------------------------------------------------------- /Materials/Skybox_Mat.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: Skybox_Mat 10 | m_Shader: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _METALLIC_SETUP _SUNDISK_HIGH_QUALITY 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: 0} 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 | - _SpecGlossMap: 58 | m_Texture: {fileID: 0} 59 | m_Scale: {x: 1, y: 1} 60 | m_Offset: {x: 0, y: 0} 61 | m_Floats: 62 | - _AtmosphereThickness: 0.53 63 | - _BumpScale: 1 64 | - _Cutoff: 0.5 65 | - _DetailNormalMapScale: 1 66 | - _DstBlend: 0 67 | - _Exposure: 1.25 68 | - _GlossMapScale: 1 69 | - _Glossiness: 0.5 70 | - _GlossyReflections: 1 71 | - _Metallic: 0 72 | - _Mode: 0 73 | - _OcclusionStrength: 1 74 | - _Parallax: 0.02 75 | - _SmoothnessTextureChannel: 0 76 | - _SpecularHighlights: 1 77 | - _SrcBlend: 1 78 | - _SunDisk: 2 79 | - _SunSize: 0.04 80 | - _SunSizeConvergence: 5 81 | - _UVSec: 0 82 | - _WorkflowMode: 1 83 | - _ZWrite: 1 84 | m_Colors: 85 | - _Color: {r: 1, g: 1, b: 1, a: 1} 86 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 87 | - _GroundColor: {r: 0.6392157, g: 0.6901961, b: 0.7411765, a: 1} 88 | - _SkyTint: {r: 1, g: 1, b: 1, a: 1} 89 | - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} 90 | -------------------------------------------------------------------------------- /Materials/Skybox_Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ffaa0b7117ba8c47a9d05ae701d4b4d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Materials/mat_renderFeature_Crosshatch.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: mat_renderFeature_Crosshatch 11 | m_Shader: {fileID: -6465566751694194690, guid: e0aecc1365835be49b3a0ff4a3a7ee6c, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - Texture2D_20468C03: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - unity_Lightmaps: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - unity_LightmapsInd: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - unity_ShadowMasks: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | m_Floats: 39 | - Vector1_94B498D5: 20 40 | - Vector1_E6F85CA: 0 41 | - Vector1_EEC4D2CB: 5 42 | m_Colors: 43 | - Vector3_430DCED8: {r: 0, g: 0, b: 0, a: 0} 44 | m_BuildTextureStacks: [] 45 | --- !u!114 &4385092696684158616 46 | MonoBehaviour: 47 | m_ObjectHideFlags: 11 48 | m_CorrespondingSourceObject: {fileID: 0} 49 | m_PrefabInstance: {fileID: 0} 50 | m_PrefabAsset: {fileID: 0} 51 | m_GameObject: {fileID: 0} 52 | m_Enabled: 1 53 | m_EditorHideFlags: 0 54 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 55 | m_Name: 56 | m_EditorClassIdentifier: 57 | version: 1 58 | -------------------------------------------------------------------------------- /Materials/mat_renderFeature_Crosshatch.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 051bf07aba0abc74f8d788512337ca94 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Materials/mat_renderFeature_Test.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: mat_renderFeature_Test 11 | m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: 2000 17 | stringTagMap: 18 | RenderType: Opaque 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BaseMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _BumpMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _EmissionMap: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _MainTex: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _MetallicGlossMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _OcclusionMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _SpecGlossMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | m_Floats: 52 | - _AlphaClip: 0 53 | - _Blend: 0 54 | - _BumpScale: 1 55 | - _Cull: 2 56 | - _Cutoff: 0.5 57 | - _DstBlend: 0 58 | - _EnvironmentReflections: 1 59 | - _GlossMapScale: 0 60 | - _Glossiness: 0 61 | - _GlossyReflections: 0 62 | - _Metallic: 0 63 | - _OcclusionStrength: 1 64 | - _QueueOffset: 0 65 | - _ReceiveShadows: 1 66 | - _SampleGI: 0 67 | - _Smoothness: 0.5 68 | - _SmoothnessTextureChannel: 0 69 | - _SpecularHighlights: 1 70 | - _SrcBlend: 1 71 | - _Surface: 0 72 | - _WorkflowMode: 1 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _BaseColor: {r: 0.26363146, g: 0.6792453, b: 0.03524386, a: 1} 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 79 | m_BuildTextureStacks: [] 80 | --- !u!114 &4385092696684158616 81 | MonoBehaviour: 82 | m_ObjectHideFlags: 11 83 | m_CorrespondingSourceObject: {fileID: 0} 84 | m_PrefabInstance: {fileID: 0} 85 | m_PrefabAsset: {fileID: 0} 86 | m_GameObject: {fileID: 0} 87 | m_Enabled: 1 88 | m_EditorHideFlags: 0 89 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 90 | m_Name: 91 | m_EditorClassIdentifier: 92 | version: 4 93 | -------------------------------------------------------------------------------- /Materials/mat_renderFeature_Test.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af76762e8ccfdc0439494ed0c1257c94 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PostProcess_CrossHatch_UnityURP 2 | 3 | -------------------------------------------------------------------------------- /Settings/Renderer_CustomRenderFeaturesDemo.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-5099579238213781739 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 6b3d386ba5cd94485973aee1479b272e, type: 3} 13 | m_Name: CrossHatch 14 | m_EditorClassIdentifier: 15 | m_Active: 1 16 | settings: 17 | passTag: CrossHatch 18 | Event: 500 19 | filterSettings: 20 | RenderQueueType: 0 21 | LayerMask: 22 | serializedVersion: 2 23 | m_Bits: 4294967295 24 | PassNames: [] 25 | overrideMaterial: {fileID: 2100000, guid: 2c91dcfeb6defe24fb6f4825065f2e8c, type: 2} 26 | overrideMaterialPassIndex: 0 27 | overrideDepthState: 0 28 | depthCompareFunction: 4 29 | enableWrite: 1 30 | stencilSettings: 31 | overrideStencilState: 0 32 | stencilReference: 0 33 | stencilCompareFunction: 8 34 | passOperation: 0 35 | failOperation: 0 36 | zFailOperation: 0 37 | cameraSettings: 38 | overrideCamera: 0 39 | restoreCamera: 1 40 | offset: {x: 0, y: 0, z: 0, w: 0} 41 | cameraFieldOfView: 60 42 | --- !u!114 &11400000 43 | MonoBehaviour: 44 | m_ObjectHideFlags: 0 45 | m_CorrespondingSourceObject: {fileID: 0} 46 | m_PrefabInstance: {fileID: 0} 47 | m_PrefabAsset: {fileID: 0} 48 | m_GameObject: {fileID: 0} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} 52 | m_Name: Renderer_CustomRenderFeaturesDemo 53 | m_EditorClassIdentifier: 54 | m_RendererFeatures: 55 | - {fileID: -5099579238213781739} 56 | m_RendererFeatureMap: 15774f9ab3a73ab9 57 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} 58 | xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} 59 | shaders: 60 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} 61 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} 62 | screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd, type: 3} 63 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} 64 | tileDepthInfoPS: {fileID: 0} 65 | tileDeferredPS: {fileID: 0} 66 | stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} 67 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} 68 | materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} 69 | m_OpaqueLayerMask: 70 | serializedVersion: 2 71 | m_Bits: 4294967295 72 | m_TransparentLayerMask: 73 | serializedVersion: 2 74 | m_Bits: 4294967295 75 | m_DefaultStencilState: 76 | overrideStencilState: 0 77 | stencilReference: 0 78 | stencilCompareFunction: 8 79 | passOperation: 0 80 | failOperation: 0 81 | zFailOperation: 0 82 | m_ShadowTransparentReceive: 1 83 | m_RenderingMode: 0 84 | m_AccurateGbufferNormals: 0 85 | -------------------------------------------------------------------------------- /Settings/Renderer_CustomRenderFeaturesDemo.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76fa8b18d79ffe042abe2ca6f2090e69 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Settings/Renderer_Default.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} 13 | m_Name: Renderer_Default 14 | m_EditorClassIdentifier: 15 | m_RendererFeatures: [] 16 | m_RendererFeatureMap: 17 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} 18 | shaders: 19 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} 20 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} 21 | screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd, 22 | type: 3} 23 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} 24 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} 25 | m_OpaqueLayerMask: 26 | serializedVersion: 2 27 | m_Bits: 4294967295 28 | m_TransparentLayerMask: 29 | serializedVersion: 2 30 | m_Bits: 4294967295 31 | m_DefaultStencilState: 32 | overrideStencilState: 0 33 | stencilReference: 0 34 | stencilCompareFunction: 8 35 | passOperation: 0 36 | failOperation: 0 37 | zFailOperation: 0 38 | m_ShadowTransparentReceive: 1 39 | -------------------------------------------------------------------------------- /Settings/Renderer_Default.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4db2c6e9ae8ca6240b392e036f0683b4 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Settings/URPSetup.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} 13 | m_Name: URPSetup 14 | m_EditorClassIdentifier: 15 | k_AssetVersion: 6 16 | k_AssetPreviousVersion: 5 17 | m_RendererType: 1 18 | m_RendererData: {fileID: 0} 19 | m_RendererDataList: 20 | - {fileID: 11400000, guid: 4db2c6e9ae8ca6240b392e036f0683b4, type: 2} 21 | - {fileID: 11400000, guid: 76fa8b18d79ffe042abe2ca6f2090e69, type: 2} 22 | m_DefaultRendererIndex: 1 23 | m_RequireDepthTexture: 0 24 | m_RequireOpaqueTexture: 0 25 | m_OpaqueDownsampling: 1 26 | m_SupportsTerrainHoles: 1 27 | m_SupportsHDR: 0 28 | m_MSAA: 4 29 | m_RenderScale: 1 30 | m_MainLightRenderingMode: 1 31 | m_MainLightShadowsSupported: 1 32 | m_MainLightShadowmapResolution: 1024 33 | m_AdditionalLightsRenderingMode: 1 34 | m_AdditionalLightsPerObjectLimit: 4 35 | m_AdditionalLightShadowsSupported: 1 36 | m_AdditionalLightsShadowmapResolution: 512 37 | m_ShadowDistance: 50 38 | m_ShadowCascadeCount: 2 39 | m_Cascade2Split: 0.25 40 | m_Cascade3Split: {x: 0.1, y: 0.3} 41 | m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} 42 | m_ShadowDepthBias: 2 43 | m_ShadowNormalBias: 0.8 44 | m_SoftShadowsSupported: 1 45 | m_UseSRPBatcher: 1 46 | m_SupportsDynamicBatching: 0 47 | m_MixedLightingSupported: 1 48 | m_DebugLevel: 0 49 | m_UseAdaptivePerformance: 1 50 | m_ColorGradingMode: 0 51 | m_ColorGradingLutSize: 32 52 | m_ShadowType: 1 53 | m_LocalShadowsSupported: 0 54 | m_LocalShadowsAtlasResolution: 256 55 | m_MaxPixelLights: 0 56 | m_ShadowAtlasResolution: 256 57 | m_ShaderVariantLogLevel: 0 58 | m_ShadowCascades: 1 59 | -------------------------------------------------------------------------------- /Settings/URPSetup.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3bd197f570902640beca6655d1cd7f0 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Settings/URPSetup_PostProcess_Global_CrossHatchinig.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &-8502908248729475150 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 3 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 40b924e2dad56384a8df2a1e111bb675, type: 3} 13 | m_Name: Vignette 14 | m_EditorClassIdentifier: 15 | active: 0 16 | enabled: 17 | overrideState: 1 18 | value: 1 19 | mode: 20 | overrideState: 1 21 | value: 0 22 | color: 23 | overrideState: 1 24 | value: {r: 0, g: 0, b: 0, a: 1} 25 | center: 26 | overrideState: 0 27 | value: {x: 0.5, y: 0.5} 28 | intensity: 29 | overrideState: 1 30 | value: 0.556 31 | smoothness: 32 | overrideState: 1 33 | value: 0.195 34 | roundness: 35 | overrideState: 0 36 | value: 1 37 | rounded: 38 | overrideState: 1 39 | value: 0 40 | mask: 41 | overrideState: 0 42 | value: {fileID: 0} 43 | defaultState: 1 44 | opacity: 45 | overrideState: 0 46 | value: 1 47 | --- !u!114 &-6715043434388598246 48 | MonoBehaviour: 49 | m_ObjectHideFlags: 3 50 | m_CorrespondingSourceObject: {fileID: 0} 51 | m_PrefabInstance: {fileID: 0} 52 | m_PrefabAsset: {fileID: 0} 53 | m_GameObject: {fileID: 0} 54 | m_Enabled: 1 55 | m_EditorHideFlags: 0 56 | m_Script: {fileID: 11500000, guid: 556797029e73b2347956b6579e77e05b, type: 3} 57 | m_Name: DepthOfField 58 | m_EditorClassIdentifier: 59 | active: 0 60 | enabled: 61 | overrideState: 1 62 | value: 1 63 | focusDistance: 64 | overrideState: 1 65 | value: 1.36 66 | aperture: 67 | overrideState: 1 68 | value: 11.8 69 | focalLength: 70 | overrideState: 0 71 | value: 50 72 | kernelSize: 73 | overrideState: 0 74 | value: 1 75 | --- !u!114 &-4127720243925048697 76 | MonoBehaviour: 77 | m_ObjectHideFlags: 3 78 | m_CorrespondingSourceObject: {fileID: 0} 79 | m_PrefabInstance: {fileID: 0} 80 | m_PrefabAsset: {fileID: 0} 81 | m_GameObject: {fileID: 0} 82 | m_Enabled: 1 83 | m_EditorHideFlags: 0 84 | m_Script: {fileID: 11500000, guid: 48a79b01ea5641d4aa6daa2e23605641, type: 3} 85 | m_Name: Bloom 86 | m_EditorClassIdentifier: 87 | active: 1 88 | enabled: 89 | overrideState: 1 90 | value: 1 91 | intensity: 92 | overrideState: 1 93 | value: 2 94 | threshold: 95 | overrideState: 1 96 | value: 0.9 97 | softKnee: 98 | overrideState: 1 99 | value: 0.473 100 | clamp: 101 | overrideState: 0 102 | value: 65472 103 | diffusion: 104 | overrideState: 0 105 | value: 7 106 | anamorphicRatio: 107 | overrideState: 0 108 | value: 0 109 | color: 110 | overrideState: 1 111 | value: {r: 1, g: 1, b: 1, a: 1} 112 | fastMode: 113 | overrideState: 0 114 | value: 0 115 | dirtTexture: 116 | overrideState: 0 117 | value: {fileID: 0} 118 | defaultState: 1 119 | dirtIntensity: 120 | overrideState: 0 121 | value: 0.5 122 | --- !u!114 &-1697041620175576351 123 | MonoBehaviour: 124 | m_ObjectHideFlags: 3 125 | m_CorrespondingSourceObject: {fileID: 0} 126 | m_PrefabInstance: {fileID: 0} 127 | m_PrefabAsset: {fileID: 0} 128 | m_GameObject: {fileID: 0} 129 | m_Enabled: 1 130 | m_EditorHideFlags: 0 131 | m_Script: {fileID: 11500000, guid: 9a6a5447b0d02504ebd65e862204db83, type: 3} 132 | m_Name: NightVision 133 | m_EditorClassIdentifier: 134 | active: 0 135 | enabled: 136 | overrideState: 1 137 | value: 1 138 | noiseFactor: 139 | overrideState: 1 140 | value: 0.029 141 | luminence: 142 | overrideState: 1 143 | value: {r: 0.41509432, g: 0.41509432, b: 0.41509432, a: 1} 144 | maskShape: 145 | overrideState: 1 146 | value: 0.659 147 | maskIntensity: 148 | overrideState: 1 149 | value: 0.433 150 | --- !u!114 &-1626315210430126140 151 | MonoBehaviour: 152 | m_ObjectHideFlags: 3 153 | m_CorrespondingSourceObject: {fileID: 0} 154 | m_PrefabInstance: {fileID: 0} 155 | m_PrefabAsset: {fileID: 0} 156 | m_GameObject: {fileID: 0} 157 | m_Enabled: 1 158 | m_EditorHideFlags: 0 159 | m_Script: {fileID: 11500000, guid: adb84e30e02715445aeb9959894e3b4d, type: 3} 160 | m_Name: ColorGrading 161 | m_EditorClassIdentifier: 162 | active: 1 163 | enabled: 164 | overrideState: 1 165 | value: 1 166 | gradingMode: 167 | overrideState: 1 168 | value: 0 169 | externalLut: 170 | overrideState: 0 171 | value: {fileID: 0} 172 | defaultState: 1 173 | tonemapper: 174 | overrideState: 1 175 | value: 0 176 | toneCurveToeStrength: 177 | overrideState: 0 178 | value: 0 179 | toneCurveToeLength: 180 | overrideState: 0 181 | value: 0.5 182 | toneCurveShoulderStrength: 183 | overrideState: 0 184 | value: 0 185 | toneCurveShoulderLength: 186 | overrideState: 0 187 | value: 0.5 188 | toneCurveShoulderAngle: 189 | overrideState: 0 190 | value: 0 191 | toneCurveGamma: 192 | overrideState: 0 193 | value: 1 194 | ldrLut: 195 | overrideState: 0 196 | value: {fileID: 0} 197 | defaultState: 4 198 | ldrLutContribution: 199 | overrideState: 0 200 | value: 1 201 | temperature: 202 | overrideState: 1 203 | value: 5 204 | tint: 205 | overrideState: 0 206 | value: 0 207 | colorFilter: 208 | overrideState: 0 209 | value: {r: 1, g: 1, b: 1, a: 1} 210 | hueShift: 211 | overrideState: 0 212 | value: 0 213 | saturation: 214 | overrideState: 1 215 | value: 25 216 | brightness: 217 | overrideState: 1 218 | value: -11 219 | postExposure: 220 | overrideState: 0 221 | value: 0 222 | contrast: 223 | overrideState: 1 224 | value: 15 225 | mixerRedOutRedIn: 226 | overrideState: 0 227 | value: 100 228 | mixerRedOutGreenIn: 229 | overrideState: 0 230 | value: 0 231 | mixerRedOutBlueIn: 232 | overrideState: 0 233 | value: 0 234 | mixerGreenOutRedIn: 235 | overrideState: 0 236 | value: 0 237 | mixerGreenOutGreenIn: 238 | overrideState: 0 239 | value: 100 240 | mixerGreenOutBlueIn: 241 | overrideState: 0 242 | value: 0 243 | mixerBlueOutRedIn: 244 | overrideState: 0 245 | value: 0 246 | mixerBlueOutGreenIn: 247 | overrideState: 0 248 | value: 0 249 | mixerBlueOutBlueIn: 250 | overrideState: 0 251 | value: 100 252 | lift: 253 | overrideState: 0 254 | value: {x: 1, y: 1, z: 1, w: 0} 255 | gamma: 256 | overrideState: 0 257 | value: {x: 1, y: 1, z: 1, w: 0.12474011} 258 | gain: 259 | overrideState: 0 260 | value: {x: 1, y: 1, z: 1, w: 0} 261 | masterCurve: 262 | overrideState: 0 263 | value: 264 | curve: 265 | serializedVersion: 2 266 | m_Curve: 267 | - serializedVersion: 3 268 | time: 0 269 | value: 0 270 | inSlope: 1 271 | outSlope: 1 272 | tangentMode: 0 273 | weightedMode: 0 274 | inWeight: 0 275 | outWeight: 0 276 | - serializedVersion: 3 277 | time: 1 278 | value: 1 279 | inSlope: 1 280 | outSlope: 1 281 | tangentMode: 0 282 | weightedMode: 0 283 | inWeight: 0 284 | outWeight: 0 285 | m_PreInfinity: 2 286 | m_PostInfinity: 2 287 | m_RotationOrder: 4 288 | m_Loop: 0 289 | m_ZeroValue: 0 290 | m_Range: 1 291 | cachedData: 292 | - 0 293 | - 0.0078125 294 | - 0.015625 295 | - 0.0234375 296 | - 0.03125 297 | - 0.0390625 298 | - 0.046875 299 | - 0.0546875 300 | - 0.0625 301 | - 0.0703125 302 | - 0.078125 303 | - 0.0859375 304 | - 0.09375 305 | - 0.1015625 306 | - 0.109375 307 | - 0.1171875 308 | - 0.125 309 | - 0.1328125 310 | - 0.140625 311 | - 0.1484375 312 | - 0.15625 313 | - 0.1640625 314 | - 0.171875 315 | - 0.1796875 316 | - 0.1875 317 | - 0.1953125 318 | - 0.203125 319 | - 0.2109375 320 | - 0.21875 321 | - 0.2265625 322 | - 0.234375 323 | - 0.2421875 324 | - 0.25 325 | - 0.2578125 326 | - 0.265625 327 | - 0.2734375 328 | - 0.28125 329 | - 0.2890625 330 | - 0.296875 331 | - 0.3046875 332 | - 0.3125 333 | - 0.3203125 334 | - 0.328125 335 | - 0.3359375 336 | - 0.34375 337 | - 0.3515625 338 | - 0.359375 339 | - 0.3671875 340 | - 0.375 341 | - 0.3828125 342 | - 0.390625 343 | - 0.3984375 344 | - 0.40625 345 | - 0.4140625 346 | - 0.421875 347 | - 0.4296875 348 | - 0.4375 349 | - 0.4453125 350 | - 0.453125 351 | - 0.4609375 352 | - 0.46875 353 | - 0.4765625 354 | - 0.484375 355 | - 0.4921875 356 | - 0.5 357 | - 0.5078125 358 | - 0.515625 359 | - 0.5234375 360 | - 0.53125 361 | - 0.5390625 362 | - 0.546875 363 | - 0.5546875 364 | - 0.5625 365 | - 0.5703125 366 | - 0.578125 367 | - 0.5859375 368 | - 0.59375 369 | - 0.6015625 370 | - 0.609375 371 | - 0.6171875 372 | - 0.625 373 | - 0.6328125 374 | - 0.640625 375 | - 0.6484375 376 | - 0.65625 377 | - 0.6640625 378 | - 0.671875 379 | - 0.6796875 380 | - 0.6875 381 | - 0.6953125 382 | - 0.703125 383 | - 0.7109375 384 | - 0.71875 385 | - 0.7265625 386 | - 0.734375 387 | - 0.7421875 388 | - 0.75 389 | - 0.7578125 390 | - 0.765625 391 | - 0.7734375 392 | - 0.78125 393 | - 0.7890625 394 | - 0.796875 395 | - 0.8046875 396 | - 0.8125 397 | - 0.8203125 398 | - 0.828125 399 | - 0.8359375 400 | - 0.84375 401 | - 0.8515625 402 | - 0.859375 403 | - 0.8671875 404 | - 0.875 405 | - 0.8828125 406 | - 0.890625 407 | - 0.8984375 408 | - 0.90625 409 | - 0.9140625 410 | - 0.921875 411 | - 0.9296875 412 | - 0.9375 413 | - 0.9453125 414 | - 0.953125 415 | - 0.9609375 416 | - 0.96875 417 | - 0.9765625 418 | - 0.984375 419 | - 0.9921875 420 | redCurve: 421 | overrideState: 0 422 | value: 423 | curve: 424 | serializedVersion: 2 425 | m_Curve: 426 | - serializedVersion: 3 427 | time: 0 428 | value: 0 429 | inSlope: 1 430 | outSlope: 1 431 | tangentMode: 0 432 | weightedMode: 0 433 | inWeight: 0 434 | outWeight: 0 435 | - serializedVersion: 3 436 | time: 1 437 | value: 1 438 | inSlope: 1 439 | outSlope: 1 440 | tangentMode: 0 441 | weightedMode: 0 442 | inWeight: 0 443 | outWeight: 0 444 | m_PreInfinity: 2 445 | m_PostInfinity: 2 446 | m_RotationOrder: 4 447 | m_Loop: 0 448 | m_ZeroValue: 0 449 | m_Range: 1 450 | cachedData: 451 | - 0 452 | - 0.0078125 453 | - 0.015625 454 | - 0.0234375 455 | - 0.03125 456 | - 0.0390625 457 | - 0.046875 458 | - 0.0546875 459 | - 0.0625 460 | - 0.0703125 461 | - 0.078125 462 | - 0.0859375 463 | - 0.09375 464 | - 0.1015625 465 | - 0.109375 466 | - 0.1171875 467 | - 0.125 468 | - 0.1328125 469 | - 0.140625 470 | - 0.1484375 471 | - 0.15625 472 | - 0.1640625 473 | - 0.171875 474 | - 0.1796875 475 | - 0.1875 476 | - 0.1953125 477 | - 0.203125 478 | - 0.2109375 479 | - 0.21875 480 | - 0.2265625 481 | - 0.234375 482 | - 0.2421875 483 | - 0.25 484 | - 0.2578125 485 | - 0.265625 486 | - 0.2734375 487 | - 0.28125 488 | - 0.2890625 489 | - 0.296875 490 | - 0.3046875 491 | - 0.3125 492 | - 0.3203125 493 | - 0.328125 494 | - 0.3359375 495 | - 0.34375 496 | - 0.3515625 497 | - 0.359375 498 | - 0.3671875 499 | - 0.375 500 | - 0.3828125 501 | - 0.390625 502 | - 0.3984375 503 | - 0.40625 504 | - 0.4140625 505 | - 0.421875 506 | - 0.4296875 507 | - 0.4375 508 | - 0.4453125 509 | - 0.453125 510 | - 0.4609375 511 | - 0.46875 512 | - 0.4765625 513 | - 0.484375 514 | - 0.4921875 515 | - 0.5 516 | - 0.5078125 517 | - 0.515625 518 | - 0.5234375 519 | - 0.53125 520 | - 0.5390625 521 | - 0.546875 522 | - 0.5546875 523 | - 0.5625 524 | - 0.5703125 525 | - 0.578125 526 | - 0.5859375 527 | - 0.59375 528 | - 0.6015625 529 | - 0.609375 530 | - 0.6171875 531 | - 0.625 532 | - 0.6328125 533 | - 0.640625 534 | - 0.6484375 535 | - 0.65625 536 | - 0.6640625 537 | - 0.671875 538 | - 0.6796875 539 | - 0.6875 540 | - 0.6953125 541 | - 0.703125 542 | - 0.7109375 543 | - 0.71875 544 | - 0.7265625 545 | - 0.734375 546 | - 0.7421875 547 | - 0.75 548 | - 0.7578125 549 | - 0.765625 550 | - 0.7734375 551 | - 0.78125 552 | - 0.7890625 553 | - 0.796875 554 | - 0.8046875 555 | - 0.8125 556 | - 0.8203125 557 | - 0.828125 558 | - 0.8359375 559 | - 0.84375 560 | - 0.8515625 561 | - 0.859375 562 | - 0.8671875 563 | - 0.875 564 | - 0.8828125 565 | - 0.890625 566 | - 0.8984375 567 | - 0.90625 568 | - 0.9140625 569 | - 0.921875 570 | - 0.9296875 571 | - 0.9375 572 | - 0.9453125 573 | - 0.953125 574 | - 0.9609375 575 | - 0.96875 576 | - 0.9765625 577 | - 0.984375 578 | - 0.9921875 579 | greenCurve: 580 | overrideState: 0 581 | value: 582 | curve: 583 | serializedVersion: 2 584 | m_Curve: 585 | - serializedVersion: 3 586 | time: 0 587 | value: 0 588 | inSlope: 1 589 | outSlope: 1 590 | tangentMode: 0 591 | weightedMode: 0 592 | inWeight: 0 593 | outWeight: 0 594 | - serializedVersion: 3 595 | time: 1 596 | value: 1 597 | inSlope: 1 598 | outSlope: 1 599 | tangentMode: 0 600 | weightedMode: 0 601 | inWeight: 0 602 | outWeight: 0 603 | m_PreInfinity: 2 604 | m_PostInfinity: 2 605 | m_RotationOrder: 4 606 | m_Loop: 0 607 | m_ZeroValue: 0 608 | m_Range: 1 609 | cachedData: 610 | - 0 611 | - 0.0078125 612 | - 0.015625 613 | - 0.0234375 614 | - 0.03125 615 | - 0.0390625 616 | - 0.046875 617 | - 0.0546875 618 | - 0.0625 619 | - 0.0703125 620 | - 0.078125 621 | - 0.0859375 622 | - 0.09375 623 | - 0.1015625 624 | - 0.109375 625 | - 0.1171875 626 | - 0.125 627 | - 0.1328125 628 | - 0.140625 629 | - 0.1484375 630 | - 0.15625 631 | - 0.1640625 632 | - 0.171875 633 | - 0.1796875 634 | - 0.1875 635 | - 0.1953125 636 | - 0.203125 637 | - 0.2109375 638 | - 0.21875 639 | - 0.2265625 640 | - 0.234375 641 | - 0.2421875 642 | - 0.25 643 | - 0.2578125 644 | - 0.265625 645 | - 0.2734375 646 | - 0.28125 647 | - 0.2890625 648 | - 0.296875 649 | - 0.3046875 650 | - 0.3125 651 | - 0.3203125 652 | - 0.328125 653 | - 0.3359375 654 | - 0.34375 655 | - 0.3515625 656 | - 0.359375 657 | - 0.3671875 658 | - 0.375 659 | - 0.3828125 660 | - 0.390625 661 | - 0.3984375 662 | - 0.40625 663 | - 0.4140625 664 | - 0.421875 665 | - 0.4296875 666 | - 0.4375 667 | - 0.4453125 668 | - 0.453125 669 | - 0.4609375 670 | - 0.46875 671 | - 0.4765625 672 | - 0.484375 673 | - 0.4921875 674 | - 0.5 675 | - 0.5078125 676 | - 0.515625 677 | - 0.5234375 678 | - 0.53125 679 | - 0.5390625 680 | - 0.546875 681 | - 0.5546875 682 | - 0.5625 683 | - 0.5703125 684 | - 0.578125 685 | - 0.5859375 686 | - 0.59375 687 | - 0.6015625 688 | - 0.609375 689 | - 0.6171875 690 | - 0.625 691 | - 0.6328125 692 | - 0.640625 693 | - 0.6484375 694 | - 0.65625 695 | - 0.6640625 696 | - 0.671875 697 | - 0.6796875 698 | - 0.6875 699 | - 0.6953125 700 | - 0.703125 701 | - 0.7109375 702 | - 0.71875 703 | - 0.7265625 704 | - 0.734375 705 | - 0.7421875 706 | - 0.75 707 | - 0.7578125 708 | - 0.765625 709 | - 0.7734375 710 | - 0.78125 711 | - 0.7890625 712 | - 0.796875 713 | - 0.8046875 714 | - 0.8125 715 | - 0.8203125 716 | - 0.828125 717 | - 0.8359375 718 | - 0.84375 719 | - 0.8515625 720 | - 0.859375 721 | - 0.8671875 722 | - 0.875 723 | - 0.8828125 724 | - 0.890625 725 | - 0.8984375 726 | - 0.90625 727 | - 0.9140625 728 | - 0.921875 729 | - 0.9296875 730 | - 0.9375 731 | - 0.9453125 732 | - 0.953125 733 | - 0.9609375 734 | - 0.96875 735 | - 0.9765625 736 | - 0.984375 737 | - 0.9921875 738 | blueCurve: 739 | overrideState: 0 740 | value: 741 | curve: 742 | serializedVersion: 2 743 | m_Curve: 744 | - serializedVersion: 3 745 | time: 0 746 | value: 0 747 | inSlope: 1 748 | outSlope: 1 749 | tangentMode: 0 750 | weightedMode: 0 751 | inWeight: 0 752 | outWeight: 0 753 | - serializedVersion: 3 754 | time: 1 755 | value: 1 756 | inSlope: 1 757 | outSlope: 1 758 | tangentMode: 0 759 | weightedMode: 0 760 | inWeight: 0 761 | outWeight: 0 762 | m_PreInfinity: 2 763 | m_PostInfinity: 2 764 | m_RotationOrder: 4 765 | m_Loop: 0 766 | m_ZeroValue: 0 767 | m_Range: 1 768 | cachedData: 769 | - 0 770 | - 0.0078125 771 | - 0.015625 772 | - 0.0234375 773 | - 0.03125 774 | - 0.0390625 775 | - 0.046875 776 | - 0.0546875 777 | - 0.0625 778 | - 0.0703125 779 | - 0.078125 780 | - 0.0859375 781 | - 0.09375 782 | - 0.1015625 783 | - 0.109375 784 | - 0.1171875 785 | - 0.125 786 | - 0.1328125 787 | - 0.140625 788 | - 0.1484375 789 | - 0.15625 790 | - 0.1640625 791 | - 0.171875 792 | - 0.1796875 793 | - 0.1875 794 | - 0.1953125 795 | - 0.203125 796 | - 0.2109375 797 | - 0.21875 798 | - 0.2265625 799 | - 0.234375 800 | - 0.2421875 801 | - 0.25 802 | - 0.2578125 803 | - 0.265625 804 | - 0.2734375 805 | - 0.28125 806 | - 0.2890625 807 | - 0.296875 808 | - 0.3046875 809 | - 0.3125 810 | - 0.3203125 811 | - 0.328125 812 | - 0.3359375 813 | - 0.34375 814 | - 0.3515625 815 | - 0.359375 816 | - 0.3671875 817 | - 0.375 818 | - 0.3828125 819 | - 0.390625 820 | - 0.3984375 821 | - 0.40625 822 | - 0.4140625 823 | - 0.421875 824 | - 0.4296875 825 | - 0.4375 826 | - 0.4453125 827 | - 0.453125 828 | - 0.4609375 829 | - 0.46875 830 | - 0.4765625 831 | - 0.484375 832 | - 0.4921875 833 | - 0.5 834 | - 0.5078125 835 | - 0.515625 836 | - 0.5234375 837 | - 0.53125 838 | - 0.5390625 839 | - 0.546875 840 | - 0.5546875 841 | - 0.5625 842 | - 0.5703125 843 | - 0.578125 844 | - 0.5859375 845 | - 0.59375 846 | - 0.6015625 847 | - 0.609375 848 | - 0.6171875 849 | - 0.625 850 | - 0.6328125 851 | - 0.640625 852 | - 0.6484375 853 | - 0.65625 854 | - 0.6640625 855 | - 0.671875 856 | - 0.6796875 857 | - 0.6875 858 | - 0.6953125 859 | - 0.703125 860 | - 0.7109375 861 | - 0.71875 862 | - 0.7265625 863 | - 0.734375 864 | - 0.7421875 865 | - 0.75 866 | - 0.7578125 867 | - 0.765625 868 | - 0.7734375 869 | - 0.78125 870 | - 0.7890625 871 | - 0.796875 872 | - 0.8046875 873 | - 0.8125 874 | - 0.8203125 875 | - 0.828125 876 | - 0.8359375 877 | - 0.84375 878 | - 0.8515625 879 | - 0.859375 880 | - 0.8671875 881 | - 0.875 882 | - 0.8828125 883 | - 0.890625 884 | - 0.8984375 885 | - 0.90625 886 | - 0.9140625 887 | - 0.921875 888 | - 0.9296875 889 | - 0.9375 890 | - 0.9453125 891 | - 0.953125 892 | - 0.9609375 893 | - 0.96875 894 | - 0.9765625 895 | - 0.984375 896 | - 0.9921875 897 | hueVsHueCurve: 898 | overrideState: 0 899 | value: 900 | curve: 901 | serializedVersion: 2 902 | m_Curve: [] 903 | m_PreInfinity: 2 904 | m_PostInfinity: 2 905 | m_RotationOrder: 4 906 | m_Loop: 1 907 | m_ZeroValue: 0.5 908 | m_Range: 1 909 | cachedData: 910 | - 0.5 911 | - 0.5 912 | - 0.5 913 | - 0.5 914 | - 0.5 915 | - 0.5 916 | - 0.5 917 | - 0.5 918 | - 0.5 919 | - 0.5 920 | - 0.5 921 | - 0.5 922 | - 0.5 923 | - 0.5 924 | - 0.5 925 | - 0.5 926 | - 0.5 927 | - 0.5 928 | - 0.5 929 | - 0.5 930 | - 0.5 931 | - 0.5 932 | - 0.5 933 | - 0.5 934 | - 0.5 935 | - 0.5 936 | - 0.5 937 | - 0.5 938 | - 0.5 939 | - 0.5 940 | - 0.5 941 | - 0.5 942 | - 0.5 943 | - 0.5 944 | - 0.5 945 | - 0.5 946 | - 0.5 947 | - 0.5 948 | - 0.5 949 | - 0.5 950 | - 0.5 951 | - 0.5 952 | - 0.5 953 | - 0.5 954 | - 0.5 955 | - 0.5 956 | - 0.5 957 | - 0.5 958 | - 0.5 959 | - 0.5 960 | - 0.5 961 | - 0.5 962 | - 0.5 963 | - 0.5 964 | - 0.5 965 | - 0.5 966 | - 0.5 967 | - 0.5 968 | - 0.5 969 | - 0.5 970 | - 0.5 971 | - 0.5 972 | - 0.5 973 | - 0.5 974 | - 0.5 975 | - 0.5 976 | - 0.5 977 | - 0.5 978 | - 0.5 979 | - 0.5 980 | - 0.5 981 | - 0.5 982 | - 0.5 983 | - 0.5 984 | - 0.5 985 | - 0.5 986 | - 0.5 987 | - 0.5 988 | - 0.5 989 | - 0.5 990 | - 0.5 991 | - 0.5 992 | - 0.5 993 | - 0.5 994 | - 0.5 995 | - 0.5 996 | - 0.5 997 | - 0.5 998 | - 0.5 999 | - 0.5 1000 | - 0.5 1001 | - 0.5 1002 | - 0.5 1003 | - 0.5 1004 | - 0.5 1005 | - 0.5 1006 | - 0.5 1007 | - 0.5 1008 | - 0.5 1009 | - 0.5 1010 | - 0.5 1011 | - 0.5 1012 | - 0.5 1013 | - 0.5 1014 | - 0.5 1015 | - 0.5 1016 | - 0.5 1017 | - 0.5 1018 | - 0.5 1019 | - 0.5 1020 | - 0.5 1021 | - 0.5 1022 | - 0.5 1023 | - 0.5 1024 | - 0.5 1025 | - 0.5 1026 | - 0.5 1027 | - 0.5 1028 | - 0.5 1029 | - 0.5 1030 | - 0.5 1031 | - 0.5 1032 | - 0.5 1033 | - 0.5 1034 | - 0.5 1035 | - 0.5 1036 | - 0.5 1037 | - 0.5 1038 | hueVsSatCurve: 1039 | overrideState: 0 1040 | value: 1041 | curve: 1042 | serializedVersion: 2 1043 | m_Curve: [] 1044 | m_PreInfinity: 2 1045 | m_PostInfinity: 2 1046 | m_RotationOrder: 4 1047 | m_Loop: 1 1048 | m_ZeroValue: 0.5 1049 | m_Range: 1 1050 | cachedData: 1051 | - 0.5 1052 | - 0.5 1053 | - 0.5 1054 | - 0.5 1055 | - 0.5 1056 | - 0.5 1057 | - 0.5 1058 | - 0.5 1059 | - 0.5 1060 | - 0.5 1061 | - 0.5 1062 | - 0.5 1063 | - 0.5 1064 | - 0.5 1065 | - 0.5 1066 | - 0.5 1067 | - 0.5 1068 | - 0.5 1069 | - 0.5 1070 | - 0.5 1071 | - 0.5 1072 | - 0.5 1073 | - 0.5 1074 | - 0.5 1075 | - 0.5 1076 | - 0.5 1077 | - 0.5 1078 | - 0.5 1079 | - 0.5 1080 | - 0.5 1081 | - 0.5 1082 | - 0.5 1083 | - 0.5 1084 | - 0.5 1085 | - 0.5 1086 | - 0.5 1087 | - 0.5 1088 | - 0.5 1089 | - 0.5 1090 | - 0.5 1091 | - 0.5 1092 | - 0.5 1093 | - 0.5 1094 | - 0.5 1095 | - 0.5 1096 | - 0.5 1097 | - 0.5 1098 | - 0.5 1099 | - 0.5 1100 | - 0.5 1101 | - 0.5 1102 | - 0.5 1103 | - 0.5 1104 | - 0.5 1105 | - 0.5 1106 | - 0.5 1107 | - 0.5 1108 | - 0.5 1109 | - 0.5 1110 | - 0.5 1111 | - 0.5 1112 | - 0.5 1113 | - 0.5 1114 | - 0.5 1115 | - 0.5 1116 | - 0.5 1117 | - 0.5 1118 | - 0.5 1119 | - 0.5 1120 | - 0.5 1121 | - 0.5 1122 | - 0.5 1123 | - 0.5 1124 | - 0.5 1125 | - 0.5 1126 | - 0.5 1127 | - 0.5 1128 | - 0.5 1129 | - 0.5 1130 | - 0.5 1131 | - 0.5 1132 | - 0.5 1133 | - 0.5 1134 | - 0.5 1135 | - 0.5 1136 | - 0.5 1137 | - 0.5 1138 | - 0.5 1139 | - 0.5 1140 | - 0.5 1141 | - 0.5 1142 | - 0.5 1143 | - 0.5 1144 | - 0.5 1145 | - 0.5 1146 | - 0.5 1147 | - 0.5 1148 | - 0.5 1149 | - 0.5 1150 | - 0.5 1151 | - 0.5 1152 | - 0.5 1153 | - 0.5 1154 | - 0.5 1155 | - 0.5 1156 | - 0.5 1157 | - 0.5 1158 | - 0.5 1159 | - 0.5 1160 | - 0.5 1161 | - 0.5 1162 | - 0.5 1163 | - 0.5 1164 | - 0.5 1165 | - 0.5 1166 | - 0.5 1167 | - 0.5 1168 | - 0.5 1169 | - 0.5 1170 | - 0.5 1171 | - 0.5 1172 | - 0.5 1173 | - 0.5 1174 | - 0.5 1175 | - 0.5 1176 | - 0.5 1177 | - 0.5 1178 | - 0.5 1179 | satVsSatCurve: 1180 | overrideState: 0 1181 | value: 1182 | curve: 1183 | serializedVersion: 2 1184 | m_Curve: [] 1185 | m_PreInfinity: 2 1186 | m_PostInfinity: 2 1187 | m_RotationOrder: 4 1188 | m_Loop: 0 1189 | m_ZeroValue: 0.5 1190 | m_Range: 1 1191 | cachedData: 1192 | - 0.5 1193 | - 0.5 1194 | - 0.5 1195 | - 0.5 1196 | - 0.5 1197 | - 0.5 1198 | - 0.5 1199 | - 0.5 1200 | - 0.5 1201 | - 0.5 1202 | - 0.5 1203 | - 0.5 1204 | - 0.5 1205 | - 0.5 1206 | - 0.5 1207 | - 0.5 1208 | - 0.5 1209 | - 0.5 1210 | - 0.5 1211 | - 0.5 1212 | - 0.5 1213 | - 0.5 1214 | - 0.5 1215 | - 0.5 1216 | - 0.5 1217 | - 0.5 1218 | - 0.5 1219 | - 0.5 1220 | - 0.5 1221 | - 0.5 1222 | - 0.5 1223 | - 0.5 1224 | - 0.5 1225 | - 0.5 1226 | - 0.5 1227 | - 0.5 1228 | - 0.5 1229 | - 0.5 1230 | - 0.5 1231 | - 0.5 1232 | - 0.5 1233 | - 0.5 1234 | - 0.5 1235 | - 0.5 1236 | - 0.5 1237 | - 0.5 1238 | - 0.5 1239 | - 0.5 1240 | - 0.5 1241 | - 0.5 1242 | - 0.5 1243 | - 0.5 1244 | - 0.5 1245 | - 0.5 1246 | - 0.5 1247 | - 0.5 1248 | - 0.5 1249 | - 0.5 1250 | - 0.5 1251 | - 0.5 1252 | - 0.5 1253 | - 0.5 1254 | - 0.5 1255 | - 0.5 1256 | - 0.5 1257 | - 0.5 1258 | - 0.5 1259 | - 0.5 1260 | - 0.5 1261 | - 0.5 1262 | - 0.5 1263 | - 0.5 1264 | - 0.5 1265 | - 0.5 1266 | - 0.5 1267 | - 0.5 1268 | - 0.5 1269 | - 0.5 1270 | - 0.5 1271 | - 0.5 1272 | - 0.5 1273 | - 0.5 1274 | - 0.5 1275 | - 0.5 1276 | - 0.5 1277 | - 0.5 1278 | - 0.5 1279 | - 0.5 1280 | - 0.5 1281 | - 0.5 1282 | - 0.5 1283 | - 0.5 1284 | - 0.5 1285 | - 0.5 1286 | - 0.5 1287 | - 0.5 1288 | - 0.5 1289 | - 0.5 1290 | - 0.5 1291 | - 0.5 1292 | - 0.5 1293 | - 0.5 1294 | - 0.5 1295 | - 0.5 1296 | - 0.5 1297 | - 0.5 1298 | - 0.5 1299 | - 0.5 1300 | - 0.5 1301 | - 0.5 1302 | - 0.5 1303 | - 0.5 1304 | - 0.5 1305 | - 0.5 1306 | - 0.5 1307 | - 0.5 1308 | - 0.5 1309 | - 0.5 1310 | - 0.5 1311 | - 0.5 1312 | - 0.5 1313 | - 0.5 1314 | - 0.5 1315 | - 0.5 1316 | - 0.5 1317 | - 0.5 1318 | - 0.5 1319 | - 0.5 1320 | lumVsSatCurve: 1321 | overrideState: 0 1322 | value: 1323 | curve: 1324 | serializedVersion: 2 1325 | m_Curve: [] 1326 | m_PreInfinity: 2 1327 | m_PostInfinity: 2 1328 | m_RotationOrder: 4 1329 | m_Loop: 0 1330 | m_ZeroValue: 0.5 1331 | m_Range: 1 1332 | cachedData: 1333 | - 0.5 1334 | - 0.5 1335 | - 0.5 1336 | - 0.5 1337 | - 0.5 1338 | - 0.5 1339 | - 0.5 1340 | - 0.5 1341 | - 0.5 1342 | - 0.5 1343 | - 0.5 1344 | - 0.5 1345 | - 0.5 1346 | - 0.5 1347 | - 0.5 1348 | - 0.5 1349 | - 0.5 1350 | - 0.5 1351 | - 0.5 1352 | - 0.5 1353 | - 0.5 1354 | - 0.5 1355 | - 0.5 1356 | - 0.5 1357 | - 0.5 1358 | - 0.5 1359 | - 0.5 1360 | - 0.5 1361 | - 0.5 1362 | - 0.5 1363 | - 0.5 1364 | - 0.5 1365 | - 0.5 1366 | - 0.5 1367 | - 0.5 1368 | - 0.5 1369 | - 0.5 1370 | - 0.5 1371 | - 0.5 1372 | - 0.5 1373 | - 0.5 1374 | - 0.5 1375 | - 0.5 1376 | - 0.5 1377 | - 0.5 1378 | - 0.5 1379 | - 0.5 1380 | - 0.5 1381 | - 0.5 1382 | - 0.5 1383 | - 0.5 1384 | - 0.5 1385 | - 0.5 1386 | - 0.5 1387 | - 0.5 1388 | - 0.5 1389 | - 0.5 1390 | - 0.5 1391 | - 0.5 1392 | - 0.5 1393 | - 0.5 1394 | - 0.5 1395 | - 0.5 1396 | - 0.5 1397 | - 0.5 1398 | - 0.5 1399 | - 0.5 1400 | - 0.5 1401 | - 0.5 1402 | - 0.5 1403 | - 0.5 1404 | - 0.5 1405 | - 0.5 1406 | - 0.5 1407 | - 0.5 1408 | - 0.5 1409 | - 0.5 1410 | - 0.5 1411 | - 0.5 1412 | - 0.5 1413 | - 0.5 1414 | - 0.5 1415 | - 0.5 1416 | - 0.5 1417 | - 0.5 1418 | - 0.5 1419 | - 0.5 1420 | - 0.5 1421 | - 0.5 1422 | - 0.5 1423 | - 0.5 1424 | - 0.5 1425 | - 0.5 1426 | - 0.5 1427 | - 0.5 1428 | - 0.5 1429 | - 0.5 1430 | - 0.5 1431 | - 0.5 1432 | - 0.5 1433 | - 0.5 1434 | - 0.5 1435 | - 0.5 1436 | - 0.5 1437 | - 0.5 1438 | - 0.5 1439 | - 0.5 1440 | - 0.5 1441 | - 0.5 1442 | - 0.5 1443 | - 0.5 1444 | - 0.5 1445 | - 0.5 1446 | - 0.5 1447 | - 0.5 1448 | - 0.5 1449 | - 0.5 1450 | - 0.5 1451 | - 0.5 1452 | - 0.5 1453 | - 0.5 1454 | - 0.5 1455 | - 0.5 1456 | - 0.5 1457 | - 0.5 1458 | - 0.5 1459 | - 0.5 1460 | - 0.5 1461 | --- !u!114 &11400000 1462 | MonoBehaviour: 1463 | m_ObjectHideFlags: 0 1464 | m_CorrespondingSourceObject: {fileID: 0} 1465 | m_PrefabInstance: {fileID: 0} 1466 | m_PrefabAsset: {fileID: 0} 1467 | m_GameObject: {fileID: 0} 1468 | m_Enabled: 1 1469 | m_EditorHideFlags: 0 1470 | m_Script: {fileID: 11500000, guid: 8e6292b2c06870d4495f009f912b9600, type: 3} 1471 | m_Name: URPSetup_PostProcess_Global_CrossHatchinig 1472 | m_EditorClassIdentifier: 1473 | settings: 1474 | - {fileID: -4127720243925048697} 1475 | - {fileID: -8502908248729475150} 1476 | - {fileID: -1626315210430126140} 1477 | - {fileID: -6715043434388598246} 1478 | - {fileID: -1697041620175576351} 1479 | - {fileID: 6287407998311888302} 1480 | --- !u!114 &6287407998311888302 1481 | MonoBehaviour: 1482 | m_ObjectHideFlags: 3 1483 | m_CorrespondingSourceObject: {fileID: 0} 1484 | m_PrefabInstance: {fileID: 0} 1485 | m_PrefabAsset: {fileID: 0} 1486 | m_GameObject: {fileID: 0} 1487 | m_Enabled: 1 1488 | m_EditorHideFlags: 0 1489 | m_Script: {fileID: 11500000, guid: 883e668cf963a2244b8686435ede644b, type: 3} 1490 | m_Name: Paper 1491 | m_EditorClassIdentifier: 1492 | active: 1 1493 | enabled: 1494 | overrideState: 1 1495 | value: 1 1496 | OutlineColor: 1497 | overrideState: 1 1498 | value: {r: 0, g: 0, b: 0, a: 1} 1499 | OutlineDistance: 1500 | overrideState: 1 1501 | value: 0.0315 1502 | OutlineSize: 1503 | overrideState: 1 1504 | value: 0.0015 1505 | OutlineFill: 1506 | overrideState: 1 1507 | value: 5.25 1508 | IntersectionContrast: 1509 | overrideState: 1 1510 | value: 0.393 1511 | BackgroundLerp: 1512 | overrideState: 1 1513 | value: 0.184 1514 | OriginLerp: 1515 | overrideState: 1 1516 | value: 1.5 1517 | BackgroundColor: 1518 | overrideState: 1 1519 | value: {r: 0.7264151, g: 0.70715064, b: 0.69489145, a: 1} 1520 | TexPaperBackground: 1521 | overrideState: 1 1522 | value: {fileID: 2800000, guid: 8f38fd93ae7633f45831c1b56565309e, type: 3} 1523 | defaultState: 1 1524 | -------------------------------------------------------------------------------- /Settings/URPSetup_PostProcess_Global_CrossHatchinig.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53e9ab2e78bad92489fa58198f76fe60 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Shaders/Crosshatch 1.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Crosshatch 1 11 | m_Shader: {fileID: 4800000, guid: 6ea2b8232fc25c949a2f55b553016bde, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _HatchTexture: 23 | m_Texture: {fileID: 2800000, guid: eca21e9be8828674785d06f79963b341, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | m_Floats: 27 | - _AlphaCutoff: 0.5 28 | m_Colors: 29 | - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} 30 | - _Tiling: {r: 0.36, g: 0.97, b: 2.1, a: 0} 31 | m_BuildTextureStacks: [] 32 | -------------------------------------------------------------------------------- /Shaders/Crosshatch 1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c91dcfeb6defe24fb6f4825065f2e8c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Shaders/Crosshatch.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Crosshatch 11 | m_Shader: {fileID: 4800000, guid: 6ea2b8232fc25c949a2f55b553016bde, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _HatchTexture: 23 | m_Texture: {fileID: 2800000, guid: eca21e9be8828674785d06f79963b341, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | m_Floats: 27 | - _AlphaCutoff: 0.5 28 | m_Colors: 29 | - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} 30 | - _Tiling: {r: 1.21, g: 1.5, b: 2.3, a: 0} 31 | m_BuildTextureStacks: [] 32 | -------------------------------------------------------------------------------- /Shaders/Crosshatch.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9a7413f653465a469a8c9d4f7cff3c7 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Shaders/Crosshatch.shader: -------------------------------------------------------------------------------- 1 | // Made with Amplify Shader Editor 2 | // Available at the Unity Asset Store - http://u3d.as/y3X 3 | Shader "Crosshatch" 4 | { 5 | Properties 6 | { 7 | [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 8 | [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) 9 | [ASEBegin]_HatchTexture("HatchTexture", 2D) = "white" {} 10 | [ASEEnd]_Tiling("Tiling", Vector) = (0,0,0,0) 11 | 12 | //_TransmissionShadow( "Transmission Shadow", Range( 0, 1 ) ) = 0.5 13 | //_TransStrength( "Trans Strength", Range( 0, 50 ) ) = 1 14 | //_TransNormal( "Trans Normal Distortion", Range( 0, 1 ) ) = 0.5 15 | //_TransScattering( "Trans Scattering", Range( 1, 50 ) ) = 2 16 | //_TransDirect( "Trans Direct", Range( 0, 1 ) ) = 0.9 17 | //_TransAmbient( "Trans Ambient", Range( 0, 1 ) ) = 0.1 18 | //_TransShadow( "Trans Shadow", Range( 0, 1 ) ) = 0.5 19 | //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 20 | //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 21 | //_TessMin( "Tess Min Distance", Float ) = 10 22 | //_TessMax( "Tess Max Distance", Float ) = 25 23 | //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 24 | //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 25 | } 26 | 27 | SubShader 28 | { 29 | LOD 0 30 | 31 | 32 | 33 | Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Opaque" "Queue"="Geometry" } 34 | Cull Back 35 | AlphaToMask Off 36 | HLSLINCLUDE 37 | #pragma target 2.0 38 | 39 | #ifndef ASE_TESS_FUNCS 40 | #define ASE_TESS_FUNCS 41 | float4 FixedTess( float tessValue ) 42 | { 43 | return tessValue; 44 | } 45 | 46 | float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) 47 | { 48 | float3 wpos = mul(o2w,vertex).xyz; 49 | float dist = distance (wpos, cameraPos); 50 | float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; 51 | return f; 52 | } 53 | 54 | float4 CalcTriEdgeTessFactors (float3 triVertexFactors) 55 | { 56 | float4 tess; 57 | tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); 58 | tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); 59 | tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); 60 | tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; 61 | return tess; 62 | } 63 | 64 | float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) 65 | { 66 | float dist = distance (0.5 * (wpos0+wpos1), cameraPos); 67 | float len = distance(wpos0, wpos1); 68 | float f = max(len * scParams.y / (edgeLen * dist), 1.0); 69 | return f; 70 | } 71 | 72 | float DistanceFromPlane (float3 pos, float4 plane) 73 | { 74 | float d = dot (float4(pos,1.0f), plane); 75 | return d; 76 | } 77 | 78 | bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) 79 | { 80 | float4 planeTest; 81 | planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + 82 | (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + 83 | (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); 84 | planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + 85 | (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + 86 | (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); 87 | planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + 88 | (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + 89 | (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); 90 | planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + 91 | (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + 92 | (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); 93 | return !all (planeTest); 94 | } 95 | 96 | float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) 97 | { 98 | float3 f; 99 | f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); 100 | f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); 101 | f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); 102 | 103 | return CalcTriEdgeTessFactors (f); 104 | } 105 | 106 | float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) 107 | { 108 | float3 pos0 = mul(o2w,v0).xyz; 109 | float3 pos1 = mul(o2w,v1).xyz; 110 | float3 pos2 = mul(o2w,v2).xyz; 111 | float4 tess; 112 | tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); 113 | tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); 114 | tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); 115 | tess.w = (tess.x + tess.y + tess.z) / 3.0f; 116 | return tess; 117 | } 118 | 119 | float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) 120 | { 121 | float3 pos0 = mul(o2w,v0).xyz; 122 | float3 pos1 = mul(o2w,v1).xyz; 123 | float3 pos2 = mul(o2w,v2).xyz; 124 | float4 tess; 125 | 126 | if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) 127 | { 128 | tess = 0.0f; 129 | } 130 | else 131 | { 132 | tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); 133 | tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); 134 | tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); 135 | tess.w = (tess.x + tess.y + tess.z) / 3.0f; 136 | } 137 | return tess; 138 | } 139 | #endif //ASE_TESS_FUNCS 140 | 141 | ENDHLSL 142 | 143 | 144 | Pass 145 | { 146 | 147 | Name "Forward" 148 | Tags { "LightMode"="UniversalForward" } 149 | 150 | Blend One Zero, One Zero 151 | ZWrite On 152 | ZTest LEqual 153 | Offset 0 , 0 154 | ColorMask RGBA 155 | 156 | 157 | HLSLPROGRAM 158 | #define _NORMAL_DROPOFF_TS 1 159 | #pragma multi_compile_instancing 160 | #pragma multi_compile _ LOD_FADE_CROSSFADE 161 | #pragma multi_compile_fog 162 | #define ASE_FOG 1 163 | #define _EMISSION 164 | #define ASE_SRP_VERSION 100302 165 | 166 | #pragma prefer_hlslcc gles 167 | #pragma exclude_renderers d3d11_9x 168 | 169 | #pragma multi_compile _ _SCREEN_SPACE_OCCLUSION 170 | #pragma multi_compile _ _MAIN_LIGHT_SHADOWS 171 | #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE 172 | #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS _ADDITIONAL_OFF 173 | #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS 174 | #pragma multi_compile _ _SHADOWS_SOFT 175 | #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE 176 | 177 | #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING 178 | #pragma multi_compile _ SHADOWS_SHADOWMASK 179 | 180 | #pragma multi_compile _ DIRLIGHTMAP_COMBINED 181 | #pragma multi_compile _ LIGHTMAP_ON 182 | 183 | #pragma vertex vert 184 | #pragma fragment frag 185 | 186 | #define SHADERPASS_FORWARD 187 | 188 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" 189 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" 190 | #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" 191 | #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl" 192 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" 193 | 194 | #if ASE_SRP_VERSION <= 70108 195 | #define REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR 196 | #endif 197 | 198 | #if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL) 199 | #define ENABLE_TERRAIN_PERPIXEL_NORMAL 200 | #endif 201 | 202 | #define ASE_NEEDS_FRAG_SCREEN_POSITION 203 | #define ASE_NEEDS_FRAG_WORLD_NORMAL 204 | #define ASE_NEEDS_FRAG_WORLD_POSITION 205 | #define ASE_NEEDS_FRAG_SHADOWCOORDS 206 | 207 | 208 | struct VertexInput 209 | { 210 | float4 vertex : POSITION; 211 | float3 ase_normal : NORMAL; 212 | float4 ase_tangent : TANGENT; 213 | float4 texcoord1 : TEXCOORD1; 214 | float4 texcoord : TEXCOORD0; 215 | 216 | UNITY_VERTEX_INPUT_INSTANCE_ID 217 | }; 218 | 219 | struct VertexOutput 220 | { 221 | float4 clipPos : SV_POSITION; 222 | float4 lightmapUVOrVertexSH : TEXCOORD0; 223 | half4 fogFactorAndVertexLight : TEXCOORD1; 224 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) 225 | float4 shadowCoord : TEXCOORD2; 226 | #endif 227 | float4 tSpace0 : TEXCOORD3; 228 | float4 tSpace1 : TEXCOORD4; 229 | float4 tSpace2 : TEXCOORD5; 230 | #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION) 231 | float4 screenPos : TEXCOORD6; 232 | #endif 233 | 234 | UNITY_VERTEX_INPUT_INSTANCE_ID 235 | UNITY_VERTEX_OUTPUT_STEREO 236 | }; 237 | 238 | CBUFFER_START(UnityPerMaterial) 239 | float3 _Tiling; 240 | #ifdef _TRANSMISSION_ASE 241 | float _TransmissionShadow; 242 | #endif 243 | #ifdef _TRANSLUCENCY_ASE 244 | float _TransStrength; 245 | float _TransNormal; 246 | float _TransScattering; 247 | float _TransDirect; 248 | float _TransAmbient; 249 | float _TransShadow; 250 | #endif 251 | #ifdef TESSELLATION_ON 252 | float _TessPhongStrength; 253 | float _TessValue; 254 | float _TessMin; 255 | float _TessMax; 256 | float _TessEdgeLength; 257 | float _TessMaxDisp; 258 | #endif 259 | CBUFFER_END 260 | sampler2D _HatchTexture; 261 | 262 | 263 | 264 | VertexOutput VertexFunction( VertexInput v ) 265 | { 266 | VertexOutput o = (VertexOutput)0; 267 | UNITY_SETUP_INSTANCE_ID(v); 268 | UNITY_TRANSFER_INSTANCE_ID(v, o); 269 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 270 | 271 | 272 | #ifdef ASE_ABSOLUTE_VERTEX_POS 273 | float3 defaultVertexValue = v.vertex.xyz; 274 | #else 275 | float3 defaultVertexValue = float3(0, 0, 0); 276 | #endif 277 | float3 vertexValue = defaultVertexValue; 278 | #ifdef ASE_ABSOLUTE_VERTEX_POS 279 | v.vertex.xyz = vertexValue; 280 | #else 281 | v.vertex.xyz += vertexValue; 282 | #endif 283 | v.ase_normal = v.ase_normal; 284 | 285 | float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); 286 | float3 positionVS = TransformWorldToView( positionWS ); 287 | float4 positionCS = TransformWorldToHClip( positionWS ); 288 | 289 | VertexNormalInputs normalInput = GetVertexNormalInputs( v.ase_normal, v.ase_tangent ); 290 | 291 | o.tSpace0 = float4( normalInput.normalWS, positionWS.x); 292 | o.tSpace1 = float4( normalInput.tangentWS, positionWS.y); 293 | o.tSpace2 = float4( normalInput.bitangentWS, positionWS.z); 294 | 295 | OUTPUT_LIGHTMAP_UV( v.texcoord1, unity_LightmapST, o.lightmapUVOrVertexSH.xy ); 296 | OUTPUT_SH( normalInput.normalWS.xyz, o.lightmapUVOrVertexSH.xyz ); 297 | 298 | #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) 299 | o.lightmapUVOrVertexSH.zw = v.texcoord; 300 | o.lightmapUVOrVertexSH.xy = v.texcoord * unity_LightmapST.xy + unity_LightmapST.zw; 301 | #endif 302 | 303 | half3 vertexLight = VertexLighting( positionWS, normalInput.normalWS ); 304 | #ifdef ASE_FOG 305 | half fogFactor = ComputeFogFactor( positionCS.z ); 306 | #else 307 | half fogFactor = 0; 308 | #endif 309 | o.fogFactorAndVertexLight = half4(fogFactor, vertexLight); 310 | 311 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) 312 | VertexPositionInputs vertexInput = (VertexPositionInputs)0; 313 | vertexInput.positionWS = positionWS; 314 | vertexInput.positionCS = positionCS; 315 | o.shadowCoord = GetShadowCoord( vertexInput ); 316 | #endif 317 | 318 | o.clipPos = positionCS; 319 | #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION) 320 | o.screenPos = ComputeScreenPos(positionCS); 321 | #endif 322 | return o; 323 | } 324 | 325 | #if defined(TESSELLATION_ON) 326 | struct VertexControl 327 | { 328 | float4 vertex : INTERNALTESSPOS; 329 | float3 ase_normal : NORMAL; 330 | float4 ase_tangent : TANGENT; 331 | float4 texcoord : TEXCOORD0; 332 | float4 texcoord1 : TEXCOORD1; 333 | 334 | UNITY_VERTEX_INPUT_INSTANCE_ID 335 | }; 336 | 337 | struct TessellationFactors 338 | { 339 | float edge[3] : SV_TessFactor; 340 | float inside : SV_InsideTessFactor; 341 | }; 342 | 343 | VertexControl vert ( VertexInput v ) 344 | { 345 | VertexControl o; 346 | UNITY_SETUP_INSTANCE_ID(v); 347 | UNITY_TRANSFER_INSTANCE_ID(v, o); 348 | o.vertex = v.vertex; 349 | o.ase_normal = v.ase_normal; 350 | o.ase_tangent = v.ase_tangent; 351 | o.texcoord = v.texcoord; 352 | o.texcoord1 = v.texcoord1; 353 | 354 | return o; 355 | } 356 | 357 | TessellationFactors TessellationFunction (InputPatch v) 358 | { 359 | TessellationFactors o; 360 | float4 tf = 1; 361 | float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; 362 | float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; 363 | #if defined(ASE_FIXED_TESSELLATION) 364 | tf = FixedTess( tessValue ); 365 | #elif defined(ASE_DISTANCE_TESSELLATION) 366 | tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); 367 | #elif defined(ASE_LENGTH_TESSELLATION) 368 | tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); 369 | #elif defined(ASE_LENGTH_CULL_TESSELLATION) 370 | tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); 371 | #endif 372 | o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; 373 | return o; 374 | } 375 | 376 | [domain("tri")] 377 | [partitioning("fractional_odd")] 378 | [outputtopology("triangle_cw")] 379 | [patchconstantfunc("TessellationFunction")] 380 | [outputcontrolpoints(3)] 381 | VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) 382 | { 383 | return patch[id]; 384 | } 385 | 386 | [domain("tri")] 387 | VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) 388 | { 389 | VertexInput o = (VertexInput) 0; 390 | o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; 391 | o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; 392 | o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z; 393 | o.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; 394 | o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; 395 | 396 | #if defined(ASE_PHONG_TESSELLATION) 397 | float3 pp[3]; 398 | for (int i = 0; i < 3; ++i) 399 | pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); 400 | float phongStrength = _TessPhongStrength; 401 | o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; 402 | #endif 403 | UNITY_TRANSFER_INSTANCE_ID(patch[0], o); 404 | return VertexFunction(o); 405 | } 406 | #else 407 | VertexOutput vert ( VertexInput v ) 408 | { 409 | return VertexFunction( v ); 410 | } 411 | #endif 412 | 413 | #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) 414 | #define ASE_SV_DEPTH SV_DepthLessEqual 415 | #else 416 | #define ASE_SV_DEPTH SV_Depth 417 | #endif 418 | 419 | half4 frag ( VertexOutput IN 420 | #ifdef ASE_DEPTH_WRITE_ON 421 | ,out float outputDepth : ASE_SV_DEPTH 422 | #endif 423 | ) : SV_Target 424 | { 425 | UNITY_SETUP_INSTANCE_ID(IN); 426 | UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN); 427 | 428 | #ifdef LOD_FADE_CROSSFADE 429 | LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); 430 | #endif 431 | 432 | #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) 433 | float2 sampleCoords = (IN.lightmapUVOrVertexSH.zw / _TerrainHeightmapRecipSize.zw + 0.5f) * _TerrainHeightmapRecipSize.xy; 434 | float3 WorldNormal = TransformObjectToWorldNormal(normalize(SAMPLE_TEXTURE2D(_TerrainNormalmapTexture, sampler_TerrainNormalmapTexture, sampleCoords).rgb * 2 - 1)); 435 | float3 WorldTangent = -cross(GetObjectToWorldMatrix()._13_23_33, WorldNormal); 436 | float3 WorldBiTangent = cross(WorldNormal, -WorldTangent); 437 | #else 438 | float3 WorldNormal = normalize( IN.tSpace0.xyz ); 439 | float3 WorldTangent = IN.tSpace1.xyz; 440 | float3 WorldBiTangent = IN.tSpace2.xyz; 441 | #endif 442 | float3 WorldPosition = float3(IN.tSpace0.w,IN.tSpace1.w,IN.tSpace2.w); 443 | float3 WorldViewDirection = _WorldSpaceCameraPos.xyz - WorldPosition; 444 | float4 ShadowCoords = float4( 0, 0, 0, 0 ); 445 | #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION) 446 | float4 ScreenPos = IN.screenPos; 447 | #endif 448 | 449 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) 450 | ShadowCoords = IN.shadowCoord; 451 | #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) 452 | ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); 453 | #endif 454 | 455 | WorldViewDirection = SafeNormalize( WorldViewDirection ); 456 | 457 | float4 ase_screenPosNorm = ScreenPos / ScreenPos.w; 458 | ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; 459 | float4 break12 = ase_screenPosNorm; 460 | float2 appendResult4_g1 = (float2(break12.x , break12.y)); 461 | float2 temp_output_17_0 = ( ( appendResult4_g1 * 4.0 ) / break12.w ); 462 | float dotResult19 = dot( WorldNormal , _MainLightPosition.xyz ); 463 | float ase_lightAtten = 0; 464 | Light ase_lightAtten_mainLight = GetMainLight( ShadowCoords ); 465 | ase_lightAtten = ase_lightAtten_mainLight.distanceAttenuation * ase_lightAtten_mainLight.shadowAttenuation; 466 | float temp_output_24_0 = saturate( ( ( dotResult19 * ase_lightAtten ) * length( _MainLightColor.rgb ) ) ); 467 | float lerpResult34 = lerp( tex2D( _HatchTexture, ( _Tiling.y * temp_output_17_0 ) ).g , tex2D( _HatchTexture, ( _Tiling.z * temp_output_17_0 ) ).b , temp_output_24_0); 468 | float lerpResult35 = lerp( lerpResult34 , tex2D( _HatchTexture, ( _Tiling.x * temp_output_17_0 ) ).r , temp_output_24_0); 469 | float3 temp_cast_0 = (saturate( lerpResult35 )).xxx; 470 | 471 | float3 Albedo = float3(0.5, 0.5, 0.5); 472 | float3 Normal = float3(0, 0, 1); 473 | float3 Emission = temp_cast_0; 474 | float3 Specular = 0.5; 475 | float Metallic = 0; 476 | float Smoothness = 0.5; 477 | float Occlusion = 1; 478 | float Alpha = 1; 479 | float AlphaClipThreshold = 0.5; 480 | float AlphaClipThresholdShadow = 0.5; 481 | float3 BakedGI = 0; 482 | float3 RefractionColor = 1; 483 | float RefractionIndex = 1; 484 | float3 Transmission = 1; 485 | float3 Translucency = 1; 486 | #ifdef ASE_DEPTH_WRITE_ON 487 | float DepthValue = 0; 488 | #endif 489 | 490 | #ifdef _ALPHATEST_ON 491 | clip(Alpha - AlphaClipThreshold); 492 | #endif 493 | 494 | InputData inputData; 495 | inputData.positionWS = WorldPosition; 496 | inputData.viewDirectionWS = WorldViewDirection; 497 | inputData.shadowCoord = ShadowCoords; 498 | 499 | #ifdef _NORMALMAP 500 | #if _NORMAL_DROPOFF_TS 501 | inputData.normalWS = TransformTangentToWorld(Normal, half3x3( WorldTangent, WorldBiTangent, WorldNormal )); 502 | #elif _NORMAL_DROPOFF_OS 503 | inputData.normalWS = TransformObjectToWorldNormal(Normal); 504 | #elif _NORMAL_DROPOFF_WS 505 | inputData.normalWS = Normal; 506 | #endif 507 | inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS); 508 | #else 509 | inputData.normalWS = WorldNormal; 510 | #endif 511 | 512 | #ifdef ASE_FOG 513 | inputData.fogCoord = IN.fogFactorAndVertexLight.x; 514 | #endif 515 | 516 | inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw; 517 | #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) 518 | float3 SH = SampleSH(inputData.normalWS.xyz); 519 | #else 520 | float3 SH = IN.lightmapUVOrVertexSH.xyz; 521 | #endif 522 | 523 | inputData.bakedGI = SAMPLE_GI( IN.lightmapUVOrVertexSH.xy, SH, inputData.normalWS ); 524 | #ifdef _ASE_BAKEDGI 525 | inputData.bakedGI = BakedGI; 526 | #endif 527 | 528 | inputData.normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(IN.clipPos); 529 | inputData.shadowMask = SAMPLE_SHADOWMASK(IN.lightmapUVOrVertexSH.xy); 530 | 531 | half4 color = UniversalFragmentPBR( 532 | inputData, 533 | Albedo, 534 | Metallic, 535 | Specular, 536 | Smoothness, 537 | Occlusion, 538 | Emission, 539 | Alpha); 540 | 541 | #ifdef _TRANSMISSION_ASE 542 | { 543 | float shadow = _TransmissionShadow; 544 | 545 | Light mainLight = GetMainLight( inputData.shadowCoord ); 546 | float3 mainAtten = mainLight.color * mainLight.distanceAttenuation; 547 | mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow ); 548 | half3 mainTransmission = max(0 , -dot(inputData.normalWS, mainLight.direction)) * mainAtten * Transmission; 549 | color.rgb += Albedo * mainTransmission; 550 | 551 | #ifdef _ADDITIONAL_LIGHTS 552 | int transPixelLightCount = GetAdditionalLightsCount(); 553 | for (int i = 0; i < transPixelLightCount; ++i) 554 | { 555 | Light light = GetAdditionalLight(i, inputData.positionWS); 556 | float3 atten = light.color * light.distanceAttenuation; 557 | atten = lerp( atten, atten * light.shadowAttenuation, shadow ); 558 | 559 | half3 transmission = max(0 , -dot(inputData.normalWS, light.direction)) * atten * Transmission; 560 | color.rgb += Albedo * transmission; 561 | } 562 | #endif 563 | } 564 | #endif 565 | 566 | #ifdef _TRANSLUCENCY_ASE 567 | { 568 | float shadow = _TransShadow; 569 | float normal = _TransNormal; 570 | float scattering = _TransScattering; 571 | float direct = _TransDirect; 572 | float ambient = _TransAmbient; 573 | float strength = _TransStrength; 574 | 575 | Light mainLight = GetMainLight( inputData.shadowCoord ); 576 | float3 mainAtten = mainLight.color * mainLight.distanceAttenuation; 577 | mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow ); 578 | 579 | half3 mainLightDir = mainLight.direction + inputData.normalWS * normal; 580 | half mainVdotL = pow( saturate( dot( inputData.viewDirectionWS, -mainLightDir ) ), scattering ); 581 | half3 mainTranslucency = mainAtten * ( mainVdotL * direct + inputData.bakedGI * ambient ) * Translucency; 582 | color.rgb += Albedo * mainTranslucency * strength; 583 | 584 | #ifdef _ADDITIONAL_LIGHTS 585 | int transPixelLightCount = GetAdditionalLightsCount(); 586 | for (int i = 0; i < transPixelLightCount; ++i) 587 | { 588 | Light light = GetAdditionalLight(i, inputData.positionWS); 589 | float3 atten = light.color * light.distanceAttenuation; 590 | atten = lerp( atten, atten * light.shadowAttenuation, shadow ); 591 | 592 | half3 lightDir = light.direction + inputData.normalWS * normal; 593 | half VdotL = pow( saturate( dot( inputData.viewDirectionWS, -lightDir ) ), scattering ); 594 | half3 translucency = atten * ( VdotL * direct + inputData.bakedGI * ambient ) * Translucency; 595 | color.rgb += Albedo * translucency * strength; 596 | } 597 | #endif 598 | } 599 | #endif 600 | 601 | #ifdef _REFRACTION_ASE 602 | float4 projScreenPos = ScreenPos / ScreenPos.w; 603 | float3 refractionOffset = ( RefractionIndex - 1.0 ) * mul( UNITY_MATRIX_V, WorldNormal ).xyz * ( 1.0 - dot( WorldNormal, WorldViewDirection ) ); 604 | projScreenPos.xy += refractionOffset.xy; 605 | float3 refraction = SHADERGRAPH_SAMPLE_SCENE_COLOR( projScreenPos ) * RefractionColor; 606 | color.rgb = lerp( refraction, color.rgb, color.a ); 607 | color.a = 1; 608 | #endif 609 | 610 | #ifdef ASE_FINAL_COLOR_ALPHA_MULTIPLY 611 | color.rgb *= color.a; 612 | #endif 613 | 614 | #ifdef ASE_FOG 615 | #ifdef TERRAIN_SPLAT_ADDPASS 616 | color.rgb = MixFogColor(color.rgb, half3( 0, 0, 0 ), IN.fogFactorAndVertexLight.x ); 617 | #else 618 | color.rgb = MixFog(color.rgb, IN.fogFactorAndVertexLight.x); 619 | #endif 620 | #endif 621 | 622 | #ifdef ASE_DEPTH_WRITE_ON 623 | outputDepth = DepthValue; 624 | #endif 625 | 626 | return color; 627 | } 628 | 629 | ENDHLSL 630 | } 631 | 632 | 633 | Pass 634 | { 635 | 636 | Name "ShadowCaster" 637 | Tags { "LightMode"="ShadowCaster" } 638 | 639 | ZWrite On 640 | ZTest LEqual 641 | AlphaToMask Off 642 | 643 | HLSLPROGRAM 644 | #define _NORMAL_DROPOFF_TS 1 645 | #pragma multi_compile_instancing 646 | #pragma multi_compile _ LOD_FADE_CROSSFADE 647 | #pragma multi_compile_fog 648 | #define ASE_FOG 1 649 | #define _EMISSION 650 | #define ASE_SRP_VERSION 100302 651 | 652 | #pragma prefer_hlslcc gles 653 | #pragma exclude_renderers d3d11_9x 654 | 655 | #pragma vertex vert 656 | #pragma fragment frag 657 | 658 | #define SHADERPASS_SHADOWCASTER 659 | 660 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" 661 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" 662 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" 663 | #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" 664 | 665 | 666 | 667 | struct VertexInput 668 | { 669 | float4 vertex : POSITION; 670 | float3 ase_normal : NORMAL; 671 | 672 | UNITY_VERTEX_INPUT_INSTANCE_ID 673 | }; 674 | 675 | struct VertexOutput 676 | { 677 | float4 clipPos : SV_POSITION; 678 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 679 | float3 worldPos : TEXCOORD0; 680 | #endif 681 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 682 | float4 shadowCoord : TEXCOORD1; 683 | #endif 684 | 685 | UNITY_VERTEX_INPUT_INSTANCE_ID 686 | UNITY_VERTEX_OUTPUT_STEREO 687 | }; 688 | 689 | CBUFFER_START(UnityPerMaterial) 690 | float3 _Tiling; 691 | #ifdef _TRANSMISSION_ASE 692 | float _TransmissionShadow; 693 | #endif 694 | #ifdef _TRANSLUCENCY_ASE 695 | float _TransStrength; 696 | float _TransNormal; 697 | float _TransScattering; 698 | float _TransDirect; 699 | float _TransAmbient; 700 | float _TransShadow; 701 | #endif 702 | #ifdef TESSELLATION_ON 703 | float _TessPhongStrength; 704 | float _TessValue; 705 | float _TessMin; 706 | float _TessMax; 707 | float _TessEdgeLength; 708 | float _TessMaxDisp; 709 | #endif 710 | CBUFFER_END 711 | 712 | 713 | 714 | float3 _LightDirection; 715 | 716 | VertexOutput VertexFunction( VertexInput v ) 717 | { 718 | VertexOutput o; 719 | UNITY_SETUP_INSTANCE_ID(v); 720 | UNITY_TRANSFER_INSTANCE_ID(v, o); 721 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o ); 722 | 723 | 724 | #ifdef ASE_ABSOLUTE_VERTEX_POS 725 | float3 defaultVertexValue = v.vertex.xyz; 726 | #else 727 | float3 defaultVertexValue = float3(0, 0, 0); 728 | #endif 729 | float3 vertexValue = defaultVertexValue; 730 | #ifdef ASE_ABSOLUTE_VERTEX_POS 731 | v.vertex.xyz = vertexValue; 732 | #else 733 | v.vertex.xyz += vertexValue; 734 | #endif 735 | 736 | v.ase_normal = v.ase_normal; 737 | 738 | float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); 739 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 740 | o.worldPos = positionWS; 741 | #endif 742 | float3 normalWS = TransformObjectToWorldDir(v.ase_normal); 743 | 744 | float4 clipPos = TransformWorldToHClip( ApplyShadowBias( positionWS, normalWS, _LightDirection ) ); 745 | 746 | #if UNITY_REVERSED_Z 747 | clipPos.z = min(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE); 748 | #else 749 | clipPos.z = max(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE); 750 | #endif 751 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 752 | VertexPositionInputs vertexInput = (VertexPositionInputs)0; 753 | vertexInput.positionWS = positionWS; 754 | vertexInput.positionCS = clipPos; 755 | o.shadowCoord = GetShadowCoord( vertexInput ); 756 | #endif 757 | o.clipPos = clipPos; 758 | return o; 759 | } 760 | 761 | #if defined(TESSELLATION_ON) 762 | struct VertexControl 763 | { 764 | float4 vertex : INTERNALTESSPOS; 765 | float3 ase_normal : NORMAL; 766 | 767 | UNITY_VERTEX_INPUT_INSTANCE_ID 768 | }; 769 | 770 | struct TessellationFactors 771 | { 772 | float edge[3] : SV_TessFactor; 773 | float inside : SV_InsideTessFactor; 774 | }; 775 | 776 | VertexControl vert ( VertexInput v ) 777 | { 778 | VertexControl o; 779 | UNITY_SETUP_INSTANCE_ID(v); 780 | UNITY_TRANSFER_INSTANCE_ID(v, o); 781 | o.vertex = v.vertex; 782 | o.ase_normal = v.ase_normal; 783 | 784 | return o; 785 | } 786 | 787 | TessellationFactors TessellationFunction (InputPatch v) 788 | { 789 | TessellationFactors o; 790 | float4 tf = 1; 791 | float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; 792 | float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; 793 | #if defined(ASE_FIXED_TESSELLATION) 794 | tf = FixedTess( tessValue ); 795 | #elif defined(ASE_DISTANCE_TESSELLATION) 796 | tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); 797 | #elif defined(ASE_LENGTH_TESSELLATION) 798 | tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); 799 | #elif defined(ASE_LENGTH_CULL_TESSELLATION) 800 | tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); 801 | #endif 802 | o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; 803 | return o; 804 | } 805 | 806 | [domain("tri")] 807 | [partitioning("fractional_odd")] 808 | [outputtopology("triangle_cw")] 809 | [patchconstantfunc("TessellationFunction")] 810 | [outputcontrolpoints(3)] 811 | VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) 812 | { 813 | return patch[id]; 814 | } 815 | 816 | [domain("tri")] 817 | VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) 818 | { 819 | VertexInput o = (VertexInput) 0; 820 | o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; 821 | o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; 822 | 823 | #if defined(ASE_PHONG_TESSELLATION) 824 | float3 pp[3]; 825 | for (int i = 0; i < 3; ++i) 826 | pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); 827 | float phongStrength = _TessPhongStrength; 828 | o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; 829 | #endif 830 | UNITY_TRANSFER_INSTANCE_ID(patch[0], o); 831 | return VertexFunction(o); 832 | } 833 | #else 834 | VertexOutput vert ( VertexInput v ) 835 | { 836 | return VertexFunction( v ); 837 | } 838 | #endif 839 | 840 | #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) 841 | #define ASE_SV_DEPTH SV_DepthLessEqual 842 | #else 843 | #define ASE_SV_DEPTH SV_Depth 844 | #endif 845 | 846 | half4 frag( VertexOutput IN 847 | #ifdef ASE_DEPTH_WRITE_ON 848 | ,out float outputDepth : ASE_SV_DEPTH 849 | #endif 850 | ) : SV_TARGET 851 | { 852 | UNITY_SETUP_INSTANCE_ID( IN ); 853 | UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); 854 | 855 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 856 | float3 WorldPosition = IN.worldPos; 857 | #endif 858 | float4 ShadowCoords = float4( 0, 0, 0, 0 ); 859 | 860 | #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 861 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) 862 | ShadowCoords = IN.shadowCoord; 863 | #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) 864 | ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); 865 | #endif 866 | #endif 867 | 868 | 869 | float Alpha = 1; 870 | float AlphaClipThreshold = 0.5; 871 | float AlphaClipThresholdShadow = 0.5; 872 | #ifdef ASE_DEPTH_WRITE_ON 873 | float DepthValue = 0; 874 | #endif 875 | 876 | #ifdef _ALPHATEST_ON 877 | #ifdef _ALPHATEST_SHADOW_ON 878 | clip(Alpha - AlphaClipThresholdShadow); 879 | #else 880 | clip(Alpha - AlphaClipThreshold); 881 | #endif 882 | #endif 883 | 884 | #ifdef LOD_FADE_CROSSFADE 885 | LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); 886 | #endif 887 | #ifdef ASE_DEPTH_WRITE_ON 888 | outputDepth = DepthValue; 889 | #endif 890 | return 0; 891 | } 892 | 893 | ENDHLSL 894 | } 895 | 896 | 897 | Pass 898 | { 899 | 900 | Name "DepthOnly" 901 | Tags { "LightMode"="DepthOnly" } 902 | 903 | ZWrite On 904 | ColorMask 0 905 | AlphaToMask Off 906 | 907 | HLSLPROGRAM 908 | #define _NORMAL_DROPOFF_TS 1 909 | #pragma multi_compile_instancing 910 | #pragma multi_compile _ LOD_FADE_CROSSFADE 911 | #pragma multi_compile_fog 912 | #define ASE_FOG 1 913 | #define _EMISSION 914 | #define ASE_SRP_VERSION 100302 915 | 916 | #pragma prefer_hlslcc gles 917 | #pragma exclude_renderers d3d11_9x 918 | 919 | #pragma vertex vert 920 | #pragma fragment frag 921 | 922 | #define SHADERPASS_DEPTHONLY 923 | 924 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" 925 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" 926 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" 927 | #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" 928 | 929 | 930 | 931 | struct VertexInput 932 | { 933 | float4 vertex : POSITION; 934 | float3 ase_normal : NORMAL; 935 | 936 | UNITY_VERTEX_INPUT_INSTANCE_ID 937 | }; 938 | 939 | struct VertexOutput 940 | { 941 | float4 clipPos : SV_POSITION; 942 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 943 | float3 worldPos : TEXCOORD0; 944 | #endif 945 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 946 | float4 shadowCoord : TEXCOORD1; 947 | #endif 948 | 949 | UNITY_VERTEX_INPUT_INSTANCE_ID 950 | UNITY_VERTEX_OUTPUT_STEREO 951 | }; 952 | 953 | CBUFFER_START(UnityPerMaterial) 954 | float3 _Tiling; 955 | #ifdef _TRANSMISSION_ASE 956 | float _TransmissionShadow; 957 | #endif 958 | #ifdef _TRANSLUCENCY_ASE 959 | float _TransStrength; 960 | float _TransNormal; 961 | float _TransScattering; 962 | float _TransDirect; 963 | float _TransAmbient; 964 | float _TransShadow; 965 | #endif 966 | #ifdef TESSELLATION_ON 967 | float _TessPhongStrength; 968 | float _TessValue; 969 | float _TessMin; 970 | float _TessMax; 971 | float _TessEdgeLength; 972 | float _TessMaxDisp; 973 | #endif 974 | CBUFFER_END 975 | 976 | 977 | 978 | VertexOutput VertexFunction( VertexInput v ) 979 | { 980 | VertexOutput o = (VertexOutput)0; 981 | UNITY_SETUP_INSTANCE_ID(v); 982 | UNITY_TRANSFER_INSTANCE_ID(v, o); 983 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 984 | 985 | 986 | #ifdef ASE_ABSOLUTE_VERTEX_POS 987 | float3 defaultVertexValue = v.vertex.xyz; 988 | #else 989 | float3 defaultVertexValue = float3(0, 0, 0); 990 | #endif 991 | float3 vertexValue = defaultVertexValue; 992 | #ifdef ASE_ABSOLUTE_VERTEX_POS 993 | v.vertex.xyz = vertexValue; 994 | #else 995 | v.vertex.xyz += vertexValue; 996 | #endif 997 | 998 | v.ase_normal = v.ase_normal; 999 | float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); 1000 | float4 positionCS = TransformWorldToHClip( positionWS ); 1001 | 1002 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 1003 | o.worldPos = positionWS; 1004 | #endif 1005 | 1006 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 1007 | VertexPositionInputs vertexInput = (VertexPositionInputs)0; 1008 | vertexInput.positionWS = positionWS; 1009 | vertexInput.positionCS = positionCS; 1010 | o.shadowCoord = GetShadowCoord( vertexInput ); 1011 | #endif 1012 | o.clipPos = positionCS; 1013 | return o; 1014 | } 1015 | 1016 | #if defined(TESSELLATION_ON) 1017 | struct VertexControl 1018 | { 1019 | float4 vertex : INTERNALTESSPOS; 1020 | float3 ase_normal : NORMAL; 1021 | 1022 | UNITY_VERTEX_INPUT_INSTANCE_ID 1023 | }; 1024 | 1025 | struct TessellationFactors 1026 | { 1027 | float edge[3] : SV_TessFactor; 1028 | float inside : SV_InsideTessFactor; 1029 | }; 1030 | 1031 | VertexControl vert ( VertexInput v ) 1032 | { 1033 | VertexControl o; 1034 | UNITY_SETUP_INSTANCE_ID(v); 1035 | UNITY_TRANSFER_INSTANCE_ID(v, o); 1036 | o.vertex = v.vertex; 1037 | o.ase_normal = v.ase_normal; 1038 | 1039 | return o; 1040 | } 1041 | 1042 | TessellationFactors TessellationFunction (InputPatch v) 1043 | { 1044 | TessellationFactors o; 1045 | float4 tf = 1; 1046 | float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; 1047 | float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; 1048 | #if defined(ASE_FIXED_TESSELLATION) 1049 | tf = FixedTess( tessValue ); 1050 | #elif defined(ASE_DISTANCE_TESSELLATION) 1051 | tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); 1052 | #elif defined(ASE_LENGTH_TESSELLATION) 1053 | tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); 1054 | #elif defined(ASE_LENGTH_CULL_TESSELLATION) 1055 | tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); 1056 | #endif 1057 | o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; 1058 | return o; 1059 | } 1060 | 1061 | [domain("tri")] 1062 | [partitioning("fractional_odd")] 1063 | [outputtopology("triangle_cw")] 1064 | [patchconstantfunc("TessellationFunction")] 1065 | [outputcontrolpoints(3)] 1066 | VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) 1067 | { 1068 | return patch[id]; 1069 | } 1070 | 1071 | [domain("tri")] 1072 | VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) 1073 | { 1074 | VertexInput o = (VertexInput) 0; 1075 | o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; 1076 | o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; 1077 | 1078 | #if defined(ASE_PHONG_TESSELLATION) 1079 | float3 pp[3]; 1080 | for (int i = 0; i < 3; ++i) 1081 | pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); 1082 | float phongStrength = _TessPhongStrength; 1083 | o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; 1084 | #endif 1085 | UNITY_TRANSFER_INSTANCE_ID(patch[0], o); 1086 | return VertexFunction(o); 1087 | } 1088 | #else 1089 | VertexOutput vert ( VertexInput v ) 1090 | { 1091 | return VertexFunction( v ); 1092 | } 1093 | #endif 1094 | 1095 | #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) 1096 | #define ASE_SV_DEPTH SV_DepthLessEqual 1097 | #else 1098 | #define ASE_SV_DEPTH SV_Depth 1099 | #endif 1100 | half4 frag( VertexOutput IN 1101 | #ifdef ASE_DEPTH_WRITE_ON 1102 | ,out float outputDepth : ASE_SV_DEPTH 1103 | #endif 1104 | ) : SV_TARGET 1105 | { 1106 | UNITY_SETUP_INSTANCE_ID(IN); 1107 | UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); 1108 | 1109 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 1110 | float3 WorldPosition = IN.worldPos; 1111 | #endif 1112 | float4 ShadowCoords = float4( 0, 0, 0, 0 ); 1113 | 1114 | #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 1115 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) 1116 | ShadowCoords = IN.shadowCoord; 1117 | #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) 1118 | ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); 1119 | #endif 1120 | #endif 1121 | 1122 | 1123 | float Alpha = 1; 1124 | float AlphaClipThreshold = 0.5; 1125 | #ifdef ASE_DEPTH_WRITE_ON 1126 | float DepthValue = 0; 1127 | #endif 1128 | 1129 | #ifdef _ALPHATEST_ON 1130 | clip(Alpha - AlphaClipThreshold); 1131 | #endif 1132 | 1133 | #ifdef LOD_FADE_CROSSFADE 1134 | LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); 1135 | #endif 1136 | #ifdef ASE_DEPTH_WRITE_ON 1137 | outputDepth = DepthValue; 1138 | #endif 1139 | 1140 | return 0; 1141 | } 1142 | ENDHLSL 1143 | } 1144 | 1145 | 1146 | Pass 1147 | { 1148 | 1149 | Name "Meta" 1150 | Tags { "LightMode"="Meta" } 1151 | 1152 | Cull Off 1153 | 1154 | HLSLPROGRAM 1155 | #define _NORMAL_DROPOFF_TS 1 1156 | #pragma multi_compile_instancing 1157 | #pragma multi_compile _ LOD_FADE_CROSSFADE 1158 | #pragma multi_compile_fog 1159 | #define ASE_FOG 1 1160 | #define _EMISSION 1161 | #define ASE_SRP_VERSION 100302 1162 | 1163 | #pragma prefer_hlslcc gles 1164 | #pragma exclude_renderers d3d11_9x 1165 | 1166 | #pragma vertex vert 1167 | #pragma fragment frag 1168 | 1169 | #define SHADERPASS_META 1170 | 1171 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" 1172 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl" 1173 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" 1174 | #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" 1175 | 1176 | #define ASE_NEEDS_VERT_NORMAL 1177 | #define ASE_NEEDS_FRAG_WORLD_POSITION 1178 | #define ASE_NEEDS_FRAG_SHADOWCOORDS 1179 | #pragma multi_compile _ _MAIN_LIGHT_SHADOWS 1180 | #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE 1181 | #pragma multi_compile _ _SHADOWS_SOFT 1182 | 1183 | 1184 | #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A 1185 | 1186 | struct VertexInput 1187 | { 1188 | float4 vertex : POSITION; 1189 | float3 ase_normal : NORMAL; 1190 | float4 texcoord1 : TEXCOORD1; 1191 | float4 texcoord2 : TEXCOORD2; 1192 | 1193 | UNITY_VERTEX_INPUT_INSTANCE_ID 1194 | }; 1195 | 1196 | struct VertexOutput 1197 | { 1198 | float4 clipPos : SV_POSITION; 1199 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 1200 | float3 worldPos : TEXCOORD0; 1201 | #endif 1202 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 1203 | float4 shadowCoord : TEXCOORD1; 1204 | #endif 1205 | float4 ase_texcoord2 : TEXCOORD2; 1206 | float4 ase_texcoord3 : TEXCOORD3; 1207 | UNITY_VERTEX_INPUT_INSTANCE_ID 1208 | UNITY_VERTEX_OUTPUT_STEREO 1209 | }; 1210 | 1211 | CBUFFER_START(UnityPerMaterial) 1212 | float3 _Tiling; 1213 | #ifdef _TRANSMISSION_ASE 1214 | float _TransmissionShadow; 1215 | #endif 1216 | #ifdef _TRANSLUCENCY_ASE 1217 | float _TransStrength; 1218 | float _TransNormal; 1219 | float _TransScattering; 1220 | float _TransDirect; 1221 | float _TransAmbient; 1222 | float _TransShadow; 1223 | #endif 1224 | #ifdef TESSELLATION_ON 1225 | float _TessPhongStrength; 1226 | float _TessValue; 1227 | float _TessMin; 1228 | float _TessMax; 1229 | float _TessEdgeLength; 1230 | float _TessMaxDisp; 1231 | #endif 1232 | CBUFFER_END 1233 | sampler2D _HatchTexture; 1234 | 1235 | 1236 | 1237 | VertexOutput VertexFunction( VertexInput v ) 1238 | { 1239 | VertexOutput o = (VertexOutput)0; 1240 | UNITY_SETUP_INSTANCE_ID(v); 1241 | UNITY_TRANSFER_INSTANCE_ID(v, o); 1242 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 1243 | 1244 | float4 ase_clipPos = TransformObjectToHClip((v.vertex).xyz); 1245 | float4 screenPos = ComputeScreenPos(ase_clipPos); 1246 | o.ase_texcoord2 = screenPos; 1247 | float3 ase_worldNormal = TransformObjectToWorldNormal(v.ase_normal); 1248 | o.ase_texcoord3.xyz = ase_worldNormal; 1249 | 1250 | 1251 | //setting value to unused interpolator channels and avoid initialization warnings 1252 | o.ase_texcoord3.w = 0; 1253 | 1254 | #ifdef ASE_ABSOLUTE_VERTEX_POS 1255 | float3 defaultVertexValue = v.vertex.xyz; 1256 | #else 1257 | float3 defaultVertexValue = float3(0, 0, 0); 1258 | #endif 1259 | float3 vertexValue = defaultVertexValue; 1260 | #ifdef ASE_ABSOLUTE_VERTEX_POS 1261 | v.vertex.xyz = vertexValue; 1262 | #else 1263 | v.vertex.xyz += vertexValue; 1264 | #endif 1265 | 1266 | v.ase_normal = v.ase_normal; 1267 | 1268 | float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); 1269 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 1270 | o.worldPos = positionWS; 1271 | #endif 1272 | 1273 | o.clipPos = MetaVertexPosition( v.vertex, v.texcoord1.xy, v.texcoord1.xy, unity_LightmapST, unity_DynamicLightmapST ); 1274 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 1275 | VertexPositionInputs vertexInput = (VertexPositionInputs)0; 1276 | vertexInput.positionWS = positionWS; 1277 | vertexInput.positionCS = o.clipPos; 1278 | o.shadowCoord = GetShadowCoord( vertexInput ); 1279 | #endif 1280 | return o; 1281 | } 1282 | 1283 | #if defined(TESSELLATION_ON) 1284 | struct VertexControl 1285 | { 1286 | float4 vertex : INTERNALTESSPOS; 1287 | float3 ase_normal : NORMAL; 1288 | float4 texcoord1 : TEXCOORD1; 1289 | float4 texcoord2 : TEXCOORD2; 1290 | 1291 | UNITY_VERTEX_INPUT_INSTANCE_ID 1292 | }; 1293 | 1294 | struct TessellationFactors 1295 | { 1296 | float edge[3] : SV_TessFactor; 1297 | float inside : SV_InsideTessFactor; 1298 | }; 1299 | 1300 | VertexControl vert ( VertexInput v ) 1301 | { 1302 | VertexControl o; 1303 | UNITY_SETUP_INSTANCE_ID(v); 1304 | UNITY_TRANSFER_INSTANCE_ID(v, o); 1305 | o.vertex = v.vertex; 1306 | o.ase_normal = v.ase_normal; 1307 | o.texcoord1 = v.texcoord1; 1308 | o.texcoord2 = v.texcoord2; 1309 | 1310 | return o; 1311 | } 1312 | 1313 | TessellationFactors TessellationFunction (InputPatch v) 1314 | { 1315 | TessellationFactors o; 1316 | float4 tf = 1; 1317 | float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; 1318 | float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; 1319 | #if defined(ASE_FIXED_TESSELLATION) 1320 | tf = FixedTess( tessValue ); 1321 | #elif defined(ASE_DISTANCE_TESSELLATION) 1322 | tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); 1323 | #elif defined(ASE_LENGTH_TESSELLATION) 1324 | tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); 1325 | #elif defined(ASE_LENGTH_CULL_TESSELLATION) 1326 | tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); 1327 | #endif 1328 | o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; 1329 | return o; 1330 | } 1331 | 1332 | [domain("tri")] 1333 | [partitioning("fractional_odd")] 1334 | [outputtopology("triangle_cw")] 1335 | [patchconstantfunc("TessellationFunction")] 1336 | [outputcontrolpoints(3)] 1337 | VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) 1338 | { 1339 | return patch[id]; 1340 | } 1341 | 1342 | [domain("tri")] 1343 | VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) 1344 | { 1345 | VertexInput o = (VertexInput) 0; 1346 | o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; 1347 | o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; 1348 | o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; 1349 | o.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; 1350 | 1351 | #if defined(ASE_PHONG_TESSELLATION) 1352 | float3 pp[3]; 1353 | for (int i = 0; i < 3; ++i) 1354 | pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); 1355 | float phongStrength = _TessPhongStrength; 1356 | o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; 1357 | #endif 1358 | UNITY_TRANSFER_INSTANCE_ID(patch[0], o); 1359 | return VertexFunction(o); 1360 | } 1361 | #else 1362 | VertexOutput vert ( VertexInput v ) 1363 | { 1364 | return VertexFunction( v ); 1365 | } 1366 | #endif 1367 | 1368 | half4 frag(VertexOutput IN ) : SV_TARGET 1369 | { 1370 | UNITY_SETUP_INSTANCE_ID(IN); 1371 | UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); 1372 | 1373 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 1374 | float3 WorldPosition = IN.worldPos; 1375 | #endif 1376 | float4 ShadowCoords = float4( 0, 0, 0, 0 ); 1377 | 1378 | #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 1379 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) 1380 | ShadowCoords = IN.shadowCoord; 1381 | #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) 1382 | ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); 1383 | #endif 1384 | #endif 1385 | 1386 | float4 screenPos = IN.ase_texcoord2; 1387 | float4 ase_screenPosNorm = screenPos / screenPos.w; 1388 | ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; 1389 | float4 break12 = ase_screenPosNorm; 1390 | float2 appendResult4_g1 = (float2(break12.x , break12.y)); 1391 | float2 temp_output_17_0 = ( ( appendResult4_g1 * 4.0 ) / break12.w ); 1392 | float3 ase_worldNormal = IN.ase_texcoord3.xyz; 1393 | float dotResult19 = dot( ase_worldNormal , _MainLightPosition.xyz ); 1394 | float ase_lightAtten = 0; 1395 | Light ase_lightAtten_mainLight = GetMainLight( ShadowCoords ); 1396 | ase_lightAtten = ase_lightAtten_mainLight.distanceAttenuation * ase_lightAtten_mainLight.shadowAttenuation; 1397 | float temp_output_24_0 = saturate( ( ( dotResult19 * ase_lightAtten ) * length( _MainLightColor.rgb ) ) ); 1398 | float lerpResult34 = lerp( tex2D( _HatchTexture, ( _Tiling.y * temp_output_17_0 ) ).g , tex2D( _HatchTexture, ( _Tiling.z * temp_output_17_0 ) ).b , temp_output_24_0); 1399 | float lerpResult35 = lerp( lerpResult34 , tex2D( _HatchTexture, ( _Tiling.x * temp_output_17_0 ) ).r , temp_output_24_0); 1400 | float3 temp_cast_0 = (saturate( lerpResult35 )).xxx; 1401 | 1402 | 1403 | float3 Albedo = float3(0.5, 0.5, 0.5); 1404 | float3 Emission = temp_cast_0; 1405 | float Alpha = 1; 1406 | float AlphaClipThreshold = 0.5; 1407 | 1408 | #ifdef _ALPHATEST_ON 1409 | clip(Alpha - AlphaClipThreshold); 1410 | #endif 1411 | 1412 | MetaInput metaInput = (MetaInput)0; 1413 | metaInput.Albedo = Albedo; 1414 | metaInput.Emission = Emission; 1415 | 1416 | return MetaFragment(metaInput); 1417 | } 1418 | ENDHLSL 1419 | } 1420 | 1421 | 1422 | Pass 1423 | { 1424 | 1425 | Name "Universal2D" 1426 | Tags { "LightMode"="Universal2D" } 1427 | 1428 | Blend One Zero, One Zero 1429 | ZWrite On 1430 | ZTest LEqual 1431 | Offset 0 , 0 1432 | ColorMask RGBA 1433 | 1434 | HLSLPROGRAM 1435 | #define _NORMAL_DROPOFF_TS 1 1436 | #pragma multi_compile_instancing 1437 | #pragma multi_compile _ LOD_FADE_CROSSFADE 1438 | #pragma multi_compile_fog 1439 | #define ASE_FOG 1 1440 | #define _EMISSION 1441 | #define ASE_SRP_VERSION 100302 1442 | 1443 | #pragma prefer_hlslcc gles 1444 | #pragma exclude_renderers d3d11_9x 1445 | 1446 | #pragma vertex vert 1447 | #pragma fragment frag 1448 | 1449 | #define SHADERPASS_2D 1450 | 1451 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" 1452 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" 1453 | #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" 1454 | #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl" 1455 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" 1456 | 1457 | 1458 | 1459 | #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A 1460 | 1461 | struct VertexInput 1462 | { 1463 | float4 vertex : POSITION; 1464 | float3 ase_normal : NORMAL; 1465 | 1466 | UNITY_VERTEX_INPUT_INSTANCE_ID 1467 | }; 1468 | 1469 | struct VertexOutput 1470 | { 1471 | float4 clipPos : SV_POSITION; 1472 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 1473 | float3 worldPos : TEXCOORD0; 1474 | #endif 1475 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 1476 | float4 shadowCoord : TEXCOORD1; 1477 | #endif 1478 | 1479 | UNITY_VERTEX_INPUT_INSTANCE_ID 1480 | UNITY_VERTEX_OUTPUT_STEREO 1481 | }; 1482 | 1483 | CBUFFER_START(UnityPerMaterial) 1484 | float3 _Tiling; 1485 | #ifdef _TRANSMISSION_ASE 1486 | float _TransmissionShadow; 1487 | #endif 1488 | #ifdef _TRANSLUCENCY_ASE 1489 | float _TransStrength; 1490 | float _TransNormal; 1491 | float _TransScattering; 1492 | float _TransDirect; 1493 | float _TransAmbient; 1494 | float _TransShadow; 1495 | #endif 1496 | #ifdef TESSELLATION_ON 1497 | float _TessPhongStrength; 1498 | float _TessValue; 1499 | float _TessMin; 1500 | float _TessMax; 1501 | float _TessEdgeLength; 1502 | float _TessMaxDisp; 1503 | #endif 1504 | CBUFFER_END 1505 | 1506 | 1507 | 1508 | VertexOutput VertexFunction( VertexInput v ) 1509 | { 1510 | VertexOutput o = (VertexOutput)0; 1511 | UNITY_SETUP_INSTANCE_ID( v ); 1512 | UNITY_TRANSFER_INSTANCE_ID( v, o ); 1513 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o ); 1514 | 1515 | 1516 | 1517 | #ifdef ASE_ABSOLUTE_VERTEX_POS 1518 | float3 defaultVertexValue = v.vertex.xyz; 1519 | #else 1520 | float3 defaultVertexValue = float3(0, 0, 0); 1521 | #endif 1522 | float3 vertexValue = defaultVertexValue; 1523 | #ifdef ASE_ABSOLUTE_VERTEX_POS 1524 | v.vertex.xyz = vertexValue; 1525 | #else 1526 | v.vertex.xyz += vertexValue; 1527 | #endif 1528 | 1529 | v.ase_normal = v.ase_normal; 1530 | 1531 | float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); 1532 | float4 positionCS = TransformWorldToHClip( positionWS ); 1533 | 1534 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 1535 | o.worldPos = positionWS; 1536 | #endif 1537 | 1538 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 1539 | VertexPositionInputs vertexInput = (VertexPositionInputs)0; 1540 | vertexInput.positionWS = positionWS; 1541 | vertexInput.positionCS = positionCS; 1542 | o.shadowCoord = GetShadowCoord( vertexInput ); 1543 | #endif 1544 | 1545 | o.clipPos = positionCS; 1546 | return o; 1547 | } 1548 | 1549 | #if defined(TESSELLATION_ON) 1550 | struct VertexControl 1551 | { 1552 | float4 vertex : INTERNALTESSPOS; 1553 | float3 ase_normal : NORMAL; 1554 | 1555 | UNITY_VERTEX_INPUT_INSTANCE_ID 1556 | }; 1557 | 1558 | struct TessellationFactors 1559 | { 1560 | float edge[3] : SV_TessFactor; 1561 | float inside : SV_InsideTessFactor; 1562 | }; 1563 | 1564 | VertexControl vert ( VertexInput v ) 1565 | { 1566 | VertexControl o; 1567 | UNITY_SETUP_INSTANCE_ID(v); 1568 | UNITY_TRANSFER_INSTANCE_ID(v, o); 1569 | o.vertex = v.vertex; 1570 | o.ase_normal = v.ase_normal; 1571 | 1572 | return o; 1573 | } 1574 | 1575 | TessellationFactors TessellationFunction (InputPatch v) 1576 | { 1577 | TessellationFactors o; 1578 | float4 tf = 1; 1579 | float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; 1580 | float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; 1581 | #if defined(ASE_FIXED_TESSELLATION) 1582 | tf = FixedTess( tessValue ); 1583 | #elif defined(ASE_DISTANCE_TESSELLATION) 1584 | tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); 1585 | #elif defined(ASE_LENGTH_TESSELLATION) 1586 | tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); 1587 | #elif defined(ASE_LENGTH_CULL_TESSELLATION) 1588 | tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); 1589 | #endif 1590 | o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; 1591 | return o; 1592 | } 1593 | 1594 | [domain("tri")] 1595 | [partitioning("fractional_odd")] 1596 | [outputtopology("triangle_cw")] 1597 | [patchconstantfunc("TessellationFunction")] 1598 | [outputcontrolpoints(3)] 1599 | VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) 1600 | { 1601 | return patch[id]; 1602 | } 1603 | 1604 | [domain("tri")] 1605 | VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) 1606 | { 1607 | VertexInput o = (VertexInput) 0; 1608 | o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; 1609 | o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; 1610 | 1611 | #if defined(ASE_PHONG_TESSELLATION) 1612 | float3 pp[3]; 1613 | for (int i = 0; i < 3; ++i) 1614 | pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); 1615 | float phongStrength = _TessPhongStrength; 1616 | o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; 1617 | #endif 1618 | UNITY_TRANSFER_INSTANCE_ID(patch[0], o); 1619 | return VertexFunction(o); 1620 | } 1621 | #else 1622 | VertexOutput vert ( VertexInput v ) 1623 | { 1624 | return VertexFunction( v ); 1625 | } 1626 | #endif 1627 | 1628 | half4 frag(VertexOutput IN ) : SV_TARGET 1629 | { 1630 | UNITY_SETUP_INSTANCE_ID( IN ); 1631 | UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); 1632 | 1633 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 1634 | float3 WorldPosition = IN.worldPos; 1635 | #endif 1636 | float4 ShadowCoords = float4( 0, 0, 0, 0 ); 1637 | 1638 | #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 1639 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) 1640 | ShadowCoords = IN.shadowCoord; 1641 | #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) 1642 | ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); 1643 | #endif 1644 | #endif 1645 | 1646 | 1647 | 1648 | float3 Albedo = float3(0.5, 0.5, 0.5); 1649 | float Alpha = 1; 1650 | float AlphaClipThreshold = 0.5; 1651 | 1652 | half4 color = half4( Albedo, Alpha ); 1653 | 1654 | #ifdef _ALPHATEST_ON 1655 | clip(Alpha - AlphaClipThreshold); 1656 | #endif 1657 | 1658 | return color; 1659 | } 1660 | ENDHLSL 1661 | } 1662 | 1663 | 1664 | Pass 1665 | { 1666 | 1667 | Name "DepthNormals" 1668 | Tags { "LightMode"="DepthNormals" } 1669 | 1670 | ZWrite On 1671 | Blend One Zero 1672 | ZTest LEqual 1673 | ZWrite On 1674 | 1675 | HLSLPROGRAM 1676 | #define _NORMAL_DROPOFF_TS 1 1677 | #pragma multi_compile_instancing 1678 | #pragma multi_compile _ LOD_FADE_CROSSFADE 1679 | #pragma multi_compile_fog 1680 | #define ASE_FOG 1 1681 | #define _EMISSION 1682 | #define ASE_SRP_VERSION 100302 1683 | 1684 | #pragma prefer_hlslcc gles 1685 | #pragma exclude_renderers d3d11_9x 1686 | 1687 | #pragma vertex vert 1688 | #pragma fragment frag 1689 | 1690 | #define SHADERPASS_DEPTHNORMALSONLY 1691 | 1692 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" 1693 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" 1694 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" 1695 | #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" 1696 | 1697 | 1698 | 1699 | struct VertexInput 1700 | { 1701 | float4 vertex : POSITION; 1702 | float3 ase_normal : NORMAL; 1703 | 1704 | UNITY_VERTEX_INPUT_INSTANCE_ID 1705 | }; 1706 | 1707 | struct VertexOutput 1708 | { 1709 | float4 clipPos : SV_POSITION; 1710 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 1711 | float3 worldPos : TEXCOORD0; 1712 | #endif 1713 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 1714 | float4 shadowCoord : TEXCOORD1; 1715 | #endif 1716 | float3 worldNormal : TEXCOORD2; 1717 | 1718 | UNITY_VERTEX_INPUT_INSTANCE_ID 1719 | UNITY_VERTEX_OUTPUT_STEREO 1720 | }; 1721 | 1722 | CBUFFER_START(UnityPerMaterial) 1723 | float3 _Tiling; 1724 | #ifdef _TRANSMISSION_ASE 1725 | float _TransmissionShadow; 1726 | #endif 1727 | #ifdef _TRANSLUCENCY_ASE 1728 | float _TransStrength; 1729 | float _TransNormal; 1730 | float _TransScattering; 1731 | float _TransDirect; 1732 | float _TransAmbient; 1733 | float _TransShadow; 1734 | #endif 1735 | #ifdef TESSELLATION_ON 1736 | float _TessPhongStrength; 1737 | float _TessValue; 1738 | float _TessMin; 1739 | float _TessMax; 1740 | float _TessEdgeLength; 1741 | float _TessMaxDisp; 1742 | #endif 1743 | CBUFFER_END 1744 | 1745 | 1746 | 1747 | VertexOutput VertexFunction( VertexInput v ) 1748 | { 1749 | VertexOutput o = (VertexOutput)0; 1750 | UNITY_SETUP_INSTANCE_ID(v); 1751 | UNITY_TRANSFER_INSTANCE_ID(v, o); 1752 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 1753 | 1754 | 1755 | #ifdef ASE_ABSOLUTE_VERTEX_POS 1756 | float3 defaultVertexValue = v.vertex.xyz; 1757 | #else 1758 | float3 defaultVertexValue = float3(0, 0, 0); 1759 | #endif 1760 | float3 vertexValue = defaultVertexValue; 1761 | #ifdef ASE_ABSOLUTE_VERTEX_POS 1762 | v.vertex.xyz = vertexValue; 1763 | #else 1764 | v.vertex.xyz += vertexValue; 1765 | #endif 1766 | 1767 | v.ase_normal = v.ase_normal; 1768 | float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); 1769 | float3 normalWS = TransformObjectToWorldNormal( v.ase_normal ); 1770 | float4 positionCS = TransformWorldToHClip( positionWS ); 1771 | 1772 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 1773 | o.worldPos = positionWS; 1774 | #endif 1775 | 1776 | o.worldNormal = normalWS; 1777 | 1778 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 1779 | VertexPositionInputs vertexInput = (VertexPositionInputs)0; 1780 | vertexInput.positionWS = positionWS; 1781 | vertexInput.positionCS = positionCS; 1782 | o.shadowCoord = GetShadowCoord( vertexInput ); 1783 | #endif 1784 | o.clipPos = positionCS; 1785 | return o; 1786 | } 1787 | 1788 | #if defined(TESSELLATION_ON) 1789 | struct VertexControl 1790 | { 1791 | float4 vertex : INTERNALTESSPOS; 1792 | float3 ase_normal : NORMAL; 1793 | 1794 | UNITY_VERTEX_INPUT_INSTANCE_ID 1795 | }; 1796 | 1797 | struct TessellationFactors 1798 | { 1799 | float edge[3] : SV_TessFactor; 1800 | float inside : SV_InsideTessFactor; 1801 | }; 1802 | 1803 | VertexControl vert ( VertexInput v ) 1804 | { 1805 | VertexControl o; 1806 | UNITY_SETUP_INSTANCE_ID(v); 1807 | UNITY_TRANSFER_INSTANCE_ID(v, o); 1808 | o.vertex = v.vertex; 1809 | o.ase_normal = v.ase_normal; 1810 | 1811 | return o; 1812 | } 1813 | 1814 | TessellationFactors TessellationFunction (InputPatch v) 1815 | { 1816 | TessellationFactors o; 1817 | float4 tf = 1; 1818 | float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; 1819 | float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; 1820 | #if defined(ASE_FIXED_TESSELLATION) 1821 | tf = FixedTess( tessValue ); 1822 | #elif defined(ASE_DISTANCE_TESSELLATION) 1823 | tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); 1824 | #elif defined(ASE_LENGTH_TESSELLATION) 1825 | tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); 1826 | #elif defined(ASE_LENGTH_CULL_TESSELLATION) 1827 | tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); 1828 | #endif 1829 | o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; 1830 | return o; 1831 | } 1832 | 1833 | [domain("tri")] 1834 | [partitioning("fractional_odd")] 1835 | [outputtopology("triangle_cw")] 1836 | [patchconstantfunc("TessellationFunction")] 1837 | [outputcontrolpoints(3)] 1838 | VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) 1839 | { 1840 | return patch[id]; 1841 | } 1842 | 1843 | [domain("tri")] 1844 | VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) 1845 | { 1846 | VertexInput o = (VertexInput) 0; 1847 | o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; 1848 | o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; 1849 | 1850 | #if defined(ASE_PHONG_TESSELLATION) 1851 | float3 pp[3]; 1852 | for (int i = 0; i < 3; ++i) 1853 | pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); 1854 | float phongStrength = _TessPhongStrength; 1855 | o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; 1856 | #endif 1857 | UNITY_TRANSFER_INSTANCE_ID(patch[0], o); 1858 | return VertexFunction(o); 1859 | } 1860 | #else 1861 | VertexOutput vert ( VertexInput v ) 1862 | { 1863 | return VertexFunction( v ); 1864 | } 1865 | #endif 1866 | 1867 | #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) 1868 | #define ASE_SV_DEPTH SV_DepthLessEqual 1869 | #else 1870 | #define ASE_SV_DEPTH SV_Depth 1871 | #endif 1872 | half4 frag( VertexOutput IN 1873 | #ifdef ASE_DEPTH_WRITE_ON 1874 | ,out float outputDepth : ASE_SV_DEPTH 1875 | #endif 1876 | ) : SV_TARGET 1877 | { 1878 | UNITY_SETUP_INSTANCE_ID(IN); 1879 | UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN ); 1880 | 1881 | #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) 1882 | float3 WorldPosition = IN.worldPos; 1883 | #endif 1884 | float4 ShadowCoords = float4( 0, 0, 0, 0 ); 1885 | 1886 | #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS) 1887 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) 1888 | ShadowCoords = IN.shadowCoord; 1889 | #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) 1890 | ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); 1891 | #endif 1892 | #endif 1893 | 1894 | 1895 | float Alpha = 1; 1896 | float AlphaClipThreshold = 0.5; 1897 | #ifdef ASE_DEPTH_WRITE_ON 1898 | float DepthValue = 0; 1899 | #endif 1900 | 1901 | #ifdef _ALPHATEST_ON 1902 | clip(Alpha - AlphaClipThreshold); 1903 | #endif 1904 | 1905 | #ifdef LOD_FADE_CROSSFADE 1906 | LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); 1907 | #endif 1908 | 1909 | #ifdef ASE_DEPTH_WRITE_ON 1910 | outputDepth = DepthValue; 1911 | #endif 1912 | 1913 | return float4(PackNormalOctRectEncode(TransformWorldToViewDir(IN.worldNormal, true)), 0.0, 0.0); 1914 | } 1915 | ENDHLSL 1916 | } 1917 | 1918 | 1919 | Pass 1920 | { 1921 | 1922 | Name "GBuffer" 1923 | Tags { "LightMode"="UniversalGBuffer" } 1924 | 1925 | Blend One Zero, One Zero 1926 | ZWrite On 1927 | ZTest LEqual 1928 | Offset 0 , 0 1929 | ColorMask RGBA 1930 | 1931 | 1932 | HLSLPROGRAM 1933 | #define _NORMAL_DROPOFF_TS 1 1934 | #pragma multi_compile_instancing 1935 | #pragma multi_compile _ LOD_FADE_CROSSFADE 1936 | #pragma multi_compile_fog 1937 | #define ASE_FOG 1 1938 | #define _EMISSION 1939 | #define ASE_SRP_VERSION 100302 1940 | 1941 | #pragma prefer_hlslcc gles 1942 | #pragma exclude_renderers d3d11_9x 1943 | 1944 | #pragma multi_compile _ _MAIN_LIGHT_SHADOWS 1945 | #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE 1946 | #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS 1947 | #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS 1948 | #pragma multi_compile _ _SHADOWS_SOFT 1949 | #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE 1950 | #pragma multi_compile _ _GBUFFER_NORMALS_OCT 1951 | 1952 | #pragma multi_compile _ DIRLIGHTMAP_COMBINED 1953 | #pragma multi_compile _ LIGHTMAP_ON 1954 | 1955 | #pragma vertex vert 1956 | #pragma fragment frag 1957 | 1958 | #define SHADERPASS SHADERPASS_GBUFFER 1959 | 1960 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" 1961 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" 1962 | #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" 1963 | #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl" 1964 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" 1965 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/UnityGBuffer.hlsl" 1966 | 1967 | #if ASE_SRP_VERSION <= 70108 1968 | #define REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR 1969 | #endif 1970 | 1971 | #if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL) 1972 | #define ENABLE_TERRAIN_PERPIXEL_NORMAL 1973 | #endif 1974 | 1975 | #define ASE_NEEDS_FRAG_SCREEN_POSITION 1976 | #define ASE_NEEDS_FRAG_WORLD_NORMAL 1977 | #define ASE_NEEDS_FRAG_WORLD_POSITION 1978 | #define ASE_NEEDS_FRAG_SHADOWCOORDS 1979 | 1980 | 1981 | struct VertexInput 1982 | { 1983 | float4 vertex : POSITION; 1984 | float3 ase_normal : NORMAL; 1985 | float4 ase_tangent : TANGENT; 1986 | float4 texcoord1 : TEXCOORD1; 1987 | float4 texcoord : TEXCOORD0; 1988 | 1989 | UNITY_VERTEX_INPUT_INSTANCE_ID 1990 | }; 1991 | 1992 | struct VertexOutput 1993 | { 1994 | float4 clipPos : SV_POSITION; 1995 | float4 lightmapUVOrVertexSH : TEXCOORD0; 1996 | half4 fogFactorAndVertexLight : TEXCOORD1; 1997 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) 1998 | float4 shadowCoord : TEXCOORD2; 1999 | #endif 2000 | float4 tSpace0 : TEXCOORD3; 2001 | float4 tSpace1 : TEXCOORD4; 2002 | float4 tSpace2 : TEXCOORD5; 2003 | #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION) 2004 | float4 screenPos : TEXCOORD6; 2005 | #endif 2006 | 2007 | UNITY_VERTEX_INPUT_INSTANCE_ID 2008 | UNITY_VERTEX_OUTPUT_STEREO 2009 | }; 2010 | 2011 | CBUFFER_START(UnityPerMaterial) 2012 | float3 _Tiling; 2013 | #ifdef _TRANSMISSION_ASE 2014 | float _TransmissionShadow; 2015 | #endif 2016 | #ifdef _TRANSLUCENCY_ASE 2017 | float _TransStrength; 2018 | float _TransNormal; 2019 | float _TransScattering; 2020 | float _TransDirect; 2021 | float _TransAmbient; 2022 | float _TransShadow; 2023 | #endif 2024 | #ifdef TESSELLATION_ON 2025 | float _TessPhongStrength; 2026 | float _TessValue; 2027 | float _TessMin; 2028 | float _TessMax; 2029 | float _TessEdgeLength; 2030 | float _TessMaxDisp; 2031 | #endif 2032 | CBUFFER_END 2033 | sampler2D _HatchTexture; 2034 | 2035 | 2036 | 2037 | VertexOutput VertexFunction( VertexInput v ) 2038 | { 2039 | VertexOutput o = (VertexOutput)0; 2040 | UNITY_SETUP_INSTANCE_ID(v); 2041 | UNITY_TRANSFER_INSTANCE_ID(v, o); 2042 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 2043 | 2044 | 2045 | #ifdef ASE_ABSOLUTE_VERTEX_POS 2046 | float3 defaultVertexValue = v.vertex.xyz; 2047 | #else 2048 | float3 defaultVertexValue = float3(0, 0, 0); 2049 | #endif 2050 | float3 vertexValue = defaultVertexValue; 2051 | #ifdef ASE_ABSOLUTE_VERTEX_POS 2052 | v.vertex.xyz = vertexValue; 2053 | #else 2054 | v.vertex.xyz += vertexValue; 2055 | #endif 2056 | v.ase_normal = v.ase_normal; 2057 | 2058 | float3 positionWS = TransformObjectToWorld( v.vertex.xyz ); 2059 | float3 positionVS = TransformWorldToView( positionWS ); 2060 | float4 positionCS = TransformWorldToHClip( positionWS ); 2061 | 2062 | VertexNormalInputs normalInput = GetVertexNormalInputs( v.ase_normal, v.ase_tangent ); 2063 | 2064 | o.tSpace0 = float4( normalInput.normalWS, positionWS.x); 2065 | o.tSpace1 = float4( normalInput.tangentWS, positionWS.y); 2066 | o.tSpace2 = float4( normalInput.bitangentWS, positionWS.z); 2067 | 2068 | OUTPUT_LIGHTMAP_UV( v.texcoord1, unity_LightmapST, o.lightmapUVOrVertexSH.xy ); 2069 | OUTPUT_SH( normalInput.normalWS.xyz, o.lightmapUVOrVertexSH.xyz ); 2070 | 2071 | #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) 2072 | o.lightmapUVOrVertexSH.zw = v.texcoord; 2073 | o.lightmapUVOrVertexSH.xy = v.texcoord * unity_LightmapST.xy + unity_LightmapST.zw; 2074 | #endif 2075 | 2076 | half3 vertexLight = VertexLighting( positionWS, normalInput.normalWS ); 2077 | #ifdef ASE_FOG 2078 | half fogFactor = ComputeFogFactor( positionCS.z ); 2079 | #else 2080 | half fogFactor = 0; 2081 | #endif 2082 | o.fogFactorAndVertexLight = half4(fogFactor, vertexLight); 2083 | 2084 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) 2085 | VertexPositionInputs vertexInput = (VertexPositionInputs)0; 2086 | vertexInput.positionWS = positionWS; 2087 | vertexInput.positionCS = positionCS; 2088 | o.shadowCoord = GetShadowCoord( vertexInput ); 2089 | #endif 2090 | 2091 | o.clipPos = positionCS; 2092 | #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION) 2093 | o.screenPos = ComputeScreenPos(positionCS); 2094 | #endif 2095 | return o; 2096 | } 2097 | 2098 | #if defined(TESSELLATION_ON) 2099 | struct VertexControl 2100 | { 2101 | float4 vertex : INTERNALTESSPOS; 2102 | float3 ase_normal : NORMAL; 2103 | float4 ase_tangent : TANGENT; 2104 | float4 texcoord : TEXCOORD0; 2105 | float4 texcoord1 : TEXCOORD1; 2106 | 2107 | UNITY_VERTEX_INPUT_INSTANCE_ID 2108 | }; 2109 | 2110 | struct TessellationFactors 2111 | { 2112 | float edge[3] : SV_TessFactor; 2113 | float inside : SV_InsideTessFactor; 2114 | }; 2115 | 2116 | VertexControl vert ( VertexInput v ) 2117 | { 2118 | VertexControl o; 2119 | UNITY_SETUP_INSTANCE_ID(v); 2120 | UNITY_TRANSFER_INSTANCE_ID(v, o); 2121 | o.vertex = v.vertex; 2122 | o.ase_normal = v.ase_normal; 2123 | o.ase_tangent = v.ase_tangent; 2124 | o.texcoord = v.texcoord; 2125 | o.texcoord1 = v.texcoord1; 2126 | 2127 | return o; 2128 | } 2129 | 2130 | TessellationFactors TessellationFunction (InputPatch v) 2131 | { 2132 | TessellationFactors o; 2133 | float4 tf = 1; 2134 | float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; 2135 | float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; 2136 | #if defined(ASE_FIXED_TESSELLATION) 2137 | tf = FixedTess( tessValue ); 2138 | #elif defined(ASE_DISTANCE_TESSELLATION) 2139 | tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); 2140 | #elif defined(ASE_LENGTH_TESSELLATION) 2141 | tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); 2142 | #elif defined(ASE_LENGTH_CULL_TESSELLATION) 2143 | tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); 2144 | #endif 2145 | o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; 2146 | return o; 2147 | } 2148 | 2149 | [domain("tri")] 2150 | [partitioning("fractional_odd")] 2151 | [outputtopology("triangle_cw")] 2152 | [patchconstantfunc("TessellationFunction")] 2153 | [outputcontrolpoints(3)] 2154 | VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) 2155 | { 2156 | return patch[id]; 2157 | } 2158 | 2159 | [domain("tri")] 2160 | VertexOutput DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) 2161 | { 2162 | VertexInput o = (VertexInput) 0; 2163 | o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; 2164 | o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z; 2165 | o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z; 2166 | o.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; 2167 | o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; 2168 | 2169 | #if defined(ASE_PHONG_TESSELLATION) 2170 | float3 pp[3]; 2171 | for (int i = 0; i < 3; ++i) 2172 | pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal)); 2173 | float phongStrength = _TessPhongStrength; 2174 | o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; 2175 | #endif 2176 | UNITY_TRANSFER_INSTANCE_ID(patch[0], o); 2177 | return VertexFunction(o); 2178 | } 2179 | #else 2180 | VertexOutput vert ( VertexInput v ) 2181 | { 2182 | return VertexFunction( v ); 2183 | } 2184 | #endif 2185 | 2186 | #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) 2187 | #define ASE_SV_DEPTH SV_DepthLessEqual 2188 | #else 2189 | #define ASE_SV_DEPTH SV_Depth 2190 | #endif 2191 | FragmentOutput frag ( VertexOutput IN 2192 | #ifdef ASE_DEPTH_WRITE_ON 2193 | ,out float outputDepth : ASE_SV_DEPTH 2194 | #endif 2195 | ) 2196 | { 2197 | UNITY_SETUP_INSTANCE_ID(IN); 2198 | UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN); 2199 | 2200 | #ifdef LOD_FADE_CROSSFADE 2201 | LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x ); 2202 | #endif 2203 | 2204 | #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) 2205 | float2 sampleCoords = (IN.lightmapUVOrVertexSH.zw / _TerrainHeightmapRecipSize.zw + 0.5f) * _TerrainHeightmapRecipSize.xy; 2206 | float3 WorldNormal = TransformObjectToWorldNormal(normalize(SAMPLE_TEXTURE2D(_TerrainNormalmapTexture, sampler_TerrainNormalmapTexture, sampleCoords).rgb * 2 - 1)); 2207 | float3 WorldTangent = -cross(GetObjectToWorldMatrix()._13_23_33, WorldNormal); 2208 | float3 WorldBiTangent = cross(WorldNormal, -WorldTangent); 2209 | #else 2210 | float3 WorldNormal = normalize( IN.tSpace0.xyz ); 2211 | float3 WorldTangent = IN.tSpace1.xyz; 2212 | float3 WorldBiTangent = IN.tSpace2.xyz; 2213 | #endif 2214 | float3 WorldPosition = float3(IN.tSpace0.w,IN.tSpace1.w,IN.tSpace2.w); 2215 | float3 WorldViewDirection = _WorldSpaceCameraPos.xyz - WorldPosition; 2216 | float4 ShadowCoords = float4( 0, 0, 0, 0 ); 2217 | #if defined(ASE_NEEDS_FRAG_SCREEN_POSITION) 2218 | float4 ScreenPos = IN.screenPos; 2219 | #endif 2220 | 2221 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) 2222 | ShadowCoords = IN.shadowCoord; 2223 | #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) 2224 | ShadowCoords = TransformWorldToShadowCoord( WorldPosition ); 2225 | #endif 2226 | 2227 | WorldViewDirection = SafeNormalize( WorldViewDirection ); 2228 | 2229 | float4 ase_screenPosNorm = ScreenPos / ScreenPos.w; 2230 | ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; 2231 | float4 break12 = ase_screenPosNorm; 2232 | float2 appendResult4_g1 = (float2(break12.x , break12.y)); 2233 | float2 temp_output_17_0 = ( ( appendResult4_g1 * 4.0 ) / break12.w ); 2234 | float dotResult19 = dot( WorldNormal , _MainLightPosition.xyz ); 2235 | float ase_lightAtten = 0; 2236 | Light ase_lightAtten_mainLight = GetMainLight( ShadowCoords ); 2237 | ase_lightAtten = ase_lightAtten_mainLight.distanceAttenuation * ase_lightAtten_mainLight.shadowAttenuation; 2238 | float temp_output_24_0 = saturate( ( ( dotResult19 * ase_lightAtten ) * length( _MainLightColor.rgb ) ) ); 2239 | float lerpResult34 = lerp( tex2D( _HatchTexture, ( _Tiling.y * temp_output_17_0 ) ).g , tex2D( _HatchTexture, ( _Tiling.z * temp_output_17_0 ) ).b , temp_output_24_0); 2240 | float lerpResult35 = lerp( lerpResult34 , tex2D( _HatchTexture, ( _Tiling.x * temp_output_17_0 ) ).r , temp_output_24_0); 2241 | float3 temp_cast_0 = (saturate( lerpResult35 )).xxx; 2242 | 2243 | float3 Albedo = float3(0.5, 0.5, 0.5); 2244 | float3 Normal = float3(0, 0, 1); 2245 | float3 Emission = temp_cast_0; 2246 | float3 Specular = 0.5; 2247 | float Metallic = 0; 2248 | float Smoothness = 0.5; 2249 | float Occlusion = 1; 2250 | float Alpha = 1; 2251 | float AlphaClipThreshold = 0.5; 2252 | float AlphaClipThresholdShadow = 0.5; 2253 | float3 BakedGI = 0; 2254 | float3 RefractionColor = 1; 2255 | float RefractionIndex = 1; 2256 | float3 Transmission = 1; 2257 | float3 Translucency = 1; 2258 | #ifdef ASE_DEPTH_WRITE_ON 2259 | float DepthValue = 0; 2260 | #endif 2261 | 2262 | #ifdef _ALPHATEST_ON 2263 | clip(Alpha - AlphaClipThreshold); 2264 | #endif 2265 | 2266 | InputData inputData; 2267 | inputData.positionWS = WorldPosition; 2268 | inputData.viewDirectionWS = WorldViewDirection; 2269 | inputData.shadowCoord = ShadowCoords; 2270 | 2271 | #ifdef _NORMALMAP 2272 | #if _NORMAL_DROPOFF_TS 2273 | inputData.normalWS = TransformTangentToWorld(Normal, half3x3( WorldTangent, WorldBiTangent, WorldNormal )); 2274 | #elif _NORMAL_DROPOFF_OS 2275 | inputData.normalWS = TransformObjectToWorldNormal(Normal); 2276 | #elif _NORMAL_DROPOFF_WS 2277 | inputData.normalWS = Normal; 2278 | #endif 2279 | inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS); 2280 | #else 2281 | inputData.normalWS = WorldNormal; 2282 | #endif 2283 | 2284 | #ifdef ASE_FOG 2285 | inputData.fogCoord = IN.fogFactorAndVertexLight.x; 2286 | #endif 2287 | 2288 | inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw; 2289 | #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) 2290 | float3 SH = SampleSH(inputData.normalWS.xyz); 2291 | #else 2292 | float3 SH = IN.lightmapUVOrVertexSH.xyz; 2293 | #endif 2294 | 2295 | inputData.bakedGI = SAMPLE_GI( IN.lightmapUVOrVertexSH.xy, SH, inputData.normalWS ); 2296 | #ifdef _ASE_BAKEDGI 2297 | inputData.bakedGI = BakedGI; 2298 | #endif 2299 | 2300 | BRDFData brdfData; 2301 | InitializeBRDFData( Albedo, Metallic, Specular, Smoothness, Alpha, brdfData); 2302 | half4 color; 2303 | color.rgb = GlobalIllumination( brdfData, inputData.bakedGI, Occlusion, inputData.normalWS, inputData.viewDirectionWS); 2304 | color.a = Alpha; 2305 | 2306 | #ifdef _TRANSMISSION_ASE 2307 | { 2308 | float shadow = _TransmissionShadow; 2309 | 2310 | Light mainLight = GetMainLight( inputData.shadowCoord ); 2311 | float3 mainAtten = mainLight.color * mainLight.distanceAttenuation; 2312 | mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow ); 2313 | half3 mainTransmission = max(0 , -dot(inputData.normalWS, mainLight.direction)) * mainAtten * Transmission; 2314 | color.rgb += Albedo * mainTransmission; 2315 | 2316 | #ifdef _ADDITIONAL_LIGHTS 2317 | int transPixelLightCount = GetAdditionalLightsCount(); 2318 | for (int i = 0; i < transPixelLightCount; ++i) 2319 | { 2320 | Light light = GetAdditionalLight(i, inputData.positionWS); 2321 | float3 atten = light.color * light.distanceAttenuation; 2322 | atten = lerp( atten, atten * light.shadowAttenuation, shadow ); 2323 | 2324 | half3 transmission = max(0 , -dot(inputData.normalWS, light.direction)) * atten * Transmission; 2325 | color.rgb += Albedo * transmission; 2326 | } 2327 | #endif 2328 | } 2329 | #endif 2330 | 2331 | #ifdef _TRANSLUCENCY_ASE 2332 | { 2333 | float shadow = _TransShadow; 2334 | float normal = _TransNormal; 2335 | float scattering = _TransScattering; 2336 | float direct = _TransDirect; 2337 | float ambient = _TransAmbient; 2338 | float strength = _TransStrength; 2339 | 2340 | Light mainLight = GetMainLight( inputData.shadowCoord ); 2341 | float3 mainAtten = mainLight.color * mainLight.distanceAttenuation; 2342 | mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow ); 2343 | 2344 | half3 mainLightDir = mainLight.direction + inputData.normalWS * normal; 2345 | half mainVdotL = pow( saturate( dot( inputData.viewDirectionWS, -mainLightDir ) ), scattering ); 2346 | half3 mainTranslucency = mainAtten * ( mainVdotL * direct + inputData.bakedGI * ambient ) * Translucency; 2347 | color.rgb += Albedo * mainTranslucency * strength; 2348 | 2349 | #ifdef _ADDITIONAL_LIGHTS 2350 | int transPixelLightCount = GetAdditionalLightsCount(); 2351 | for (int i = 0; i < transPixelLightCount; ++i) 2352 | { 2353 | Light light = GetAdditionalLight(i, inputData.positionWS); 2354 | float3 atten = light.color * light.distanceAttenuation; 2355 | atten = lerp( atten, atten * light.shadowAttenuation, shadow ); 2356 | 2357 | half3 lightDir = light.direction + inputData.normalWS * normal; 2358 | half VdotL = pow( saturate( dot( inputData.viewDirectionWS, -lightDir ) ), scattering ); 2359 | half3 translucency = atten * ( VdotL * direct + inputData.bakedGI * ambient ) * Translucency; 2360 | color.rgb += Albedo * translucency * strength; 2361 | } 2362 | #endif 2363 | } 2364 | #endif 2365 | 2366 | #ifdef _REFRACTION_ASE 2367 | float4 projScreenPos = ScreenPos / ScreenPos.w; 2368 | float3 refractionOffset = ( RefractionIndex - 1.0 ) * mul( UNITY_MATRIX_V, WorldNormal ).xyz * ( 1.0 - dot( WorldNormal, WorldViewDirection ) ); 2369 | projScreenPos.xy += refractionOffset.xy; 2370 | float3 refraction = SHADERGRAPH_SAMPLE_SCENE_COLOR( projScreenPos ) * RefractionColor; 2371 | color.rgb = lerp( refraction, color.rgb, color.a ); 2372 | color.a = 1; 2373 | #endif 2374 | 2375 | #ifdef ASE_FINAL_COLOR_ALPHA_MULTIPLY 2376 | color.rgb *= color.a; 2377 | #endif 2378 | 2379 | #ifdef ASE_FOG 2380 | #ifdef TERRAIN_SPLAT_ADDPASS 2381 | color.rgb = MixFogColor(color.rgb, half3( 0, 0, 0 ), IN.fogFactorAndVertexLight.x ); 2382 | #else 2383 | color.rgb = MixFog(color.rgb, IN.fogFactorAndVertexLight.x); 2384 | #endif 2385 | #endif 2386 | 2387 | #ifdef ASE_DEPTH_WRITE_ON 2388 | outputDepth = DepthValue; 2389 | #endif 2390 | 2391 | return BRDFDataToGbuffer(brdfData, inputData, Smoothness, Emission + color.rgb); 2392 | } 2393 | 2394 | ENDHLSL 2395 | } 2396 | 2397 | } 2398 | /*ase_lod*/ 2399 | CustomEditor "UnityEditor.ShaderGraph.PBRMasterGUI" 2400 | Fallback "Hidden/InternalErrorShader" 2401 | 2402 | } 2403 | /*ASEBEGIN 2404 | Version=18900 2405 | 1536.8;73.6;911.2;965;3058.23;971.8258;1.760552;True;False 2406 | Node;AmplifyShaderEditor.ScreenPosInputsNode;61;-2628.442,-382.86;Float;False;0;False;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 2407 | Node;AmplifyShaderEditor.BreakToComponentsNode;12;-2414.136,-371.5701;Inherit;True;FLOAT4;1;0;FLOAT4;0,0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15 2408 | Node;AmplifyShaderEditor.RangedFloatNode;16;-2075.277,-279.9718;Inherit;False;Constant;_Float0;Float 0;0;0;Create;True;0;0;0;False;0;False;4;0;0;0;0;1;FLOAT;0 2409 | Node;AmplifyShaderEditor.FunctionNode;14;-2173.277,-383.9718;Inherit;False;MakeFloat2;-1;;1;8fda03c5ec029854aa45bd33bc82e849;0;2;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT2;0 2410 | Node;AmplifyShaderEditor.WorldNormalVector;18;-1713.607,544.9077;Inherit;False;False;1;0;FLOAT3;0,0,1;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 2411 | Node;AmplifyShaderEditor.WorldSpaceLightDirHlpNode;10;-1718.714,727.5667;Inherit;False;False;1;0;FLOAT;0;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 2412 | Node;AmplifyShaderEditor.DotProductOpNode;19;-1435.661,572.7463;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0 2413 | Node;AmplifyShaderEditor.SimpleMultiplyOpNode;15;-1928.277,-379.9718;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 2414 | Node;AmplifyShaderEditor.LightAttenuation;8;-1692.074,999.9548;Inherit;False;0;1;FLOAT;0 2415 | Node;AmplifyShaderEditor.LightColorNode;9;-1680.714,869.5667;Inherit;False;0;3;COLOR;0;FLOAT3;1;FLOAT;2 2416 | Node;AmplifyShaderEditor.LengthOpNode;21;-1219.76,973.0026;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT;0 2417 | Node;AmplifyShaderEditor.Vector3Node;25;-1593.123,-538.5649;Inherit;False;Property;_Tiling;Tiling;1;0;Create;True;0;0;0;False;0;False;0,0,0;0,0,0;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 2418 | Node;AmplifyShaderEditor.SimpleMultiplyOpNode;20;-1204.004,703.5172;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 2419 | Node;AmplifyShaderEditor.SimpleDivideOpNode;17;-1738.277,-238.9718;Inherit;False;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 2420 | Node;AmplifyShaderEditor.SimpleMultiplyOpNode;28;-1339.5,-314.877;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 2421 | Node;AmplifyShaderEditor.SimpleMultiplyOpNode;22;-927.7599,862.0026;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 2422 | Node;AmplifyShaderEditor.SimpleMultiplyOpNode;29;-1341.5,-220.8769;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 2423 | Node;AmplifyShaderEditor.TexturePropertyNode;33;-1171.354,21.11322;Inherit;True;Property;_HatchTexture;HatchTexture;0;0;Create;True;0;0;0;False;0;False;None;None;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 2424 | Node;AmplifyShaderEditor.SamplerNode;32;-781.0523,22.48339;Inherit;True;Property;_TextureSample2;Texture Sample 2;2;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 2425 | Node;AmplifyShaderEditor.SamplerNode;31;-783.2623,-169.7834;Inherit;True;Property;_TextureSample1;Texture Sample 1;1;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 2426 | Node;AmplifyShaderEditor.SimpleMultiplyOpNode;27;-1339.123,-408.5649;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 2427 | Node;AmplifyShaderEditor.SaturateNode;24;-750.76,852.0026;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 2428 | Node;AmplifyShaderEditor.SamplerNode;30;-780.5507,-368.0919;Inherit;True;Property;_TextureSample0;Texture Sample 0;0;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 2429 | Node;AmplifyShaderEditor.LerpOp;34;-244.5632,463.9653;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 2430 | Node;AmplifyShaderEditor.LerpOp;35;24.74853,472.7375;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 2431 | Node;AmplifyShaderEditor.SaturateNode;37;257.6992,475.2905;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 2432 | Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;3;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;False;False;True;False;False;False;False;0;False;-1;False;False;False;False;False;False;False;False;False;True;1;False;-1;False;False;True;1;LightMode=DepthOnly;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 2433 | Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;2;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;-1;True;3;False;-1;False;True;1;LightMode=ShadowCaster;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 2434 | Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;4;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 2435 | Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;6;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;DepthNormals;0;6;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;True;1;1;False;-1;0;False;-1;0;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;-1;True;3;False;-1;False;True;1;LightMode=DepthNormals;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 2436 | Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;5;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;True;1;1;False;-1;0;False;-1;1;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;1;LightMode=Universal2D;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 2437 | Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;7;-1302.332,192.2906;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;GBuffer;0;7;GBuffer;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;True;1;1;False;-1;0;False;-1;1;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;1;LightMode=UniversalGBuffer;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 2438 | Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;-1302.332,192.2906;Float;False;False;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;True;1;1;False;-1;0;False;-1;0;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;True;True;True;True;0;False;-1;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;0;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 2439 | Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1;462.3939,428.4371;Float;False;True;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;2;Crosshatch;94348b07e5e8bab40bd6c8a1e3df54cd;True;Forward;0;1;Forward;18;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;0;0;False;True;1;1;False;-1;0;False;-1;1;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;1;LightMode=UniversalForward;False;0;Hidden/InternalErrorShader;0;0;Standard;38;Workflow;1;Surface;0; Refraction Model;0; Blend;0;Two Sided;1;Fragment Normal Space,InvertActionOnDeselection;0;Transmission;0; Transmission Shadow;0.5,False,-1;Translucency;0; Translucency Strength;1,False,-1; Normal Distortion;0.5,False,-1; Scattering;2,False,-1; Direct;0.9,False,-1; Ambient;0.1,False,-1; Shadow;0.5,False,-1;Cast Shadows;1; Use Shadow Threshold;0;Receive Shadows;1;GPU Instancing;1;LOD CrossFade;1;Built-in Fog;1;_FinalColorxAlpha;0;Meta Pass;1;Override Baked GI;0;Extra Pre Pass;0;DOTS Instancing;0;Tessellation;0; Phong;0; Strength;0.5,False,-1; Type;0; Tess;16,False,-1; Min;10,False,-1; Max;25,False,-1; Edge Length;16,False,-1; Max Displacement;25,False,-1;Write Depth;0; Early Z;0;Vertex Position,InvertActionOnDeselection;1;0;8;False;True;True;True;True;True;True;True;False;;False;0 2440 | WireConnection;12;0;61;0 2441 | WireConnection;14;1;12;0 2442 | WireConnection;14;2;12;1 2443 | WireConnection;19;0;18;0 2444 | WireConnection;19;1;10;0 2445 | WireConnection;15;0;14;0 2446 | WireConnection;15;1;16;0 2447 | WireConnection;21;0;9;1 2448 | WireConnection;20;0;19;0 2449 | WireConnection;20;1;8;0 2450 | WireConnection;17;0;15;0 2451 | WireConnection;17;1;12;3 2452 | WireConnection;28;0;25;2 2453 | WireConnection;28;1;17;0 2454 | WireConnection;22;0;20;0 2455 | WireConnection;22;1;21;0 2456 | WireConnection;29;0;25;3 2457 | WireConnection;29;1;17;0 2458 | WireConnection;32;0;33;0 2459 | WireConnection;32;1;29;0 2460 | WireConnection;31;0;33;0 2461 | WireConnection;31;1;28;0 2462 | WireConnection;27;0;25;1 2463 | WireConnection;27;1;17;0 2464 | WireConnection;24;0;22;0 2465 | WireConnection;30;0;33;0 2466 | WireConnection;30;1;27;0 2467 | WireConnection;34;0;31;2 2468 | WireConnection;34;1;32;3 2469 | WireConnection;34;2;24;0 2470 | WireConnection;35;0;34;0 2471 | WireConnection;35;1;30;1 2472 | WireConnection;35;2;24;0 2473 | WireConnection;37;0;35;0 2474 | WireConnection;1;2;37;0 2475 | ASEEND*/ 2476 | //CHKSM=40263BA30DCE80AB8C473F59EE7B0FFC8582ADB7 -------------------------------------------------------------------------------- /Shaders/Crosshatch.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ea2b8232fc25c949a2f55b553016bde 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Shaders/Crosshatch.shadergraph.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0aecc1365835be49b3a0ff4a3a7ee6c 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} 11 | -------------------------------------------------------------------------------- /Shaders/Functions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e60538e4669914840b665191a5ea398d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Shaders/Functions/LightInfo.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3} 13 | m_Name: LightInfo 14 | m_EditorClassIdentifier: 15 | m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity 16 | Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=18900\n0;21;2046;991;1023;495.5;1;True;False\nNode;AmplifyShaderEditor.FunctionOutput;0;0,0;Inherit;False;True;-1;Output;0;False;1;0;FLOAT;0;False;1;FLOAT;0\nASEEND*/\n//CHKSM=77842A3A643D8421EC97E880765B4E9F5E732F63" 17 | m_functionName: 18 | m_description: 19 | m_additionalIncludes: 20 | m_additionalIncludes: [] 21 | m_outsideIncludes: [] 22 | m_additionalPragmas: 23 | m_additionalPragmas: [] 24 | m_outsidePragmas: [] 25 | m_additionalDirectives: 26 | m_validData: 0 27 | m_isDirty: 0 28 | m_moduleName: ' Additional Directives' 29 | m_independentModule: 1 30 | m_customEdited: 0 31 | m_additionalDirectives: [] 32 | m_shaderFunctionDirectives: [] 33 | m_nativeDirectives: [] 34 | m_nativeDirectivesIndex: -1 35 | m_nativeDirectivesFoldout: 0 36 | m_directivesSaveItems: [] 37 | m_nodeCategory: 3 38 | m_customNodeCategory: 39 | m_previewPosition: 0 40 | m_hidden: 0 41 | -------------------------------------------------------------------------------- /Shaders/Functions/LightInfo.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64fb4d0c02bf43e49b478f3c3500bd63 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Shaders/Functions/MakeFloat2.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3} 13 | m_Name: MakeFloat2 14 | m_EditorClassIdentifier: 15 | m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity 16 | Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=18800\n0;73.6;986.2;1051;971.0172;645.2111;1;True;False\nNode;AmplifyShaderEditor.DynamicAppendNode;4;-223.5741,-9.19389;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.FunctionInput;2;-396.3104,52.16687;Inherit;False;Y;1;1;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionInput;1;-398.6809,-52.64807;Inherit;False;X;1;0;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionOutput;0;-61,-5;Inherit;False;True;-1;Output;0;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0\nWireConnection;4;0;1;0\nWireConnection;4;1;2;0\nWireConnection;0;0;4;0\nASEEND*/\n//CHKSM=F0138D8DB6845F8E0A0C16FA9843EA654495DD49" 17 | m_functionName: 18 | m_description: 19 | m_additionalIncludes: 20 | m_additionalIncludes: [] 21 | m_outsideIncludes: [] 22 | m_additionalPragmas: 23 | m_additionalPragmas: [] 24 | m_outsidePragmas: [] 25 | m_additionalDirectives: 26 | m_validData: 0 27 | m_isDirty: 0 28 | m_moduleName: ' Additional Directives' 29 | m_independentModule: 1 30 | m_additionalDirectives: [] 31 | m_shaderFunctionDirectives: [] 32 | m_nativeDirectives: [] 33 | m_nativeDirectivesIndex: -1 34 | m_nativeDirectivesFoldout: 0 35 | m_directivesSaveItems: [] 36 | m_nodeCategory: 3 37 | m_customNodeCategory: 38 | m_previewPosition: 0 39 | m_hidden: 0 40 | -------------------------------------------------------------------------------- /Shaders/Functions/MakeFloat2.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8fda03c5ec029854aa45bd33bc82e849 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Shaders/Functions/MakeFloat3.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3} 13 | m_Name: MakeFloat3 14 | m_EditorClassIdentifier: 15 | m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity 16 | Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=18800\n0;73.6;814.2;1050;857.4172;570.7111;1;True;False\nNode;AmplifyShaderEditor.DynamicAppendNode;4;-223.5741,-9.19389;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.FunctionInput;2;-390.3104,28.16687;Inherit;False;Y;1;1;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionInput;1;-390.6809,-45.64807;Inherit;False;X;1;0;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionInput;5;-385.4172,110.2889;Inherit;False;Z;1;2;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionOutput;0;-61,-5;Inherit;False;True;-1;Output;0;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nWireConnection;4;0;1;0\nWireConnection;4;1;2;0\nWireConnection;4;2;5;0\nWireConnection;0;0;4;0\nASEEND*/\n//CHKSM=E599EE5C4D65F45F83C02C64F7330D8A31E86EC3" 17 | m_functionName: 18 | m_description: 19 | m_additionalIncludes: 20 | m_additionalIncludes: [] 21 | m_outsideIncludes: [] 22 | m_additionalPragmas: 23 | m_additionalPragmas: [] 24 | m_outsidePragmas: [] 25 | m_additionalDirectives: 26 | m_validData: 0 27 | m_isDirty: 0 28 | m_moduleName: ' Additional Directives' 29 | m_independentModule: 1 30 | m_additionalDirectives: [] 31 | m_shaderFunctionDirectives: [] 32 | m_nativeDirectives: [] 33 | m_nativeDirectivesIndex: -1 34 | m_nativeDirectivesFoldout: 0 35 | m_directivesSaveItems: [] 36 | m_nodeCategory: 3 37 | m_customNodeCategory: 38 | m_previewPosition: 0 39 | m_hidden: 0 40 | -------------------------------------------------------------------------------- /Shaders/Functions/MakeFloat3.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a05f6eaacfe6e4345a894064a8da7cc0 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Shaders/Regular.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Regular 11 | m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: 2000 17 | stringTagMap: 18 | RenderType: Opaque 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BaseMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _BumpMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailAlbedoMap: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailMask: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _DetailNormalMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _EmissionMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MainTex: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _MetallicGlossMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _OcclusionMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _ParallaxMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _SpecGlossMap: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - unity_Lightmaps: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - unity_LightmapsInd: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | - unity_ShadowMasks: 76 | m_Texture: {fileID: 0} 77 | m_Scale: {x: 1, y: 1} 78 | m_Offset: {x: 0, y: 0} 79 | m_Floats: 80 | - _AlphaClip: 0 81 | - _AlphaCutoff: 0.5 82 | - _Blend: 0 83 | - _BumpScale: 1 84 | - _ClearCoatMask: 0 85 | - _ClearCoatSmoothness: 0 86 | - _Cull: 2 87 | - _Cutoff: 0.5 88 | - _DetailAlbedoMapScale: 1 89 | - _DetailNormalMapScale: 1 90 | - _DstBlend: 0 91 | - _EnvironmentReflections: 1 92 | - _GlossMapScale: 0 93 | - _Glossiness: 0 94 | - _GlossyReflections: 0 95 | - _Metallic: 0 96 | - _OcclusionStrength: 1 97 | - _Parallax: 0.005 98 | - _QueueOffset: 0 99 | - _ReceiveShadows: 1 100 | - _Smoothness: 0.5 101 | - _SmoothnessTextureChannel: 0 102 | - _SpecularHighlights: 1 103 | - _SrcBlend: 1 104 | - _Surface: 0 105 | - _WorkflowMode: 1 106 | - _ZWrite: 1 107 | m_Colors: 108 | - _BaseColor: {r: 1, g: 1, b: 1, a: 1} 109 | - _Color: {r: 1, g: 1, b: 1, a: 1} 110 | - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} 111 | - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} 112 | m_BuildTextureStacks: [] 113 | --- !u!114 &8471529590906833404 114 | MonoBehaviour: 115 | m_ObjectHideFlags: 11 116 | m_CorrespondingSourceObject: {fileID: 0} 117 | m_PrefabInstance: {fileID: 0} 118 | m_PrefabAsset: {fileID: 0} 119 | m_GameObject: {fileID: 0} 120 | m_Enabled: 1 121 | m_EditorHideFlags: 0 122 | m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} 123 | m_Name: 124 | m_EditorClassIdentifier: 125 | version: 4 126 | -------------------------------------------------------------------------------- /Shaders/Regular.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4ebcd6a41bc4304ca6532529be216f6 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | --------------------------------------------------------------------------------