chore: add MarrowSDK plugin

Signed-off-by: Jo <johannesreckers2006@gmail.com>
This commit is contained in:
Jo 2024-08-07 01:40:32 +02:00
parent 64de674738
commit 5eb961ae8a
119 changed files with 40706 additions and 0 deletions

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ddd48b4097b0b2b4a9e2624e21715d1a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,182 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 468a46d0ae32c3544b7d98094e6448a9, type: 3}
m_Name: AddressableAssetSettings
m_EditorClassIdentifier:
m_DefaultGroup: 4d882dacb0cf54c449d94345cde2d533
m_currentHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 0
m_BundleLocalCatalog: 0
m_CatalogRequestsTimeout: 0
m_DisableCatalogUpdateOnStart: 0
m_IgnoreUnsupportedFilesInBuild: 1
m_UniqueBundleIds: 0
m_NonRecursiveBuilding: 1
m_CCDEnabled: 0
m_maxConcurrentWebRequests: 3
m_ContiguousBundles: 1
m_StripUnityVersionFromBundleBuild: 0
m_DisableVisibleSubAssetRepresentations: 0
m_ShaderBundleNaming: 2
m_ShaderBundleCustomNaming: PALLET_NAME_HERE
m_MonoScriptBundleNaming: 3
m_CheckForContentUpdateRestrictionsOption: 0
m_MonoScriptBundleCustomNaming: MARROW
m_RemoteCatalogBuildPath:
m_Id: f03d2a55457fa6e4f8d499c42217628e
m_RemoteCatalogLoadPath:
m_Id: c379e54b5a3413b4e95ede99b7df5856
m_ContentStateBuildPathProfileVariableName: <default settings path>
m_CustomContentStateBuildPath:
m_ContentStateBuildPath:
m_BuildAddressablesWithPlayerBuild: 2
m_overridePlayerVersion:
m_GroupAssets:
- {fileID: 11400000, guid: 8b5ee8ae1bae6794692e05c65f209650, type: 2}
m_BuildSettings:
m_CompileScriptsInVirtualMode: 0
m_CleanupStreamingAssetsAfterBuilds: 1
m_LogResourceManagerExceptions: 1
m_BundleBuildPath: Temp/com.unity.addressables/AssetBundles
m_ProfileSettings:
m_Profiles:
- m_InheritedParent:
m_Id: 2056c22079b11ce478d338f3f85afa99
m_ProfileName: Default
m_Values:
- m_Id: 4b5be2a9894728a48b3be114e9cab1d3
m_Value: '[UnityEditor.EditorUserBuildSettings.activeBuildTarget]'
- m_Id: cd46b6cc1cd9bb3468de6ffa0c95ecc0
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
- m_Id: f61512461f3fbb64bb882a6af52b8090
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
- m_Id: f03d2a55457fa6e4f8d499c42217628e
m_Value: ServerData/[BuildTarget]
- m_Id: c379e54b5a3413b4e95ede99b7df5856
m_Value: http://[PrivateIpAddress]:[HostingServicePort]
- m_Id: a55fd1d1cc0e2c54f8fc99fd45a015b6
m_Value: ~PALLETBARCODE~
- m_Id: ba16486fe6f55fd4fbf595bcaa8301dc
m_Value: 'PALLET_BARCODE:[PalletBarcode]:'
- m_Id: 8f6c7444a8c35a84aa1f5afd15b7b68c
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
- m_Id: f8725ba8ca4660e4a9c94c64ccb97536
m_Value: '[SLZ.Marrow.MarrowSDK.BUILT_PALLETS_NAME]'
- m_Id: f97bbac1d358e3b47a31bd05dd60fd33
m_Value: '[PalletBuildPath]/[UnityEditor.EditorUserBuildSettings.activeBuildTarget]/[PalletBarcode]'
- m_Id: d936b3f7b661e3b4eac88aca85467faa
m_Value: '[PalletLoadPath]'
- m_Id: 2023158ce820b5e46b6902e85fc5ddda
m_Value: '[GameBuildPath]'
- m_Id: 641fa520f0cf9104eb3a4973a1e9aea2
m_Value: '[PalletLoadPath]'
- m_InheritedParent:
m_Id: fbad295727b3dec49ba750485b9465e7
m_ProfileName: Pallets
m_Values:
- m_Id: 4b5be2a9894728a48b3be114e9cab1d3
m_Value: '[UnityEditor.EditorUserBuildSettings.activeBuildTarget]'
- m_Id: cd46b6cc1cd9bb3468de6ffa0c95ecc0
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
- m_Id: f61512461f3fbb64bb882a6af52b8090
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
- m_Id: f03d2a55457fa6e4f8d499c42217628e
m_Value: ServerData/[BuildTarget]
- m_Id: c379e54b5a3413b4e95ede99b7df5856
m_Value: http://[PrivateIpAddress]:[HostingServicePort]
- m_Id: a55fd1d1cc0e2c54f8fc99fd45a015b6
m_Value: ~PALLETBARCODE~
- m_Id: ba16486fe6f55fd4fbf595bcaa8301dc
m_Value: 'PALLET_BARCODE:[PalletBarcode]:'
- m_Id: 8f6c7444a8c35a84aa1f5afd15b7b68c
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
- m_Id: f8725ba8ca4660e4a9c94c64ccb97536
m_Value: '[SLZ.Marrow.MarrowSDK.BUILT_PALLETS_NAME]'
- m_Id: f97bbac1d358e3b47a31bd05dd60fd33
m_Value: '[PalletBuildPath]/[UnityEditor.EditorUserBuildSettings.activeBuildTarget]/[PalletBarcode]'
- m_Id: d936b3f7b661e3b4eac88aca85467faa
m_Value: '[PalletLoadPath]'
- m_Id: 2023158ce820b5e46b6902e85fc5ddda
m_Value: '[GameBuildPath]'
- m_Id: 641fa520f0cf9104eb3a4973a1e9aea2
m_Value: '[PalletLoadPath]'
m_ProfileEntryNames:
- m_Id: 4b5be2a9894728a48b3be114e9cab1d3
m_Name: BuildTarget
m_InlineUsage: 0
- m_Id: cd46b6cc1cd9bb3468de6ffa0c95ecc0
m_Name: Local.BuildPath
m_InlineUsage: 0
- m_Id: f61512461f3fbb64bb882a6af52b8090
m_Name: Local.LoadPath
m_InlineUsage: 0
- m_Id: f03d2a55457fa6e4f8d499c42217628e
m_Name: Remote.BuildPath
m_InlineUsage: 0
- m_Id: c379e54b5a3413b4e95ede99b7df5856
m_Name: Remote.LoadPath
m_InlineUsage: 0
- m_Id: a55fd1d1cc0e2c54f8fc99fd45a015b6
m_Name: PalletBarcode
m_InlineUsage: 0
- m_Id: ba16486fe6f55fd4fbf595bcaa8301dc
m_Name: PalletLoadPath
m_InlineUsage: 0
- m_Id: 8f6c7444a8c35a84aa1f5afd15b7b68c
m_Name: GameBuildPath
m_InlineUsage: 0
- m_Id: f8725ba8ca4660e4a9c94c64ccb97536
m_Name: PalletBuildPath
m_InlineUsage: 0
- m_Id: f97bbac1d358e3b47a31bd05dd60fd33
m_Name: Pallet.BuildPath
m_InlineUsage: 0
- m_Id: d936b3f7b661e3b4eac88aca85467faa
m_Name: Pallet.LoadPath
m_InlineUsage: 0
- m_Id: 2023158ce820b5e46b6902e85fc5ddda
m_Name: Game Pallet.BuildPath
m_InlineUsage: 0
- m_Id: 641fa520f0cf9104eb3a4973a1e9aea2
m_Name: Game Pallet.LoadPath
m_InlineUsage: 0
m_ProfileVersion: 1
m_LabelTable:
m_LabelNames:
- default
m_SchemaTemplates: []
m_GroupTemplateObjects:
- {fileID: 11400000, guid: 63c989be4f767464bbd2d29f27316786, type: 2}
- {fileID: 11400000, guid: 76efe2a1ad2f9f24fb9b02f794fd974d, type: 2}
- {fileID: 11400000, guid: af5933cee8a8f9140889c4a0a669a67d, type: 2}
m_InitializationObjects: []
m_CertificateHandlerType:
m_AssemblyName:
m_ClassName:
m_ActivePlayerDataBuilderIndex: 4
m_DataBuilders:
- {fileID: 11400000, guid: 3aaba9eb0090cbd43bda0b87dae007ad, type: 2}
- {fileID: 11400000, guid: 2cf32c6dca5c3814aa682f35cb5afdb1, type: 2}
- {fileID: 11400000, guid: 70bd1540f4e4b0f4fa920d3ba706e290, type: 2}
- {fileID: 11400000, guid: 529af1d9b97831944b46774fd6d973d0, type: 2}
- {fileID: 11400000, guid: d2953db3a3b7d444b88a0af7383ae15b, type: 2}
- {fileID: 11400000, guid: 53d1aec21bc407e46951276825cdb752, type: 2}
m_ActiveProfileId: fbad295727b3dec49ba750485b9465e7
m_HostingServicesManager:
m_HostingServiceInfos: []
m_Settings: {fileID: 0}
m_NextInstanceId: 0
m_RegisteredServiceTypeRefs: []
m_PingTimeoutInMilliseconds: 5000

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c71f1176531903748ae728e24f577c88
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a189bb168d8d90478a09ea08c2f3d72, type: 3}
m_Name: DefaultObject
m_EditorClassIdentifier:
m_AddressableAssetSettingsGuid: c71f1176531903748ae728e24f577c88

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5d3b04119e4ec0946b0ce1ca71f2e9b7
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

8
Assets/SLZShaders.meta Normal file
View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 074f63f6bee531747b8047d59069bad1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,39 @@
e95b31b7241745c479b6b9574209d1f9
6bf3d81d08a4ff343b22619a187bb249
4c21875978f9ed04d9edcf6d97e9ed54
b2e867ce46fe95046aaceb0155a651ad
f71cd8ed99405284ab09d18bf11d03ab
44cd4284ecfc46c4c97f571b3681e0c6
ae467daa42d17ee45b6947a14ec8ec96
7276a03ae0651b1419b50e2c76272732
f05a5c6a2a705054d8547ebd87b58073
97791a0150e87a14bbe1a5d46267be8a
93a4eb99edd7b9c42bfb913f0ee52b3e
4a1250fb7f0da2e4e96bd2e34ce4a8ea
24617ef4b8ecbe74984e0955867cffd4
a0cae63ef60b7da4f9cb90b8cdb4ce4e
86c42a8335fb06241a674530f1fa24c5
6aab105c75192124887c893201ce93e0
225aec2e7a259b642a9fa1a4d10d7aac
c96b15076e0088349a95505e52f5a12a
93c33570d60341c439e50150832c5173
81cc8fbe3bd52d149b2b91936b92bfb8
6dc78741d54741a4c90a0fb74bd75f20
3190a336b6bd4484d911017dd0fc15ba
ebf91ac3a3d63fe42ace3e3a75c5153a
57dc2f6a8812542439eb1e60c355d9a2
75ebf02c7324c2944904e47c12cb421b
e48b7c1f5379ceb4687833196130a9dd
0e6e0041457dfeb47936aa37f7c4bfdf
75872890b046c074fac20ab6d18e52b1
40dd6881c3760054cacc50fdba7554dc
36686d6671a56b04f9401216e0ff9ae5
c156fe6f1c50d864f8ceb85b935236f7
390d76c4ec3c32e4e8ecc2b49aa78a1c
005850956c06e3c4d9126500376c9a40
88f1b8e9d502e19419d88bca2cab94da
2313d59684d119840a78fee73c48959a
2df13d630bf74324fbefa9003b6544b3
03859193eb793184ca8cc47738d7109d
f42ab72a6a8465649be290d03a8f1981
2a6fc1acbba5a6045a0692bfb9a7a8f2

View file

@ -0,0 +1,5 @@
{
"displayName":"SLZ Bonelab Shaders",
"description": "A collection of shaders that are found in Bonelab",
"createSeparatePackage": false
}

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 788eda7870482d742ab84d912eeaef30
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,13 @@
# Sky Prefab For Bonelab
This package contains a prefab for rendering sky in Bonelab. Unity's default
sky rendering is turned off due to it being incompatible with the fog and vol-
umetric systems we use. The included prefab can be used as a replacement for
the default sky. The prefab is simply an enormous mesh with no occlusion and
a special shader. Note that the included shader (SLZ/Sky With Fog) must only be
used with the included mesh (Sky_Mesh) as the shader expects a single triangle
mesh. Additionally, Sky_Mesh has a 65x65x65 kilometer bounding box to ensure it
is always rendered. The included prefab further has dynamic occlusion disabled
to ensure it never gets culled, as well as all unnecessary lighting information
disabled. Do not enable the Occluder or Occludee Static flags on the prefab to
ensure the mesh is never occluded.

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 86c42a8335fb06241a674530f1fa24c5
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d52f8debff15ed04b89c365c5b348eb0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,94 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Sky_Example
m_Shader: {fileID: 4800000, guid: 75ebf02c7324c2944904e47c12cb421b, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SkyTex:
m_Texture: {fileID: 8900000, guid: e48b7c1f5379ceb4687833196130a9dd, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _Blend: 0
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DetailSmoothnessMapScale: 1
- _DstBlend: 0
- _FogDist: 0.1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OffsetFactor: 0
- _OffsetUnits: 0
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 1
- _SrcBlend: 1
- _Surface: 0
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SkyColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3190a336b6bd4484d911017dd0fc15ba
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3c33eff4ea614ba4285462f29506cf94
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,167 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!43 &4300000
Mesh:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Sky_Mesh
serializedVersion: 11
m_SubMeshes:
- serializedVersion: 2
firstByte: 0
indexCount: 3
topology: 0
baseVertex: 0
firstVertex: 0
vertexCount: 3
localAABB:
m_Center: {x: 1, y: 1, z: 0}
m_Extent: {x: 2, y: 2, z: 0}
m_Shapes:
vertices: []
shapes: []
channels: []
fullWeights: []
m_BindPose: []
m_BoneNameHashes:
m_RootBoneNameHash: 0
m_BonesAABB: []
m_VariableBoneCountWeights:
m_Data:
m_MeshCompression: 0
m_IsReadable: 1
m_KeepVertices: 1
m_KeepIndices: 1
m_IndexFormat: 0
m_IndexBuffer: 000001000200
m_VertexData:
serializedVersion: 3
m_VertexCount: 3
m_Channels:
- stream: 0
offset: 0
format: 0
dimension: 3
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 12
format: 0
dimension: 2
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
m_DataSize: 60
_typelessdata: 000080bf0000404000000000000000000000803f000080bf000080bf00000000000000000000000000004040000080bf000000000000803f00000000
m_CompressedMesh:
m_Vertices:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_UV:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Normals:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Tangents:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Weights:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_NormalSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_TangentSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_FloatColors:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_BoneIndices:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_Triangles:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_UVInfo: 0
m_LocalAABB:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 32768, y: 32768, z: 32768}
m_MeshUsageFlags: 0
m_CookingOptions: 30
m_BakedConvexCollisionMesh:
m_BakedTriangleCollisionMesh:
m_MeshMetrics[0]: 1
m_MeshMetrics[1]: 1
m_MeshOptimizationFlags: 1
m_StreamData:
serializedVersion: 2
offset: 0
size: 0
path:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ebf91ac3a3d63fe42ace3e3a75c5153a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: dfda820ea5fa26a4fad111042abd4a98
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,85 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &531086027732950538
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1713422862066233390}
- component: {fileID: 2453626235171082250}
- component: {fileID: 3742906364795765522}
m_Layer: 0
m_Name: Sky_Prefab
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 64
m_IsActive: 1
--- !u!4 &1713422862066233390
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 531086027732950538}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &2453626235171082250
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 531086027732950538}
m_Mesh: {fileID: 4300000, guid: ebf91ac3a3d63fe42ace3e3a75c5153a, type: 2}
--- !u!23 &3742906364795765522
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 531086027732950538}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 1
m_DynamicOccludee: 0
m_StaticShadowCaster: 0
m_MotionVectors: 2
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 3190a336b6bd4484d911017dd0fc15ba, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 57dc2f6a8812542439eb1e60c355d9a2
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ca716302fae88144cb8018d9ea2dd61c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,122 @@
Shader "SLZ/Sky With Fog"
{
Properties
{
_SkyTex ("Sky Texture", CUBE) = "black" {}
[HDR] _SkyColor ("Sky Color", Color) = (1,1,1,1)
_FogDist ("Fog Max Distance (0 to camera far clip)", Range(0,1)) = 1.0
}
SubShader
{
Tags {"RenderPipeline" = "UniversalPipeline" "RenderType" = "Opaque" "Queue" = "AlphaTest+51" "IgnoreProjector"="True"}
Blend One Zero
ZWrite Off
ZTest LEqual
//Offset 1,1
ColorMask RGBA
LOD 100
Cull Off
Pass
{
Name "Forward"
Tags {"Lightmode"="UniversalForward"}
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma exclude_renderers gles
#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
#pragma multi_compile_fragment _ FOG_LINEAR FOG_EXP2
#define SHADERPASS SHADERPASS_FORWARD
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl"
struct appdata
{
//float4 vertex : POSITION;
half2 uv0 : TEXCOORD0;
uint vertexID : SV_VertexID;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 vertex : SV_POSITION;
float2 uv0 : TEXCOORD0;
float4 wPos_xyz_fog_x : TEXCOORD1;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
TEXTURECUBE(_SkyTex);
SamplerState sampler_SkyTex;
CBUFFER_START(UnityPerMaterial)
half4 _SkyColor;
float _FogDist;
CBUFFER_END
/* Gets the position of a vertex as a part of a right triangle that completely covers the screen
* Assumes a single triangle mesh, with the positions based on the vertex's ID.
* CCW order
* 0 : 0,1 0
* 1 : 0,0 | \
* 2 : 1,0 1--2
*/
float4 GetQuadVertexPosition2(uint vertexID, float z = UNITY_NEAR_CLIP_VALUE)
{
uint topBit = vertexID >> 1u;
uint botBit = (vertexID & 1u);
float y = 1.0f - ((vertexID & 2u) >> 1);
float x = (vertexID & 1u);//1 - (topBit + botBit) & 1; // produces 1 for indices 0,3 and 0 for 1,2
return float4(x, y, z, 1.0);
}
v2f vert(appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
//float z = (rcp(_SkyDist) - _ZBufferParams.y) / (_ZBufferParams.x); // Transform from linear 0-1 depth to clipspace Z
float4 clipQuad = GetQuadVertexPosition(v.vertexID, UNITY_RAW_FAR_CLIP_VALUE);
clipQuad.xy = 4.0f * clipQuad.xy - 1.0f;
//clipQuad.xy = 0.5f * clipQuad.xy - 0.5f;
float4 wPos = mul(UNITY_MATRIX_I_VP, clipQuad);
o.wPos_xyz_fog_x.xyz = wPos.xyz / wPos.w;
o.vertex = clipQuad;
half clipZ_0Far = lerp(_ProjectionParams.y, _ProjectionParams.z, _FogDist);
o.wPos_xyz_fog_x.w = unity_FogParams.x * clipZ_0Far;
return o;
}
half4 frag(v2f i) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
float3 viewDir = normalize(float3(i.wPos_xyz_fog_x.xyz - _WorldSpaceCameraPos));
half4 col = SAMPLE_TEXTURECUBE_LOD(_SkyTex, sampler_SkyTex, viewDir, 0);
col *= _SkyColor;
col.rgb = MixFog(col.rgb, viewDir, i.wPos_xyz_fog_x.w);
col = Volumetrics(col, i.wPos_xyz_fog_x.xyz);
return col;
}
ENDHLSL
}
}
}

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 75ebf02c7324c2944904e47c12cb421b
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ea399fb043d56334aa2576c57d9a4eee
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View file

@ -0,0 +1,138 @@
fileFormatVersion: 2
guid: e48b7c1f5379ceb4687833196130a9dd
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 2
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData: "<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ExtraTextureSettings
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n
<detailMap>false</detailMap>\r\n <hemiOctNormals>true</hemiOctNormals>\r\n
<geoRoughness>GenRoughness</geoRoughness>\r\n <geoRoughnessPow>1</geoRoughnessPow>\r\n
<dontReadSource>false</dontReadSource>\r\n</ExtraTextureSettings>"
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: e95b31b7241745c479b6b9574209d1f9
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 6bf3d81d08a4ff343b22619a187bb249
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ae65e6fd73412a843ad0abebcd7f7754
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 05cb88a931e735a4b9ad942dbbbf3ed7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: baf0cae36873ec6479fc0c926f732068
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 98a02e34c0c4b8748ade0ad9cd5a2611
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,152 @@
#pragma target 5.0
//#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
#if defined(SHADER_API_MOBILE)
//#!INJECT_POINT MOBILE_DEFINES
#else
//#!INJECT_POINT STANDALONE_DEFINES
#endif
//#!INJECT_POINT UNIVERSAL_DEFINES
#pragma multi_compile_fog
#pragma skip_variants FOG_LINEAR
#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
#pragma multi_compile_instancing
#pragma instancing_options procedural:ParticleInstancingSetup
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl"
#include "Include/Particle/billboard.hlsl"
//#!INJECT_POINT INCLUDES
struct appdata
{
float4 vertex : POSITION;
float4 uv0_vertexStream0_xy : TEXCOORD0;
half4 color : COLOR;
//#!INJECT_POINT VERTEX_IN
//#!INJECT_DEFAULT
float vertexStream1 : TEXCOORD1;
//#!INJECT_END
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
//#!INJECT_POINT VERTEX_CENTROID
//#!INJECT_DEFAULT
float4 vertex : SV_POSITION;
//#!INJECT_END
float2 uv0 : TEXCOORD0;
float4 wPos_xyz_fog_x : TEXCOORD1;
half4 color : COLOR;
//#!INJECT_POINT INTERPOLATORS
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
struct fragOut
{
half4 color : SV_Target;
//#!INJECT_POINT OUTPUT_SEMANTICS
};
//#include "Include/PlatformSamplers.hlsl"
TEXTURE2D(_BaseMap);
SamplerState sampler_BaseMap;
//#!INJECT_POINT UNIFORMS
CBUFFER_START(UnityPerMaterial)
float4 _BaseMap_ST;
half4 _BaseColor;
//#!INJECT_POINT MATERIAL_CBUFFER
CBUFFER_END
//#!INJECT_POINT FUNCTIONS
v2f vert(appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
//#!INJECT_POINT VERT_BEGIN
//#!INJECT_POINT VERT_TRANSFORM
//#!INJECT_DEFAULT
float3 particleCenter = float3(v.uv0_vertexStream0_xy.zw, v.vertexStream1.x);
v.vertex.xyz = ParticleFaceCamera(v.vertex.xyz, particleCenter);
//#!INJECT_END
o.wPos_xyz_fog_x.xyz = TransformObjectToWorld(v.vertex.xyz);
o.vertex = TransformWorldToHClip(o.wPos_xyz_fog_x.xyz);
o.uv0 = TRANSFORM_TEX(v.uv0_vertexStream0_xy.xy, _BaseMap);
half clipZ_0Far = UNITY_Z_0_FAR_FROM_CLIPSPACE(o.vertex.z);
o.wPos_xyz_fog_x.w = unity_FogParams.x * clipZ_0Far;
o.color = v.color;
//#!INJECT_POINT VERT_END
return o;
}
fragOut frag(v2f i)
{
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
fragOut f;
//#!INJECT_POINT FRAG_BEGIN
//#!INJECT_POINT FRAG_COLOR
//#!INJECT_DEFAULT
f.color = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, i.uv0);
f.color *= _BaseColor * i.color;
//#!INJECT_END
//#!INJECT_POINT FRAG_FOG
//#!INJECT_DEFAULT
half3 viewDir = normalize(half3(i.wPos_xyz_fog_x.xyz - _WorldSpaceCameraPos));
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
#if defined(SLZ_PARTICLE_ADDITIVE)
f.color.rgb *= 1.0 - ComputeFogIntensity(i.wPos_xyz_fog_x.w);
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
f.color.rgb = lerp(f.color.rgb, half3(1,1,1), ComputeFogIntensity(i.wPos_xyz_fog_x.w));
#elif defined(SLZ_PARTICLE_ALPHABLEND)
f.color.rgb = MixFog(f.color.rgb, viewDir, i.wPos_xyz_fog_x.w);
#endif
#endif
//#!INJECT_END
//#!INJECT_POINT FRAG_VOLUMETRICS
//#!INJECT_DEFAULT
#if defined(SLZ_PARTICLE_ADDITIVE)
#if defined(_VOLUMETRICS_ENABLED)
f.color *= GetVolumetricColor(i.wPos_xyz_fog_x.xyz).a;
#endif
#elif defined(SLZ_PARTICLE_ALPHABLEND)
f.color = Volumetrics(f.color, i.wPos_xyz_fog_x.xyz);
#endif
//#!INJECT_END
//#!INJECT_POINT FRAG_END
return f;
}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2df13d630bf74324fbefa9003b6544b3
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4e0ec44885694984b843804e07b56a1c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,42 @@
//#!INJECT_BEGIN INCLUDES 0
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SLZBlueNoise.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareDepthTexture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SLZSoftBlend.hlsl"
//#!INJECT_END
//#!INJECT_BEGIN MATERIAL_CBUFFER 0
float _SoftFactor;
//#!INJECT_END
//#!INJECT_BEGIN VERTEX_CENTROID 0
#if defined(SHADER_API_MOBILE)
centroid float4 vertex : SV_POSITION;
#else
float4 vertex : SV_POSITION;
#endif
//#!INJECT_END
//#!INJECT_BEGIN OUTPUT_SEMANTICS 0
#if defined(SHADER_API_MOBILE)
float depth : SV_DepthLessEqual;
#endif
//#!INJECT_END
//#!INJECT_BEGIN FRAG_END 99
#if defined(SHADER_API_MOBILE)
half noise = GetScreenNoiseR(screenUVs);
f.depth = SLZSoftBlendZTest(i.vertex.z, noise, _SoftFactor);
#else
float rawDepth = SampleSceneDepth(screenUVs);
float viewZ = dot(GetWorldToViewMatrix()._m20_m21_m22_m23, float4(i.wPos_xyz_fog_x.xyz, 1));
float fade = SLZSoftBlendDepth(rawDepth, viewZ, _SoftFactor);
#if defined(SLZ_PARTICLE_ADDITIVE)
f.color *= fade;
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
f.color = lerp(fade, float4(1,1,1,1), f.color));
#else
f.color.a *= fade;
#endif
#endif
//#!INJECT_END

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f42ab72a6a8465649be290d03a8f1981
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,4 @@
//#!INJECT_BEGIN FRAG_BEGIN -1
float2 screenUVs = GetNormalizedScreenSpaceUV(i.vertex);
//#!INJECT_END

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 03859193eb793184ca8cc47738d7109d
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,39 @@
//#!INJECT_BEGIN UNIFORMS 0
TEXTURE2D(_ScreenSpacePattern);
SAMPLER(sampler_ScreenSpacePattern);
//#!INJECT_END
//#!INJECT_BEGIN MATERIAL_CBUFFER 0
half _Speed;
half _SecondarySpeed;
float _ScreenSpaceSize;
float _ParticleOffset;
//#!INJECT_END
//#!INJECT_BEGIN FUNCTIONS 0
float2 RotateTorchUVs(float2 uv, float2 center, float angle)
{
uv = uv - center;
float sin1, cos1;
sincos(angle, sin1, cos1);
float2x2 rotMat = float2x2(cos1, -sin1, sin1, cos1);
uv = mul(rotMat, uv);
return uv + center;
}
//#!INJECT_END
//#!INJECT_BEGIN VERT_BEGIN 0
v.vertex.z += _ParticleOffset;
//#!INJECT_END
//#!INJECT_BEGIN FRAG_COLOR 0
float angle1 = frac(_Time[0] * 3.1830988618 * _Speed) * TWO_PI;
float angle2 = frac(_Time[0] * 3.1830988618 * _Speed * _SecondarySpeed) * TWO_PI;
angle1 = -angle1;
float2 uv1 = RotateTorchUVs(i.uv0.xy, float2(0.5, 0.5), angle1);
half layer1 = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv1).r;
float2 uv2 = RotateTorchUVs(i.uv0.xy, float2(0.5, 0.5), angle2);
half layer2 = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv2).r;
half4 SSPattern = SAMPLE_TEXTURE2D(_ScreenSpacePattern, sampler_ScreenSpacePattern, _ScreenParams.xy * screenUVs / _ScreenSpaceSize);
f.color = (layer1 * layer2 * i.color.a) * SSPattern * _BaseColor * i.color;
//#!INJECT_END

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2a6fc1acbba5a6045a0692bfb9a7a8f2
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bd7d1f8f9838c1541abbb5c264b254f6, type: 3}
m_Name: ParticleBasic
m_EditorClassIdentifier:
outputInclude: {fileID: 10900000, guid: c156fe6f1c50d864f8ceb85b935236f7, type: 3}
baseInclude: {fileID: 10900000, guid: 2df13d630bf74324fbefa9003b6544b3, type: 3}
injectableIncludes: []

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 36686d6671a56b04f9401216e0ff9ae5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,128 @@
/*-----------------------------------------------------------------------------------------------------*
*-----------------------------------------------------------------------------------------------------*
* WARNING: THIS FILE WAS CREATED WITH SHADERINJECTOR, AND SHOULD NOT BE EDITED DIRECTLY. MODIFY THE *
* BASE INCLUDE AND INJECTED FILES INSTEAD, AND REGENERATE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *
*-----------------------------------------------------------------------------------------------------*
*-----------------------------------------------------------------------------------------------------*/
#pragma target 5.0
//#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
#if defined(SHADER_API_MOBILE)
#else
#endif
#pragma multi_compile_fog
#pragma skip_variants FOG_LINEAR
#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
#pragma multi_compile_instancing
#pragma instancing_options procedural:ParticleInstancingSetup
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl"
#include "Include/Particle/billboard.hlsl"
struct appdata
{
float4 vertex : POSITION;
float4 uv0_vertexStream0_xy : TEXCOORD0;
half4 color : COLOR;
float vertexStream1 : TEXCOORD1;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 vertex : SV_POSITION;
float2 uv0 : TEXCOORD0;
float4 wPos_xyz_fog_x : TEXCOORD1;
half4 color : COLOR;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
struct fragOut
{
half4 color : SV_Target;
};
//#include "Include/PlatformSamplers.hlsl"
TEXTURE2D(_BaseMap);
SamplerState sampler_BaseMap;
CBUFFER_START(UnityPerMaterial)
float4 _BaseMap_ST;
half4 _BaseColor;
CBUFFER_END
v2f vert(appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
float3 particleCenter = float3(v.uv0_vertexStream0_xy.zw, v.vertexStream1.x);
v.vertex.xyz = ParticleFaceCamera(v.vertex.xyz, particleCenter);
o.wPos_xyz_fog_x.xyz = TransformObjectToWorld(v.vertex.xyz);
o.vertex = TransformWorldToHClip(o.wPos_xyz_fog_x.xyz);
o.uv0 = TRANSFORM_TEX(v.uv0_vertexStream0_xy.xy, _BaseMap);
half clipZ_0Far = UNITY_Z_0_FAR_FROM_CLIPSPACE(o.vertex.z);
o.wPos_xyz_fog_x.w = unity_FogParams.x * clipZ_0Far;
o.color = v.color;
return o;
}
fragOut frag(v2f i)
{
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
fragOut f;
f.color = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, i.uv0);
f.color *= _BaseColor * i.color;
half3 viewDir = normalize(half3(i.wPos_xyz_fog_x.xyz - _WorldSpaceCameraPos));
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
#if defined(SLZ_PARTICLE_ADDITIVE)
f.color.rgb *= 1.0 - ComputeFogIntensity(i.wPos_xyz_fog_x.w);
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
f.color.rgb = lerp(f.color.rgb, half3(1,1,1), ComputeFogIntensity(i.wPos_xyz_fog_x.w));
#elif defined(SLZ_PARTICLE_ALPHABLEND)
f.color.rgb = MixFog(f.color.rgb, viewDir, i.wPos_xyz_fog_x.w);
#endif
#endif
#if defined(SLZ_PARTICLE_ADDITIVE)
#if defined(_VOLUMETRICS_ENABLED)
f.color *= GetVolumetricColor(i.wPos_xyz_fog_x.xyz).a;
#endif
#elif defined(SLZ_PARTICLE_ALPHABLEND)
f.color = Volumetrics(f.color, i.wPos_xyz_fog_x.xyz);
#endif
return f;
}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c156fe6f1c50d864f8ceb85b935236f7
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bd7d1f8f9838c1541abbb5c264b254f6, type: 3}
m_Name: ParticleSoft
m_EditorClassIdentifier:
outputInclude: {fileID: 10900000, guid: 005850956c06e3c4d9126500376c9a40, type: 3}
baseInclude: {fileID: 10900000, guid: 2df13d630bf74324fbefa9003b6544b3, type: 3}
injectableIncludes:
- {fileID: 10900000, guid: 03859193eb793184ca8cc47738d7109d, type: 3}
- {fileID: 10900000, guid: f42ab72a6a8465649be290d03a8f1981, type: 3}

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 390d76c4ec3c32e4e8ecc2b49aa78a1c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,175 @@
/*-----------------------------------------------------------------------------------------------------*
*-----------------------------------------------------------------------------------------------------*
* WARNING: THIS FILE WAS CREATED WITH SHADERINJECTOR, AND SHOULD NOT BE EDITED DIRECTLY. MODIFY THE *
* BASE INCLUDE AND INJECTED FILES INSTEAD, AND REGENERATE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *
*-----------------------------------------------------------------------------------------------------*
*-----------------------------------------------------------------------------------------------------*/
#pragma target 5.0
//#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
#if defined(SHADER_API_MOBILE)
#else
#endif
#pragma multi_compile_fog
#pragma skip_variants FOG_LINEAR
#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
#pragma multi_compile_instancing
#pragma instancing_options procedural:ParticleInstancingSetup
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl"
#include "Include/Particle/billboard.hlsl"
// Begin Injection INCLUDES from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
#if defined(SHADER_API_MOBILE)
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SLZBlueNoise.hlsl"
#else
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareDepthTexture.hlsl"
#endif
// End Injection INCLUDES from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
struct appdata
{
float4 vertex : POSITION;
float4 uv0_vertexStream0_xy : TEXCOORD0;
half4 color : COLOR;
float vertexStream1 : TEXCOORD1;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
// Begin Injection VERTEX_CENTROID from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
#if defined(SHADER_API_MOBILE)
centroid float4 vertex : SV_POSITION;
#else
float4 vertex : SV_POSITION;
#endif
// End Injection VERTEX_CENTROID from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
float2 uv0 : TEXCOORD0;
float4 wPos_xyz_fog_x : TEXCOORD1;
half4 color : COLOR;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
struct fragOut
{
half4 color : SV_Target;
// Begin Injection OUTPUT_SEMANTICS from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
#if defined(SHADER_API_MOBILE)
float depth : SV_DepthLessEqual;
#endif
// End Injection OUTPUT_SEMANTICS from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
};
//#include "Include/PlatformSamplers.hlsl"
TEXTURE2D(_BaseMap);
SamplerState sampler_BaseMap;
CBUFFER_START(UnityPerMaterial)
float4 _BaseMap_ST;
half4 _BaseColor;
// Begin Injection MATERIAL_CBUFFER from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
float _SoftFactor;
// End Injection MATERIAL_CBUFFER from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
CBUFFER_END
v2f vert(appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
float3 particleCenter = float3(v.uv0_vertexStream0_xy.zw, v.vertexStream1.x);
v.vertex.xyz = ParticleFaceCamera(v.vertex.xyz, particleCenter);
o.wPos_xyz_fog_x.xyz = TransformObjectToWorld(v.vertex.xyz);
o.vertex = TransformWorldToHClip(o.wPos_xyz_fog_x.xyz);
o.uv0 = TRANSFORM_TEX(v.uv0_vertexStream0_xy.xy, _BaseMap);
half clipZ_0Far = UNITY_Z_0_FAR_FROM_CLIPSPACE(o.vertex.z);
o.wPos_xyz_fog_x.w = unity_FogParams.x * clipZ_0Far;
o.color = v.color;
return o;
}
fragOut frag(v2f i)
{
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
fragOut f;
// Begin Injection FRAG_BEGIN from Injection_Particle_screenspaceUVs.hlsl ----------------------------------------------------------
float2 screenUVs = GetNormalizedScreenSpaceUV(i.vertex);
// End Injection FRAG_BEGIN from Injection_Particle_screenspaceUVs.hlsl ----------------------------------------------------------
f.color = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, i.uv0);
f.color *= _BaseColor * i.color;
half3 viewDir = normalize(half3(i.wPos_xyz_fog_x.xyz - _WorldSpaceCameraPos));
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
#if defined(SLZ_PARTICLE_ADDITIVE)
f.color.rgb *= 1.0 - ComputeFogIntensity(i.wPos_xyz_fog_x.w);
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
f.color.rgb = lerp(f.color.rgb, half3(1,1,1), ComputeFogIntensity(i.wPos_xyz_fog_x.w));
#elif defined(SLZ_PARTICLE_ALPHABLEND)
f.color.rgb = MixFog(f.color.rgb, viewDir, i.wPos_xyz_fog_x.w);
#endif
#endif
#if defined(SLZ_PARTICLE_ADDITIVE)
#if defined(_VOLUMETRICS_ENABLED)
f.color *= GetVolumetricColor(i.wPos_xyz_fog_x.xyz).a;
#endif
#elif defined(SLZ_PARTICLE_ALPHABLEND)
f.color = Volumetrics(f.color, i.wPos_xyz_fog_x.xyz);
#endif
// Begin Injection FRAG_END from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
#if defined(SHADER_API_MOBILE)
half noise = GetScreenNoiseR(screenUVs);
float depthOffset = _SoftFactor * noise * noise ;
float vertDepth = i.vertex.z;
float cameraZ = 1.0 / (_ZBufferParams.z * vertDepth + _ZBufferParams.w);
cameraZ += depthOffset;
f.depth = (rcp(cameraZ) - _ZBufferParams.w) / _ZBufferParams.z;
#else
float rawDepth = SampleSceneDepth(screenUVs);
float sceneZ = (unity_OrthoParams.w == 0) ? LinearEyeDepth(rawDepth, _ZBufferParams) : LinearDepthToEyeDepth(rawDepth);
float thisZ = LinearEyeDepth(i.wPos_xyz_fog_x.xyz, GetWorldToViewMatrix());
float fade = saturate((1 / _SoftFactor) * (sceneZ - thisZ));
fade *= fade;
#if defined(SLZ_PARTICLE_ADDITIVE)
f.color *= fade;
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
f.color = lerp(fade, float4(1,1,1,1), f.color));
#else
f.color.a *= fade;
#endif
#endif
// End Injection FRAG_END from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
return f;
}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 005850956c06e3c4d9126500376c9a40
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bd7d1f8f9838c1541abbb5c264b254f6, type: 3}
m_Name: ParticleTorch
m_EditorClassIdentifier:
outputInclude: {fileID: 10900000, guid: 2313d59684d119840a78fee73c48959a, type: 3}
baseInclude: {fileID: 10900000, guid: 2df13d630bf74324fbefa9003b6544b3, type: 3}
injectableIncludes:
- {fileID: 10900000, guid: 03859193eb793184ca8cc47738d7109d, type: 3}
- {fileID: 10900000, guid: f42ab72a6a8465649be290d03a8f1981, type: 3}
- {fileID: 10900000, guid: 2a6fc1acbba5a6045a0692bfb9a7a8f2, type: 3}

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 88f1b8e9d502e19419d88bca2cab94da
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,200 @@
/*-----------------------------------------------------------------------------------------------------*
*-----------------------------------------------------------------------------------------------------*
* WARNING: THIS FILE WAS CREATED WITH SHADERINJECTOR, AND SHOULD NOT BE EDITED DIRECTLY. MODIFY THE *
* BASE INCLUDE AND INJECTED FILES INSTEAD, AND REGENERATE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *
*-----------------------------------------------------------------------------------------------------*
*-----------------------------------------------------------------------------------------------------*/
#pragma target 5.0
//#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
#if defined(SHADER_API_MOBILE)
#else
#endif
#pragma multi_compile_fog
#pragma skip_variants FOG_LINEAR
#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
#pragma multi_compile_instancing
#pragma instancing_options procedural:ParticleInstancingSetup
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl"
#include "Include/Particle/billboard.hlsl"
// Begin Injection INCLUDES from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SLZBlueNoise.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareDepthTexture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SLZSoftBlend.hlsl"
// End Injection INCLUDES from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
struct appdata
{
float4 vertex : POSITION;
float4 uv0_vertexStream0_xy : TEXCOORD0;
half4 color : COLOR;
float vertexStream1 : TEXCOORD1;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
// Begin Injection VERTEX_CENTROID from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
#if defined(SHADER_API_MOBILE)
centroid float4 vertex : SV_POSITION;
#else
float4 vertex : SV_POSITION;
#endif
// End Injection VERTEX_CENTROID from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
float2 uv0 : TEXCOORD0;
float4 wPos_xyz_fog_x : TEXCOORD1;
half4 color : COLOR;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
struct fragOut
{
half4 color : SV_Target;
// Begin Injection OUTPUT_SEMANTICS from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
#if defined(SHADER_API_MOBILE)
float depth : SV_DepthLessEqual;
#endif
// End Injection OUTPUT_SEMANTICS from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
};
//#include "Include/PlatformSamplers.hlsl"
TEXTURE2D(_BaseMap);
SamplerState sampler_BaseMap;
// Begin Injection UNIFORMS from Injection_Torch.hlsl ----------------------------------------------------------
TEXTURE2D(_ScreenSpacePattern);
SAMPLER(sampler_ScreenSpacePattern);
// End Injection UNIFORMS from Injection_Torch.hlsl ----------------------------------------------------------
CBUFFER_START(UnityPerMaterial)
float4 _BaseMap_ST;
half4 _BaseColor;
// Begin Injection MATERIAL_CBUFFER from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
float _SoftFactor;
// End Injection MATERIAL_CBUFFER from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
// Begin Injection MATERIAL_CBUFFER from Injection_Torch.hlsl ----------------------------------------------------------
half _Speed;
half _SecondarySpeed;
float _ScreenSpaceSize;
float _ParticleOffset;
// End Injection MATERIAL_CBUFFER from Injection_Torch.hlsl ----------------------------------------------------------
CBUFFER_END
// Begin Injection FUNCTIONS from Injection_Torch.hlsl ----------------------------------------------------------
float2 RotateTorchUVs(float2 uv, float2 center, float angle)
{
uv = uv - center;
float sin1, cos1;
sincos(angle, sin1, cos1);
float2x2 rotMat = float2x2(cos1, -sin1, sin1, cos1);
uv = mul(rotMat, uv);
return uv + center;
}
// End Injection FUNCTIONS from Injection_Torch.hlsl ----------------------------------------------------------
v2f vert(appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
// Begin Injection VERT_BEGIN from Injection_Torch.hlsl ----------------------------------------------------------
v.vertex.z += _ParticleOffset;
// End Injection VERT_BEGIN from Injection_Torch.hlsl ----------------------------------------------------------
float3 particleCenter = float3(v.uv0_vertexStream0_xy.zw, v.vertexStream1.x);
v.vertex.xyz = ParticleFaceCamera(v.vertex.xyz, particleCenter);
o.wPos_xyz_fog_x.xyz = TransformObjectToWorld(v.vertex.xyz);
o.vertex = TransformWorldToHClip(o.wPos_xyz_fog_x.xyz);
o.uv0 = TRANSFORM_TEX(v.uv0_vertexStream0_xy.xy, _BaseMap);
half clipZ_0Far = UNITY_Z_0_FAR_FROM_CLIPSPACE(o.vertex.z);
o.wPos_xyz_fog_x.w = unity_FogParams.x * clipZ_0Far;
o.color = v.color;
return o;
}
fragOut frag(v2f i)
{
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
fragOut f;
// Begin Injection FRAG_BEGIN from Injection_Particle_screenspaceUVs.hlsl ----------------------------------------------------------
float2 screenUVs = GetNormalizedScreenSpaceUV(i.vertex);
// End Injection FRAG_BEGIN from Injection_Particle_screenspaceUVs.hlsl ----------------------------------------------------------
// Begin Injection FRAG_COLOR from Injection_Torch.hlsl ----------------------------------------------------------
float angle1 = frac(_Time[0] * 3.1830988618 * _Speed) * TWO_PI;
float angle2 = frac(_Time[0] * 3.1830988618 * _Speed * _SecondarySpeed) * TWO_PI;
angle1 = -angle1;
float2 uv1 = RotateTorchUVs(i.uv0.xy, float2(0.5, 0.5), angle1);
half layer1 = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv1).r;
float2 uv2 = RotateTorchUVs(i.uv0.xy, float2(0.5, 0.5), angle2);
half layer2 = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv2).r;
half4 SSPattern = SAMPLE_TEXTURE2D(_ScreenSpacePattern, sampler_ScreenSpacePattern, _ScreenParams.xy * screenUVs / _ScreenSpaceSize);
f.color = (layer1 * layer2 * i.color.a) * SSPattern * _BaseColor * i.color;
// End Injection FRAG_COLOR from Injection_Torch.hlsl ----------------------------------------------------------
half3 viewDir = normalize(half3(i.wPos_xyz_fog_x.xyz - _WorldSpaceCameraPos));
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
#if defined(SLZ_PARTICLE_ADDITIVE)
f.color.rgb *= 1.0 - ComputeFogIntensity(i.wPos_xyz_fog_x.w);
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
f.color.rgb = lerp(f.color.rgb, half3(1,1,1), ComputeFogIntensity(i.wPos_xyz_fog_x.w));
#elif defined(SLZ_PARTICLE_ALPHABLEND)
f.color.rgb = MixFog(f.color.rgb, viewDir, i.wPos_xyz_fog_x.w);
#endif
#endif
#if defined(SLZ_PARTICLE_ADDITIVE)
#if defined(_VOLUMETRICS_ENABLED)
f.color *= GetVolumetricColor(i.wPos_xyz_fog_x.xyz).a;
#endif
#elif defined(SLZ_PARTICLE_ALPHABLEND)
f.color = Volumetrics(f.color, i.wPos_xyz_fog_x.xyz);
#endif
// Begin Injection FRAG_END from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
#if defined(SHADER_API_MOBILE)
half noise = GetScreenNoiseR(screenUVs);
f.depth = SLZSoftBlendZTest(i.vertex.z, noise, _SoftFactor);
#else
float rawDepth = SampleSceneDepth(screenUVs);
float viewZ = dot(GetWorldToViewMatrix()._m20_m21_m22_m23, float4(i.wPos_xyz_fog_x.xyz, 1));
float fade = SLZSoftBlendDepth(rawDepth, viewZ, _SoftFactor);
#if defined(SLZ_PARTICLE_ADDITIVE)
f.color *= fade;
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
f.color = lerp(fade, float4(1,1,1,1), f.color));
#else
f.color.a *= fade;
#endif
#endif
// End Injection FRAG_END from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
return f;
}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2313d59684d119840a78fee73c48959a
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1 @@
v.vertex.xyz = ParticleFaceCamera(v.vertex.xyz, v.ase_texcoord1.xyz);

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 0e6e0041457dfeb47936aa37f7c4bfdf
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1 @@
v.vertex.xyz = MeshFlareBillboard(v.vertex.xyz);

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 75872890b046c074fac20ab6d18e52b1
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,94 @@
float3 centerEyePos()
{
#if defined(UNITY_STEREO_MULTIVIEW_ENABLED) || defined(UNITY_STEREO_INSTANCING_ENABLED)
return 0.5 * (unity_StereoWorldSpaceCameraPos[0] + unity_StereoWorldSpaceCameraPos[1]);
#else
return _WorldSpaceCameraPos;
#endif
}
/** Rotates a particle to face the camera in a more vr-correct way than unity's default particle system
*
*/
float3 particle_face_camera(float3 vertex, inout float3 normal, inout float3 center)
{
vertex.xyz -= center;
float3 head = centerEyePos();
float3 centerToEye = normalize(center-head);
float c2eXZLen = length(centerToEye.xz);
float sin1 = -centerToEye.y;
float cos1 = c2eXZLen;
float2x2 rotPitch = float2x2(cos1, sin1, -sin1, cos1);
vertex.zy = mul(rotPitch, vertex.zy);
normal.zy = mul(rotPitch, normal.zy);
//tangent.zy = mul(rotPitch, tangent.zy);
float sin2 = centerToEye.x/c2eXZLen;
float cos2 = centerToEye.z/c2eXZLen;
float2x2 rotYaw = float2x2(cos2, sin2, -sin2, cos2);
vertex.xz = mul(rotYaw,vertex.xz);
normal.xz = mul(rotYaw,normal.xz);
//tangent.xz = mul(rotYaw,tangent.xz);
vertex.xyz += center;
return vertex;
}
float3 ParticleFaceCamera(float3 vertex, float3 center)
{
vertex.xyz -= center;
float3 head = centerEyePos();
float3 centerToEye = normalize(center - head);
float c2eXZLen = length(centerToEye.xz);
float sin1 = -centerToEye.y;
float cos1 = c2eXZLen;
float2x2 rotPitch = float2x2(cos1, sin1, -sin1, cos1);
vertex.zy = mul(rotPitch, vertex.zy);
float sin2 = centerToEye.x / c2eXZLen;
float cos2 = centerToEye.z / c2eXZLen;
float2x2 rotYaw = float2x2(cos2, sin2, -sin2, cos2);
vertex.xz = mul(rotYaw, vertex.xz);
vertex.xyz += center;
return vertex;
}
float3 MeshFaceCamera(float3 vertex)
{
float3 center = float3(0,0,0);
//vertex = TransformObjectToWorld(vertex);
float3 head = TransformWorldToObject(centerEyePos());
float3 centerToEye = normalize(center - head);
float c2eXZLen = length(centerToEye.xz);
float sin1 = -centerToEye.y;
float cos1 = c2eXZLen;
float2x2 rotPitch = float2x2(cos1, sin1, -sin1, cos1);
vertex.zy = mul(rotPitch, vertex.zy);
float sin2 = centerToEye.x / c2eXZLen;
float cos2 = centerToEye.z / c2eXZLen;
float2x2 rotYaw = float2x2(cos2, sin2, -sin2, cos2);
vertex.xz = mul(rotYaw, vertex.xz);
//vertex.xyz += center;
return vertex;
}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 40dd6881c3760054cacc50fdba7554dc
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,16 @@
#if defined(SHADER_API_MOBILE) // Quest 2 (XR2) works better with combined texture-samplers apparently
#ifdef TEXTURE2D
#undef TEXTURE2D
#endif
#ifdef SAMPLER
#undef SAMPLER
#endif
#ifdef SAMPLE_TEXTURE2D
#undef SAMPLE_TEXTURE2D
#endif
#define TEXTURE2D(textureName) sampler2D textureName
#define SAMPLER(samplerName)
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord) tex2D(textureName, coord)
#endif

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6aab105c75192124887c893201ce93e0
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,95 @@
#if !defined(SLZ_TRIPLANAR_INCLUDED)
#define SLZ_TRIPLANAR_INCLUDED
//#define TEXTURE2D_PARAM(textureName, samplerName) Texture2D textureName, sampler samplerName
/**
* Struct containg the ddx and ddy of the uvs combined into one half4 for each axis
*/
struct tpDerivatives
{
half4 ddX;
half4 ddY;
half4 ddZ;
};
/**
* Gets the derivatives of the worldspace coordinates reduced to 3 2 dimensional planes defined by each axis
*
* @param wPos Worldspace position
* @param[out] dd struct containing the x and y derivatives of each plane
*/
void GetDirectionalDerivatives(float3 wPos, out tpDerivatives dd)
{
dd.ddX.xy = ddx(wPos.zy);
dd.ddY.xy = ddx(wPos.xz);
dd.ddZ.xy = ddx(wPos.xy);
dd.ddX.zw = ddy(wPos.zy);
dd.ddY.zw = ddy(wPos.xz);
dd.ddZ.zw = ddy(wPos.xy);
}
/**
* Determines the worldspace axis that the given mesh normal is most closely aligned to, and returns the coordinates of the
* pixel in the plane aligned with that axis and the derivatives associated with that plane. Also generates a tangent to world
* matrix using the axes orthogonal to the dominant axis as the tangent and bitangent.
*
* @param[out] triplanarUV Coordinates of the fragment in the plane aligned with the dominant axis
* @param[out] ddxMax X derivatives of the coordinates of the fragment in the plane aligned with the dominant axis
* @param[out] ddyMax Y derivatives of the coordinates of the fragment in the plane aligned with the dominant axis
* @param[out] tanToWrld Tangent to world matrix composed of the other two axes as tangent and bitangent, and the mesh normal as the normal
* @param wPos World-space position of the fragment
* @param wNorm World-space mesh normal
* @param dd derivatives of the fragment's coordinates in each axis aligned plane
*/
void GetTPUVExpensive(out float2 triplanarUV, out half2 ddxMax, out half2 ddyMax, out half3x3 tanToWrld, float3 wPos, half3 wNorm,
tpDerivatives dd)
{
half3 dir;
dir.x = abs(wNorm.x) > abs(wNorm.y) && abs(wNorm.x) > abs(wNorm.z) ? 1 : 0;
dir.y = abs(wNorm.y) >= abs(wNorm.x) && abs(wNorm.y) > abs(wNorm.z) ? 1 : 0;
dir.z = abs(wNorm.z) >= abs(wNorm.y) && abs(wNorm.z) >= abs(wNorm.x) ? 1 : 0;
half3 dirSign = sign(wNorm);
dirSign.z = -dirSign.z; // u should be flipped on Z
ddxMax = dir.x * dd.ddX.xy + dir.y * dd.ddY.xy + dir.z * dd.ddZ.xy;
ddyMax = dir.x * dd.ddX.zw + dir.y * dd.ddY.zw + dir.z * dd.ddZ.zw;
//half3 maxDir = half3(dirX, dirY, dirZ);
float2 uvX = wPos.zy * float2(dirSign.x, 1.0);
triplanarUV = dir.x * uvX;
float2 uvY = wPos.xz * float2(dirSign.y, 1.0);
triplanarUV = mad(dir.y, uvY, triplanarUV);
float2 uvZ = wPos.xy * float2(dirSign.z, 1.0);
triplanarUV = mad(dir.z, uvZ, triplanarUV);
tanToWrld = half3x3(
dir.y * dirSign.y + dir.z * dirSign.z, 0, wNorm.x,
0, dir.x + dir.z, wNorm.y,
dir.x * dirSign.x, dir.y, wNorm.z
);
}
void GetTPUVCheap(out float2 triplanarUV, out half3x3 tanToWrld, float3 wPos, half3 wNorm)
{
half3 dir;
dir.x = abs(wNorm.x) > abs(wNorm.y) && abs(wNorm.x) > abs(wNorm.z) ? 1 : 0;
dir.y = abs(wNorm.y) >= abs(wNorm.x) && abs(wNorm.y) > abs(wNorm.z) ? 1 : 0;
dir.z = abs(wNorm.z) >= abs(wNorm.y) && abs(wNorm.z) >= abs(wNorm.x) ? 1 : 0;
half3 dirSign = sign(wNorm);
dirSign.z = -dirSign.z; // u should be flipped on Z
//half3 maxDir = half3(dirX, dirY, dirZ);
float2 uvX = wPos.zy * float2(dirSign.x, 1.0);
triplanarUV = dir.x * uvX;
float2 uvY = wPos.xz * float2(dirSign.y, 1.0);
triplanarUV = mad(dir.y, uvY, triplanarUV);
float2 uvZ = wPos.xy * float2(dirSign.z, 1.0);
triplanarUV = mad(dir.z, uvZ, triplanarUV);
tanToWrld = half3x3(
dir.y * dirSign.y + dir.z * dirSign.z, 0, wNorm.x,
0, dir.x + dir.z, wNorm.y,
dir.x * dirSign.x, dir.y, wNorm.z
);
}
#endif

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 225aec2e7a259b642a9fa1a4d10d7aac
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,225 @@
Shader "SLZ/Mod2x"
{
Properties
{
[HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
[HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
_MainTex("MainTex", 2D) = "gray" {}
[HDR]_Color("Color", Color) = (1,1,1,0)
_OffsetUnits("OffsetUnits", Int) = -2
_OffsetFactor("OffsetFactor", Int) = -2
_Multiplier("Multiplier", Float) = 1
[Toggle(_ALPHA_ON)] _alpha("alpha", Float) = 0
[Toggle(_VERTEXCOLORS_ON)] _VertexColors("VertexColors", Float) = 1
// [HideInInspector] _texcoord( "", 2D ) = "white" {}
// [HideInInspector]_QueueOffset("_QueueOffset", Float) = 0
// [HideInInspector]_QueueControl("_QueueControl", Float) = -1
// [HideInInspector][NoScaleOffset]unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
// [HideInInspector][NoScaleOffset]unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
// [HideInInspector][NoScaleOffset]unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
}
SubShader
{
LOD 0
Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent-499" "IgnoreProjector" = "True"}
Cull Back
AlphaToMask Off
HLSLINCLUDE
#pragma target 5.0
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/PlatformCompiler.hlsl"
ENDHLSL
Pass
{
Name "Forward"
Tags { "LightMode"="UniversalForward" }
Blend DstColor SrcColor
ZWrite Off
ZTest LEqual
Offset [_OffsetFactor] , [_OffsetUnits]
ColorMask RGBA
HLSLPROGRAM
#define _RECEIVE_SHADOWS_OFF 1
#pragma multi_compile_instancing
#define ASE_SRP_VERSION 999999
#define SHADERPASS SHADERPASS_UNLIT
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
//#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
//#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
#define ASE_NEEDS_FRAG_COLOR
#define ASE_NEEDS_FRAG_WORLD_POSITION
#pragma shader_feature _ALPHA_ON
#pragma shader_feature _VERTEXCOLORS_ON
#pragma multi_compile _ _VOLUMETRICS_ENABLED
#pragma multi_compile_fog
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareOpaqueTexture.hlsl"
struct VertexInput
{
float4 vertex : POSITION;
float3 ase_normal : NORMAL;
float4 ase_texcoord : TEXCOORD0;
float4 ase_color : COLOR;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct VertexOutput
{
float4 clipPos : SV_POSITION;
float3 worldPos : TEXCOORD0;
float fogFactor : TEXCOORD2;
float4 ase_texcoord3 : TEXCOORD3;
float4 ase_color : COLOR;
float4 ase_texcoord4 : TEXCOORD4;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
CBUFFER_START(UnityPerMaterial)
float4 _MainTex_ST;
float4 _Color;
int _OffsetUnits;
int _OffsetFactor;
float _Multiplier;
CBUFFER_END
sampler2D _MainTex;
shared float _StaticLightMultiplier;
VertexOutput VertexFunction ( VertexInput v )
{
VertexOutput o = (VertexOutput)0;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
float4 ase_clipPos = TransformObjectToHClip((v.vertex).xyz);
float4 screenPos = ComputeScreenPos(ase_clipPos);
o.ase_texcoord4 = screenPos;
o.ase_texcoord3.xy = v.ase_texcoord.xy;
o.ase_color = v.ase_color;
//setting value to unused interpolator channels and avoid initialization warnings
o.ase_texcoord3.zw = 0;
v.ase_normal = v.ase_normal;
float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
float4 positionCS = TransformWorldToHClip( positionWS );
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
o.worldPos = positionWS;
#endif
o.fogFactor = ComputeFogFactor( positionCS.z );
o.clipPos = positionCS;
return o;
}
VertexOutput vert ( VertexInput v )
{
return VertexFunction( v );
}
half3 Mod2xFog(half3 fragColor, half fogFactor)
{
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
half fogIntensity = ComputeFogIntensity(fogFactor);
fragColor = lerp(0.5, fragColor, fogIntensity);
#endif
return fragColor;
}
half4 frag ( VertexOutput IN ) : SV_Target
{
UNITY_SETUP_INSTANCE_ID( IN );
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
float3 WorldPosition = IN.worldPos;
#endif
float localMyCustomExpression1_g126 = ( 0.0 );
float2 uv_MainTex = IN.ase_texcoord3.xy * _MainTex_ST.xy + _MainTex_ST.zw;
float4 appendResult52 = (float4(1.0 , 1.0 , 1.0 , IN.ase_color.a));
#ifdef _VERTEXCOLORS_ON
float4 staticSwitch38 = IN.ase_color;
#else
float4 staticSwitch38 = appendResult52;
#endif
float4 temp_output_16_0 = ( tex2D( _MainTex, uv_MainTex ) * _Color * staticSwitch38 );
float4 temp_output_26_0 = ( ( ( temp_output_16_0 - .5 ) * _Multiplier ) + 0.5 );
#ifdef _ALPHA_ON
float4 lerpResult30 = lerp( .5 , temp_output_26_0 , (temp_output_16_0).a);
float4 staticSwitch28 = lerpResult30;
#else
float4 staticSwitch28 = temp_output_26_0;
#endif
float4 color1_g126 = staticSwitch28;
float localMyCustomExpression24_g126 = ( 0.0 );
float4 screenPos = IN.ase_texcoord4;
float4 ase_screenPosNorm = screenPos / screenPos.w;
ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5;
float2 uv24_g126 = (ase_screenPosNorm).xy;
float3 BakedAlbedo = 0;
float3 BakedEmission = 0;
float3 Color = color1_g126.xyz;
float Alpha = 1;
float AlphaClipThreshold = 0.5;
float AlphaClipThresholdShadow = 0.5;
#ifdef _ALPHATEST_ON
clip( Alpha - AlphaClipThreshold );
#endif
#if defined(_ALPHAPREMULTIPLY_ON)
Color *= Alpha;
#endif
#ifdef LOD_FADE_CROSSFADE
LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
#endif
Color.rgb = Mod2xFog( Color, IN.fogFactor );
#if defined(_VOLUMETRICS_ENABLED)
//works fine on the PC but not quest. Using a semi-plausible result otherwise.
#if !defined(SHADER_API_MOBILE)
half3 FroxelColor = GetVolumetricColor(WorldPosition).rgb;
Color.rgb = Color.rgb - 0.5* (2.0*Color.rgb - 1.0) * FroxelColor / SampleSceneColor(uv24_g126).rgb;
#else
half4 FroxelColor = GetVolumetricColor(IN.worldPos);
Color.rgb = Color.rgb + (saturate(FroxelColor.rgb)*(0.5-Color.rgb)); //rgb lerp //x + s(y-x)
Color.rgb = lerp(0.5, Color , saturate(FroxelColor.a*FroxelColor.a) );
#endif
#endif
return half4( Color, Alpha );
}
ENDHLSL
}
}
Fallback "Hidden/InternalErrorShader"
}

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 4c21875978f9ed04d9edcf6d97e9ed54
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b2e867ce46fe95046aaceb0155a651ad
ShaderImporter:
externalObjects: {}
defaultTextures:
- _BaseMap: {fileID: 2800000, guid: e298abdcd2d10894fba4930f7890c1fc, type: 3}
- _WireColor: {fileID: 2800000, guid: 07e40fb4bdc07784493f741d9447821a, type: 3}
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: f71cd8ed99405284ab09d18bf11d03ab
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 44cd4284ecfc46c4c97f571b3681e0c6
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: f05a5c6a2a705054d8547ebd87b58073
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 97791a0150e87a14bbe1a5d46267be8a
ShaderImporter:
externalObjects: {}
defaultTextures:
- _BaseMap: {instanceID: 0}
- g_tBRDFMap: {instanceID: 0}
- _MetallicGlossMap: {fileID: 2800000, guid: 703311043c2b2a14fa1fd24eec4d6b39, type: 3}
- _BumpMap: {instanceID: 0}
- _texcoord: {instanceID: 0}
- unity_Lightmaps: {instanceID: 0}
- unity_LightmapsInd: {instanceID: 0}
- unity_ShadowMasks: {instanceID: 0}
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: ae467daa42d17ee45b6947a14ec8ec96
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 7276a03ae0651b1419b50e2c76272732
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 93a4eb99edd7b9c42bfb913f0ee52b3e
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ca296f3d7b22feb4e81db6271c2350cf
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View file

@ -0,0 +1,138 @@
fileFormatVersion: 2
guid: c96b15076e0088349a95505e52f5a12a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 2
mipBias: 0
wrapU: 1
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 51
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData: "<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ExtraTextureSettings
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n
<detailMap>false</detailMap>\r\n <hemiOctNormals>true</hemiOctNormals>\r\n
<geoRoughness>GenRoughness</geoRoughness>\r\n <geoRoughnessPow>1</geoRoughnessPow>\r\n
<dontReadSource>false</dontReadSource>\r\n</ExtraTextureSettings>"
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View file

@ -0,0 +1,126 @@
fileFormatVersion: 2
guid: 81cc8fbe3bd52d149b2b91936b92bfb8
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 1
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 5
mipMapFadeDistanceEnd: 8
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 1
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 128
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 128
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 128
resizeAlgorithm: 1
textureFormat: 51
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData: "<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ExtraTextureSettings
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n
<detailMap>false</detailMap>\r\n <hemiOctNormals>true</hemiOctNormals>\r\n
<geoRoughness>GenRoughness</geoRoughness>\r\n <geoRoughnessPow>1</geoRoughnessPow>\r\n
<dontReadSource>false</dontReadSource>\r\n</ExtraTextureSettings>"
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,138 @@
fileFormatVersion: 2
guid: 6dc78741d54741a4c90a0fb74bd75f20
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 1
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 1
userData: "<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ExtraTextureSettings
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n
<detailMap>false</detailMap>\r\n <hemiOctNormals>true</hemiOctNormals>\r\n
<geoRoughness>GenRoughness</geoRoughness>\r\n <geoRoughnessPow>1</geoRoughnessPow>\r\n
<dontReadSource>false</dontReadSource>\r\n</ExtraTextureSettings>"
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

View file

@ -0,0 +1,126 @@
fileFormatVersion: 2
guid: 93c33570d60341c439e50150832c5173
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 51
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData: "<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ExtraTextureSettings
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n
<detailMap>false</detailMap>\r\n <hemiOctNormals>true</hemiOctNormals>\r\n
<geoRoughness>GenRoughness</geoRoughness>\r\n <geoRoughnessPow>1</geoRoughnessPow>\r\n
<dontReadSource>false</dontReadSource>\r\n</ExtraTextureSettings>"
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 4a1250fb7f0da2e4e96bd2e34ce4a8ea
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 24617ef4b8ecbe74984e0955867cffd4
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,819 @@
Shader "SLZ/Particle/Motion Vector Billboard Correct Shadows"
{
Properties
{
[HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
_EmissionColor("Emission Color", Color) = (0,0,0,0)
[NoScaleOffset]_MainTex("Main Texture", 2D) = "white" {}
[NoScaleOffset]_EmissionMap("Emission Texture", 2D) = "white" {}
[NoScaleOffset]_MotionVectors("Motion Vectors", 2D) = "white" {}
_UVMotionMultiplier("UV Motion Multiplier", Float) = 0
_Color("Color", Color) = (1,1,1,1)
[Toggle(_BRDFMAP)] BRDFMAP("Enable BRDF map", Float) = 0
[NoScaleOffset]g_tBRDFMap("BRDF map", 2D) = "white" {}
_Depth("Depth", Float) = 0
[ASEEnd][Toggle(_SCALEDEPTHDITHER_ON)] _ScaleDepthDither("Scale Depth Dither", Float) = 0
[HideInInspector]_QueueOffset("_QueueOffset", Float) = 0
[HideInInspector]_QueueControl("_QueueControl", Float) = -1
[HideInInspector][NoScaleOffset]unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
[HideInInspector][NoScaleOffset]unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
[HideInInspector][NoScaleOffset]unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
}
SubShader
{
LOD 0
Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" }
Cull Back
ZWrite Off
ZTest LEqual
Offset 0 , 0
AlphaToMask Off
HLSLINCLUDE
#pragma target 3.0
#pragma prefer_hlslcc gles
#pragma exclude_renderers d3d11_9x
#pragma multi_compile
ENDHLSL
Pass
{
Name "Forward"
Tags { "LightMode"="UniversalForward" }
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
ColorMask RGBA
HLSLPROGRAM
#define _NORMAL_DROPOFF_TS 1
#pragma multi_compile_instancing
//#pragma multi_compile _ LOD_FADE_CROSSFADE
#pragma multi_compile_fog
#define ASE_FOG 1
#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
#define ASE_ABSOLUTE_VERTEX_POS 1
#define ASE_SRP_VERSION 120102
// #pragma multi_compile _ _SCREEN_SPACE_OCCLUSION
#define _DISABLE_LIGHTMAPS
#define _DISABLE_REFLECTIONPROBES
#define _DISABLE_SSAO
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DefaultLitVariants.hlsl"
#pragma vertex vert
#pragma fragment frag
#define SHADERPASS SHADERPASS_FORWARD
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
#include "Include/Particle/billboard.hlsl"
#define ASE_NEEDS_VERT_POSITION
#define ASE_NEEDS_VERT_NORMAL
#define ASE_NEEDS_FRAG_COLOR
#define ASE_NEEDS_FRAG_SCREEN_POSITION
#pragma shader_feature_local _SCALEDEPTHDITHER_ON
#pragma shader_feature_local_fragment _BRDFMAP
#ifndef SHADER_API_MOBILE
#define ASE_DEPTH_WRITE_ON
#endif
struct VertexInput
{
float4 vertex : POSITION;
half3 normal : NORMAL;
half4 tangent : TANGENT;
float4 texcoord : TEXCOORD0; //uv, uv2
float4 texcoord1 : TEXCOORD1; //anim blend, anim frame, center.xy
float texcoord2 : TEXCOORD2; //center.z
half4 vColor : COLOR;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct VertexOutput
{
float4 clipPos : SV_POSITION;
half4 vColor : COLOR;
half4 uv01 : TEXCOORD0;
half3 SH : TEXCOORD1;
half4 fog_x_vLight_rgb : TEXCOORD2;
half4 wNormal_xyz_animBlend_x : TEXCOORD3;
float3 wPos : TEXCOORD4;
float4 pCenter_xyz_animFrame_x : TEXCOORD5;
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
float4 shadowCoord : TEXCOORD6;
#endif
#if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
float4 screenPos : TEXCOORD7;
#endif
#if defined(DYNAMICLIGHTMAP_ON)
float2 dynamicLightmapUV : TEXCOORD8;
#endif
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
CBUFFER_START(UnityPerMaterial)
float4 _Color;
float4 _EmissionColor;
float _UVMotionMultiplier;
float _Depth;
CBUFFER_END
Texture2D _MainTex; SamplerState sampler_MainTex;
Texture2D _EmissionMap; SamplerState sampler_EmissionMap;
Texture2D _MotionVectors; SamplerState sampler_MotionVectors;
TEXTURE2D_ARRAY(_SLZ_DitherTex2D);
int NoisePixels;
int _SLZ_TexSel;
int NoiseArraySize;
SAMPLER(sampler_SLZ_DitherTex2D);
inline float4 ASE_ComputeGrabScreenPos( float4 pos )
{
#if UNITY_UV_STARTS_AT_TOP
float scale = -1.0;
#else
float scale = 1.0;
#endif
float4 o = pos;
o.y = pos.w * 0.5f;
o.y = ( pos.y - o.y ) * _ProjectionParams.x * scale + o.y;
return o;
}
VertexOutput VertexFunction( VertexInput v )
{
VertexOutput o = (VertexOutput)0;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
float3 particleCenter = float3(v.texcoord1.z , v.texcoord1.w , v.texcoord2.x);
v.vertex.xyz = particle_face_camera(v.vertex.xyz , v.normal, particleCenter);
o.vColor = v.vColor;
o.uv01 = v.texcoord;
float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
float4 positionCS = TransformWorldToHClip( positionWS );
o.wPos = positionWS;
VertexNormalInputs normalInput = GetVertexNormalInputs( v.normal, v.tangent );
o.wNormal_xyz_animBlend_x = half4(normalInput.normalWS.xyz, v.texcoord1.x);
o.pCenter_xyz_animFrame_x = float4(v.texcoord1.zw, v.texcoord2.x, v.texcoord1.y);
#if defined(DYNAMICLIGHTMAP_ON)
o.dynamicLightmapUV.xy = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw;
#endif
#if !defined(LIGHTMAP_ON)
OUTPUT_SH( normalInput.normalWS.xyz, o.SH.xyz );
#endif
half3 vertexLight = VertexLighting( positionWS, normalInput.normalWS );
#ifdef ASE_FOG
half fogFactor = ComputeFogFactor( positionCS.z );
#else
half fogFactor = 0;
#endif
o.fog_x_vLight_rgb = half4(fogFactor, vertexLight);
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
VertexPositionInputs vertexInput = (VertexPositionInputs)0;
vertexInput.positionWS = positionWS;
vertexInput.positionCS = positionCS;
o.shadowCoord = GetShadowCoord( vertexInput );
#endif
o.clipPos = positionCS;
#if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
o.screenPos = ComputeScreenPos(positionCS);
#endif
return o;
}
VertexOutput vert ( VertexInput v )
{
return VertexFunction( v );
}
#if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE)
#define ASE_SV_DEPTH SV_DepthLessEqual
#else
#define ASE_SV_DEPTH SV_Depth
#endif
half4 frag ( VertexOutput IN
#ifdef ASE_DEPTH_WRITE_ON
,out float outputDepth : ASE_SV_DEPTH
#endif
) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(IN);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
#ifdef LOD_FADE_CROSSFADE
LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
#endif
half3 WorldNormal = normalize( IN.wNormal_xyz_animBlend_x.xyz);
float3 WorldPosition = IN.wPos;
float3 WorldViewDirection = _WorldSpaceCameraPos.xyz - WorldPosition;
float4 ShadowCoords = float4( 0, 0, 0, 0 );
#if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
float4 ScreenPos = IN.screenPos;
#endif
WorldViewDirection = SafeNormalize( WorldViewDirection );
half animBlend = IN.wNormal_xyz_animBlend_x.w;
float animFrame = IN.pCenter_xyz_animFrame_x.w;
float2 motionVectorOffset1 = (SAMPLE_TEXTURE2D( _MotionVectors, sampler_MotionVectors, IN.uv01.xy).rg - 0.5 ) * animBlend * -_UVMotionMultiplier;
float2 motionVectorOffset2 = (SAMPLE_TEXTURE2D( _MotionVectors, sampler_MotionVectors, IN.uv01.zw).rg - 0.5 ) * ( 1.0 - animBlend ) * _UVMotionMultiplier;
float4 albedo = lerp( SAMPLE_TEXTURE2D( _MainTex, sampler_MainTex, IN.uv01.xy + motionVectorOffset1),
SAMPLE_TEXTURE2D( _MainTex, sampler_MainTex, IN.uv01.zw + motionVectorOffset2), animBlend);
albedo = IN.vColor * albedo * _Color;
float4 emission = lerp( SAMPLE_TEXTURE2D( _EmissionMap, sampler_EmissionMap, IN.uv01.xy + motionVectorOffset1),
SAMPLE_TEXTURE2D( _EmissionMap, sampler_EmissionMap, IN.uv01.zw + motionVectorOffset2), animBlend);
float4 ase_grabScreenPos = ASE_ComputeGrabScreenPos( ScreenPos );
float4 ase_grabScreenPosNorm = ase_grabScreenPos / ase_grabScreenPos.w;
#ifdef _SCALEDEPTHDITHER_ON
float staticSwitch72 = ( _Depth * IN.uv01.z );
#else
float staticSwitch72 = _Depth;
#endif
float2 depthDitherUV = ase_grabScreenPosNorm.xy * _ScreenParams.xy / NoisePixels;
float depthDitherIndex = fmod((float)_SLZ_TexSel + floor((float)NoiseArraySize * animFrame) , (float)NoiseArraySize);
float clipOffset = (SAMPLE_TEXTURE2D_ARRAY( _SLZ_DitherTex2D, sampler_SLZ_DitherTex2D, depthDitherUV , depthDitherIndex).r - 0.5) * staticSwitch72;
float offsetClipW = ( IN.clipPos.w + clipOffset);
float3 Albedo = albedo.rgb;
float3 Normal = float3(0, 0, 1);
float3 Emission = (emission*_EmissionColor).rgb;
#if 0
float3 BakedEmission = 0;
#endif
float3 Specular = 0.5;
float Metallic = 0;
float Smoothness = 0.5;
float Occlusion = 1;
float Alpha = albedo.a;
float AlphaClipThreshold = 0.5;
float AlphaClipThresholdShadow = 0.5;
float3 BakedGI = 0;
float3 RefractionColor = 1;
float RefractionIndex = 1;
float3 Transmission = 1;
float3 Translucency = 1;
//#ifdef ASE_DEPTH_WRITE_ON
float DepthValue = ( ( 1.0 - ( offsetClipW * _ZBufferParams.w ) ) / ( offsetClipW * _ZBufferParams.z ) );
//#endif
#ifdef _CLEARCOAT
float CoatMask = 0;
float CoatSmoothness = 0;
#endif
#ifdef _ALPHATEST_ON
clip(Alpha - AlphaClipThreshold);
#endif
InputData inputData = (InputData)0;
inputData.positionWS = WorldPosition;
inputData.viewDirectionWS = WorldViewDirection;
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
inputData.shadowCoord = IN.shadowCoord;
#elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
float depthZ = Linear01Depth(DepthValue, _ZBufferParams) * (_ProjectionParams.z - _ProjectionParams.y) + _ProjectionParams.y;
float3 shadowPos = WorldViewDirection * (depthZ / -(dot(WorldViewDirection, UNITY_MATRIX_V._m20_m21_m22))) + _WorldSpaceCameraPos;
inputData.shadowCoord = TransformWorldToShadowCoord(shadowPos);
#else
inputData.shadowCoord = float4(0, 0, 0, 0);
#endif
#ifdef _NORMALMAP
#if _NORMAL_DROPOFF_TS
inputData.normalWS = TransformTangentToWorld(Normal, half3x3( WorldTangent, WorldBiTangent, WorldNormal ));
#elif _NORMAL_DROPOFF_OS
inputData.normalWS = TransformObjectToWorldNormal(Normal);
#elif _NORMAL_DROPOFF_WS
inputData.normalWS = Normal;
#endif
inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS);
#else
inputData.normalWS = WorldNormal;
#endif
#ifdef ASE_FOG
inputData.fogCoord = IN.fog_x_vLight_rgb.x;
#endif
inputData.vertexLighting = IN.fog_x_vLight_rgb.yzw;
#if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL)
float3 SH = SampleSH(inputData.normalWS.xyz);
#else
float3 SH = IN.SH.xyz;
#endif
#if defined(DYNAMICLIGHTMAP_ON)
#ifdef LIGHTMAP_ON
float4 encodedGI = SAMPLE_GI_DIR(IN.SH.xyz, IN.dynamicLightmapUV.xy, IN.vertexSH, inputData.normalWS, Smoothness, WorldViewDirection);
inputData.bakedGI = encodedGI.rgb;
float BakedSpecular = encodedGI.w;
#else
inputData.bakedGI = SAMPLE_GI(IN.SH.xy, IN.dynamicLightmapUV.xy, IN.vertexSH , inputData.normalWS);
#endif
#else
#ifdef LIGHTMAP_ON
float4 encodedGI = SAMPLE_GI_DIR(IN.SH.xy, IN.lightmapUVOrVertexSH.xyz, inputData.normalWS, Smoothness, WorldViewDirection);
inputData.bakedGI = encodedGI.rgb;
float BakedSpecular = encodedGI.w;
#else
inputData.bakedGI = SAMPLE_GI(IN.SH.xy, IN.SH.xyz, inputData.normalWS);
#endif
#endif
#ifdef _ASE_BAKEDGI
inputData.bakedGI = BakedGI;
#endif
inputData.normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(IN.clipPos);
inputData.shadowMask = SAMPLE_SHADOWMASK(IN.lightmapUVOrVertexSH.xy);
#if defined(DEBUG_DISPLAY)
#if defined(DYNAMICLIGHTMAP_ON)
inputData.dynamicLightmapUV = IN.dynamicLightmapUV.xy;
#endif
#if defined(LIGHTMAP_ON)
inputData.staticLightmapUV = IN.lightmapUVOrVertexSH.xy;
#else
inputData.vertexSH = SH;
#endif
#endif
SurfaceData surfaceData;
surfaceData.albedo = Albedo;
surfaceData.metallic = saturate(Metallic);
surfaceData.specular = Specular;
surfaceData.smoothness = saturate(Smoothness),
surfaceData.occlusion = Occlusion,
surfaceData.emission = Emission,
surfaceData.alpha = saturate(Alpha);
surfaceData.normalTS = Normal;
surfaceData.clearCoatMask = 0;
surfaceData.clearCoatSmoothness = 1;
#ifdef _CLEARCOAT
surfaceData.clearCoatMask = saturate(CoatMask);
surfaceData.clearCoatSmoothness = saturate(CoatSmoothness);
#endif
#ifdef _DBUFFER
ApplyDecalToSurfaceData(IN.clipPos, surfaceData, inputData);
#endif
half4 color = UniversalFragmentPBR( inputData, surfaceData);
#ifdef LIGHTMAP_ON
float3 MetalSpec = lerp(kDieletricSpec.rgb, surfaceData.albedo , surfaceData.metallic);
color.rgb += BakedSpecular * surfaceData.occlusion * MetalSpec * inputData.bakedGI.rgb;
#endif
#ifdef _TRANSMISSION_ASE
{
float shadow = _TransmissionShadow;
Light mainLight = GetMainLight( inputData.shadowCoord );
float3 mainAtten = mainLight.color * mainLight.distanceAttenuation;
mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow );
half3 mainTransmission = max(0 , -dot(inputData.normalWS, mainLight.direction)) * mainAtten * Transmission;
color.rgb += Albedo * mainTransmission;
#ifdef _ADDITIONAL_LIGHTS
int transPixelLightCount = GetAdditionalLightsCount();
for (int i = 0; i < transPixelLightCount; ++i)
{
Light light = GetAdditionalLight(i, inputData.positionWS);
float3 atten = light.color * light.distanceAttenuation;
atten = lerp( atten, atten * light.shadowAttenuation, shadow );
half3 transmission = max(0 , -dot(inputData.normalWS, light.direction)) * atten * Transmission;
color.rgb += Albedo * transmission;
}
#endif
}
#endif
#ifdef _TRANSLUCENCY_ASE
{
float shadow = _TransShadow;
float normal = _TransNormal;
float scattering = _TransScattering;
float direct = _TransDirect;
float ambient = _TransAmbient;
float strength = _TransStrength;
Light mainLight = GetMainLight( inputData.shadowCoord );
float3 mainAtten = mainLight.color * mainLight.distanceAttenuation;
mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow );
half3 mainLightDir = mainLight.direction + inputData.normalWS * normal;
half mainVdotL = pow( saturate( dot( inputData.viewDirectionWS, -mainLightDir ) ), scattering );
half3 mainTranslucency = mainAtten * ( mainVdotL * direct + inputData.bakedGI * ambient ) * Translucency;
color.rgb += Albedo * mainTranslucency * strength;
#ifdef _ADDITIONAL_LIGHTS
int transPixelLightCount = GetAdditionalLightsCount();
for (int i = 0; i < transPixelLightCount; ++i)
{
Light light = GetAdditionalLight(i, inputData.positionWS);
float3 atten = light.color * light.distanceAttenuation;
atten = lerp( atten, atten * light.shadowAttenuation, shadow );
half3 lightDir = light.direction + inputData.normalWS * normal;
half VdotL = pow( saturate( dot( inputData.viewDirectionWS, -lightDir ) ), scattering );
half3 translucency = atten * ( VdotL * direct + inputData.bakedGI * ambient ) * Translucency;
color.rgb += Albedo * translucency * strength;
}
#endif
}
#endif
#ifdef _REFRACTION_ASE
float4 projScreenPos = ScreenPos / ScreenPos.w;
float3 refractionOffset = ( RefractionIndex - 1.0 ) * mul( UNITY_MATRIX_V, float4( WorldNormal,0 ) ).xyz * ( 1.0 - dot( WorldNormal, WorldViewDirection ) );
projScreenPos.xy += refractionOffset.xy;
float3 refraction = SHADERGRAPH_SAMPLE_SCENE_COLOR( projScreenPos.xy ) * RefractionColor;
color.rgb = lerp( refraction, color.rgb, color.a );
color.a = 1;
#endif
#ifdef ASE_FINAL_COLOR_ALPHA_MULTIPLY
color.rgb *= color.a;
#endif
#ifdef ASE_FOG
#ifdef TERRAIN_SPLAT_ADDPASS
color.rgb = MixFogColor(color.rgb, half3( 0, 0, 0 ), IN.fog_x_vLight_rgb.x );
#else
color.rgb = MixFog(color.rgb, -inputData.viewDirectionWS, IN.fog_x_vLight_rgb.x);
#endif
#endif
color = Volumetrics( color, inputData.positionWS);
#ifdef ASE_DEPTH_WRITE_ON
outputDepth = DepthValue;
#endif
return color;
}
ENDHLSL
}
Pass
{
Name "ShadowCaster"
Tags { "LightMode"="ShadowCaster" }
ZWrite On
ZTest LEqual
AlphaToMask Off
ColorMask 0
HLSLPROGRAM
#define _NORMAL_DROPOFF_TS 1
#pragma multi_compile_instancing
#pragma multi_compile_fog
#define ASE_FOG 1
#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
#define ASE_ABSOLUTE_VERTEX_POS 1
#define ASE_SRP_VERSION 120102
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW
#define SHADERPASS SHADERPASS_SHADOWCASTER
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
#include "Include/Particle/billboard.hlsl"
#define ASE_NEEDS_VERT_POSITION
#define ASE_NEEDS_VERT_NORMAL
#pragma shader_feature_local _SCALEDEPTHDITHER_ON
#ifndef SHADER_API_MOBILE
#define ASE_DEPTH_WRITE_ON
#endif
struct VertexInput
{
float4 vertex : POSITION;
float3 ase_normal : NORMAL;
float4 ase_texcoord1 : TEXCOORD1;
float4 ase_texcoord2 : TEXCOORD2;
float4 ase_color : COLOR;
float4 ase_texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct VertexOutput
{
float4 clipPos : SV_POSITION;
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
float3 worldPos : TEXCOORD0;
#endif
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
float4 shadowCoord : TEXCOORD1;
#endif
float4 ase_color : COLOR;
float4 ase_texcoord2 : TEXCOORD2;
float4 ase_texcoord3 : TEXCOORD3;
float4 ase_texcoord4 : TEXCOORD4;
float4 ase_texcoord5 : TEXCOORD5;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
CBUFFER_START(UnityPerMaterial)
float4 _Color;
float _UVMotionMultiplier;
float _Depth;
#ifdef _TRANSMISSION_ASE
float _TransmissionShadow;
#endif
#ifdef _TRANSLUCENCY_ASE
float _TransStrength;
float _TransNormal;
float _TransScattering;
float _TransDirect;
float _TransAmbient;
float _TransShadow;
#endif
#ifdef TESSELLATION_ON
float _TessPhongStrength;
float _TessValue;
float _TessMin;
float _TessMax;
float _TessEdgeLength;
float _TessMaxDisp;
#endif
CBUFFER_END
sampler2D _MainTex;
sampler2D _MotionVectors;
TEXTURE2D_ARRAY(_SLZ_DitherTex2D);
int NoisePixels;
int _SLZ_TexSel;
int NoiseArraySize;
SAMPLER(sampler_SLZ_DitherTex2D);
inline float4 ASE_ComputeGrabScreenPos( float4 pos )
{
#if UNITY_UV_STARTS_AT_TOP
float scale = -1.0;
#else
float scale = 1.0;
#endif
float4 o = pos;
o.y = pos.w * 0.5f;
o.y = ( pos.y - o.y ) * _ProjectionParams.x * scale + o.y;
return o;
}
float3 _LightDirection;
float3 _LightPosition;
VertexOutput VertexFunction( VertexInput v )
{
VertexOutput o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
float4 vertex84 = float4( v.vertex.xyz , 0.0 );
float3 normal84 = v.ase_normal;
float3 tangent84 = float3( 0,0,0 );
float3 appendResult88 = (float3(v.ase_texcoord1.z , v.ase_texcoord1.w , v.ase_texcoord2.x));
float3 center84 = appendResult88;
float3 localparticle_face_camera84 = particle_face_camera( vertex84 , normal84, center84 );
float4 ase_clipPos = TransformObjectToHClip((v.vertex).xyz);
float4 screenPos = ComputeScreenPos(ase_clipPos);
o.ase_texcoord5 = screenPos;
o.ase_color = v.ase_color;
o.ase_texcoord2 = v.ase_texcoord;
o.ase_texcoord3 = v.ase_texcoord1;
o.ase_texcoord4 = v.vertex;
#ifdef ASE_ABSOLUTE_VERTEX_POS
float3 defaultVertexValue = v.vertex.xyz;
#else
float3 defaultVertexValue = float3(0, 0, 0);
#endif
float3 vertexValue = localparticle_face_camera84;
#ifdef ASE_ABSOLUTE_VERTEX_POS
v.vertex.xyz = vertexValue;
#else
v.vertex.xyz += vertexValue;
#endif
v.ase_normal = normal84;
float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
o.worldPos = positionWS;
#endif
float3 normalWS = TransformObjectToWorldDir(v.ase_normal);
#if _CASTING_PUNCTUAL_LIGHT_SHADOW
float3 lightDirectionWS = normalize(_LightPosition - positionWS);
#else
float3 lightDirectionWS = _LightDirection;
#endif
float4 clipPos = ApplySLZShadowBias(positionWS, normalWS, lightDirectionWS);
#if UNITY_REVERSED_Z
clipPos.z = min(clipPos.z, UNITY_NEAR_CLIP_VALUE);
#else
clipPos.z = max(clipPos.z, UNITY_NEAR_CLIP_VALUE);
#endif
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
VertexPositionInputs vertexInput = (VertexPositionInputs)0;
vertexInput.positionWS = positionWS;
vertexInput.positionCS = clipPos;
o.shadowCoord = GetShadowCoord( vertexInput );
#endif
o.clipPos = clipPos;
return o;
}
VertexOutput vert ( VertexInput v )
{
return VertexFunction( v );
}
#if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE)
#define ASE_SV_DEPTH SV_DepthLessEqual
#else
#define ASE_SV_DEPTH SV_Depth
#endif
half4 frag( VertexOutput IN
#ifdef ASE_DEPTH_WRITE_ON
,out float outputDepth : ASE_SV_DEPTH
#endif
) : SV_TARGET
{
UNITY_SETUP_INSTANCE_ID( IN );
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
float3 WorldPosition = IN.worldPos;
#endif
float4 ShadowCoords = float4( 0, 0, 0, 0 );
#if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
ShadowCoords = IN.shadowCoord;
#elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
#endif
#endif
float2 temp_output_8_0 = (IN.ase_texcoord2).xy;
float4 temp_cast_1 = (0.5).xxxx;
float2 temp_output_9_0 = (IN.ase_texcoord2).zw;
float4 temp_cast_4 = (0.5).xxxx;
float4 lerpResult4 = lerp( tex2D( _MainTex, ( float4( temp_output_8_0, 0.0 , 0.0 ) + ( ( tex2D( _MotionVectors, temp_output_8_0 ) - temp_cast_1 ) * IN.ase_texcoord3.xyz.x * -_UVMotionMultiplier ) ).rg ) , tex2D( _MainTex, ( float4( temp_output_9_0, 0.0 , 0.0 ) + ( ( tex2D( _MotionVectors, temp_output_9_0 ) - temp_cast_4 ) * ( 1.0 - IN.ase_texcoord3.xyz.x ) * -1.0 * -_UVMotionMultiplier ) ).rg ) , IN.ase_texcoord3.xyz.x);
float4 temp_output_11_0 = ( IN.ase_color * lerpResult4 * _Color );
float4 unityObjectToClipPos92 = TransformWorldToHClip(TransformObjectToWorld(IN.ase_texcoord4.xyz));
float4 screenPos = IN.ase_texcoord5;
float4 ase_grabScreenPos = ASE_ComputeGrabScreenPos( screenPos );
float4 ase_grabScreenPosNorm = ase_grabScreenPos / ase_grabScreenPos.w;
float4 temp_cast_8 = (0.5).xxxx;
#ifdef _SCALEDEPTHDITHER_ON
float staticSwitch72 = ( _Depth * IN.ase_texcoord3.xyz.z );
#else
float staticSwitch72 = _Depth;
#endif
float temp_output_4_0_g44 = ( unityObjectToClipPos92.w + ( ( SAMPLE_TEXTURE2D_ARRAY( _SLZ_DitherTex2D, sampler_SLZ_DitherTex2D, ( (ase_grabScreenPosNorm).xy * ( (_ScreenParams).xy / NoisePixels ) ),(float)( ( _SLZ_TexSel + (int)( NoiseArraySize * IN.ase_texcoord3.xyz.y ) ) % NoiseArraySize ) ) - temp_cast_8 ) * staticSwitch72 ).r );
float Alpha = (temp_output_11_0).a;
float AlphaClipThreshold = 0.5;
float AlphaClipThresholdShadow = 0.5;
#ifdef ASE_DEPTH_WRITE_ON
float DepthValue = ( ( 1.0 - ( temp_output_4_0_g44 * _ZBufferParams.w ) ) / ( temp_output_4_0_g44 * _ZBufferParams.z ) );
#endif
#ifdef _ALPHATEST_ON
#ifdef _ALPHATEST_SHADOW_ON
clip(Alpha - AlphaClipThresholdShadow);
#else
clip(Alpha - AlphaClipThreshold);
#endif
#endif
#ifdef LOD_FADE_CROSSFADE
LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
#endif
#ifdef ASE_DEPTH_WRITE_ON
outputDepth = DepthValue;
#endif
return 0;
}
ENDHLSL
}
}
CustomEditor "UnityEditor.ShaderGraphLitGUI"
Fallback "Hidden/InternalErrorShader"
}

View file

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: a0cae63ef60b7da4f9cb90b8cdb4ce4e
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,27 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2ec995e51a6e251468d2a3fd8a686257, type: 3}
m_Name: UniversalRenderPipelineGlobalSettings
m_EditorClassIdentifier:
k_AssetVersion: 2
lightLayerName0: Light Layer default
lightLayerName1: Light Layer 1
lightLayerName2: Light Layer 2
lightLayerName3: Light Layer 3
lightLayerName4: Light Layer 4
lightLayerName5: Light Layer 5
lightLayerName6: Light Layer 6
lightLayerName7: Light Layer 7
m_StripDebugVariants: 1
m_StripUnusedPostProcessingVariants: 0
m_StripUnusedVariants: 1
supportRuntimeDebugDisplay: 0

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7854839073f855740851081b9422a1bf
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show more