diff --git a/.gitignore b/.gitignore index aaa8cef1..82dd6401 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,5 @@ !/Imports/CaveOfHiddenTomb !/Imports/Audio Clips !/Imports/Realistic -!/Imports/Ratel \ No newline at end of file +!/Imports/Ratel +!/Imports/Beautify \ No newline at end of file diff --git a/Imports/Beautify/Builtin.meta b/Imports/Beautify/Builtin.meta new file mode 100644 index 00000000..f9be9194 --- /dev/null +++ b/Imports/Beautify/Builtin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 835ec2e95f94c4902b8f424bea3851d2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/Builtin/BeautifyBuiltinPipeline.unitypackage b/Imports/Beautify/Builtin/BeautifyBuiltinPipeline.unitypackage new file mode 100644 index 00000000..b986c9eb --- /dev/null +++ b/Imports/Beautify/Builtin/BeautifyBuiltinPipeline.unitypackage @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2c00ed3e2a36ca65c40a5359b40b70617accfa038984657049255a97aceb5db +size 43546468 diff --git a/Imports/Beautify/Builtin/BeautifyBuiltinPipeline.unitypackage.meta b/Imports/Beautify/Builtin/BeautifyBuiltinPipeline.unitypackage.meta new file mode 100644 index 00000000..16fd8cc8 --- /dev/null +++ b/Imports/Beautify/Builtin/BeautifyBuiltinPipeline.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7d9615768027a46c6be8471f9831fb64 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP.meta b/Imports/Beautify/URP.meta new file mode 100644 index 00000000..232fe93d --- /dev/null +++ b/Imports/Beautify/URP.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3f9961d11e2134c169394003911b1353 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Beautify_URP.unitypackage b/Imports/Beautify/URP/Beautify_URP.unitypackage new file mode 100644 index 00000000..da9a9e5f --- /dev/null +++ b/Imports/Beautify/URP/Beautify_URP.unitypackage @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e50db4393cf3419d947a768857edf5a70d5d821111c8c63a262d918c8b2808d7 +size 33984359 diff --git a/Imports/Beautify/URP/Beautify_URP.unitypackage.meta b/Imports/Beautify/URP/Beautify_URP.unitypackage.meta new file mode 100644 index 00000000..be76530f --- /dev/null +++ b/Imports/Beautify/URP/Beautify_URP.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b5a026086e55c4223bca096f44d38711 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo.meta b/Imports/Beautify/URP/Demo.meta new file mode 100644 index 00000000..e37973a8 --- /dev/null +++ b/Imports/Beautify/URP/Demo.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7da73911376c04403a2c651fb4ed8db4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources.meta b/Imports/Beautify/URP/Demo/DemoSources.meta new file mode 100644 index 00000000..328fd2f4 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 777e31ef507ec4febb92b6688c89a9e3 +folderAsset: yes +timeCreated: 1462519607 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials.meta b/Imports/Beautify/URP/Demo/DemoSources/Materials.meta new file mode 100644 index 00000000..f286fd4c --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 157f5f4e06c7e41c89fbb4f9fbdeb27b +folderAsset: yes +timeCreated: 1465307842 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/BluishEmissive.mat b/Imports/Beautify/URP/Demo/DemoSources/Materials/BluishEmissive.mat new file mode 100644 index 00000000..e0b2f36d --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/BluishEmissive.mat @@ -0,0 +1,132 @@ +%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: BluishEmissive + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _EMISSION + m_InvalidKeywords: [] + m_LightmapFlags: 2 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_LockedProperties: + 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} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + 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} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + 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 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0, g: 0.5137931, b: 1, a: 1} + - _Color: {r: 0, g: 0.5137931, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0.5187909, b: 1.4934778, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] +--- !u!114 &459922976277588049 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 7 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/BluishEmissive.mat.meta b/Imports/Beautify/URP/Demo/DemoSources/Materials/BluishEmissive.mat.meta new file mode 100644 index 00000000..ad1f9246 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/BluishEmissive.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3f665cbb95d06419dab6831f996994ae +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightBlueEmissive.mat b/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightBlueEmissive.mat new file mode 100644 index 00000000..e0f95c9b --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightBlueEmissive.mat @@ -0,0 +1,132 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-5499540237844167067 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 7 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: BrightBlueEmissive + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _EMISSION + m_InvalidKeywords: [] + m_LightmapFlags: 2 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_LockedProperties: + 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} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + 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} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + 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 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.5137987, g: 0.5137987, b: 1, a: 1} + - _Color: {r: 0.5137987, g: 0.5137987, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 11.211581, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightBlueEmissive.mat.meta b/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightBlueEmissive.mat.meta new file mode 100644 index 00000000..c6f3651d --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightBlueEmissive.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0067d374af558414bb48e3b34a1c2323 +timeCreated: 1478863058 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightRedEmissive.mat b/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightRedEmissive.mat new file mode 100644 index 00000000..b2a42787 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightRedEmissive.mat @@ -0,0 +1,132 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-1699392176167857644 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 7 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: BrightRedEmissive + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _EMISSION + m_InvalidKeywords: [] + m_LightmapFlags: 1 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_LockedProperties: + 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} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + 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} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + 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 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 0.5138042, b: 0.5137254, a: 1} + - _Color: {r: 1, g: 0.51380414, b: 0.51372534, a: 1} + - _EmissionColor: {r: 11.211583, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightRedEmissive.mat.meta b/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightRedEmissive.mat.meta new file mode 100644 index 00000000..f1cd75f5 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightRedEmissive.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aa631c03375c24c4cbe310de744f058f +timeCreated: 1478863141 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightWhiteEmissive.mat b/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightWhiteEmissive.mat new file mode 100644 index 00000000..3d36ad20 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightWhiteEmissive.mat @@ -0,0 +1,132 @@ +%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: BrightWhiteEmissive + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _EMISSION + m_InvalidKeywords: [] + m_LightmapFlags: 2 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_LockedProperties: + 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} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + 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} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + 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 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.5137931, g: 0.5137931, b: 0.5137931, a: 1} + - _Color: {r: 0.5137931, g: 0.5137931, b: 0.5137931, a: 1} + - _EmissionColor: {r: 11.211579, g: 11.211579, b: 11.211579, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] +--- !u!114 &6085971584056948090 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 7 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightWhiteEmissive.mat.meta b/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightWhiteEmissive.mat.meta new file mode 100644 index 00000000..0c4c4817 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/BrightWhiteEmissive.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f0fd2d801240046b7b673468d8a86e6f +timeCreated: 1475946238 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/GreenEmissive.mat b/Imports/Beautify/URP/Demo/DemoSources/Materials/GreenEmissive.mat new file mode 100644 index 00000000..36fb9266 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/GreenEmissive.mat @@ -0,0 +1,132 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-3247939049424181077 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 7 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: GreenEmissive + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _EMISSION + m_InvalidKeywords: [] + m_LightmapFlags: 2 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_LockedProperties: + 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} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + 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} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + 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 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0, g: 0.509, b: 0, a: 1} + - _Color: {r: 0, g: 0.50899994, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 1, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/GreenEmissive.mat.meta b/Imports/Beautify/URP/Demo/DemoSources/Materials/GreenEmissive.mat.meta new file mode 100644 index 00000000..2098a235 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/GreenEmissive.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dc62823918da4474aa9e1f0ac5dda8e7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/Quad.mat b/Imports/Beautify/URP/Demo/DemoSources/Materials/Quad.mat new file mode 100644 index 00000000..bd1782a8 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/Quad.mat @@ -0,0 +1,131 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-5045325534731926743 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 7 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Quad + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 2800000, guid: 557dec91771464758a75e390f553373d, type: 3} + 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} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + 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: 2800000, guid: 557dec91771464758a75e390f553373d, type: 3} + 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} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + 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 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.2 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _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} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/Quad.mat.meta b/Imports/Beautify/URP/Demo/DemoSources/Materials/Quad.mat.meta new file mode 100644 index 00000000..9f964858 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/Quad.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 50867211f1c3a4f4d873b9e9a2345b09 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/ReddishEmissive.mat b/Imports/Beautify/URP/Demo/DemoSources/Materials/ReddishEmissive.mat new file mode 100644 index 00000000..33f484b4 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/ReddishEmissive.mat @@ -0,0 +1,136 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-9038392548793152760 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 7 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ReddishEmissive + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _EMISSION + m_InvalidKeywords: [] + m_LightmapFlags: 2 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_LockedProperties: + 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} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + 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} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + 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 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 0.78431374, b: 0, a: 1} + - _Color: {r: 1, g: 0.78431374, b: 0, a: 1} + - _EmissionColor: {r: 4.594794, g: 0.10287979, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/ReddishEmissive.mat.meta b/Imports/Beautify/URP/Demo/DemoSources/Materials/ReddishEmissive.mat.meta new file mode 100644 index 00000000..9acbcf21 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/ReddishEmissive.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 520cb4efa7fe74af489b70716d3ad15d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/Skybox.mat b/Imports/Beautify/URP/Demo/DemoSources/Materials/Skybox.mat new file mode 100644 index 00000000..2f837e71 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/Skybox.mat @@ -0,0 +1,103 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Skybox + m_Shader: {fileID: 104, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BackTex: + m_Texture: {fileID: 2800000, guid: cc9e016a2e3f0450fac218857a5735a5, type: 3} + 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} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DownTex: + m_Texture: {fileID: 2800000, guid: f560d74ff147f42f59dae87bed823663, type: 3} + 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} + - _FrontTex: + m_Texture: {fileID: 2800000, guid: 58e8bd7fe81bc4bdfaa0aca16a4fbfd9, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LeftTex: + m_Texture: {fileID: 2800000, guid: dda2e23fd5b2b455aa17ca42de02ee8f, type: 3} + 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} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RightTex: + m_Texture: {fileID: 2800000, guid: fb85cc19dc8f0487a8577530b89b48ec, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Tex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UpTex: + m_Texture: {fileID: 2800000, guid: 21beb9f9536cc42798b5eec3b533de67, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Exposure: 1.06 + - _Glossiness: 0.5 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _Rotation: 0 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Tint: {r: 0.472, g: 0.478, b: 0.478, a: 0.497} diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/Skybox.mat.meta b/Imports/Beautify/URP/Demo/DemoSources/Materials/Skybox.mat.meta new file mode 100644 index 00000000..d02c69ec --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/Skybox.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4df845aa63d7e4feab9be5b658f46012 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/StonePath.mat b/Imports/Beautify/URP/Demo/DemoSources/Materials/StonePath.mat new file mode 100644 index 00000000..75f9b5fa --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/StonePath.mat @@ -0,0 +1,131 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-4843335661373119716 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 7 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: StonePath + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 6 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 2800000, guid: 557dec91771464758a75e390f553373d, type: 3} + m_Scale: {x: 2, y: 20} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 2, y: 20} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 557dec91771464758a75e390f553373d, type: 3} + m_Scale: {x: 2, y: 20} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + 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 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.2 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.2 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _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} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/StonePath.mat.meta b/Imports/Beautify/URP/Demo/DemoSources/Materials/StonePath.mat.meta new file mode 100644 index 00000000..38a61da1 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/StonePath.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a3446cf188dca4f6a973eeb8189308f6 +timeCreated: 1475679226 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/StoneWall.mat b/Imports/Beautify/URP/Demo/DemoSources/Materials/StoneWall.mat new file mode 100644 index 00000000..444cebbd --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/StoneWall.mat @@ -0,0 +1,131 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-3063801942314024869 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 7 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: StoneWall + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 2800000, guid: 557dec91771464758a75e390f553373d, type: 3} + 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} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + 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: 2800000, guid: 557dec91771464758a75e390f553373d, type: 3} + 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} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + 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 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.2 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.2 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _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} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/StoneWall.mat.meta b/Imports/Beautify/URP/Demo/DemoSources/Materials/StoneWall.mat.meta new file mode 100644 index 00000000..89b0a703 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/StoneWall.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 16548db57056b4eeeb9bc551b18be0c7 +timeCreated: 1466521213 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/WhiteEmissive.mat b/Imports/Beautify/URP/Demo/DemoSources/Materials/WhiteEmissive.mat new file mode 100644 index 00000000..8fa1ac67 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/WhiteEmissive.mat @@ -0,0 +1,132 @@ +%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: WhiteEmissive + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _EMISSION + m_InvalidKeywords: [] + m_LightmapFlags: 1 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_LockedProperties: + 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} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + 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} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + 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 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.5137931, g: 0.5137931, b: 0.5137931, a: 1} + - _Color: {r: 0.5137931, g: 0.5137931, b: 0.5137931, a: 1} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] +--- !u!114 &5224656851961784243 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 7 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/WhiteEmissive.mat.meta b/Imports/Beautify/URP/Demo/DemoSources/Materials/WhiteEmissive.mat.meta new file mode 100644 index 00000000..6dd1ac69 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/WhiteEmissive.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3d58c6582090747c18f4f2c1f5d50217 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/YellowEmissive.mat b/Imports/Beautify/URP/Demo/DemoSources/Materials/YellowEmissive.mat new file mode 100644 index 00000000..6f4faade --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/YellowEmissive.mat @@ -0,0 +1,132 @@ +%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: YellowEmissive + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _EMISSION + m_InvalidKeywords: [] + m_LightmapFlags: 2 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_LockedProperties: + 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} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + 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} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + 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 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Surface: 0 + - _UVSec: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.5137931, g: 0.5137931, b: 0, a: 1} + - _Color: {r: 0.5137931, g: 0.5137931, b: 0, a: 1} + - _EmissionColor: {r: 1, g: 1, b: 0, a: 1} + - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_BuildTextureStacks: [] +--- !u!114 &170394318617756494 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 7 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Materials/YellowEmissive.mat.meta b/Imports/Beautify/URP/Demo/DemoSources/Materials/YellowEmissive.mat.meta new file mode 100644 index 00000000..f22796c6 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Materials/YellowEmissive.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 62fe9ccaa47394d74846e9604ac9c017 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Profile.meta b/Imports/Beautify/URP/Demo/DemoSources/Profile.meta new file mode 100644 index 00000000..955cfec6 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Profile.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d503132152f524b7aa507d8e1cab8f72 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Profile/Demo DoF Profile.asset b/Imports/Beautify/URP/Demo/DemoSources/Profile/Demo DoF Profile.asset new file mode 100644 index 00000000..66614ef4 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Profile/Demo DoF Profile.asset @@ -0,0 +1,806 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-4322935215193396605 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: c133717c76e564a5fa90d7f12908d17e, type: 3} + m_Name: Beautify + m_EditorClassIdentifier: + active: 1 + disabled: + m_OverrideState: 1 + m_Value: 0 + compareMode: + m_OverrideState: 1 + m_Value: 0 + compareStyle: + m_OverrideState: 0 + m_Value: 0 + comparePanning: + m_OverrideState: 0 + m_Value: 0.25 + compareLineAngle: + m_OverrideState: 0 + m_Value: 1.4 + compareLineWidth: + m_OverrideState: 0 + m_Value: 0.002 + flipY: + m_OverrideState: 1 + m_Value: 0 + hideInSceneView: + m_OverrideState: 1 + m_Value: 0 + debugOutput: + m_OverrideState: 0 + m_Value: 0 + turboMode: + m_OverrideState: 1 + m_Value: 0 + directWrite: + m_OverrideState: 1 + m_Value: 0 + ignoreDepthTexture: + m_OverrideState: 1 + m_Value: 0 + downsampling: + m_OverrideState: 1 + m_Value: 0 + downsamplingMode: + m_OverrideState: 0 + m_Value: 0 + downsamplingMultiplier: + m_OverrideState: 0 + m_Value: 1 + downsamplingBilinear: + m_OverrideState: 0 + m_Value: 0 + sharpenIntensity: + m_OverrideState: 1 + m_Value: 3 + sharpenDepthThreshold: + m_OverrideState: 0 + m_Value: 0.035 + sharpenMinMaxDepth: + m_OverrideState: 0 + m_Value: {x: 0, y: 0.999} + min: 0 + max: 1.1 + sharpenMinMaxDepthFallOff: + m_OverrideState: 0 + m_Value: 0 + sharpenRelaxation: + m_OverrideState: 0 + m_Value: 0.08 + sharpenClamp: + m_OverrideState: 0 + m_Value: 0.45 + sharpenMotionSensibility: + m_OverrideState: 0 + m_Value: 0.5 + sharpenMotionRestoreSpeed: + m_OverrideState: 0 + m_Value: 0.5 + sharpenExclusionLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 0 + antialiasStrength: + m_OverrideState: 0 + m_Value: 0 + antialiasDepthThreshold: + m_OverrideState: 0 + m_Value: 0.000001 + antialiasSpread: + m_OverrideState: 0 + m_Value: 3 + antialiasDepthAttenuation: + m_OverrideState: 0 + m_Value: 0 + tonemap: + m_OverrideState: 1 + m_Value: 2 + tonemapAGXGamma: + m_OverrideState: 0 + m_Value: 2.5 + tonemapMaxInputBrightness: + m_OverrideState: 0 + m_Value: 1000 + tonemapExposurePre: + m_OverrideState: 0 + m_Value: 1 + tonemapBrightnessPost: + m_OverrideState: 0 + m_Value: 1 + saturate: + m_OverrideState: 1 + m_Value: 0 + brightness: + m_OverrideState: 0 + m_Value: 1.05 + contrast: + m_OverrideState: 1 + m_Value: 1 + daltonize: + m_OverrideState: 0 + m_Value: 0 + sepia: + m_OverrideState: 0 + m_Value: 0 + tintColor: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 0} + colorTempBlend: + m_OverrideState: 0 + m_Value: 0 + colorTemp: + m_OverrideState: 0 + m_Value: 6550 + lut: + m_OverrideState: 0 + m_Value: 0 + lutIntensity: + m_OverrideState: 1 + m_Value: 1 + lutTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + bloomIntensity: + m_OverrideState: 1 + m_Value: 5 + bloomThreshold: + m_OverrideState: 0 + m_Value: 0.75 + bloomConservativeThreshold: + m_OverrideState: 0 + m_Value: 0 + bloomSpread: + m_OverrideState: 0 + m_Value: 0.5 + bloomMaxBrightness: + m_OverrideState: 0 + m_Value: 1000 + bloomTint: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 1, a: 0} + bloomDepthAtten: + m_OverrideState: 0 + m_Value: 0 + bloomNearAtten: + m_OverrideState: 0 + m_Value: 0 + bloomExcludeLayers: + m_OverrideState: 0 + m_Value: 0 + bloomLayersFilterMethod: + m_OverrideState: 0 + m_Value: 1 + bloomExclusionLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 0 + bloomAntiflicker: + m_OverrideState: 1 + m_Value: 1 + bloomResolution: + m_OverrideState: 0 + m_Value: 1 + bloomQuickerBlur: + m_OverrideState: 0 + m_Value: 0 + bloomCustomize: + m_OverrideState: 0 + m_Value: 0 + bloomWeight0: + m_OverrideState: 0 + m_Value: 0.5 + bloomBoost0: + m_OverrideState: 0 + m_Value: 0 + bloomTint0: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomWeight1: + m_OverrideState: 0 + m_Value: 0.5 + bloomBoost1: + m_OverrideState: 0 + m_Value: 0 + bloomTint1: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomWeight2: + m_OverrideState: 0 + m_Value: 0.5 + bloomBoost2: + m_OverrideState: 0 + m_Value: 0 + bloomTint2: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomWeight3: + m_OverrideState: 0 + m_Value: 0.5 + bloomBoost3: + m_OverrideState: 0 + m_Value: 0 + bloomTint3: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomWeight4: + m_OverrideState: 0 + m_Value: 0.5 + bloomBoost4: + m_OverrideState: 0 + m_Value: 0 + bloomTint4: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomWeight5: + m_OverrideState: 0 + m_Value: 0.5 + bloomBoost5: + m_OverrideState: 0 + m_Value: 0 + bloomTint5: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + anamorphicFlaresIntensity: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresThreshold: + m_OverrideState: 0 + m_Value: 0.75 + anamorphicFlaresConservativeThreshold: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresTint: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 1, a: 0} + anamorphicFlaresVertical: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresSpread: + m_OverrideState: 0 + m_Value: 1 + anamorphicFlaresMaxBrightness: + m_OverrideState: 0 + m_Value: 1000 + anamorphicFlaresDepthAtten: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresNearAtten: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresExcludeLayers: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresLayersFilterMethod: + m_OverrideState: 0 + m_Value: 1 + anamorphicFlaresExclusionLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 0 + anamorphicFlaresAntiflicker: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresResolution: + m_OverrideState: 0 + m_Value: 1 + anamorphicFlaresQuickerBlur: + m_OverrideState: 0 + m_Value: 0 + sunFlaresIntensity: + m_OverrideState: 0 + m_Value: 0 + sunFlaresTint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + sunFlaresSolarWindSpeed: + m_OverrideState: 0 + m_Value: 0.01 + sunFlaresRotationDeadZone: + m_OverrideState: 0 + m_Value: 0 + sunFlaresDownsampling: + m_OverrideState: 0 + m_Value: 1 + sunFlaresDepthOcclusionMode: + m_OverrideState: 0 + m_Value: 1 + sunFlaresDepthOcclusionThreshold: + m_OverrideState: 0 + m_Value: 0.5 + sunFlaresUseLayerMask: + m_OverrideState: 0 + m_Value: 0 + sunFlaresLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + sunFlaresAttenSpeed: + m_OverrideState: 0 + m_Value: 30 + sunFlaresSunIntensity: + m_OverrideState: 0 + m_Value: 0.1 + sunFlaresSunDiskSize: + m_OverrideState: 0 + m_Value: 0.05 + sunFlaresSunRayDiffractionIntensity: + m_OverrideState: 0 + m_Value: 3.5 + sunFlaresSunRayDiffractionThreshold: + m_OverrideState: 0 + m_Value: 0.13 + sunFlaresCoronaRays1Length: + m_OverrideState: 0 + m_Value: 0.02 + sunFlaresCoronaRays1Streaks: + m_OverrideState: 0 + m_Value: 12 + sunFlaresCoronaRays1Spread: + m_OverrideState: 0 + m_Value: 0.001 + sunFlaresCoronaRays1AngleOffset: + m_OverrideState: 0 + m_Value: 0 + sunFlaresCoronaRays2Length: + m_OverrideState: 0 + m_Value: 0.05 + sunFlaresCoronaRays2Streaks: + m_OverrideState: 0 + m_Value: 12 + sunFlaresCoronaRays2Spread: + m_OverrideState: 0 + m_Value: 0.1 + sunFlaresCoronaRays2AngleOffset: + m_OverrideState: 0 + m_Value: 0 + sunFlaresGhosts1Size: + m_OverrideState: 0 + m_Value: 0.03 + sunFlaresGhosts1Offset: + m_OverrideState: 0 + m_Value: 1.04 + sunFlaresGhosts1Brightness: + m_OverrideState: 0 + m_Value: 0.037 + sunFlaresGhosts2Size: + m_OverrideState: 0 + m_Value: 0.1 + sunFlaresGhosts2Offset: + m_OverrideState: 0 + m_Value: 0.71 + sunFlaresGhosts2Brightness: + m_OverrideState: 0 + m_Value: 0.03 + sunFlaresGhosts3Size: + m_OverrideState: 0 + m_Value: 0.24 + sunFlaresGhosts3Offset: + m_OverrideState: 0 + m_Value: 0.31 + sunFlaresGhosts3Brightness: + m_OverrideState: 0 + m_Value: 0.025 + sunFlaresGhosts4Size: + m_OverrideState: 0 + m_Value: 0.016 + sunFlaresGhosts4Offset: + m_OverrideState: 0 + m_Value: 0 + sunFlaresGhosts4Brightness: + m_OverrideState: 0 + m_Value: 0.017 + sunFlaresHaloOffset: + m_OverrideState: 0 + m_Value: 0.22 + sunFlaresHaloAmplitude: + m_OverrideState: 0 + m_Value: 15.1415 + sunFlaresHaloIntensity: + m_OverrideState: 0 + m_Value: 0.01 + lensDirtIntensity: + m_OverrideState: 0 + m_Value: 0 + lensDirtThreshold: + m_OverrideState: 0 + m_Value: 0.5 + lensDirtTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + lensDirtSpread: + m_OverrideState: 0 + m_Value: 3 + chromaticAberrationIntensity: + m_OverrideState: 0 + m_Value: 0 + chromaticAberrationShift: + m_OverrideState: 0 + m_Value: 0 + chromaticAberrationSmoothing: + m_OverrideState: 0 + m_Value: 0 + chromaticAberrationSeparatePass: + m_OverrideState: 0 + m_Value: 0 + depthOfField: + m_OverrideState: 1 + m_Value: 1 + depthOfFieldFocusMode: + m_OverrideState: 1 + m_Value: 2 + depthOfFieldAutofocusMinDistance: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldAutofocusMaxDistance: + m_OverrideState: 0 + m_Value: 10000 + depthOfFieldTargetFallback: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldTargetFallbackFixedDistance: + m_OverrideState: 0 + m_Value: 1000 + depthOfFieldAutofocusViewportPoint: + m_OverrideState: 0 + m_Value: {x: 0.5, y: 0.5} + depthOfFieldAutofocusDistanceShift: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldAutofocusLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + depthOfFieldDistance: + m_OverrideState: 0 + m_Value: 10 + depthOfFieldCameraSettings: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldFocalLength: + m_OverrideState: 1 + m_Value: 0.27 + depthOfFieldAperture: + m_OverrideState: 0 + m_Value: 2.8 + depthOfFieldFocalLengthReal: + m_OverrideState: 0 + m_Value: 50 + depthOfFieldFStop: + m_OverrideState: 0 + m_Value: 2 + depthOfFieldImageSensorHeight: + m_OverrideState: 0 + m_Value: 24 + depthOfFieldUsePhysicalCamera: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldFocusSpeed: + m_OverrideState: 0 + m_Value: 1 + depthOfFieldTransparentSupport: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldTransparentLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 1 + depthOfFieldTransparentDoubleSided: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldAlphaTestSupport: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldAlphaTestLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 1 + depthOfFieldAlphaTestDoubleSided: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldForegroundBlur: + m_OverrideState: 1 + m_Value: 1 + depthOfFieldForegroundBlurHQ: + m_OverrideState: 1 + m_Value: 1 + depthOfFieldForegroundBlurHQSpread: + m_OverrideState: 1 + m_Value: 12 + depthOfFieldForegroundDistance: + m_OverrideState: 0 + m_Value: 0.25 + depthOfFieldBokeh: + m_OverrideState: 1 + m_Value: 1 + depthOfFieldBokehComposition: + m_OverrideState: 1 + m_Value: 1 + depthOfFieldBokehThreshold: + m_OverrideState: 1 + m_Value: 0.7 + depthOfFieldBokehIntensity: + m_OverrideState: 1 + m_Value: 2 + depthOfFieldAffectsBloom: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldDownsampling: + m_OverrideState: 1 + m_Value: 1 + depthOfFieldMaxSamples: + m_OverrideState: 1 + m_Value: 8 + depthOfFieldMaxBrightness: + m_OverrideState: 0 + m_Value: 1000 + depthOfFieldMaxBlurRadius: + m_OverrideState: 0 + m_Value: 1000 + depthOfFieldResolutionInvariant: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldMaxDistance: + m_OverrideState: 0 + m_Value: 1 + depthOfFieldFilterMode: + m_OverrideState: 0 + m_Value: 1 + eyeAdaptation: + m_OverrideState: 0 + m_Value: 0 + eyeAdaptationMinExposure: + m_OverrideState: 0 + m_Value: 0.2 + eyeAdaptationMaxExposure: + m_OverrideState: 0 + m_Value: 5 + eyeAdaptationSpeedToLight: + m_OverrideState: 0 + m_Value: 0.4 + eyeAdaptationSpeedToDark: + m_OverrideState: 0 + m_Value: 0.2 + eyeAdaptationMeteringMode: + m_OverrideState: 0 + m_Value: 0 + eyeAdaptationMask: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + eyeAdaptationCenterWeight: + m_OverrideState: 0 + m_Value: 1 + eyeAdaptationMinCameraDistance: + m_OverrideState: 0 + m_Value: 0 + eyeAdaptationMiddleGray: + m_OverrideState: 0 + m_Value: 0.18 + purkinje: + m_OverrideState: 0 + m_Value: 0 + purkinjeAmount: + m_OverrideState: 0 + m_Value: 1 + purkinjeLuminanceThreshold: + m_OverrideState: 0 + m_Value: 0.15 + vignettingOuterRing: + m_OverrideState: 1 + m_Value: 0.318 + vignettingInnerRing: + m_OverrideState: 1 + m_Value: 0.803 + vignettingFade: + m_OverrideState: 0 + m_Value: 0 + vignettingCircularShape: + m_OverrideState: 0 + m_Value: 0 + vignettingCircularShapeFitMode: + m_OverrideState: 0 + m_Value: 0 + vignettingAspectRatio: + m_OverrideState: 0 + m_Value: 1 + vignettingBlink: + m_OverrideState: 0 + m_Value: 0 + vignettingBlinkStyle: + m_OverrideState: 0 + m_Value: 0 + vignettingCenter: + m_OverrideState: 0 + m_Value: {x: 0.5, y: 0.5} + vignettingColor: + m_OverrideState: 0 + m_Value: {r: 0, g: 0, b: 0, a: 1} + vignettingMask: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + outline: + m_OverrideState: 0 + m_Value: 0 + outlineColor: + m_OverrideState: 0 + m_Value: {r: 0, g: 0, b: 0, a: 0.8} + outlineTechnique: + m_OverrideState: 0 + m_Value: 0 + outlineMinSeparation: + m_OverrideState: 0 + m_Value: 1 + outlineOuterOnly: + m_OverrideState: 0 + m_Value: 0 + outlineThreshold: + m_OverrideState: 0 + m_Value: 0.2 + outlineMinDepthThreshold: + m_OverrideState: 0 + m_Value: 0 + outlineSaturationDiffThreshold: + m_OverrideState: 0 + m_Value: 0.015 + outlineCustomize: + m_OverrideState: 0 + m_Value: 0 + outlineLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + outlineStageParameter: + m_OverrideState: 0 + m_Value: 0 + outlineSpread: + m_OverrideState: 0 + m_Value: 1 + outlineBlurPassCount: + m_OverrideState: 0 + m_Value: 1 + outlineBlurDownscale: + m_OverrideState: 0 + m_Value: 0 + outlineIntensityMultiplier: + m_OverrideState: 0 + m_Value: 1 + outlineDistanceFade: + m_OverrideState: 0 + m_Value: 0 + outlineUsesOptimizedShader: + m_OverrideState: 0 + m_Value: 0 + nightVision: + m_OverrideState: 0 + m_Value: 0 + nightVisionColor: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 1, b: 0.5, a: 0.5} + nightVisionDepth: + m_OverrideState: 0 + m_Value: 100000 + nightVisionDepthFallOff: + m_OverrideState: 0 + m_Value: 1 + thermalVision: + m_OverrideState: 0 + m_Value: 0 + thermalVisionScanLines: + m_OverrideState: 0 + m_Value: 1 + thermalVisionDistortionAmount: + m_OverrideState: 0 + m_Value: 9 + ditherIntensity: + m_OverrideState: 0 + m_Value: 0.005 + frame: + m_OverrideState: 0 + m_Value: 0 + frameStyle: + m_OverrideState: 1 + m_Value: 1 + frameBandHorizontalSize: + m_OverrideState: 0 + m_Value: 0 + frameBandHorizontalSmoothness: + m_OverrideState: 0 + m_Value: 0 + frameBandVerticalSize: + m_OverrideState: 0 + m_Value: 0.1 + frameBandVerticalSmoothness: + m_OverrideState: 0 + m_Value: 0 + frameColor: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 0.047} + frameThickness: + m_OverrideState: 0 + m_Value: 0.047 + frameSharpness: + m_OverrideState: 0 + m_Value: 50 + frameMask: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + filmGrainEnabled: + m_OverrideState: 0 + m_Value: 0 + filmGrainIntensity: + m_OverrideState: 0 + m_Value: 0 + filmGrainResolution: + m_OverrideState: 0 + m_Value: 0.85 + filmGrainLumaAttenuation: + m_OverrideState: 0 + m_Value: 0.8 + filmGrainDirtSpotsAmount: + m_OverrideState: 0 + m_Value: 0 + filmGrainDirtSpotsIntensity: + m_OverrideState: 0 + m_Value: 0.2 + filmGrainScratchesAmount: + m_OverrideState: 0 + m_Value: 0 + filmGrainScratchesIntensity: + m_OverrideState: 0 + m_Value: 0.3 + blurIntensity: + m_OverrideState: 0 + m_Value: 0 + blurMask: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + blurKeepSourceOnTop: + m_OverrideState: 0 + m_Value: 0 + blurSourceRect: + m_OverrideState: 0 + m_Value: {x: 0.1, y: 0.1, z: 0.8, w: 0.8} + blurSourceEdgeBlendWidth: + m_OverrideState: 0 + m_Value: 0 + blurSourceEdgeBlendStrength: + m_OverrideState: 0 + m_Value: 20 +--- !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: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: Demo DoF Profile + m_EditorClassIdentifier: + components: + - {fileID: -4322935215193396605} diff --git a/Imports/Beautify/URP/Demo/DemoSources/Profile/Demo DoF Profile.asset.meta b/Imports/Beautify/URP/Demo/DemoSources/Profile/Demo DoF Profile.asset.meta new file mode 100644 index 00000000..c67ff21c --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Profile/Demo DoF Profile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a59933bb51f9e4053b410799bc308dfc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Profile/Demo Profile.asset b/Imports/Beautify/URP/Demo/DemoSources/Profile/Demo Profile.asset new file mode 100644 index 00000000..34d91cea --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Profile/Demo Profile.asset @@ -0,0 +1,842 @@ +%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: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: Demo Profile + m_EditorClassIdentifier: + components: + - {fileID: 2031653064697748555} +--- !u!114 &2031653064697748555 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: c133717c76e564a5fa90d7f12908d17e, type: 3} + m_Name: Beautify + m_EditorClassIdentifier: + active: 1 + disabled: + m_OverrideState: 1 + m_Value: 0 + compareMode: + m_OverrideState: 1 + m_Value: 0 + compareStyle: + m_OverrideState: 0 + m_Value: 0 + comparePanning: + m_OverrideState: 0 + m_Value: 0.25 + compareLineAngle: + m_OverrideState: 0 + m_Value: 1.4 + compareLineWidth: + m_OverrideState: 0 + m_Value: 0.002 + flipY: + m_OverrideState: 1 + m_Value: 0 + hideInSceneView: + m_OverrideState: 1 + m_Value: 0 + debugOutput: + m_OverrideState: 0 + m_Value: 0 + turboMode: + m_OverrideState: 1 + m_Value: 0 + directWrite: + m_OverrideState: 1 + m_Value: 0 + ignoreDepthTexture: + m_OverrideState: 1 + m_Value: 0 + downsampling: + m_OverrideState: 1 + m_Value: 0 + downsamplingMode: + m_OverrideState: 0 + m_Value: 0 + downsamplingMultiplier: + m_OverrideState: 0 + m_Value: 1 + downsamplingBilinear: + m_OverrideState: 0 + m_Value: 0 + sharpenIntensity: + m_OverrideState: 1 + m_Value: 8 + sharpenDepthThreshold: + m_OverrideState: 0 + m_Value: 0.035 + sharpenMinMaxDepth: + m_OverrideState: 0 + m_Value: {x: 0, y: 0.999} + min: 0 + max: 1.1 + sharpenMinMaxDepthFallOff: + m_OverrideState: 0 + m_Value: 0 + sharpenRelaxation: + m_OverrideState: 0 + m_Value: 0.08 + sharpenClamp: + m_OverrideState: 0 + m_Value: 0.45 + sharpenMotionSensibility: + m_OverrideState: 0 + m_Value: 0.5 + sharpenMotionRestoreSpeed: + m_OverrideState: 0 + m_Value: 0.5 + sharpenExclusionLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 0 + antialiasStrength: + m_OverrideState: 0 + m_Value: 5 + antialiasDepthThreshold: + m_OverrideState: 0 + m_Value: 0 + antialiasSpread: + m_OverrideState: 0 + m_Value: 3 + antialiasDepthAttenuation: + m_OverrideState: 0 + m_Value: 0 + tonemap: + m_OverrideState: 0 + m_Value: 0 + tonemapAGXGamma: + m_OverrideState: 0 + m_Value: 2.5 + tonemapMaxInputBrightness: + m_OverrideState: 0 + m_Value: 1000 + tonemapExposurePre: + m_OverrideState: 0 + m_Value: 1 + tonemapBrightnessPost: + m_OverrideState: 0 + m_Value: 1 + saturate: + m_OverrideState: 1 + m_Value: 0 + brightness: + m_OverrideState: 0 + m_Value: 1.05 + contrast: + m_OverrideState: 1 + m_Value: 1 + daltonize: + m_OverrideState: 0 + m_Value: 0 + sepia: + m_OverrideState: 0 + m_Value: 0 + tintColor: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 0} + colorTempBlend: + m_OverrideState: 0 + m_Value: 0 + colorTemp: + m_OverrideState: 0 + m_Value: 6550 + lut: + m_OverrideState: 0 + m_Value: 0 + lutIntensity: + m_OverrideState: 0 + m_Value: 1 + lutTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + bloomIntensity: + m_OverrideState: 1 + m_Value: 0.35 + bloomThreshold: + m_OverrideState: 0 + m_Value: 0.75 + bloomConservativeThreshold: + m_OverrideState: 0 + m_Value: 0 + bloomSpread: + m_OverrideState: 0 + m_Value: 0.5 + bloomMaxBrightness: + m_OverrideState: 0 + m_Value: 1000 + bloomTint: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 1, a: 0} + bloomDepthAtten: + m_OverrideState: 0 + m_Value: 0 + bloomNearAtten: + m_OverrideState: 0 + m_Value: 0 + bloomExcludeLayers: + m_OverrideState: 0 + m_Value: 0 + bloomLayersFilterMethod: + m_OverrideState: 0 + m_Value: 1 + bloomExclusionLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 0 + bloomAntiflicker: + m_OverrideState: 0 + m_Value: 0 + bloomResolution: + m_OverrideState: 0 + m_Value: 1 + bloomQuickerBlur: + m_OverrideState: 0 + m_Value: 0 + bloomCustomize: + m_OverrideState: 0 + m_Value: 0 + bloomWeight0: + m_OverrideState: 0 + m_Value: 0.5 + bloomBoost0: + m_OverrideState: 0 + m_Value: 0 + bloomTint0: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomWeight1: + m_OverrideState: 0 + m_Value: 0.5 + bloomBoost1: + m_OverrideState: 0 + m_Value: 0 + bloomTint1: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomWeight2: + m_OverrideState: 0 + m_Value: 0.5 + bloomBoost2: + m_OverrideState: 0 + m_Value: 0 + bloomTint2: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomWeight3: + m_OverrideState: 0 + m_Value: 0.5 + bloomBoost3: + m_OverrideState: 0 + m_Value: 0 + bloomTint3: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomWeight4: + m_OverrideState: 0 + m_Value: 0.5 + bloomBoost4: + m_OverrideState: 0 + m_Value: 0 + bloomTint4: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomWeight5: + m_OverrideState: 0 + m_Value: 0.5 + bloomBoost5: + m_OverrideState: 0 + m_Value: 0 + bloomTint5: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + anamorphicFlaresIntensity: + m_OverrideState: 1 + m_Value: 1 + anamorphicFlaresThreshold: + m_OverrideState: 0 + m_Value: 0.75 + anamorphicFlaresConservativeThreshold: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresTint: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 1, a: 0} + anamorphicFlaresVertical: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresSpread: + m_OverrideState: 0 + m_Value: 1 + anamorphicFlaresMaxBrightness: + m_OverrideState: 0 + m_Value: 1000 + anamorphicFlaresDepthAtten: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresNearAtten: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresExcludeLayers: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresLayersFilterMethod: + m_OverrideState: 0 + m_Value: 1 + anamorphicFlaresExclusionLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 0 + anamorphicFlaresAntiflicker: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresResolution: + m_OverrideState: 0 + m_Value: 1 + anamorphicFlaresQuickerBlur: + m_OverrideState: 0 + m_Value: 0 + sunFlaresIntensity: + m_OverrideState: 0 + m_Value: 0 + sunFlaresTint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + sunFlaresSolarWindSpeed: + m_OverrideState: 0 + m_Value: 0.01 + sunFlaresRotationDeadZone: + m_OverrideState: 0 + m_Value: 0 + sunFlaresDownsampling: + m_OverrideState: 0 + m_Value: 1 + sunFlaresDepthOcclusionMode: + m_OverrideState: 0 + m_Value: 1 + sunFlaresDepthOcclusionThreshold: + m_OverrideState: 0 + m_Value: 0.5 + sunFlaresUseLayerMask: + m_OverrideState: 0 + m_Value: 0 + sunFlaresLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + sunFlaresAttenSpeed: + m_OverrideState: 0 + m_Value: 30 + sunFlaresSunIntensity: + m_OverrideState: 0 + m_Value: 0.1 + sunFlaresSunDiskSize: + m_OverrideState: 0 + m_Value: 0.05 + sunFlaresSunRayDiffractionIntensity: + m_OverrideState: 0 + m_Value: 3.5 + sunFlaresSunRayDiffractionThreshold: + m_OverrideState: 0 + m_Value: 0.13 + sunFlaresCoronaRays1Length: + m_OverrideState: 0 + m_Value: 0.02 + sunFlaresCoronaRays1Streaks: + m_OverrideState: 0 + m_Value: 12 + sunFlaresCoronaRays1Spread: + m_OverrideState: 0 + m_Value: 0.001 + sunFlaresCoronaRays1AngleOffset: + m_OverrideState: 0 + m_Value: 0 + sunFlaresCoronaRays2Length: + m_OverrideState: 0 + m_Value: 0.05 + sunFlaresCoronaRays2Streaks: + m_OverrideState: 0 + m_Value: 12 + sunFlaresCoronaRays2Spread: + m_OverrideState: 0 + m_Value: 0.1 + sunFlaresCoronaRays2AngleOffset: + m_OverrideState: 0 + m_Value: 0 + sunFlaresGhosts1Size: + m_OverrideState: 0 + m_Value: 0.03 + sunFlaresGhosts1Offset: + m_OverrideState: 0 + m_Value: 1.04 + sunFlaresGhosts1Brightness: + m_OverrideState: 0 + m_Value: 0.037 + sunFlaresGhosts2Size: + m_OverrideState: 0 + m_Value: 0.1 + sunFlaresGhosts2Offset: + m_OverrideState: 0 + m_Value: 0.71 + sunFlaresGhosts2Brightness: + m_OverrideState: 0 + m_Value: 0.03 + sunFlaresGhosts3Size: + m_OverrideState: 0 + m_Value: 0.24 + sunFlaresGhosts3Offset: + m_OverrideState: 0 + m_Value: 0.31 + sunFlaresGhosts3Brightness: + m_OverrideState: 0 + m_Value: 0.025 + sunFlaresGhosts4Size: + m_OverrideState: 0 + m_Value: 0.016 + sunFlaresGhosts4Offset: + m_OverrideState: 0 + m_Value: 0 + sunFlaresGhosts4Brightness: + m_OverrideState: 0 + m_Value: 0.017 + sunFlaresHaloOffset: + m_OverrideState: 0 + m_Value: 0.22 + sunFlaresHaloAmplitude: + m_OverrideState: 0 + m_Value: 15.1415 + sunFlaresHaloIntensity: + m_OverrideState: 0 + m_Value: 0.01 + lensDirtIntensity: + m_OverrideState: 1 + m_Value: 2 + lensDirtThreshold: + m_OverrideState: 0 + m_Value: 0.5 + lensDirtTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + lensDirtSpread: + m_OverrideState: 0 + m_Value: 3 + chromaticAberrationIntensity: + m_OverrideState: 0 + m_Value: 0 + chromaticAberrationShift: + m_OverrideState: 0 + m_Value: 0 + chromaticAberrationSmoothing: + m_OverrideState: 0 + m_Value: 0 + chromaticAberrationSeparatePass: + m_OverrideState: 0 + m_Value: 0 + depthOfField: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldFocusMode: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldAutofocusMinDistance: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldAutofocusMaxDistance: + m_OverrideState: 0 + m_Value: 10000 + depthOfFieldTargetFallback: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldTargetFallbackFixedDistance: + m_OverrideState: 0 + m_Value: 1000 + depthOfFieldFallbackFadeDuration: + m_OverrideState: 0 + m_Value: 0.5 + depthOfFieldAutofocusViewportPoint: + m_OverrideState: 0 + m_Value: {x: 0.5, y: 0.5} + depthOfFieldAutofocusDistanceShift: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldAutofocusLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + depthOfFieldFocusPosition: + m_OverrideState: 0 + m_Value: {x: 0, y: 0, z: 0} + depthOfFieldPositionFallback: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldDistance: + m_OverrideState: 0 + m_Value: 1 + depthOfFieldCameraSettings: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldFocalLength: + m_OverrideState: 0 + m_Value: 0.05 + depthOfFieldAperture: + m_OverrideState: 0 + m_Value: 2.8 + depthOfFieldFocalLengthReal: + m_OverrideState: 0 + m_Value: 50 + depthOfFieldFStop: + m_OverrideState: 0 + m_Value: 2 + depthOfFieldImageSensorHeight: + m_OverrideState: 0 + m_Value: 24 + depthOfFieldUsePhysicalCamera: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldFocusSpeed: + m_OverrideState: 0 + m_Value: 1 + depthOfFieldTransparentSupport: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldTransparentLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 1 + depthOfFieldTransparentDoubleSided: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldAlphaTestSupport: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldAlphaTestLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 1 + depthOfFieldAlphaTestDoubleSided: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldForegroundBlur: + m_OverrideState: 0 + m_Value: 1 + depthOfFieldForegroundBlurHQ: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldForegroundBlurHQSpread: + m_OverrideState: 0 + m_Value: 4 + depthOfFieldForegroundDistance: + m_OverrideState: 0 + m_Value: 0.25 + depthOfFieldBokeh: + m_OverrideState: 0 + m_Value: 1 + depthOfFieldBokehComposition: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldBokehThreshold: + m_OverrideState: 0 + m_Value: 1 + depthOfFieldBokehIntensity: + m_OverrideState: 0 + m_Value: 2 + depthOfFieldAffectsBloom: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldDownsampling: + m_OverrideState: 0 + m_Value: 2 + depthOfFieldMaxSamples: + m_OverrideState: 0 + m_Value: 6 + depthOfFieldMaxBrightness: + m_OverrideState: 0 + m_Value: 1000 + depthOfFieldMaxBlurRadius: + m_OverrideState: 0 + m_Value: 1000 + depthOfFieldResolutionInvariant: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldMaxDistance: + m_OverrideState: 0 + m_Value: 1 + depthOfFieldFilterMode: + m_OverrideState: 0 + m_Value: 1 + eyeAdaptation: + m_OverrideState: 0 + m_Value: 0 + eyeAdaptationMinExposure: + m_OverrideState: 0 + m_Value: 0.2 + eyeAdaptationMaxExposure: + m_OverrideState: 0 + m_Value: 5 + eyeAdaptationSpeedToLight: + m_OverrideState: 0 + m_Value: 0.4 + eyeAdaptationSpeedToDark: + m_OverrideState: 0 + m_Value: 0.2 + eyeAdaptationMeteringMode: + m_OverrideState: 0 + m_Value: 0 + eyeAdaptationMask: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + eyeAdaptationCenterWeight: + m_OverrideState: 0 + m_Value: 1 + eyeAdaptationMinCameraDistance: + m_OverrideState: 0 + m_Value: 0 + eyeAdaptationMiddleGray: + m_OverrideState: 0 + m_Value: 0.18 + purkinje: + m_OverrideState: 0 + m_Value: 0 + purkinjeAmount: + m_OverrideState: 0 + m_Value: 1 + purkinjeLuminanceThreshold: + m_OverrideState: 0 + m_Value: 0.15 + vignettingOuterRing: + m_OverrideState: 1 + m_Value: 0.454 + vignettingInnerRing: + m_OverrideState: 1 + m_Value: 0.925 + vignettingFade: + m_OverrideState: 0 + m_Value: 0 + vignettingCircularShape: + m_OverrideState: 0 + m_Value: 0 + vignettingCircularShapeFitMode: + m_OverrideState: 0 + m_Value: 0 + vignettingAspectRatio: + m_OverrideState: 0 + m_Value: 1 + vignettingBlink: + m_OverrideState: 0 + m_Value: 0 + vignettingBlinkStyle: + m_OverrideState: 0 + m_Value: 0 + vignettingCenter: + m_OverrideState: 0 + m_Value: {x: 0.5, y: 0.5} + vignettingColor: + m_OverrideState: 0 + m_Value: {r: 0, g: 0, b: 0, a: 1} + vignettingMask: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + outline: + m_OverrideState: 0 + m_Value: 0 + outlineColor: + m_OverrideState: 0 + m_Value: {r: 0, g: 0, b: 0, a: 0.8} + outlineTechnique: + m_OverrideState: 0 + m_Value: 0 + outlineMinSeparation: + m_OverrideState: 0 + m_Value: 1 + outlineOuterOnly: + m_OverrideState: 0 + m_Value: 0 + outlineThreshold: + m_OverrideState: 0 + m_Value: 0.2 + outlineMinDepthThreshold: + m_OverrideState: 0 + m_Value: 0 + outlineSaturationDiffThreshold: + m_OverrideState: 0 + m_Value: 0.015 + outlineCustomize: + m_OverrideState: 0 + m_Value: 0 + outlineLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + outlineStageParameter: + m_OverrideState: 0 + m_Value: 0 + outlineSpread: + m_OverrideState: 0 + m_Value: 1 + outlineBlurPassCount: + m_OverrideState: 0 + m_Value: 1 + outlineBlurDownscale: + m_OverrideState: 0 + m_Value: 0 + outlineIntensityMultiplier: + m_OverrideState: 0 + m_Value: 1 + outlineDistanceFade: + m_OverrideState: 0 + m_Value: 0 + outlineUsesOptimizedShader: + m_OverrideState: 0 + m_Value: 0 + outlineLayerCutOff: + m_OverrideState: 0 + m_Value: 0 + nightVision: + m_OverrideState: 0 + m_Value: 0 + nightVisionColor: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 1, b: 0.5, a: 0.5} + nightVisionDepth: + m_OverrideState: 0 + m_Value: 100000 + nightVisionDepthFallOff: + m_OverrideState: 0 + m_Value: 1 + thermalVision: + m_OverrideState: 0 + m_Value: 0 + thermalVisionScanLines: + m_OverrideState: 0 + m_Value: 1 + thermalVisionDistortionAmount: + m_OverrideState: 0 + m_Value: 9 + ditherIntensity: + m_OverrideState: 0 + m_Value: 0.005 + frame: + m_OverrideState: 0 + m_Value: 0 + frameStyle: + m_OverrideState: 0 + m_Value: 0 + frameBandHorizontalSize: + m_OverrideState: 0 + m_Value: 0 + frameBandHorizontalSmoothness: + m_OverrideState: 0 + m_Value: 0 + frameBandVerticalSize: + m_OverrideState: 0 + m_Value: 0.1 + frameBandVerticalSmoothness: + m_OverrideState: 0 + m_Value: 0 + frameColor: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + frameThickness: + m_OverrideState: 0 + m_Value: 0.047 + frameSharpness: + m_OverrideState: 0 + m_Value: 50 + frameMask: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + filmGrainEnabled: + m_OverrideState: 0 + m_Value: 0 + filmGrainIntensity: + m_OverrideState: 1 + m_Value: 0.5 + filmGrainResolution: + m_OverrideState: 1 + m_Value: 0.85 + filmGrainLumaAttenuation: + m_OverrideState: 0 + m_Value: 0.8 + filmGrainDirtSpotsAmount: + m_OverrideState: 0 + m_Value: 0 + filmGrainDirtSpotsIntensity: + m_OverrideState: 0 + m_Value: 0.2 + filmGrainScratchesAmount: + m_OverrideState: 0 + m_Value: 0 + filmGrainScratchesIntensity: + m_OverrideState: 0 + m_Value: 0.3 + blurIntensity: + m_OverrideState: 0 + m_Value: 0 + blurStyle: + m_OverrideState: 0 + m_Value: 0 + blurMask: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + blurCenter: + m_OverrideState: 0 + m_Value: {x: 0.5, y: 0.5} + blurTiltShiftWidth: + m_OverrideState: 0 + m_Value: 0.2 + blurTiltShiftFalloff: + m_OverrideState: 0 + m_Value: 0.2 + blurRadialBlurRadius: + m_OverrideState: 0 + m_Value: 0.2 + blurRadialBlurFalloff: + m_OverrideState: 0 + m_Value: 0.35 + blurDesaturation: + m_OverrideState: 0 + m_Value: 0 + blurKeepSourceOnTop: + m_OverrideState: 0 + m_Value: 0 + blurSourceRect: + m_OverrideState: 0 + m_Value: {x: 0.1, y: 0.1, z: 0.8, w: 0.8} + blurSourceEdgeBlendWidth: + m_OverrideState: 0 + m_Value: 0 + blurSourceEdgeBlendStrength: + m_OverrideState: 0 + m_Value: 20 + blurShowMask: + m_OverrideState: 0 + m_Value: 0 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Profile/Demo Profile.asset.meta b/Imports/Beautify/URP/Demo/DemoSources/Profile/Demo Profile.asset.meta new file mode 100644 index 00000000..43c1b29f --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Profile/Demo Profile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: efb0a5dc71c424fabaae788534da781f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Profile/LUT Blending Volume.asset b/Imports/Beautify/URP/Demo/DemoSources/Profile/LUT Blending Volume.asset new file mode 100644 index 00000000..98c945f1 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Profile/LUT Blending Volume.asset @@ -0,0 +1,706 @@ +%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: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: LUT Blending Volume + m_EditorClassIdentifier: + components: + - {fileID: 2691455952864523090} +--- !u!114 &2691455952864523090 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: c133717c76e564a5fa90d7f12908d17e, type: 3} + m_Name: Beautify + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + disabled: + m_OverrideState: 1 + m_Value: 0 + compareMode: + m_OverrideState: 1 + m_Value: 0 + compareLineAngle: + m_OverrideState: 0 + m_Value: 1.4 + compareLineWidth: + m_OverrideState: 0 + m_Value: 0.002 + hideInSceneView: + m_OverrideState: 1 + m_Value: 0 + debugOutput: + m_OverrideState: 0 + m_Value: 0 + turboMode: + m_OverrideState: 1 + m_Value: 0 + directWrite: + m_OverrideState: 1 + m_Value: 0 + downsampling: + m_OverrideState: 1 + m_Value: 0 + downsamplingMultiplier: + m_OverrideState: 0 + m_Value: 1 + min: 1 + max: 8 + downsamplingBilinear: + m_OverrideState: 0 + m_Value: 0 + optimizeBuildBeautifyAuto: + m_OverrideState: 1 + m_Value: 0 + stripBeautifyTonemapping: + m_OverrideState: 1 + m_Value: 0 + stripBeautifySharpen: + m_OverrideState: 1 + m_Value: 0 + stripBeautifyDithering: + m_OverrideState: 1 + m_Value: 0 + stripBeautifyLUT: + m_OverrideState: 1 + m_Value: 0 + stripBeautifyColorTweaks: + m_OverrideState: 1 + m_Value: 0 + stripBeautifyBloom: + m_OverrideState: 1 + m_Value: 0 + stripBeautifyLensDirt: + m_OverrideState: 1 + m_Value: 0 + stripBeautifyDoF: + m_OverrideState: 1 + m_Value: 0 + stripBeautifyEyeAdaptation: + m_OverrideState: 1 + m_Value: 0 + stripBeautifyPurkinje: + m_OverrideState: 1 + m_Value: 0 + stripBeautifyVignetting: + m_OverrideState: 1 + m_Value: 0 + stripBeautifyOutline: + m_OverrideState: 1 + m_Value: 0 + stripBeautifyNightVision: + m_OverrideState: 1 + m_Value: 0 + optimizeBuildUnityPPSAuto: + m_OverrideState: 1 + m_Value: 0 + stripUnityFilmGrain: + m_OverrideState: 1 + m_Value: 0 + stripUnityTonemapping: + m_OverrideState: 1 + m_Value: 0 + stripUnityBloom: + m_OverrideState: 1 + m_Value: 0 + stripUnityChromaticAberration: + m_OverrideState: 1 + m_Value: 0 + stripUnityDistortion: + m_OverrideState: 1 + m_Value: 0 + sharpenIntensity: + m_OverrideState: 0 + m_Value: 4 + sharpenDepthThreshold: + m_OverrideState: 0 + m_Value: 0.035 + sharpenMinMaxDepth: + m_OverrideState: 0 + m_Value: {x: 0, y: 0.999} + min: 0 + max: 1.1 + sharpenMinMaxDepthFallOff: + m_OverrideState: 0 + m_Value: 0 + sharpenRelaxation: + m_OverrideState: 0 + m_Value: 0.08 + sharpenClamp: + m_OverrideState: 0 + m_Value: 0.45 + sharpenMotionSensibility: + m_OverrideState: 0 + m_Value: 0.5 + tonemap: + m_OverrideState: 0 + m_Value: 0 + tonemapExposurePre: + m_OverrideState: 0 + m_Value: 1 + tonemapBrightnessPost: + m_OverrideState: 0 + m_Value: 1 + saturate: + m_OverrideState: 0 + m_Value: 1 + min: -2 + max: 3 + brightness: + m_OverrideState: 0 + m_Value: 1.05 + min: 0 + max: 2 + contrast: + m_OverrideState: 0 + m_Value: 1.02 + min: 0.5 + max: 1.5 + daltonize: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 2 + sepia: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 1 + tintColor: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 0} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + colorTemp: + m_OverrideState: 0 + m_Value: 6550 + min: 1000 + max: 40000 + colorTempBlend: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 1 + lut: + m_OverrideState: 0 + m_Value: 0 + lutIntensity: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 1 + lutTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + bloomIntensity: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 10 + bloomThreshold: + m_OverrideState: 0 + m_Value: 0.75 + min: 0 + max: 5 + bloomMaxBrightness: + m_OverrideState: 0 + m_Value: 1000 + bloomDepthAtten: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 1 + bloomAntiflicker: + m_OverrideState: 0 + m_Value: 0 + bloomResolution: + m_OverrideState: 0 + m_Value: 1 + min: 1 + max: 10 + bloomCustomize: + m_OverrideState: 0 + m_Value: 0 + bloomWeight0: + m_OverrideState: 0 + m_Value: 0.5 + min: 0 + max: 1 + bloomBoost0: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 3 + bloomWeight1: + m_OverrideState: 0 + m_Value: 0.5 + min: 0 + max: 1 + bloomBoost1: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 3 + bloomWeight2: + m_OverrideState: 0 + m_Value: 0.5 + min: 0 + max: 1 + bloomBoost2: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 3 + bloomWeight3: + m_OverrideState: 0 + m_Value: 0.5 + min: 0 + max: 1 + bloomBoost3: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 3 + bloomWeight4: + m_OverrideState: 0 + m_Value: 0.5 + min: 0 + max: 1 + bloomBoost4: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 3 + bloomWeight5: + m_OverrideState: 0 + m_Value: 0.5 + min: 0 + max: 1 + bloomBoost5: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 3 + bloomTint: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 1, a: 0} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + anamorphicFlaresIntensity: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 10 + anamorphicFlaresThreshold: + m_OverrideState: 0 + m_Value: 0.75 + min: 0 + max: 5 + anamorphicFlaresTint: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 1, a: 0} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + anamorphicFlaresVertical: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresSpread: + m_OverrideState: 0 + m_Value: 1 + min: 0.1 + max: 2 + anamorphicFlaresDepthAtten: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 1 + anamorphicFlaresAntiflicker: + m_OverrideState: 0 + m_Value: 0 + anamorphicFlaresResolution: + m_OverrideState: 0 + m_Value: 1 + min: 1 + max: 10 + sunFlaresIntensity: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 1 + sunFlaresTint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + sunFlaresSolarWindSpeed: + m_OverrideState: 0 + m_Value: 0.01 + min: 0 + max: 1 + sunFlaresRotationDeadZone: + m_OverrideState: 0 + m_Value: 0 + sunFlaresDownsampling: + m_OverrideState: 0 + m_Value: 1 + min: 1 + max: 5 + sunFlaresSunIntensity: + m_OverrideState: 0 + m_Value: 0.1 + min: 0 + max: 1 + sunFlaresSunDiskSize: + m_OverrideState: 0 + m_Value: 0.05 + min: 0 + max: 1 + sunFlaresSunRayDiffractionIntensity: + m_OverrideState: 0 + m_Value: 3.5 + min: 0 + max: 25 + sunFlaresSunRayDiffractionThreshold: + m_OverrideState: 0 + m_Value: 0.13 + min: 0 + max: 1 + sunFlaresCoronaRays1Length: + m_OverrideState: 0 + m_Value: 0.02 + min: 0 + max: 0.2 + sunFlaresCoronaRays1Streaks: + m_OverrideState: 0 + m_Value: 12 + min: 2 + max: 30 + sunFlaresCoronaRays1Spread: + m_OverrideState: 0 + m_Value: 0.001 + min: 0 + max: 0.1 + sunFlaresCoronaRays1AngleOffset: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 6.2831855 + sunFlaresCoronaRays2Length: + m_OverrideState: 0 + m_Value: 0.05 + min: 0 + max: 0.2 + sunFlaresCoronaRays2Streaks: + m_OverrideState: 0 + m_Value: 12 + min: 2 + max: 30 + sunFlaresCoronaRays2Spread: + m_OverrideState: 0 + m_Value: 0.1 + min: 0 + max: 0.1 + sunFlaresCoronaRays2AngleOffset: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 6.2831855 + sunFlaresGhosts1Size: + m_OverrideState: 0 + m_Value: 0.03 + min: 0 + max: 1 + sunFlaresGhosts1Offset: + m_OverrideState: 0 + m_Value: 1.04 + min: -3 + max: 3 + sunFlaresGhosts1Brightness: + m_OverrideState: 0 + m_Value: 0.037 + min: 0 + max: 1 + sunFlaresGhosts2Size: + m_OverrideState: 0 + m_Value: 0.1 + min: 0 + max: 1 + sunFlaresGhosts2Offset: + m_OverrideState: 0 + m_Value: 0.71 + min: -3 + max: 3 + sunFlaresGhosts2Brightness: + m_OverrideState: 0 + m_Value: 0.03 + min: 0 + max: 1 + sunFlaresGhosts3Size: + m_OverrideState: 0 + m_Value: 0.24 + min: 0 + max: 1 + sunFlaresGhosts3Offset: + m_OverrideState: 0 + m_Value: 0.31 + min: -3 + max: 3 + sunFlaresGhosts3Brightness: + m_OverrideState: 0 + m_Value: 0.025 + min: 0 + max: 1 + sunFlaresGhosts4Size: + m_OverrideState: 0 + m_Value: 0.016 + min: 0 + max: 1 + sunFlaresGhosts4Offset: + m_OverrideState: 0 + m_Value: 0 + min: -3 + max: 3 + sunFlaresGhosts4Brightness: + m_OverrideState: 0 + m_Value: 0.017 + min: 0 + max: 1 + sunFlaresHaloOffset: + m_OverrideState: 0 + m_Value: 0.22 + min: 0 + max: 1 + sunFlaresHaloAmplitude: + m_OverrideState: 0 + m_Value: 15.1415 + min: 0 + max: 50 + sunFlaresHaloIntensity: + m_OverrideState: 0 + m_Value: 0.01 + min: 0 + max: 1 + lensDirtIntensity: + m_OverrideState: 0 + m_Value: 0 + lensDirtThreshold: + m_OverrideState: 0 + m_Value: 0.5 + min: 0 + max: 1 + lensDirtTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + lensDirtSpread: + m_OverrideState: 0 + m_Value: 3 + min: 3 + max: 5 + depthOfField: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldFocusMode: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldAutofocusMinDistance: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldAutofocusMaxDistance: + m_OverrideState: 0 + m_Value: 10000 + depthOfFieldAutofocusViewportPoint: + m_OverrideState: 0 + m_Value: {x: 0.5, y: 0.5} + depthOfFieldAutofocusDistanceShift: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldAutofocusLayerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + depthOfFieldDistance: + m_OverrideState: 0 + m_Value: 1 + min: 1 + max: 100 + depthOfFieldFocalLength: + m_OverrideState: 0 + m_Value: 0.05 + min: 0.005 + max: 0.5 + depthOfFieldAperture: + m_OverrideState: 0 + m_Value: 2.8 + depthOfFieldFocusSpeed: + m_OverrideState: 0 + m_Value: 1 + min: 0.001 + max: 5 + depthOfFieldForegroundBlur: + m_OverrideState: 0 + m_Value: 1 + depthOfFieldForegroundBlurHQ: + m_OverrideState: 0 + m_Value: 0 + depthOfFieldForegroundDistance: + m_OverrideState: 0 + m_Value: 0.25 + depthOfFieldBokeh: + m_OverrideState: 0 + m_Value: 1 + depthOfFieldBokehThreshold: + m_OverrideState: 0 + m_Value: 1 + min: 0.5 + max: 3 + depthOfFieldBokehIntensity: + m_OverrideState: 0 + m_Value: 2 + min: 0 + max: 8 + depthOfFieldDownsampling: + m_OverrideState: 0 + m_Value: 2 + min: 1 + max: 5 + depthOfFieldMaxSamples: + m_OverrideState: 0 + m_Value: 6 + min: 2 + max: 16 + depthOfFieldMaxBrightness: + m_OverrideState: 0 + m_Value: 1000 + depthOfFieldMaxDistance: + m_OverrideState: 0 + m_Value: 1 + min: 0 + max: 1 + depthOfFieldFilterMode: + m_OverrideState: 0 + m_Value: 1 + eyeAdaptation: + m_OverrideState: 0 + m_Value: 0 + eyeAdaptationMinExposure: + m_OverrideState: 0 + m_Value: 0.2 + min: 0 + max: 1 + eyeAdaptationMaxExposure: + m_OverrideState: 0 + m_Value: 5 + min: 1 + max: 100 + eyeAdaptationSpeedToLight: + m_OverrideState: 0 + m_Value: 0.4 + min: 0 + max: 1 + eyeAdaptationSpeedToDark: + m_OverrideState: 0 + m_Value: 0.2 + min: 0 + max: 1 + purkinje: + m_OverrideState: 0 + m_Value: 0 + purkinjeAmount: + m_OverrideState: 0 + m_Value: 1 + min: 0 + max: 5 + purkinjeLuminanceThreshold: + m_OverrideState: 0 + m_Value: 0.15 + min: 0 + max: 1 + vignettingOuterRing: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 1 + vignettingInnerRing: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 1 + vignettingFade: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 1 + vignettingCircularShape: + m_OverrideState: 0 + m_Value: 0 + vignettingAspectRatio: + m_OverrideState: 0 + m_Value: 1 + min: 0 + max: 1 + vignettingBlink: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 1 + vignettingColor: + m_OverrideState: 0 + m_Value: {r: 0, g: 0, b: 0, a: 1} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + vignettingMask: + m_OverrideState: 0 + m_Value: {fileID: 0} + outline: + m_OverrideState: 0 + m_Value: 0 + outlineColor: + m_OverrideState: 0 + m_Value: {r: 0, g: 0, b: 0, a: 0.8} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + outlineThreshold: + m_OverrideState: 0 + m_Value: 0.2 + min: 0 + max: 1 + nightVision: + m_OverrideState: 0 + m_Value: 0 + nightVisionColor: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 1, b: 0.5, a: 0.5} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + blurIntensity: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 4 + ditherIntensity: + m_OverrideState: 0 + m_Value: 0.005 + min: 0 + max: 0.02 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Profile/LUT Blending Volume.asset.meta b/Imports/Beautify/URP/Demo/DemoSources/Profile/LUT Blending Volume.asset.meta new file mode 100644 index 00000000..0fa9ff9c --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Profile/LUT Blending Volume.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 69e5c7e5562824986a4843d89a95675f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Scripts.meta b/Imports/Beautify/URP/Demo/DemoSources/Scripts.meta new file mode 100644 index 00000000..52fcd535 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b9984c554d6454839869def79e7b50ac +folderAsset: yes +timeCreated: 1472709933 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Scripts/CameraAnimator.cs b/Imports/Beautify/URP/Demo/DemoSources/Scripts/CameraAnimator.cs new file mode 100644 index 00000000..fc9e309a --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Scripts/CameraAnimator.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace Beautify.Universal { + public class CameraAnimator : MonoBehaviour { + void Update() { + transform.Rotate(new Vector3(0, 0, Time.deltaTime * 10f)); + + } + } +} \ No newline at end of file diff --git a/Imports/Beautify/URP/Demo/DemoSources/Scripts/CameraAnimator.cs.meta b/Imports/Beautify/URP/Demo/DemoSources/Scripts/CameraAnimator.cs.meta new file mode 100644 index 00000000..f41c4be4 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Scripts/CameraAnimator.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 883e769c58c564fb69c4a777b7280035 +timeCreated: 1473950280 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Scripts/Demo.cs b/Imports/Beautify/URP/Demo/DemoSources/Scripts/Demo.cs new file mode 100644 index 00000000..648ea366 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Scripts/Demo.cs @@ -0,0 +1,105 @@ +using UnityEngine; +using UnityEngine.UI; +using Beautify.Universal; +using Input = Beautify.Demos.InputProxy; + +namespace Beautify.Demos { + + public class Demo : MonoBehaviour { + + public Texture lutTexture; + + private void Start() { + UpdateText(); + } + + void Update() { + if (Input.GetKeyDown(KeyCode.J)) { + BeautifySettings.settings.bloomIntensity.value += 0.1f; + } + if (Input.GetKeyDown(KeyCode.T) || Input.GetMouseButtonDown(0)) { + BeautifySettings.settings.disabled.value = !BeautifySettings.settings.disabled.value; + UpdateText(); + } + if (Input.GetKeyDown(KeyCode.B)) BeautifySettings.Blink(0.2f); + + if (Input.GetKeyDown(KeyCode.C)) { + BeautifySettings.settings.compareMode.value = !BeautifySettings.settings.compareMode.value; + } + + if (Input.GetKeyDown(KeyCode.N)) { + BeautifySettings.settings.nightVision.Override(!BeautifySettings.settings.nightVision.value); + } + + if (Input.GetKeyDown(KeyCode.F)) { + if (BeautifySettings.settings.blurIntensity.overrideState) { + BeautifySettings.settings.blurIntensity.overrideState = false; // disables the override, disabling the blur + } else { + BeautifySettings.settings.blurIntensity.Override(4); // enables the override, activating the effect and enabling the blur + } + } + + if (Input.GetKeyDown(KeyCode.Alpha1)) { + // applies a custom value to brightness + BeautifySettings.settings.brightness.Override(0.1f); + } + if (Input.GetKeyDown(KeyCode.Alpha2)) { + // applies a custom value to brightness + BeautifySettings.settings.brightness.Override(0.5f); + } + if (Input.GetKeyDown(KeyCode.Alpha3)) { + // disables custom value + BeautifySettings.settings.brightness.overrideState = false; + } + + if (Input.GetKeyDown(KeyCode.Alpha4)) { + // enables outline + BeautifySettings.settings.outline.Override(true); + BeautifySettings.settings.outlineColor.Override(Color.cyan); + BeautifySettings.settings.outlineCustomize.Override(true); + BeautifySettings.settings.outlineSpread.Override(1.5f); + } + + if (Input.GetKeyDown(KeyCode.Alpha5)) { + // disables outline + BeautifySettings.settings.outline.overrideState = false; + } + + if (Input.GetKeyDown(KeyCode.Alpha6)) { + // assigns a LUT + BeautifySettings.settings.lut.Override(true); + BeautifySettings.settings.lutIntensity.Override(1f); + BeautifySettings.settings.lutTexture.Override(lutTexture); + } + + if (Input.GetKeyDown(KeyCode.Alpha7)) { + // disables LUT + BeautifySettings.settings.lut.Override(false); + } + + if (Input.GetKeyDown(KeyCode.Alpha8)) { + // toggles anamorphic flares on/off + float intensity = BeautifySettings.settings.anamorphicFlaresIntensity.value; + BeautifySettings.settings.anamorphicFlaresIntensity.Override(intensity > 0 ? 0f: 1f); + } + + if (Input.GetKeyDown(KeyCode.Alpha9)) { + // toggles final blur + float intensity = BeautifySettings.settings.blurIntensity.value; + BeautifySettings.settings.blurIntensity.Override(intensity > 0 ? 0f: 1f); + } + } + + void UpdateText() { + + if (BeautifySettings.settings.disabled.value) { + GameObject.Find("Beautify").GetComponent().text = "Beautify OFF"; + } else { + GameObject.Find("Beautify").GetComponent().text = "Beautify ON"; + } + + } + + + } +} diff --git a/Imports/Beautify/URP/Demo/DemoSources/Scripts/Demo.cs.meta b/Imports/Beautify/URP/Demo/DemoSources/Scripts/Demo.cs.meta new file mode 100644 index 00000000..49c08147 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Scripts/Demo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 55731cb165f254154b276c96d6565d4f +timeCreated: 1466520993 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Scripts/InputProxy.cs b/Imports/Beautify/URP/Demo/DemoSources/Scripts/InputProxy.cs new file mode 100644 index 00000000..a895dbc2 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Scripts/InputProxy.cs @@ -0,0 +1,61 @@ +using UnityEngine; + +#if ENABLE_INPUT_SYSTEM +using UnityEngine.InputSystem; +#endif + +namespace Beautify.Demos { + + public static class InputProxy { + + public static bool GetKeyDown(KeyCode keyCode) { +#if ENABLE_INPUT_SYSTEM + Keyboard keyboard = Keyboard.current; + if (keyboard == null) return false; + switch (keyCode) { + case KeyCode.J: return keyboard.jKey.wasPressedThisFrame; + case KeyCode.T: return keyboard.tKey.wasPressedThisFrame; + case KeyCode.B: return keyboard.bKey.wasPressedThisFrame; + case KeyCode.C: return keyboard.cKey.wasPressedThisFrame; + case KeyCode.N: return keyboard.nKey.wasPressedThisFrame; + case KeyCode.F: return keyboard.fKey.wasPressedThisFrame; + + case KeyCode.Alpha1: return keyboard.digit1Key.wasPressedThisFrame; + case KeyCode.Alpha2: return keyboard.digit2Key.wasPressedThisFrame; + case KeyCode.Alpha3: return keyboard.digit3Key.wasPressedThisFrame; + case KeyCode.Alpha4: return keyboard.digit4Key.wasPressedThisFrame; + case KeyCode.Alpha5: return keyboard.digit5Key.wasPressedThisFrame; + case KeyCode.Alpha6: return keyboard.digit6Key.wasPressedThisFrame; + case KeyCode.Alpha7: return keyboard.digit7Key.wasPressedThisFrame; + case KeyCode.Alpha8: return keyboard.digit8Key.wasPressedThisFrame; + case KeyCode.Alpha9: return keyboard.digit9Key.wasPressedThisFrame; + case KeyCode.Alpha0: return keyboard.digit0Key.wasPressedThisFrame; + } + return false; +#elif ENABLE_LEGACY_INPUT_MANAGER + return UnityEngine.Input.GetKeyDown(keyCode); +#else + return false; +#endif + } + + public static bool GetMouseButtonDown(int button) { +#if ENABLE_INPUT_SYSTEM + Mouse mouse = Mouse.current; + if (mouse == null) return false; + switch (button) { + case 0: return mouse.leftButton.wasPressedThisFrame; + case 1: return mouse.rightButton.wasPressedThisFrame; + case 2: return mouse.middleButton.wasPressedThisFrame; + default: return false; + } +#elif ENABLE_LEGACY_INPUT_MANAGER + return UnityEngine.Input.GetMouseButtonDown(button); +#else + return false; +#endif + } + } +} + + diff --git a/Imports/Beautify/URP/Demo/DemoSources/Scripts/InputProxy.cs.meta b/Imports/Beautify/URP/Demo/DemoSources/Scripts/InputProxy.cs.meta new file mode 100644 index 00000000..80e7a32a --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Scripts/InputProxy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e38d81bb9f53c40f7b0540cc8230de2d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Scripts/LUTBlending.cs b/Imports/Beautify/URP/Demo/DemoSources/Scripts/LUTBlending.cs new file mode 100644 index 00000000..3ddde66b --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Scripts/LUTBlending.cs @@ -0,0 +1,68 @@ +using UnityEngine; + +namespace Beautify.Universal { + + [ExecuteInEditMode] + public class LUTBlending : MonoBehaviour { + + public Texture2D LUT1, LUT2; + + [Range(0, 1)] + public float LUT1Intensity = 1f; + + [Range(0, 1)] + public float LUT2Intensity = 1f; + + [Range(0, 1)] + public float phase; + public Shader lerpShader; + + float oldPhase = -1; + RenderTexture rt; + Material lerpMat; + + static class ShaderParams { + public readonly static int LUT2 = Shader.PropertyToID("_LUT2"); + public readonly static int Phase = Shader.PropertyToID("_Phase"); + } + + void OnEnable() { + UpdateBeautifyLUT(); + } + + void OnValidate() { + oldPhase = -1; + UpdateBeautifyLUT(); + } + + private void OnDestroy() { + if (rt != null) { + rt.Release(); + } + } + + void LateUpdate() { + UpdateBeautifyLUT(); + } + + void UpdateBeautifyLUT() { + if (oldPhase == phase || LUT1 == null || LUT2 == null || lerpShader == null) return; + oldPhase = phase; + + if (rt == null) { + rt = new RenderTexture(LUT1.width, LUT1.height, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear); + rt.filterMode = FilterMode.Point; + } + if (lerpMat == null) { + lerpMat = new Material(lerpShader); + } + lerpMat.SetTexture(ShaderParams.LUT2, LUT2); + lerpMat.SetFloat(ShaderParams.Phase, phase); + Graphics.Blit(LUT1, rt, lerpMat); + BeautifySettings.settings.lut.Override(true); + float intensity = Mathf.Lerp(LUT1Intensity, LUT2Intensity, phase); + BeautifySettings.settings.lutIntensity.Override(intensity); + BeautifySettings.settings.lutTexture.Override(rt); + } + } +} diff --git a/Imports/Beautify/URP/Demo/DemoSources/Scripts/LUTBlending.cs.meta b/Imports/Beautify/URP/Demo/DemoSources/Scripts/LUTBlending.cs.meta new file mode 100644 index 00000000..83d919fc --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Scripts/LUTBlending.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 72980150b63624acfa5f209b9179d99a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Scripts/SphereAnimator.cs b/Imports/Beautify/URP/Demo/DemoSources/Scripts/SphereAnimator.cs new file mode 100644 index 00000000..a056a1cc --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Scripts/SphereAnimator.cs @@ -0,0 +1,26 @@ +using UnityEngine; + + +namespace Beautify.Universal { + + public class SphereAnimator : MonoBehaviour { + + Rigidbody rb; + const float SPEED = 4; + + void Start () { + rb = GetComponent(); + Application.targetFrameRate = 60; + } + + void FixedUpdate () { + if (transform.position.z < 0.5f) { + rb.velocity = Vector3.forward * SPEED; + } + else if (transform.position.z > 8f) { + rb.velocity = Vector3.back * SPEED; + } + } + + } +} \ No newline at end of file diff --git a/Imports/Beautify/URP/Demo/DemoSources/Scripts/SphereAnimator.cs.meta b/Imports/Beautify/URP/Demo/DemoSources/Scripts/SphereAnimator.cs.meta new file mode 100644 index 00000000..8d5f3e55 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Scripts/SphereAnimator.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8eb68b473eb774609b32b2af81f919d9 +timeCreated: 1475946452 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Scripts/ToggleDoF.cs b/Imports/Beautify/URP/Demo/DemoSources/Scripts/ToggleDoF.cs new file mode 100644 index 00000000..92adc753 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Scripts/ToggleDoF.cs @@ -0,0 +1,18 @@ +using UnityEngine; +using Beautify.Universal; +using Input = Beautify.Demos.InputProxy; + +namespace Beautify.Demos { + + public class ToggleDoF : MonoBehaviour { + + void Update() { + if (Input.GetMouseButtonDown(0)) { + // toggles DoF state by overriding the volume property + bool state = BeautifySettings.settings.depthOfField.value; + BeautifySettings.settings.depthOfField.Override(!state); + } + } + + } +} diff --git a/Imports/Beautify/URP/Demo/DemoSources/Scripts/ToggleDoF.cs.meta b/Imports/Beautify/URP/Demo/DemoSources/Scripts/ToggleDoF.cs.meta new file mode 100644 index 00000000..f7127f04 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Scripts/ToggleDoF.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ff57a37bca097427389e488b81e3df3c +timeCreated: 1466520993 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Shaders.meta b/Imports/Beautify/URP/Demo/DemoSources/Shaders.meta new file mode 100644 index 00000000..94214fcc --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Shaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d58da3cd0d51744478b373e83ff1598d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Shaders/TextureLerp.shader b/Imports/Beautify/URP/Demo/DemoSources/Shaders/TextureLerp.shader new file mode 100644 index 00000000..bd2caafd --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Shaders/TextureLerp.shader @@ -0,0 +1,55 @@ +Shader "Hidden/Kronnect/Beautify/TextureLerp" +{ + Properties + { + [NoScaleOffset] _MainTex ("LUT 1", 2D) = "black" {} + [NoScaleOffset] _LUT2 ("LUT 2", 2D) = "black" {} + _Phase("Phase", Float) = 0 + } + SubShader + { + ZTest Always + ZWrite Off + Cull Off + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float2 uv : TEXCOORD0; + float4 vertex : SV_POSITION; + }; + + sampler2D _MainTex, _LUT2; + float _Phase; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = v.uv; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + half4 lut1 = tex2D(_MainTex, i.uv); + half4 lut2 = tex2D(_LUT2, i.uv); + return lerp(lut1, lut2, _Phase); + } + ENDCG + } + } +} diff --git a/Sources/Shaders/BeautifyACESFitted.cginc.meta b/Imports/Beautify/URP/Demo/DemoSources/Shaders/TextureLerp.shader.meta similarity index 56% rename from Sources/Shaders/BeautifyACESFitted.cginc.meta rename to Imports/Beautify/URP/Demo/DemoSources/Shaders/TextureLerp.shader.meta index 11eda6ed..cab570f8 100644 --- a/Sources/Shaders/BeautifyACESFitted.cginc.meta +++ b/Imports/Beautify/URP/Demo/DemoSources/Shaders/TextureLerp.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 -guid: 6f4f77b7f9ffd4486910b55411e3e072 -timeCreated: 1488661131 -licenseType: Free +guid: bf13349ccb9934f2c8b81aabc94fe6d7 ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox.meta b/Imports/Beautify/URP/Demo/DemoSources/Skybox.meta new file mode 100644 index 00000000..5d8fd5d9 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 53a4e416a976b405e9e7e42d0ab0d69a +folderAsset: yes +timeCreated: 1467470052 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/README_SKYBOX.txt b/Imports/Beautify/URP/Demo/DemoSources/Skybox/README_SKYBOX.txt new file mode 100644 index 00000000..5d8144e7 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/README_SKYBOX.txt @@ -0,0 +1,3 @@ +License of skybox used in the demo: + +SkyboxSet by Heiko Irrgang is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. Based on a work at 93i.de. \ No newline at end of file diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/README_SKYBOX.txt.meta b/Imports/Beautify/URP/Demo/DemoSources/Skybox/README_SKYBOX.txt.meta new file mode 100644 index 00000000..0e93d2f1 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/README_SKYBOX.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: feae73fb885504a8b8d1e442e8cbd92c +timeCreated: 1467470241 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterBack2048.png b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterBack2048.png new file mode 100644 index 00000000..e6f7413a --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterBack2048.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a888f6f241c6166273de08987214de33b6a8cdf4ee060156443126dd110076c4 +size 5217348 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterBack2048.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterBack2048.png.meta new file mode 100644 index 00000000..7367ab14 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterBack2048.png.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: cc9e016a2e3f0450fac218857a5735a5 +timeCreated: 1467470959 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: 1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterDown2048.png b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterDown2048.png new file mode 100644 index 00000000..76abd292 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterDown2048.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:161814f0812f07c5bc0ecb7c2f06f3c5de439696b132b1d220c32ed8b37cf101 +size 3754196 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterDown2048.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterDown2048.png.meta new file mode 100644 index 00000000..01d8bdb5 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterDown2048.png.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: f560d74ff147f42f59dae87bed823663 +timeCreated: 1467470971 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: 1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterFront2048.png b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterFront2048.png new file mode 100644 index 00000000..4b3b9580 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterFront2048.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79b8df42b8bfad1b980078a5c2c583bc2657eb6d768720f641b76dd3f17fab2f +size 4947601 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterFront2048.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterFront2048.png.meta new file mode 100644 index 00000000..8e86906e --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterFront2048.png.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 58e8bd7fe81bc4bdfaa0aca16a4fbfd9 +timeCreated: 1467470953 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: 1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterLeft2048.png b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterLeft2048.png new file mode 100644 index 00000000..ba8a816a --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterLeft2048.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:813fe80e992ee81c6109a4ca0c58d2bde4bdbde35696deef1b41d3a346bb805d +size 4621855 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterLeft2048.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterLeft2048.png.meta new file mode 100644 index 00000000..e16f4a42 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterLeft2048.png.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: dda2e23fd5b2b455aa17ca42de02ee8f +timeCreated: 1467470966 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: 1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterRight2048.png b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterRight2048.png new file mode 100644 index 00000000..08bdca12 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterRight2048.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:693bb702354f1d32a6ff3688ccbfcf36afe272989b6a8e7a9015935bcb63ca48 +size 4815657 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterRight2048.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterRight2048.png.meta new file mode 100644 index 00000000..5e09e13c --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterRight2048.png.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: fb85cc19dc8f0487a8577530b89b48ec +timeCreated: 1467470978 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: 1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterUp2048.png b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterUp2048.png new file mode 100644 index 00000000..a45e9556 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterUp2048.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf433d45393ef6902209d5b71615711b0c4369118f96fc64c7bf69e1e8fae64d +size 2483259 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterUp2048.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterUp2048.png.meta new file mode 100644 index 00000000..69420065 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Skybox/ThickCloudsWaterUp2048.png.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 21beb9f9536cc42798b5eec3b533de67 +timeCreated: 1467470948 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: 1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures.meta b/Imports/Beautify/URP/Demo/DemoSources/Textures.meta new file mode 100644 index 00000000..ecf77adf --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d4c7d09cb0ee04ac9a14092b9c872cb3 +folderAsset: yes +timeCreated: 1462519607 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/LUTNeutral.png b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUTNeutral.png new file mode 100644 index 00000000..e2a3bc34 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUTNeutral.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6cdd1893b5513c9cf40354b68aacf4d5970c41272d62dec655ff8a12a8aa8cae +size 849 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/LUTNeutral.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUTNeutral.png.meta new file mode 100644 index 00000000..0224e8ec --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUTNeutral.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: c75e186435cf24b06ba55bc1c1999a6f +timeCreated: 1554296498 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 0 + mipBias: -1 + 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} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/LUTSepia.png b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUTSepia.png new file mode 100644 index 00000000..45258084 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUTSepia.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b5501590e5e555d34a6ec7caf2ea7927462b0a1ad2506ddbbbecc6e9b8cb18a +size 24649 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/LUTSepia.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUTSepia.png.meta new file mode 100644 index 00000000..07611fe2 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUTSepia.png.meta @@ -0,0 +1,112 @@ +fileFormatVersion: 2 +guid: b8fc4d47ab82140b6add161a4d3ea695 +timeCreated: 1523525482 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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: 1 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 0 + mipBias: -1 + 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} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: WebGL + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/LUT_18.png b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUT_18.png new file mode 100644 index 00000000..684558c7 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUT_18.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c8c9b2c6916bbeaeb412063a6711ce829c50f7f1440860a1418de05b988cb4d +size 77293 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/LUT_18.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUT_18.png.meta new file mode 100644 index 00000000..db501f63 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUT_18.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 91e50ab11e3e040b289162f90a6efba5 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + 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: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + 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: 0 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/LUT_2400.png b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUT_2400.png new file mode 100644 index 00000000..7e186333 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUT_2400.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:132f79b8d85da86b38cc391a8be51f89a62bb5e823ea5e0fe21c4943e004933a +size 54884 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/LUT_2400.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUT_2400.png.meta new file mode 100644 index 00000000..f30721e0 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/LUT_2400.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: cb660b42a27954f348c1567c26aaf7c9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + 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: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + 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: 0 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt.png b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt.png new file mode 100644 index 00000000..a977cbc2 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dd2ede18800c5ea6d9b2c6cabdb65076cd01eb4f8fcddb592c1a2162d6cb491 +size 2657976 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt.png.meta new file mode 100644 index 00000000..a1e1f1e3 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt.png.meta @@ -0,0 +1,103 @@ +fileFormatVersion: 2 +guid: 557dec91771464758a75e390f553373d +timeCreated: 1466508776 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + 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: 1 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + 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} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt1.png b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt1.png new file mode 100644 index 00000000..e5d01c57 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0442ea88aa4137ea080744f86cb2832243d8cf4b7c2444246bc76788f9ea465e +size 739952 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt1.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt1.png.meta new file mode 100644 index 00000000..b31d0437 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt1.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 497391d2b220f4b588c8707828d383fc +timeCreated: 1532083477 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + 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} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt2.png b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt2.png new file mode 100644 index 00000000..f56cce02 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63fb35c8c904efd605a748c842ff9d9016329fc7e7710257ae292dcbc9b5693c +size 473839 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt2.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt2.png.meta new file mode 100644 index 00000000..72ad578f --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt2.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: f5c5080de097a4274bab7bc2bf5017f6 +timeCreated: 1532083478 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + 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} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt3.png b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt3.png new file mode 100644 index 00000000..83f26b1f --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2a673dea55438fde2099f21ba5ca77e7802cce769c26fb0e5a5b0639507dee0 +size 245359 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt3.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt3.png.meta new file mode 100644 index 00000000..d088bc59 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt3.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 1eaf49009b12743098441114b5bd333f +timeCreated: 1532083477 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + 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} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt4.png b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt4.png new file mode 100644 index 00000000..f4afc8d7 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0428669a1856f15129bea80a5f0a489a6583b61b636f32e7535e4b81179cb88 +size 819335 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt4.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt4.png.meta new file mode 100644 index 00000000..360df1cb --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt4.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 3ffe6b2509a2b4ecfa7fbb37186a72c8 +timeCreated: 1472116391 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt5.png b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt5.png new file mode 100644 index 00000000..37668a29 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4acfedb8158679bd820e7c1cb1d6bc304d1d9de4b038aea06e29f65a8333dd1 +size 818969 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt5.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt5.png.meta new file mode 100644 index 00000000..b029e8b0 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/dirt5.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: c51ac95356f5b4a129042df08e58c84d +timeCreated: 1532083478 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + 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} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/grungeBorder.png b/Imports/Beautify/URP/Demo/DemoSources/Textures/grungeBorder.png new file mode 100644 index 00000000..09e42052 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/grungeBorder.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:570fe884dfa8e06bb9519928f1fdef2fbb85e71da216ce93b31502793306761f +size 507814 diff --git a/Imports/Beautify/URP/Demo/DemoSources/Textures/grungeBorder.png.meta b/Imports/Beautify/URP/Demo/DemoSources/Textures/grungeBorder.png.meta new file mode 100644 index 00000000..23b4d4d4 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/Textures/grungeBorder.png.meta @@ -0,0 +1,91 @@ +fileFormatVersion: 2 +guid: 6f065cb5a39224347be7a897eb4fbe55 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 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 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/URP Settings.meta b/Imports/Beautify/URP/Demo/DemoSources/URP Settings.meta new file mode 100644 index 00000000..6b8eab93 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/URP Settings.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8f9d7789006c24be5a03db2ac214a6a9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineAsset.asset b/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineAsset.asset new file mode 100644 index 00000000..080fecc8 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineAsset.asset @@ -0,0 +1,114 @@ +%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: bf2edee5c58d82540a51f03df9d42094, type: 3} + m_Name: UniversalRenderPipelineAsset + m_EditorClassIdentifier: + k_AssetVersion: 11 + k_AssetPreviousVersion: 11 + m_RendererType: 1 + m_RendererData: {fileID: 0} + m_RendererDataList: + - {fileID: 11400000, guid: 9f2b19a61cd1c4f9d9720feb89e96e43, type: 2} + m_DefaultRendererIndex: 0 + m_RequireDepthTexture: 1 + m_RequireOpaqueTexture: 0 + m_OpaqueDownsampling: 1 + m_SupportsTerrainHoles: 1 + m_SupportsHDR: 1 + m_HDRColorBufferPrecision: 0 + m_MSAA: 1 + m_RenderScale: 1 + m_UpscalingFilter: 0 + m_FsrOverrideSharpness: 0 + m_FsrSharpness: 0.92 + m_EnableLODCrossFade: 1 + m_LODCrossFadeDitheringType: 1 + m_ShEvalMode: 0 + m_MainLightRenderingMode: 1 + m_MainLightShadowsSupported: 1 + m_MainLightShadowmapResolution: 2048 + m_AdditionalLightsRenderingMode: 1 + m_AdditionalLightsPerObjectLimit: 4 + m_AdditionalLightShadowsSupported: 0 + m_AdditionalLightsShadowmapResolution: 512 + m_AdditionalLightsShadowResolutionTierLow: 128 + m_AdditionalLightsShadowResolutionTierMedium: 256 + m_AdditionalLightsShadowResolutionTierHigh: 512 + m_ReflectionProbeBlending: 0 + m_ReflectionProbeBoxProjection: 0 + m_ShadowDistance: 50 + m_ShadowCascadeCount: 1 + m_Cascade2Split: 0.25 + m_Cascade3Split: {x: 0.1, y: 0.3} + m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} + m_CascadeBorder: 0.1 + m_ShadowDepthBias: 1 + m_ShadowNormalBias: 1 + m_AnyShadowsSupported: 1 + m_SoftShadowsSupported: 0 + m_ConservativeEnclosingSphere: 0 + m_NumIterationsEnclosingSphere: 64 + m_SoftShadowQuality: 2 + m_AdditionalLightsCookieResolution: 2048 + m_AdditionalLightsCookieFormat: 3 + m_UseSRPBatcher: 1 + m_SupportsDynamicBatching: 0 + m_MixedLightingSupported: 1 + m_SupportsLightCookies: 1 + m_SupportsLightLayers: 0 + m_DebugLevel: 0 + m_StoreActionsOptimization: 0 + m_EnableRenderGraph: 0 + m_UseAdaptivePerformance: 1 + m_ColorGradingMode: 0 + m_ColorGradingLutSize: 32 + m_UseFastSRGBLinearConversion: 0 + m_SupportDataDrivenLensFlare: 1 + m_ShadowType: 1 + m_LocalShadowsSupported: 0 + m_LocalShadowsAtlasResolution: 256 + m_MaxPixelLights: 0 + m_ShadowAtlasResolution: 256 + m_VolumeFrameworkUpdateMode: 0 + m_Textures: + blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} + bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} + m_PrefilteringModeMainLightShadows: 1 + m_PrefilteringModeAdditionalLight: 4 + m_PrefilteringModeAdditionalLightShadows: 1 + m_PrefilterXRKeywords: 0 + m_PrefilteringModeForwardPlus: 1 + m_PrefilteringModeDeferredRendering: 1 + m_PrefilteringModeScreenSpaceOcclusion: 1 + m_PrefilterDebugKeywords: 0 + m_PrefilterWriteRenderingLayers: 0 + m_PrefilterHDROutput: 0 + m_PrefilterSSAODepthNormals: 0 + m_PrefilterSSAOSourceDepthLow: 0 + m_PrefilterSSAOSourceDepthMedium: 0 + m_PrefilterSSAOSourceDepthHigh: 0 + m_PrefilterSSAOInterleaved: 0 + m_PrefilterSSAOBlueNoise: 0 + m_PrefilterSSAOSampleCountLow: 0 + m_PrefilterSSAOSampleCountMedium: 0 + m_PrefilterSSAOSampleCountHigh: 0 + m_PrefilterDBufferMRT1: 0 + m_PrefilterDBufferMRT2: 0 + m_PrefilterDBufferMRT3: 0 + m_PrefilterSoftShadowsQualityLow: 0 + m_PrefilterSoftShadowsQualityMedium: 0 + m_PrefilterSoftShadowsQualityHigh: 0 + m_PrefilterSoftShadows: 0 + m_PrefilterScreenCoord: 0 + m_PrefilterNativeRenderPass: 0 + m_ShaderVariantLogLevel: 0 + m_ShadowCascades: 0 diff --git a/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineAsset.asset.meta b/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineAsset.asset.meta new file mode 100644 index 00000000..e9bcf43a --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineAsset.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0420a5f7bad574a20bf7ad3eddd45a6d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineAsset_Renderer.asset b/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineAsset_Renderer.asset new file mode 100644 index 00000000..88c3a953 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineAsset_Renderer.asset @@ -0,0 +1,116 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-4256343132872579409 +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: 7cbabd8e2cb2e4f8a930752453adf79a, type: 3} + m_Name: Beautify + m_EditorClassIdentifier: + m_Active: 1 + shader: {fileID: 4800000, guid: 55d70ca4ea7504a38b66170bbe587b2f, type: 3} + renderPassEvent: 500 + ignorePostProcessingOption: 0 + clearXRColorBuffer: 0 + cameraLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + stripSettings: {fileID: 0} + stripBeautifyTonemappingACES: 0 + stripBeautifyTonemappingACESFitted: 0 + stripBeautifyTonemappingAGX: 0 + stripBeautifySharpen: 0 + stripBeautifySharpenExclusionMask: 1 + stripBeautifyDithering: 0 + stripBeautifyEdgeAA: 0 + stripBeautifyLUT: 0 + stripBeautifyLUT3D: 1 + stripBeautifyColorTweaks: 0 + stripBeautifyBloom: 0 + stripBeautifyLensDirt: 0 + stripBeautifyChromaticAberration: 0 + stripBeautifyDoF: 0 + stripBeautifyDoFTransparentSupport: 1 + stripBeautifyEyeAdaptation: 1 + stripBeautifyPurkinje: 1 + stripBeautifyVignetting: 0 + stripBeautifyVignettingMask: 1 + stripBeautifyOutline: 1 + stripBeautifyNightVision: 1 + stripBeautifyThermalVision: 1 + stripBeautifyFrame: 1 + stripBeautifyFilmGrain: 1 + stripUnityFilmGrain: 0 + stripUnityDithering: 0 + stripUnityTonemapping: 0 + stripUnityBloom: 0 + stripUnityChromaticAberration: 0 + stripUnityDistortion: 0 + stripUnityDebugVariants: 0 +--- !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: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} + m_Name: UniversalRenderPipelineAsset_Renderer + m_EditorClassIdentifier: + debugShaders: + debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, + type: 3} + hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3} + m_RendererFeatures: + - {fileID: -4256343132872579409} + m_RendererFeatureMap: + m_UseNativeRenderPass: 0 + postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} + xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} + shaders: + blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} + copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} + screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd, + type: 3} + samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} + stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} + fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} + fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3} + materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} + coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} + coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, + type: 3} + blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3} + cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, + type: 3} + objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, + type: 3} + dataDrivenLensFlare: {fileID: 4800000, guid: 6cda457ac28612740adb23da5d39ea92, + type: 3} + m_AssetVersion: 2 + m_OpaqueLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_TransparentLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_DefaultStencilState: + overrideStencilState: 0 + stencilReference: 0 + stencilCompareFunction: 8 + passOperation: 0 + failOperation: 0 + zFailOperation: 0 + m_ShadowTransparentReceive: 1 + m_RenderingMode: 0 + m_DepthPrimingMode: 0 + m_CopyDepthMode: 0 + m_AccurateGbufferNormals: 0 + m_IntermediateTextureMode: 1 diff --git a/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineAsset_Renderer.asset.meta b/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineAsset_Renderer.asset.meta new file mode 100644 index 00000000..952ed010 --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineAsset_Renderer.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9f2b19a61cd1c4f9d9720feb89e96e43 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineGlobalSettings.asset b/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineGlobalSettings.asset new file mode 100644 index 00000000..98f0dfda --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineGlobalSettings.asset @@ -0,0 +1,41 @@ +%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: 3 + m_RenderingLayerNames: + - Light Layer default + - Light Layer 1 + - Light Layer 2 + - Light Layer 3 + - Light Layer 4 + - Light Layer 5 + - Light Layer 6 + - Light Layer 7 + m_ValidRenderingLayers: 255 + 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 + m_StripUnusedLODCrossFadeVariants: 1 + m_StripScreenCoordOverrideVariants: 1 + supportRuntimeDebugDisplay: 0 + m_ShaderVariantLogLevel: 0 + m_ExportShaderVariants: 1 diff --git a/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineGlobalSettings.asset.meta b/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineGlobalSettings.asset.meta new file mode 100644 index 00000000..c6e5224a --- /dev/null +++ b/Imports/Beautify/URP/Demo/DemoSources/URP Settings/UniversalRenderPipelineGlobalSettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bc13ffe5b64b54ad2a9e37168350312c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/Scene.unity b/Imports/Beautify/URP/Demo/Scene.unity new file mode 100644 index 00000000..6cedc218 --- /dev/null +++ b/Imports/Beautify/URP/Demo/Scene.unity @@ -0,0 +1,1551 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.03669285, g: 0.039289042, b: 0.044827584, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 1 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 780940146} +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &74270555 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 74270560} + - component: {fileID: 74270559} + - component: {fileID: 74270557} + - component: {fileID: 74270556} + - component: {fileID: 74270561} + - component: {fileID: 74270558} + m_Layer: 8 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &74270556 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 74270555} + m_Enabled: 1 +--- !u!124 &74270557 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 74270555} + m_Enabled: 1 +--- !u!114 &74270558 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 74270555} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 883e769c58c564fb69c4a777b7280035, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!20 &74270559 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 74270555} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: 1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 1 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &74270560 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 74270555} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -12} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &74270561 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 74270555} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_RenderPostProcessing: 1 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !u!1 &243693765 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 243693769} + - component: {fileID: 243693768} + - component: {fileID: 243693767} + - component: {fileID: 243693766} + m_Layer: 0 + m_Name: CapsuleReddish + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &243693766 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 243693765} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 520cb4efa7fe74af489b70716d3ad15d, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!136 &243693767 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 243693765} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &243693768 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 243693765} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &243693769 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 243693765} + m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0, y: -2.5, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1405393377} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &270767976 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 270767977} + - component: {fileID: 270767979} + - component: {fileID: 270767978} + m_Layer: 5 + m_Name: Beautify + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &270767977 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 270767976} + 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_Children: [] + m_Father: {fileID: 400910773} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 7.5, y: -5} + m_SizeDelta: {x: -15, y: -10} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &270767978 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 270767976} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: Beautify ON (Demo optimized for Linear Color Space) +--- !u!222 &270767979 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 270767976} + m_CullTransparentMesh: 0 +--- !u!1 &310961356 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 310961360} + - component: {fileID: 310961359} + - component: {fileID: 310961358} + - component: {fileID: 310961357} + m_Layer: 0 + m_Name: CapsuleBluish + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &310961357 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 310961356} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 3f665cbb95d06419dab6831f996994ae, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!136 &310961358 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 310961356} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &310961359 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 310961356} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &310961360 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 310961356} + m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0, y: 2.5, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1405393377} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &400910770 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 400910773} + - component: {fileID: 400910772} + - component: {fileID: 400910771} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &400910771 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 400910770} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.854} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &400910772 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 400910770} + m_CullTransparentMesh: 0 +--- !u!224 &400910773 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 400910770} + 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_Children: + - {fileID: 270767977} + - {fileID: 641038708} + - {fileID: 959194322} + m_Father: {fileID: 477346699} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: -4, y: -4} + m_SizeDelta: {x: 700, y: 80} + m_Pivot: {x: 0, y: 0} +--- !u!1 &477346698 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 477346699} + - component: {fileID: 477346702} + - component: {fileID: 477346701} + - component: {fileID: 477346700} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &477346699 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 477346698} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 400910773} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!114 &477346700 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 477346698} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &477346701 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 477346698} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1344, y: 756} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &477346702 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 477346698} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 74270559} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 1 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!1 &589645519 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 589645523} + - component: {fileID: 589645522} + - component: {fileID: 589645521} + - component: {fileID: 589645520} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &589645520 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 589645519} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 3d58c6582090747c18f4f2c1f5d50217, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!135 &589645521 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 589645519} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &589645522 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 589645519} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &589645523 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 589645519} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 2, y: 2, z: 2} + m_Children: [] + m_Father: {fileID: 1405393377} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &620302637 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 620302641} + - component: {fileID: 620302640} + - component: {fileID: 620302639} + - component: {fileID: 620302638} + m_Layer: 4 + m_Name: CapsuleYellow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &620302638 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 620302637} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 62fe9ccaa47394d74846e9604ac9c017, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!136 &620302639 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 620302637} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &620302640 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 620302637} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &620302641 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 620302637} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 2.5, y: 0, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1405393377} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &641038707 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 641038708} + - component: {fileID: 641038710} + - component: {fileID: 641038709} + m_Layer: 5 + m_Name: DemoTitle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &641038708 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 641038707} + 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_Children: [] + m_Father: {fileID: 400910773} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 7.5, y: -15} + m_SizeDelta: {x: -15, y: -30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &641038709 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 641038707} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 0, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: Press T to toggle Beautify on/off, C compare mode on/off, B for blink effect. +--- !u!222 &641038710 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 641038707} + m_CullTransparentMesh: 0 +--- !u!1 &674079199 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 674079201} + - component: {fileID: 674079200} + m_Layer: 0 + m_Name: Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &674079200 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 674079199} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 0.5 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.802082 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &674079201 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 674079199} + m_LocalRotation: {x: -0.21458785, y: -0.12743226, z: -0.028251037, w: 0.9679437} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: -25, y: -15, z: 0} +--- !u!850595691 &780940146 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Settings.lighting + serializedVersion: 3 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_RealtimeEnvironmentLighting: 0 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_TextureCompression: 1 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 1024 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 +--- !u!1 &959194321 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 959194322} + - component: {fileID: 959194324} + - component: {fileID: 959194323} + m_Layer: 5 + m_Name: DemoTitle2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &959194322 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 959194321} + 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_Children: [] + m_Father: {fileID: 400910773} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 7.5, y: -25} + m_SizeDelta: {x: -15, y: -50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &959194323 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 959194321} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 0, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: To customize the effects, select PostFX gameobject and scroll down to Beautify + override section. +--- !u!222 &959194324 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 959194321} + m_CullTransparentMesh: 0 +--- !u!1 &1405393376 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1405393377} + m_Layer: 0 + m_Name: Objects + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1405393377 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1405393376} + 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_Children: + - {fileID: 1472230753} + - {fileID: 310961360} + - {fileID: 1629450040} + - {fileID: 620302641} + - {fileID: 243693769} + - {fileID: 589645523} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1472230749 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1472230753} + - component: {fileID: 1472230752} + - component: {fileID: 1472230751} + - component: {fileID: 1472230750} + m_Layer: 4 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1472230750 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1472230749} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 50867211f1c3a4f4d873b9e9a2345b09, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!64 &1472230751 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1472230749} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1472230752 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1472230749} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1472230753 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1472230749} + m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1405393377} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1629450036 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1629450040} + - component: {fileID: 1629450039} + - component: {fileID: 1629450038} + - component: {fileID: 1629450037} + m_Layer: 0 + m_Name: CapsuleGreen + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1629450037 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1629450036} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: dc62823918da4474aa9e1f0ac5dda8e7, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!136 &1629450038 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1629450036} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1629450039 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1629450036} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1629450040 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1629450036} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2.5, y: 0, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1405393377} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1952940960 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1952940962} + - component: {fileID: 1952940961} + - component: {fileID: 1952940963} + m_Layer: 0 + m_Name: PostFX + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1952940961 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1952940960} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + isGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: efb0a5dc71c424fabaae788534da781f, type: 2} +--- !u!4 &1952940962 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1952940960} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1952940963 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1952940960} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4b900b6d691ae49f8a12753b63b449e7, type: 3} + m_Name: + m_EditorClassIdentifier: + sun: {fileID: 0} + depthOfFieldTarget: {fileID: 0} +--- !u!1 &2036179136 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2036179138} + - component: {fileID: 2036179137} + m_Layer: 0 + m_Name: Demo + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2036179137 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2036179136} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 55731cb165f254154b276c96d6565d4f, type: 3} + m_Name: + m_EditorClassIdentifier: + lutTexture: {fileID: 0} +--- !u!4 &2036179138 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2036179136} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1.2010717, y: -1.4126583, z: 4.2060375} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Imports/Beautify/URP/Demo/Scene.unity.meta b/Imports/Beautify/URP/Demo/Scene.unity.meta new file mode 100644 index 00000000..1d31065f --- /dev/null +++ b/Imports/Beautify/URP/Demo/Scene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 676780d52cde7471f8536d9000b39b80 +timeCreated: 1487074764 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/Scene_DepthOfField.unity b/Imports/Beautify/URP/Demo/Scene_DepthOfField.unity new file mode 100644 index 00000000..0c141245 --- /dev/null +++ b/Imports/Beautify/URP/Demo/Scene_DepthOfField.unity @@ -0,0 +1,2442 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 2100000, guid: 4df845aa63d7e4feab9be5b658f46012, type: 2} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 952368903} + m_IndirectSpecularColor: {r: 0.06494768, g: 0.071292415, b: 0.12455394, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 112000000, guid: edb9cdf5bbdcc4611991f291027c3237, + type: 2} + m_LightingSettings: {fileID: 4890085278179872738, guid: e6126a180b1114e9c86b2a848d901623, + type: 2} +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &236149891 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 236149892} + - component: {fileID: 236149894} + - component: {fileID: 236149893} + m_Layer: 5 + m_Name: Beautify + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &236149892 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 236149891} + 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_Children: [] + m_Father: {fileID: 612153582} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 7.5, y: -5} + m_SizeDelta: {x: -15, y: -10} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &236149893 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 236149891} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: Beautify +--- !u!222 &236149894 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 236149891} + m_CullTransparentMesh: 0 +--- !u!1 &248282631 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 248282632} + - component: {fileID: 248282635} + - component: {fileID: 248282634} + - component: {fileID: 248282633} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &248282632 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 248282631} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 612153582} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!114 &248282633 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 248282631} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &248282634 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 248282631} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &248282635 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 248282631} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 25 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!1 &403313042 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 403313046} + - component: {fileID: 403313045} + - component: {fileID: 403313044} + - component: {fileID: 403313043} + m_Layer: 0 + m_Name: Sphere (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &403313043 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 403313042} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: f0fd2d801240046b7b673468d8a86e6f, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!135 &403313044 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 403313042} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &403313045 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 403313042} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &403313046 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 403313042} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -25, y: 2, z: 50} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 1998679370} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &409812748 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 409812749} + - component: {fileID: 409812752} + - component: {fileID: 409812751} + - component: {fileID: 409812750} + m_Layer: 0 + m_Name: BankInFront + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &409812749 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 409812748} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 10, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1588548931} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &409812750 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 409812748} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 16548db57056b4eeeb9bc551b18be0c7, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!65 &409812751 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 409812748} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &409812752 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 409812748} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &516132278 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 516132280} + - component: {fileID: 516132279} + m_Layer: 0 + m_Name: Toggle DoF Script + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &516132279 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 516132278} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ff57a37bca097427389e488b81e3df3c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &516132280 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 516132278} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &597398847 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 597398851} + - component: {fileID: 597398850} + - component: {fileID: 597398849} + - component: {fileID: 597398848} + m_Layer: 0 + m_Name: Sphere (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &597398848 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 597398847} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: f0fd2d801240046b7b673468d8a86e6f, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!135 &597398849 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 597398847} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &597398850 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 597398847} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &597398851 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 597398847} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -15, y: 2, z: 50} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 1998679370} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &612153581 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 612153582} + - component: {fileID: 612153584} + - component: {fileID: 612153583} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &612153582 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 612153581} + 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_Children: + - {fileID: 236149892} + - {fileID: 707944537} + m_Father: {fileID: 248282632} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: -4, y: -4} + m_SizeDelta: {x: 500, y: 60} + m_Pivot: {x: 0, y: 0} +--- !u!114 &612153583 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 612153581} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.854} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &612153584 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 612153581} + m_CullTransparentMesh: 0 +--- !u!1 &629772580 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 629772584} + - component: {fileID: 629772583} + - component: {fileID: 629772582} + - component: {fileID: 629772581} + m_Layer: 0 + m_Name: Sphere (6) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &629772581 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 629772580} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: f0fd2d801240046b7b673468d8a86e6f, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!135 &629772582 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 629772580} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &629772583 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 629772580} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &629772584 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 629772580} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 25, y: 2, z: 50} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 1998679370} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &707944534 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 707944537} + - component: {fileID: 707944536} + - component: {fileID: 707944535} + m_Layer: 5 + m_Name: DemoTitle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &707944535 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 707944534} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 0, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: Depth of Field demo (focus set to sphere). Click to toggle DoF on/off. +--- !u!222 &707944536 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 707944534} + m_CullTransparentMesh: 0 +--- !u!224 &707944537 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 707944534} + 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_Children: [] + m_Father: {fileID: 612153582} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 7.5, y: -15} + m_SizeDelta: {x: -15, y: -30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &713176337 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 713176341} + - component: {fileID: 713176340} + - component: {fileID: 713176339} + - component: {fileID: 713176338} + m_Layer: 0 + m_Name: Sphere (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &713176338 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 713176337} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: aa631c03375c24c4cbe310de744f058f, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!135 &713176339 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 713176337} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &713176340 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 713176337} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &713176341 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 713176337} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -20, y: 2, z: 50} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 1998679370} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &854654394 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 854654398} + - component: {fileID: 854654397} + - component: {fileID: 854654396} + - component: {fileID: 854654395} + m_Layer: 0 + m_Name: Path + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &854654395 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 854654394} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a3446cf188dca4f6a973eeb8189308f6, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!65 &854654396 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 854654394} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &854654397 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 854654394} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &854654398 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 854654394} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 2, y: 1, z: 25} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &952368902 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 952368904} + - component: {fileID: 952368903} + m_Layer: 0 + m_Name: Sun + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &952368903 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 952368902} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.802082 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &952368904 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 952368902} + m_LocalRotation: {x: 0.45695007, y: -0.35155377, z: 0.2029697, w: 0.79146063} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &959032116 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 959032118} + - component: {fileID: 959032117} + - component: {fileID: 959032119} + m_Layer: 0 + m_Name: PostFX + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &959032117 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 959032116} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + isGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: a59933bb51f9e4053b410799bc308dfc, type: 2} +--- !u!4 &959032118 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 959032116} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 157.34962, y: 34.474743, z: -39.851067} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &959032119 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 959032116} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4b900b6d691ae49f8a12753b63b449e7, type: 3} + m_Name: + m_EditorClassIdentifier: + sun: {fileID: 952368904} + depthOfFieldTarget: {fileID: 1764905975} +--- !u!1 &1104729737 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1104729741} + - component: {fileID: 1104729740} + - component: {fileID: 1104729739} + - component: {fileID: 1104729738} + m_Layer: 0 + m_Name: Sphere (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1104729738 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1104729737} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: f0fd2d801240046b7b673468d8a86e6f, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!135 &1104729739 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1104729737} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1104729740 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1104729737} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1104729741 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1104729737} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 15, y: 2, z: 50} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 1998679370} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1202668077 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1202668081} + - component: {fileID: 1202668080} + - component: {fileID: 1202668079} + - component: {fileID: 1202668078} + m_Layer: 0 + m_Name: Sphere (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1202668078 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1202668077} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 0067d374af558414bb48e3b34a1c2323, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!135 &1202668079 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1202668077} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1202668080 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1202668077} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1202668081 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1202668077} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 20, y: 2, z: 50} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 1998679370} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1517190340 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1517190344} + - component: {fileID: 1517190343} + - component: {fileID: 1517190342} + - component: {fileID: 1517190341} + m_Layer: 0 + m_Name: Bank2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1517190341 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1517190340} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 16548db57056b4eeeb9bc551b18be0c7, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!65 &1517190342 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1517190340} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1517190343 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1517190340} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1517190344 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1517190340} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1, y: 0.25, z: 5} + m_LocalScale: {x: 0.2, y: 1, z: 1} + m_Children: + - {fileID: 1669426861} + m_Father: {fileID: 2111238766} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1564164057 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1564164061} + - component: {fileID: 1564164060} + - component: {fileID: 1564164059} + - component: {fileID: 1564164058} + m_Layer: 0 + m_Name: BankInFront + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1564164058 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1564164057} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 16548db57056b4eeeb9bc551b18be0c7, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!65 &1564164059 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1564164057} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1564164060 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1564164057} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1564164061 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1564164057} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 10, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1906905083} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1588548927 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1588548931} + - component: {fileID: 1588548930} + - component: {fileID: 1588548929} + - component: {fileID: 1588548928} + m_Layer: 0 + m_Name: Bank4 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1588548928 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1588548927} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 16548db57056b4eeeb9bc551b18be0c7, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!65 &1588548929 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1588548927} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1588548930 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1588548927} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1588548931 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1588548927} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1, y: 0.25, z: 11} + m_LocalScale: {x: 0.2, y: 1, z: 1} + m_Children: + - {fileID: 409812749} + m_Father: {fileID: 2111238766} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1665337994 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1665337998} + - component: {fileID: 1665337997} + - component: {fileID: 1665337996} + - component: {fileID: 1665337995} + m_Layer: 0 + m_Name: BankInFront + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1665337995 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1665337994} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 16548db57056b4eeeb9bc551b18be0c7, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!65 &1665337996 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1665337994} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1665337997 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1665337994} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1665337998 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1665337994} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 10, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2038895712} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1669426860 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1669426861} + - component: {fileID: 1669426864} + - component: {fileID: 1669426863} + - component: {fileID: 1669426862} + m_Layer: 0 + m_Name: BankInFront + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1669426861 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669426860} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 10, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1517190344} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1669426862 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669426860} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 16548db57056b4eeeb9bc551b18be0c7, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!65 &1669426863 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669426860} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1669426864 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1669426860} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1764905971 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1764905975} + - component: {fileID: 1764905974} + - component: {fileID: 1764905973} + - component: {fileID: 1764905972} + - component: {fileID: 1764905976} + - component: {fileID: 1764905977} + m_Layer: 0 + m_Name: CenterSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1764905972 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1764905971} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 16548db57056b4eeeb9bc551b18be0c7, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!135 &1764905973 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1764905971} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1764905974 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1764905971} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1764905975 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1764905971} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.77, z: 10} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_Children: [] + m_Father: {fileID: 2017329709} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1764905976 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1764905971} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8eb68b473eb774609b32b2af81f919d9, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!54 &1764905977 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1764905971} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 1 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!1 &1906905082 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1906905083} + - component: {fileID: 1906905086} + - component: {fileID: 1906905085} + - component: {fileID: 1906905084} + m_Layer: 0 + m_Name: Bank3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1906905083 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1906905082} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1, y: 0.25, z: 8} + m_LocalScale: {x: 0.2, y: 1, z: 1} + m_Children: + - {fileID: 1564164061} + m_Father: {fileID: 2111238766} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &1906905084 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1906905082} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 16548db57056b4eeeb9bc551b18be0c7, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!65 &1906905085 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1906905082} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1906905086 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1906905082} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1998679369 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1998679370} + m_Layer: 0 + m_Name: FarSpheres + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1998679370 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1998679369} + 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_Children: + - {fileID: 1202668081} + - {fileID: 1104729741} + - {fileID: 597398851} + - {fileID: 713176341} + - {fileID: 403313046} + - {fileID: 629772584} + m_Father: {fileID: 2017329709} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2017329708 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2017329709} + m_Layer: 0 + m_Name: Spheres + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2017329709 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017329708} + 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_Children: + - {fileID: 1764905975} + - {fileID: 1998679370} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2038895708 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2038895712} + - component: {fileID: 2038895711} + - component: {fileID: 2038895710} + - component: {fileID: 2038895709} + m_Layer: 0 + m_Name: Bank1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &2038895709 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2038895708} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 16548db57056b4eeeb9bc551b18be0c7, 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: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + 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} +--- !u!65 &2038895710 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2038895708} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &2038895711 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2038895708} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2038895712 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2038895708} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1, y: 0.25, z: 2} + m_LocalScale: {x: 0.2, y: 1, z: 1} + m_Children: + - {fileID: 1665337998} + m_Father: {fileID: 2111238766} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2087541785 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2087541790} + - component: {fileID: 2087541789} + - component: {fileID: 2087541787} + - component: {fileID: 2087541786} + - component: {fileID: 2087541788} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &2087541786 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2087541785} + m_Enabled: 1 +--- !u!124 &2087541787 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2087541785} + m_Enabled: 1 +--- !u!114 &2087541788 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2087541785} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_RenderPostProcessing: 1 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 +--- !u!20 &2087541789 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2087541785} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: 1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &2087541790 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2087541785} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2111238765 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2111238766} + m_Layer: 0 + m_Name: Banks + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2111238766 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2111238765} + 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_Children: + - {fileID: 2038895712} + - {fileID: 1517190344} + - {fileID: 1906905083} + - {fileID: 1588548931} + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Imports/Beautify/URP/Demo/Scene_DepthOfField.unity.meta b/Imports/Beautify/URP/Demo/Scene_DepthOfField.unity.meta new file mode 100644 index 00000000..7e4d994d --- /dev/null +++ b/Imports/Beautify/URP/Demo/Scene_DepthOfField.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5b607301e68434e6e90ec78a5b0bcc39 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/Scene_LUTBlending.unity b/Imports/Beautify/URP/Demo/Scene_LUTBlending.unity new file mode 100644 index 00000000..f4b59a0e --- /dev/null +++ b/Imports/Beautify/URP/Demo/Scene_LUTBlending.unity @@ -0,0 +1,860 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.18028301, g: 0.22571309, b: 0.30692127, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: 4bc048d1804254e5b8c12f73790d6dc1, + type: 2} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &43328500 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 43328503} + - component: {fileID: 43328502} + - component: {fileID: 43328501} + - component: {fileID: 43328504} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &43328501 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 43328500} + m_Enabled: 1 +--- !u!20 &43328502 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 43328500} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &43328503 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 43328500} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &43328504 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 43328500} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 1 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 + m_TaaSettings: + quality: 3 + frameInfluence: 0.1 + jitterScale: 1 + mipBias: 0 + varianceClampScale: 0.9 + contrastAdaptiveSharpening: 0 +--- !u!1 &559147481 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 559147482} + - component: {fileID: 559147484} + - component: {fileID: 559147483} + m_Layer: 5 + m_Name: Text1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &559147482 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 559147481} + 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: 967859502} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &559147483 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 559147481} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 0, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Select "LUT Blending Demo" gameobject and use the inspector to blend the + two LUTs dynamically +--- !u!222 &559147484 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 559147481} + m_CullTransparentMesh: 0 +--- !u!1 &677859558 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 677859561} + - component: {fileID: 677859559} + m_Layer: 0 + m_Name: Post FX Volume + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &677859559 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 677859558} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IsGlobal: 1 + priority: 0 + blendDistance: 1 + weight: 1 + sharedProfile: {fileID: 11400000, guid: 69e5c7e5562824986a4843d89a95675f, type: 2} +--- !u!4 &677859561 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 677859558} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 10, y: 10, z: 10} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &856308644 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 856308645} + m_Layer: 0 + m_Name: ----- + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &856308645 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 856308644} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 24.035887, y: -0.43627387, z: -0.2797666} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &967859501 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 967859502} + - component: {fileID: 967859504} + - component: {fileID: 967859503} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &967859502 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 967859501} + 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: + - {fileID: 559147482} + - {fileID: 1142744245} + m_Father: {fileID: 1935846350} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 80} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &967859503 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 967859501} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &967859504 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 967859501} + m_CullTransparentMesh: 0 +--- !u!1 &1142744244 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1142744245} + - component: {fileID: 1142744247} + - component: {fileID: 1142744246} + m_Layer: 5 + m_Name: Text2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1142744245 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1142744244} + 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: 967859502} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1142744246 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1142744244} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: The script blends the two textures using a custom shader and pass the result + to Beautify profile +--- !u!222 &1142744247 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1142744244} + m_CullTransparentMesh: 0 +--- !u!1 &1270909460 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1270909465} + - component: {fileID: 1270909461} + m_Layer: 0 + m_Name: LUT Blending Demo + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1270909461 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1270909460} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 72980150b63624acfa5f209b9179d99a, type: 3} + m_Name: + m_EditorClassIdentifier: + LUT1: {fileID: 2800000, guid: 91e50ab11e3e040b289162f90a6efba5, type: 3} + LUT2: {fileID: 2800000, guid: cb660b42a27954f348c1567c26aaf7c9, type: 3} + LUT1Intensity: 1 + LUT2Intensity: 1 + phase: 0 + lerpShader: {fileID: 4800000, guid: bf13349ccb9934f2c8b81aabc94fe6d7, type: 3} +--- !u!4 &1270909465 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1270909460} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 5, y: 0, z: 0} + m_LocalScale: {x: 10, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1601437822 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1601437824} + - component: {fileID: 1601437823} + - component: {fileID: 1601437825} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &1601437823 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1601437822} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1601437824 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1601437822} + serializedVersion: 2 + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!114 &1601437825 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1601437822} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 3 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_RenderingLayers: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_ShadowRenderingLayers: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} + m_SoftShadowQuality: 0 +--- !u!1 &1935846346 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1935846350} + - component: {fileID: 1935846349} + - component: {fileID: 1935846348} + - component: {fileID: 1935846347} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1935846347 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1935846346} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1935846348 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1935846346} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &1935846349 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1935846346} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 0 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1935846350 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1935846346} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 967859502} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1270909465} + - {fileID: 677859561} + - {fileID: 856308645} + - {fileID: 43328503} + - {fileID: 1601437824} + - {fileID: 1935846350} diff --git a/Imports/Beautify/URP/Demo/Scene_LUTBlending.unity.meta b/Imports/Beautify/URP/Demo/Scene_LUTBlending.unity.meta new file mode 100644 index 00000000..ebf27bd0 --- /dev/null +++ b/Imports/Beautify/URP/Demo/Scene_LUTBlending.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b41fd1587d3de4335b76c648ed479ae4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Demo/Scene_LUTBlendingSettings.lighting b/Imports/Beautify/URP/Demo/Scene_LUTBlendingSettings.lighting new file mode 100644 index 00000000..963c9cc4 --- /dev/null +++ b/Imports/Beautify/URP/Demo/Scene_LUTBlendingSettings.lighting @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Scene_LUTBlendingSettings + serializedVersion: 6 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 1 + m_BakeBackend: 1 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_LightmapCompression: 3 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 2 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentImportanceSampling: 1 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_PVRTiledBaking: 0 + m_NumRaysToShootPerTexel: -1 + m_RespectSceneVisibilityWhenBakingGI: 0 diff --git a/Imports/Beautify/URP/Demo/Scene_LUTBlendingSettings.lighting.meta b/Imports/Beautify/URP/Demo/Scene_LUTBlendingSettings.lighting.meta new file mode 100644 index 00000000..58d85f02 --- /dev/null +++ b/Imports/Beautify/URP/Demo/Scene_LUTBlendingSettings.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4bc048d1804254e5b8c12f73790d6dc1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Documentation.meta b/Imports/Beautify/URP/Documentation.meta new file mode 100644 index 00000000..66b09eba --- /dev/null +++ b/Imports/Beautify/URP/Documentation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d553524dbeddd471981f0ca82bf35023 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Documentation/Documentation Online.url b/Imports/Beautify/URP/Documentation/Documentation Online.url new file mode 100644 index 00000000..04673350 --- /dev/null +++ b/Imports/Beautify/URP/Documentation/Documentation Online.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://kronnect.com/guides-category/beautify-2-urp/ \ No newline at end of file diff --git a/Imports/Beautify/URP/Documentation/Documentation Online.url.meta b/Imports/Beautify/URP/Documentation/Documentation Online.url.meta new file mode 100644 index 00000000..35d7c32b --- /dev/null +++ b/Imports/Beautify/URP/Documentation/Documentation Online.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8d2b34f62cb244e2d9d69e35ed72fcbd +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Documentation/Documentation PDF.url b/Imports/Beautify/URP/Documentation/Documentation PDF.url new file mode 100644 index 00000000..9a49ce00 --- /dev/null +++ b/Imports/Beautify/URP/Documentation/Documentation PDF.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://www.dropbox.com/s/npzthxi1kxno4wj/Documentation.pdf?dl=0 \ No newline at end of file diff --git a/Imports/Beautify/URP/Documentation/Documentation PDF.url.meta b/Imports/Beautify/URP/Documentation/Documentation PDF.url.meta new file mode 100644 index 00000000..05561fba --- /dev/null +++ b/Imports/Beautify/URP/Documentation/Documentation PDF.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d970b48b366614f60891e6c421ea91cb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Documentation/Kronnect Assets.url b/Imports/Beautify/URP/Documentation/Kronnect Assets.url new file mode 100644 index 00000000..d4772915 --- /dev/null +++ b/Imports/Beautify/URP/Documentation/Kronnect Assets.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://kronnect.com \ No newline at end of file diff --git a/Imports/Beautify/URP/Documentation/Kronnect Assets.url.meta b/Imports/Beautify/URP/Documentation/Kronnect Assets.url.meta new file mode 100644 index 00000000..eb6eee7f --- /dev/null +++ b/Imports/Beautify/URP/Documentation/Kronnect Assets.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e54c7cadb672b4bda968f03dd63aa4b5 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor.meta b/Imports/Beautify/URP/Editor.meta new file mode 100644 index 00000000..5d472f57 --- /dev/null +++ b/Imports/Beautify/URP/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e7ebc7ff1cfdf4d54b7c8ce54a032d2f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/BeautifyEditor.asmdef b/Imports/Beautify/URP/Editor/BeautifyEditor.asmdef new file mode 100644 index 00000000..f4dedb1e --- /dev/null +++ b/Imports/Beautify/URP/Editor/BeautifyEditor.asmdef @@ -0,0 +1,20 @@ +{ + "name": "BeautifyEditor", + "rootNamespace": "", + "references": [ + "GUID:15fc0a57446b3144c949da3e2b9737a9", + "GUID:df380645f10b7bc4b97d4f5eb6303d95", + "GUID:3eae0364be2026648bf74846acb8a731" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Imports/Beautify/URP/Editor/BeautifyEditor.asmdef.meta b/Imports/Beautify/URP/Editor/BeautifyEditor.asmdef.meta new file mode 100644 index 00000000..75005b5c --- /dev/null +++ b/Imports/Beautify/URP/Editor/BeautifyEditor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 46738d4e05ff8486984c82d3b38218aa +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/BeautifyEditor.cs b/Imports/Beautify/URP/Editor/BeautifyEditor.cs new file mode 100644 index 00000000..3d2879aa --- /dev/null +++ b/Imports/Beautify/URP/Editor/BeautifyEditor.cs @@ -0,0 +1,740 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEditor; +using UnityEditor.Rendering; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace Beautify.Universal { +#if UNITY_2022_2_OR_NEWER + [CustomEditor(typeof(Beautify))] +#else + [VolumeComponentEditor(typeof(Beautify))] +#endif + public class BeautifyEditor : VolumeComponentEditor { + + Beautify beautify; + GUIStyle sectionGroupStyle, foldoutStyle, blackBack; + PropertyFetcher propertyFetcher; + Texture2D headerTex; + bool pixelateExpanded; + + // Cached BeautifySettings instances to avoid frequent FindObjectsOfType calls + BeautifySettings[] cachedBeautifySettingsInstances; + + // settings group + class SectionContents { + public Dictionary> groups = new Dictionary>(); + public List singleFields = new List(); + } + + class FieldMeta { + public Beautify.DisplayConditionEnum displayConditionEnum; + public Beautify.DisplayConditionBool displayConditionBool; + public Beautify.DisplayName displayName; + public Beautify.GlobalOverride globalOverride; + public TooltipAttribute tooltip; + public Beautify.ShowStrippedLabel showStrippedLabel; + public bool hasToggleAllFields; + } + + readonly Dictionary sections = new Dictionary(); + readonly Dictionary> groupedFields = new Dictionary>(); + readonly Dictionary unpackedFields = new Dictionary(); + readonly Dictionary sectionFoldStates = new Dictionary(); + readonly Dictionary fieldMeta = new Dictionary(); + const string SECTION_FOLD_PREF_PREFIX = "Beautify_SectionFold_"; +#if !UNITY_2021_2_OR_NEWER + public override bool hasAdvancedMode => false; +#endif + + public override void OnEnable () { + if (target == null) return; + + base.OnEnable(); + + headerTex = Resources.Load("beautifyHeader"); + blackBack = new GUIStyle(); + blackBack.normal.background = MakeTex(4, 4, Color.black); + blackBack.alignment = TextAnchor.MiddleCenter; + + beautify = (Beautify)target; + + propertyFetcher = new PropertyFetcher(serializedObject); + + // Cache BeautifySettings instances on enable + cachedBeautifySettingsInstances = Misc.FindObjectsOfType(true); + + // get volume fx settings + var settings = beautify.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance) + .Where(t => t.FieldType.IsSubclassOf(typeof(VolumeParameter))) + .Where(t => (t.IsPublic && t.GetCustomAttributes(typeof(NonSerializedAttribute), false).Length == 0) || + (t.GetCustomAttributes(typeof(SerializeField), false).Length > 0)) + .Where(t => t.GetCustomAttributes(typeof(HideInInspector), false).Length == 0) + .Where(t => t.GetCustomAttributes(typeof(Beautify.SectionGroup), false).Any()); + + // group by settings first + unpackedFields.Clear(); + sections.Clear(); + groupedFields.Clear(); + fieldMeta.Clear(); + foreach (var setting in settings) { + SectionContents sectionContents = null; + + foreach (var section in setting.GetCustomAttributes(typeof(Beautify.SectionGroup)) as IEnumerable) { + if (!sections.TryGetValue(section, out sectionContents)) { + sectionContents = sections[section] = new SectionContents(); + } + + bool isGrouped = false; + foreach (var settingGroup in setting.GetCustomAttributes(typeof(Beautify.SettingsGroup)) as IEnumerable) { + if (!groupedFields.ContainsKey(settingGroup)) { + sectionContents.groups[settingGroup] = groupedFields[settingGroup] = new List(); + } + groupedFields[settingGroup].Add(setting); + isGrouped = true; + unpackedFields[setting] = Unpack(propertyFetcher.Find(setting.Name)); + } + + if (!isGrouped) { + sectionContents.singleFields.Add(setting); + unpackedFields[setting] = Unpack(propertyFetcher.Find(setting.Name)); + } + } + } + } + + public override void OnDisable() { + EditorApplication.delayCall -= RepaintAllViews; + cachedBeautifySettingsInstances = null; + } + + + public override void OnInspectorGUI () { + + serializedObject.Update(); + + SetStyles(); + + Beautify.TonemapOperator prevTonemap = beautify.tonemap.value; + bool prevDirectWrite = beautify.directWrite.value; + int prevBloomExclusionLayerMask = beautify.bloomExclusionLayerMask.overrideState ? (int)beautify.bloomExclusionLayerMask.value : 0; + int prevAnamorphicFlaresExclusionLayerMask = beautify.anamorphicFlaresExclusionLayerMask.overrideState ? (int)beautify.anamorphicFlaresExclusionLayerMask.value : 0; + + EditorGUILayout.BeginVertical(); + { + GUILayout.BeginHorizontal(blackBack); + GUILayout.Label(headerTex, blackBack, GUILayout.ExpandWidth(true)); + GUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Button(new GUIContent("Clear Effects", "Clears all effect overrides"), EditorStyles.miniButton)) { + if (EditorUtility.DisplayDialog("Clear Effects", "Do you want to clear all effects?", "Yes", "Cancel")) { + beautify.sharpenIntensity.overrideState = false; + beautify.antialiasStrength.overrideState = false; + beautify.ditherIntensity.overrideState = false; + beautify.tonemap.overrideState = false; + beautify.saturate.Override(0); + beautify.brightness.overrideState = false; + beautify.contrast.overrideState = false; + beautify.daltonize.overrideState = false; + beautify.sepia.overrideState = false; + beautify.tintColor.overrideState = false; + beautify.colorTemp.overrideState = false; + beautify.colorTempBlend.overrideState = false; + beautify.lut.overrideState = false; + beautify.bloomIntensity.overrideState = false; + beautify.anamorphicFlaresIntensity.overrideState = false; + beautify.sunFlaresIntensity.overrideState = false; + beautify.lensDirtIntensity.overrideState = false; + beautify.chromaticAberrationIntensity.overrideState = false; + beautify.depthOfField.overrideState = false; + beautify.eyeAdaptation.overrideState = false; + beautify.purkinje.overrideState = false; + beautify.vignettingOuterRing.overrideState = false; + beautify.vignettingInnerRing.overrideState = false; + beautify.vignettingFade.overrideState = false; + beautify.vignettingBlink.overrideState = false; + beautify.outline.overrideState = false; + beautify.nightVision.overrideState = false; + beautify.thermalVision.overrideState = false; + beautify.frame.overrideState = false; + beautify.blurIntensity.overrideState = false; + EditorUtility.SetDirty(beautify); + } + } + if (GUILayout.Button(new GUIContent("Quick Settings", "Applies a default set of effects including color improvement, sharpening, vignette and bloom."), EditorStyles.miniButton)) { + if (EditorUtility.DisplayDialog("Quick Settings", "Do you want to apply a collection of example effect settings (including color improvements, dithering, sharpening, vignette and bloom)?\nYou can adjust them later as you wish.", "Yes", "No")) { + beautify.sharpenIntensity.Override(4f); + beautify.ditherIntensity.Override(0.005f); + beautify.brightness.Override(1.05f); + beautify.saturate.Override(1f); + beautify.contrast.Override(1.02f); + beautify.bloomIntensity.Override(0.25f); + beautify.bloomThreshold.Override(0.75f); + beautify.vignettingOuterRing.Override(0.325f); + beautify.vignettingInnerRing.Override(0.925f); + EditorUtility.SetDirty(beautify); + } + } + if (GUILayout.Button("Online Resources & Support")) { + ContactUsWindow.ShowScreen(); + } + EditorGUILayout.EndHorizontal(); + + // Add "Configure Build Settings" button after the first section is fully drawn + string strippedKeywords = PlayerPrefs.GetString(BeautifyRendererFeature.PLAYER_PREF_KEYNAME, ""); + if (string.IsNullOrEmpty(strippedKeywords)) { + EditorGUILayout.HelpBox("All features are currently included in the build, which may significantly increase compilation time. Click the button below to configure and exclude unnecessary features from the build.", MessageType.Warning); + } + if (GUILayout.Button("Configure Build Settings >")) { + SelectActiveURPRendererAsset(); + } + + + // Check for multiple BeautifySettings instances + BeautifySettings[] beautifySettingsInstances = cachedBeautifySettingsInstances; + if (beautifySettingsInstances != null && beautifySettingsInstances.Length > 1) { + EditorGUILayout.HelpBox($"Multiple BeautifySettings instances found in the scene ({beautifySettingsInstances.Length}). It's recommended to keep only one instance.", MessageType.Warning); + + EditorGUILayout.LabelField("Found instances:", EditorStyles.boldLabel); + foreach (BeautifySettings settingsInstance in beautifySettingsInstances) { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(settingsInstance.gameObject.name, GUILayout.ExpandWidth(true)); + if (GUILayout.Button("Select", GUILayout.Width(60))) { + Selection.activeObject = settingsInstance.gameObject; + } + EditorGUILayout.EndHorizontal(); + } + EditorGUILayout.Separator(); + } + + UniversalRenderPipelineAsset pipe = GraphicsSettings.currentRenderPipeline as UniversalRenderPipelineAsset; + + Camera cam = Camera.main; + if (cam != null) { + UniversalAdditionalCameraData data = cam.GetComponent(); + if (data != null && !data.renderPostProcessing && !BeautifyRendererFeature.ignoringPostProcessingOption) { + EditorGUILayout.HelpBox("Post Processing option is disabled in the camera. Either enable it or enable the option 'Ignore Post Processing Option' in the Beautify Render Feature.", MessageType.Warning); + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Button("Go to Camera")) { + Selection.activeObject = cam; + } + if (GUILayout.Button("Go to Universal Rendering Pipeline Asset")) { + Selection.activeObject = pipe; + } + EditorGUILayout.EndHorizontal(); + EditorGUILayout.Separator(); + } + } + + if (pipe == null) { + EditorGUILayout.HelpBox("Universal Rendering Pipeline asset is not set in 'Project Settings / Graphics' !", MessageType.Error); + EditorGUILayout.Separator(); + GUI.enabled = false; + } + else if (!BeautifyRendererFeature.installed) { + EditorGUILayout.HelpBox("Beautify Render Feature must be added to the rendering pipeline renderer.", MessageType.Error); + if (GUILayout.Button("Go to Universal Rendering Pipeline Asset")) { + Selection.activeObject = pipe; + } + EditorGUILayout.Separator(); + GUI.enabled = false; + } + else if (beautify.RequiresDepthTexture()) { +#if !UNITY_2021_3_OR_NEWER + if (!pipe.supportsCameraDepthTexture) { + EditorGUILayout.HelpBox("Depth Texture option may be required for certain effects. Check Universal Rendering Pipeline asset!", MessageType.Warning); + if (GUILayout.Button("Go to Universal Rendering Pipeline Asset")) { + Selection.activeObject = pipe; + } + EditorGUILayout.Separator(); + } +#endif + } + + bool usesHDREffect = beautify.tonemap.value != Beautify.TonemapOperator.Linear; + if (usesHDREffect && (QualitySettings.activeColorSpace != ColorSpace.Linear || (Camera.main != null && !Camera.main.allowHDR))) { + EditorGUILayout.HelpBox("Some effects, like bloom or tonemapping, works better with Linear Color Space and HDR enabled. Enable Linear color space in Player Settings and check your camera and pipeline HDR setting.", MessageType.Warning); + } + + if ((bool)beautify.directWrite) { +#if !UNITY_2022_3_OR_NEWER + if (UnityEngine.XR.XRSettings.enabled) { + EditorGUILayout.HelpBox("Direct Write To Camera option is not compatible with VR.", MessageType.Warning); + } +#endif + } + + // sections + foreach (var section in sections) { + string sectionName = ObjectNames.NicifyVariableName(section.Key.GetType().Name); + bool sectionExpanded = GetSectionFoldState(sectionName); + + GUILayout.Space(6.0f); + Rect rect = GUILayoutUtility.GetRect(16f, 22f, sectionGroupStyle); + + // Draw foldout arrow + Rect foldoutRect = new Rect(rect.x + 4f, rect.y + 3f, 13f, 13f); + if (Event.current.type == EventType.Repaint) { + EditorStyles.foldout.Draw(foldoutRect, false, false, sectionExpanded, false); + } + + // Draw section header with offset for arrow + GUIStyle headerStyle = new GUIStyle(sectionGroupStyle); + headerStyle.contentOffset = new Vector2(12f, -2f); + GUI.Box(rect, sectionName, headerStyle); + + // Handle click on header + if (Event.current.type == EventType.MouseDown && rect.Contains(Event.current.mousePosition)) { + sectionExpanded = !sectionExpanded; + SetSectionFoldState(sectionName, sectionExpanded); + Event.current.Use(); + } + + EditorGUIUtility.AddCursorRect(rect, MouseCursor.Link); + + if (!sectionExpanded) continue; + + // individual properties + EditorGUI.indentLevel++; + foreach (var field in section.Value.singleFields) { + if (!unpackedFields.TryGetValue(field, out var parameter)) continue; + + bool indent; + if (!IsVisible(parameter, field, out indent)) { + if (GetMeta(field).showStrippedLabel != null) { + EditorGUILayout.BeginHorizontal(); + GUI.enabled = false; + DrawPropertyField(parameter, field, indent); + GUILayout.Label("(Not available - Check General Options)"); + GUI.enabled = true; + EditorGUILayout.EndHorizontal(); + } + continue; + } + + DrawPropertyField(parameter, field, indent); + + if (beautify.disabled.value) GUI.enabled = false; + } + EditorGUI.indentLevel--; + GUILayout.Space(6.0f); + + // grouped properties + foreach (var group in section.Value.groups) { + Beautify.SettingsGroup settingsGroup = group.Key; + string groupName = ObjectNames.NicifyVariableName(settingsGroup.GetType().Name); + bool printGroupFoldout = true; + bool firstField = true; + bool groupHasContent = false; + + foreach (var field in group.Value) { + if (!unpackedFields.TryGetValue(field, out var parameter)) continue; + + bool indent; + if (!IsVisible(parameter, field, out indent)) { + if (firstField) { + if (GetMeta(field).showStrippedLabel != null) { + EditorGUILayout.BeginHorizontal(); + GUI.enabled = false; + EditorGUILayout.Foldout(false, groupName, true, foldoutStyle); + GUILayout.FlexibleSpace(); + GUILayout.Label("(Not available - Check General Options)"); + GUI.enabled = true; + EditorGUILayout.EndHorizontal(); + GUILayout.Space(6.0f); + } + break; + } + continue; + } + + firstField = false; + + if (printGroupFoldout) { + printGroupFoldout = false; + settingsGroup.IsExpanded = EditorGUILayout.Foldout(settingsGroup.IsExpanded, groupName, true, foldoutStyle); + if (!settingsGroup.IsExpanded) + break; + EditorGUI.indentLevel++; + } + + DrawPropertyField(parameter, field, indent); + groupHasContent = true; + + if (parameter.value.propertyType == SerializedPropertyType.Boolean) { + if (!parameter.value.boolValue) { + var hasToggleSectionBegin = GetMeta(field).hasToggleAllFields; + if (hasToggleSectionBegin) break; + } + } + else if (field.Name.Equals("depthOfFieldFocusMode")) { + if (BeautifySettings.instance != null && BeautifySettings.instance.depthOfFieldTarget == null) { + SerializedProperty prop = serializedObject.FindProperty(field.Name); + if (prop != null) { + var value = prop.FindPropertyRelative("m_Value"); + if (value != null && value.enumValueIndex == (int)Beautify.DoFFocusMode.FollowTarget) { + EditorGUILayout.HelpBox("Assign target in the Beautify Settings component.", MessageType.Info); + } + } + } + } + } + if (groupHasContent) { + EditorGUI.indentLevel--; + GUILayout.Space(6.0f); + } + } + } + } + EditorGUILayout.EndVertical(); + + if (GetSectionFoldState("Artistic Choices")) { + EditorGUILayout.BeginHorizontal(); + GUILayout.Space(6.0f); + pixelateExpanded = EditorGUILayout.Foldout(pixelateExpanded, "Pixelate", true, foldoutStyle); + EditorGUILayout.EndHorizontal(); + if (pixelateExpanded) { + EditorGUILayout.HelpBox("Use the Downsampling option in General Settings to apply a pixelate effect.", MessageType.Info); + } + } + + + if (serializedObject.ApplyModifiedProperties()) { + if (beautify.directWrite.value != prevDirectWrite || (beautify.bloomExclusionLayerMask.overrideState ? (int)beautify.bloomExclusionLayerMask.value : 0) != prevBloomExclusionLayerMask || (beautify.anamorphicFlaresExclusionLayerMask.overrideState ? (int)beautify.anamorphicFlaresExclusionLayerMask.value : 0) != prevAnamorphicFlaresExclusionLayerMask || beautify.outline.value) { + EditorApplication.delayCall += RepaintAllViews; + } + } + + if (prevTonemap != beautify.tonemap.value && beautify.tonemap.value != Beautify.TonemapOperator.Linear) { + beautify.saturate.value = 0; + beautify.saturate.overrideState = true; + beautify.contrast.value = 1f; + beautify.contrast.overrideState = true; + } + + } + + static void RepaintAllViews() { + UnityEditorInternal.InternalEditorUtility.RepaintAllViews(); + } + + FieldMeta GetMeta (MemberInfo field) { + if (!fieldMeta.TryGetValue(field, out var meta)) { + meta = new FieldMeta { + displayConditionEnum = field.GetCustomAttribute(typeof(Beautify.DisplayConditionEnum)) as Beautify.DisplayConditionEnum, + displayConditionBool = field.GetCustomAttribute(typeof(Beautify.DisplayConditionBool)) as Beautify.DisplayConditionBool, + displayName = field.GetCustomAttribute(typeof(Beautify.DisplayName)) as Beautify.DisplayName, + globalOverride = field.GetCustomAttribute(typeof(Beautify.GlobalOverride)) as Beautify.GlobalOverride, + tooltip = field.GetCustomAttribute(typeof(TooltipAttribute)) as TooltipAttribute, + showStrippedLabel = field.GetCustomAttribute(typeof(Beautify.ShowStrippedLabel)) as Beautify.ShowStrippedLabel, + hasToggleAllFields = field.GetCustomAttribute(typeof(Beautify.ToggleAllFields)) != null + }; + fieldMeta[field] = meta; + } + return meta; + } + + bool IsVisible (SerializedDataParameter property, MemberInfo field, out bool indent) { + bool visible = true; + indent = false; + + FieldMeta meta = GetMeta(field); + Beautify.DisplayConditionEnum enumCondition = meta.displayConditionEnum; + Beautify.DisplayConditionBool boolCondition = meta.displayConditionBool; + bool isEnumCondition = enumCondition != null; + bool isBoolCondition = boolCondition != null; + bool canIndent = isEnumCondition ^ isBoolCondition; + + if (isEnumCondition) { + SerializedProperty condProp = propertyFetcher.Find(enumCondition.field); + if (condProp != null) { + var value = condProp.FindPropertyRelative("m_Value"); + if (value != null) { + visible = false; + if (enumCondition.isEqual) { + if (value.enumValueIndex == enumCondition.enumValueIndex) { + indent = canIndent; + return true; + } + } + else if (value.enumValueIndex != enumCondition.enumValueIndex) { + indent = canIndent; + return true; + } + } + } + } + /* OR */ + if (isBoolCondition) { + SerializedProperty condProp = propertyFetcher.Find(boolCondition.field); + if (condProp != null) { + var value = condProp.FindPropertyRelative("m_Value"); + if (value != null) { + if (value.boolValue != boolCondition.value) { + return false; + } + indent = value.boolValue; + } + } + /* AND */ + SerializedProperty condProp2 = propertyFetcher.Find(boolCondition.field2); + if (condProp2 != null) { + var value2 = condProp2.FindPropertyRelative("m_Value"); + if (value2 != null) { + if (value2.boolValue != boolCondition.value2) { + return false; + } + indent = indent || value2.boolValue; + } + } + indent &= canIndent; + visible = true; + } + + return visible; + } + + void DrawPropertyField (SerializedDataParameter property, MemberInfo field, bool indent) { + + if (indent) { + EditorGUI.indentLevel++; + } + + FieldMeta meta = GetMeta(field); + var displayName = property.displayName; + if (meta.displayName != null) { + displayName = meta.displayName.name; + } + + if (property.value.propertyType == SerializedPropertyType.Boolean) { + + if (meta.globalOverride != null) { + + BoolParameter pr = property.GetObjectRef(); + bool prev = pr.value; + + using (new EditorGUILayout.HorizontalScope()) { + float w = 17f; + if (EditorGUI.indentLevel > 0) w += 8f; + var overrideRect = GUILayoutUtility.GetRect(w, 20f, GUILayout.ExpandWidth(false)); + overrideRect.yMin += 4f; + if (EditorGUI.indentLevel > 0) { + overrideRect.xMin += 12f; + } + bool value = GUI.Toggle(overrideRect, prev, GUIContent.none); + + string tooltip = null; + if (meta.tooltip != null) { + tooltip = meta.tooltip.tooltip; + } + + using (new EditorGUI.DisabledScope(!prev)) { + EditorGUILayout.LabelField(new GUIContent(displayName, tooltip)); + } + + if (value != prev) { + pr.value = value; + SerializedProperty prop = serializedObject.FindProperty(field.Name); + if (prop != null) { + var boolProp = prop.FindPropertyRelative("m_Value"); + if (boolProp != null) { + boolProp.boolValue = value; + } + if (value) { + var overrideProp = prop.FindPropertyRelative("m_OverrideState"); + if (overrideProp != null) { + overrideProp.boolValue = true; + } + } + } + } + } + + } + else { + PropertyField(property, new GUIContent(displayName)); + } + } + else { + PropertyField(property, new GUIContent(displayName)); + } + + if (indent) { + EditorGUI.indentLevel--; + } + + // Add warning messages for stripped features + if (meta.showStrippedLabel != null) { + + string strippedKeywords = PlayerPrefs.GetString(BeautifyRendererFeature.PLAYER_PREF_KEYNAME, ""); + bool isEnabled = false; + bool isOverridden = property.overrideState.boolValue; + if (isOverridden) { + if (property.value.propertyType == SerializedPropertyType.Boolean) { + isEnabled = property.value.boolValue; + } + else if (property.value.propertyType == SerializedPropertyType.Float) { + isEnabled = property.value.floatValue > 0; + } + else if (property.value.propertyType == SerializedPropertyType.Enum) { + isEnabled = property.value.enumValueIndex > 0; + } + else if (property.value.propertyType == SerializedPropertyType.LayerMask) { + isEnabled = property.value.intValue != 0; + } + else if (property.value.propertyType == SerializedPropertyType.ObjectReference) { + isEnabled = property.value.objectReferenceValue != null; + } + } + + if (isEnabled) { + string warningMessage = null; + string fieldName = field.Name; + + // Check each stripped feature against the keywords in PlayerPrefs + if ((fieldName == "sharpenIntensity" && strippedKeywords.Contains(ShaderParams.SKW_SHARPEN)) || + (fieldName == "sharpenExclusionLayerMask" && strippedKeywords.Contains(ShaderParams.SKW_SHARPEN_EXCLUSION_MASK)) || + (fieldName == "ditherIntensity" && strippedKeywords.Contains(ShaderParams.SKW_DITHER)) || + (fieldName == "tonemap" && + ((property.value.enumValueIndex == (int)Beautify.TonemapOperator.ACES && strippedKeywords.Contains(ShaderParams.SKW_TONEMAP_ACES)) || + (property.value.enumValueIndex == (int)Beautify.TonemapOperator.ACESFitted && strippedKeywords.Contains(ShaderParams.SKW_TONEMAP_ACES_FITTED)) || + (property.value.enumValueIndex == (int)Beautify.TonemapOperator.AGX && strippedKeywords.Contains(ShaderParams.SKW_TONEMAP_AGX)))) || + (fieldName == "lut" && strippedKeywords.Contains(ShaderParams.SKW_LUT3D) && strippedKeywords.Contains(ShaderParams.SKW_LUT)) || + ((fieldName == "bloomIntensity" || fieldName == "anamorphicFlaresIntensity" || fieldName == "sunFlaresIntensity") && strippedKeywords.Contains(ShaderParams.SKW_BLOOM)) || + (fieldName == "outline" && strippedKeywords.Contains(ShaderParams.SKW_OUTLINE)) || + (fieldName == "nightVision" && strippedKeywords.Contains(ShaderParams.SKW_NIGHT_VISION)) || + (fieldName == "thermalVision" && strippedKeywords.Contains(ShaderParams.SKW_THERMAL_VISION)) || + (fieldName == "chromaticAberrationIntensity" && strippedKeywords.Contains(ShaderParams.SKW_CHROMATIC_ABERRATION)) || + (fieldName == "depthOfField" && strippedKeywords.Contains(ShaderParams.SKW_DEPTH_OF_FIELD)) || + (fieldName == "depthOfFieldTransparentSupport" && strippedKeywords.Contains(ShaderParams.SKW_DEPTH_OF_FIELD_TRANSPARENT)) || + (fieldName == "depthOfFieldAlphaTestSupport" && strippedKeywords.Contains(ShaderParams.SKW_DEPTH_OF_FIELD_TRANSPARENT)) || + (fieldName == "eyeAdaptation" && strippedKeywords.Contains(ShaderParams.SKW_EYE_ADAPTATION)) || + (fieldName == "purkinje" && strippedKeywords.Contains(ShaderParams.SKW_PURKINJE)) || + (fieldName == "vignettingOuterRing" && strippedKeywords.Contains(ShaderParams.SKW_VIGNETTING)) || + (fieldName == "vignettingMask" && strippedKeywords.Contains(ShaderParams.SKW_VIGNETTING_MASK)) || + (fieldName == "filmGrainIntensity" && strippedKeywords.Contains(ShaderParams.SKW_FILM_GRAIN)) || + (fieldName == "filmGrainEnabled" && strippedKeywords.Contains(ShaderParams.SKW_FILM_GRAIN)) || + (fieldName == "frame" && strippedKeywords.Contains(ShaderParams.SKW_FRAME)) || + (fieldName == "lensDirtIntensity" && strippedKeywords.Contains(ShaderParams.SKW_DIRT)) || + (fieldName == "antialiasStrength" && strippedKeywords.Contains(ShaderParams.SKW_EDGE_ANTIALIASING)) || + ((fieldName == "sepia" || fieldName == "daltonize" || fieldName == "colorTemp") && strippedKeywords.Contains(ShaderParams.SKW_COLOR_TWEAKS))) { + warningMessage = "This feature is stripped in the build."; + } + + if (warningMessage != null) { + var linkContent = new GUIContent("(click to configure)"); + var linkSize = EditorStyles.linkLabel.CalcSize(linkContent); + var height = EditorGUIUtility.singleLineHeight + 8; + + var warningRect = EditorGUILayout.GetControlRect(false, height); + warningRect.xMin += 8; + warningRect.xMax -= 8; + EditorGUI.HelpBox(warningRect, "", MessageType.Warning); + + var textRect = warningRect; + textRect.xMin += 24f; + textRect.xMax -= linkSize.x + 8; + EditorGUI.LabelField(textRect, warningMessage); + + var linkRect = warningRect; + linkRect.xMin = textRect.xMax; + linkRect.y = textRect.y + 3; + + if (GUI.Button(linkRect, linkContent, EditorStyles.linkLabel)) { + SelectActiveURPRendererAsset(); + } + } + } + } + + } + + void SetStyles () { + + // section header style + Color titleColor = EditorGUIUtility.isProSkin ? new Color(0.52f, 0.66f, 0.9f) : new Color(0.12f, 0.16f, 0.4f); + GUIStyle skurikenModuleTitleStyle = "ShurikenModuleTitle"; + sectionGroupStyle = new GUIStyle(skurikenModuleTitleStyle); + sectionGroupStyle.contentOffset = new Vector2(5f, -2f); + sectionGroupStyle.normal.textColor = titleColor; + sectionGroupStyle.fixedHeight = 22; + sectionGroupStyle.fontStyle = FontStyle.Bold; + + // foldout style + foldoutStyle = new GUIStyle(EditorStyles.foldout); + foldoutStyle.margin = new RectOffset(0, 0, 0, 0); + } + + bool GetSectionFoldState(string sectionName) { + if (!sectionFoldStates.TryGetValue(sectionName, out bool state)) { + state = EditorPrefs.GetBool(SECTION_FOLD_PREF_PREFIX + sectionName, true); + sectionFoldStates[sectionName] = state; + } + return state; + } + + void SetSectionFoldState(string sectionName, bool expanded) { + sectionFoldStates[sectionName] = expanded; + EditorPrefs.SetBool(SECTION_FOLD_PREF_PREFIX + sectionName, expanded); + } + + [VolumeParameterDrawer(typeof(Beautify.MinMaxFloatParameter))] + public class MinMaxFloatParameterDrawer : VolumeParameterDrawer { + public override bool OnGUI (SerializedDataParameter parameter, GUIContent title) { + if (parameter.value.propertyType == SerializedPropertyType.Vector2) { + var o = parameter.GetObjectRef(); + var range = o.value; + float x = range.x; + float y = range.y; + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.MinMaxSlider(title, ref x, ref y, o.min, o.max); + x = EditorGUILayout.FloatField(x, GUILayout.Width(40)); + y = EditorGUILayout.FloatField(y, GUILayout.Width(40)); + if (EditorGUI.EndChangeCheck()) { + range.x = x; + range.y = y; + o.SetValue(new Beautify.MinMaxFloatParameter(range, o.min, o.max)); + } + return true; + } + else { + EditorGUILayout.PropertyField(parameter.value); + return false; + } + } + } + + Texture2D MakeTex (int width, int height, Color col) { + Color[] pix = new Color[width * height]; + + for (int i = 0; i < pix.Length; i++) + pix[i] = col; + + TextureFormat tf = SystemInfo.SupportsTextureFormat(TextureFormat.RGBAFloat) ? TextureFormat.RGBAFloat : TextureFormat.RGBA32; + Texture2D result = new Texture2D(width, height, tf, false); + result.hideFlags = HideFlags.DontSave; + result.SetPixels(pix); + result.Apply(); + + return result; + } + + void SelectActiveURPRendererAsset () { + var urpAsset = UniversalRenderPipeline.asset; + if (urpAsset != null && urpAsset.scriptableRenderer is UniversalRenderer urpRenderer) { + var rendererDataField = typeof(UniversalRenderPipelineAsset).GetField("m_RendererDataList", BindingFlags.NonPublic | BindingFlags.Instance); + var rendererDataList = rendererDataField?.GetValue(urpAsset) as ScriptableRendererData[]; + if (rendererDataList?.Length > 0) { + Selection.activeObject = rendererDataList[0]; + } + } + } + + } +} diff --git a/Imports/Beautify/URP/Editor/BeautifyEditor.cs.meta b/Imports/Beautify/URP/Editor/BeautifyEditor.cs.meta new file mode 100644 index 00000000..60aaa265 --- /dev/null +++ b/Imports/Beautify/URP/Editor/BeautifyEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f254be33cd84f4341a7ea1deab7213b7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/BeautifyOptCompiler.cs b/Imports/Beautify/URP/Editor/BeautifyOptCompiler.cs new file mode 100644 index 00000000..bd08fe9d --- /dev/null +++ b/Imports/Beautify/URP/Editor/BeautifyOptCompiler.cs @@ -0,0 +1,52 @@ +using System.Collections.Generic; +using UnityEditor.Build; +using UnityEditor.Rendering; +using UnityEngine; +using UnityEngine.Rendering; + +namespace Beautify.Universal { + + class BeautifyOptCompiler : IPreprocessShaders { + + public const string PLAYER_PREF_KEYNAME = "BeautifyStripKeywordSet"; + + public int callbackOrder => 1; + + public void OnProcessShader( + Shader shader, ShaderSnippetData snippet, IList shaderCompilerData) { + + try { + if (shaderCompilerData == null) return; + + if (!"Hidden/Universal Render Pipeline/UberPost".Equals(shader.name) && !"Hidden/Kronnect/Beautify".Equals(shader.name)) return; + + string strippedKeywords = PlayerPrefs.GetString(PLAYER_PREF_KEYNAME); + if (string.IsNullOrEmpty(strippedKeywords)) return; + + for (int k = shaderCompilerData.Count - 1; k >= 0; k--) { + ShaderCompilerData data = shaderCompilerData[k]; + ShaderKeyword[] keywords = data.shaderKeywordSet.GetShaderKeywords(); + for (int s = 0; s < keywords.Length; s++) { + ShaderKeyword keyword = keywords[s]; +#if UNITY_2021_2_OR_NEWER + string keywordName = keyword.name; +#else + string keywordName; + if (ShaderKeyword.IsKeywordLocal(keyword)) { + keywordName = ShaderKeyword.GetKeywordName(shader, keyword); + } else { + keywordName = ShaderKeyword.GetGlobalKeywordName(keyword); + } +#endif + if (keywordName.Length > 0 && strippedKeywords.Contains(keywordName)) { + shaderCompilerData.RemoveAt(k); + break; + } + } + } + } catch { } + + } + + } +} \ No newline at end of file diff --git a/Imports/Beautify/URP/Editor/BeautifyOptCompiler.cs.meta b/Imports/Beautify/URP/Editor/BeautifyOptCompiler.cs.meta new file mode 100644 index 00000000..b8537d5f --- /dev/null +++ b/Imports/Beautify/URP/Editor/BeautifyOptCompiler.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7e44552cb4a254ddd9e75bd9d95f0a0a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/BeautifyRenderFeatureEditor.cs b/Imports/Beautify/URP/Editor/BeautifyRenderFeatureEditor.cs new file mode 100644 index 00000000..b11160d5 --- /dev/null +++ b/Imports/Beautify/URP/Editor/BeautifyRenderFeatureEditor.cs @@ -0,0 +1,107 @@ +using UnityEngine; +using UnityEditor; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace Beautify.Universal { + + [CustomEditor(typeof(BeautifyRendererFeature))] + public class BeautifyRenderFeatureEditor : Editor { + + SerializedProperty renderPassEvent, ignorePostProcessingOption; +#if ENABLE_VR && ENABLE_XR_MODULE + SerializedProperty clearXRColorBuffer; +#endif + SerializedProperty cameraLayerMask; + SerializedProperty stripSettings; + + Editor internalStripSettingsEditor; + + void OnEnable () { + renderPassEvent = serializedObject.FindProperty("renderPassEvent"); + ignorePostProcessingOption = serializedObject.FindProperty("ignorePostProcessingOption"); +#if ENABLE_VR && ENABLE_XR_MODULE + clearXRColorBuffer = serializedObject.FindProperty("clearXRColorBuffer"); +#endif + cameraLayerMask = serializedObject.FindProperty("cameraLayerMask"); + stripSettings = serializedObject.FindProperty("stripSettings"); + } + + public override void OnInspectorGUI () { + + serializedObject.Update(); + + EditorGUILayout.PropertyField(renderPassEvent); + EditorGUILayout.PropertyField(ignorePostProcessingOption); +#if ENABLE_VR && ENABLE_XR_MODULE + EditorGUILayout.PropertyField(clearXRColorBuffer); +#endif + EditorGUILayout.PropertyField(cameraLayerMask); + + BeautifyRendererFeature feature = (BeautifyRendererFeature)target; + if (stripSettings.objectReferenceValue == null) { + feature.UpdateInternalStripSettings(); + } + BeautifyStripSettings currentSettings = feature.settings; + + EditorGUILayout.Space(10); + EditorGUILayout.LabelField("Beautify Shader Features Stripping", EditorStyles.boldLabel); + EditorGUILayout.HelpBox("Optimize shader compilation time by stripping unused Beautify features. Select the features you wish to exclude from the build.", MessageType.Info); + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(stripSettings); + if (GUILayout.Button("Create Config Asset", GUILayout.Width(150))) { + CreateConfigAsset(feature, currentSettings); + GUIUtility.ExitGUI(); + return; + } + EditorGUILayout.EndHorizontal(); + + if (currentSettings != null) { + Editor.CreateCachedEditor(currentSettings, typeof(BeautifyStripSettingsEditor), ref internalStripSettingsEditor); + + EditorGUI.BeginChangeCheck(); + internalStripSettingsEditor.OnInspectorGUI(); + if (EditorGUI.EndChangeCheck()) { + if (stripSettings.objectReferenceValue == null) { + Undo.RecordObject(feature, "Change Strip Settings"); + feature.SyncInternalToLegacy(); + EditorUtility.SetDirty(feature); + } + } + } + + EditorGUILayout.Separator(); + + if (GUILayout.Button("Select Beautify Volume >")) { + var volumes = Misc.FindObjectsOfType(); + + foreach (var volume in volumes) { + if (volume.sharedProfile != null && volume.sharedProfile.TryGet(out var beautify)) { + Selection.activeObject = volume.gameObject; + EditorGUIUtility.PingObject(volume.gameObject); + break; + } + } + } + + serializedObject.ApplyModifiedProperties(); + } + + void CreateConfigAsset (BeautifyRendererFeature feature, BeautifyStripSettings source) { + string path = EditorUtility.SaveFilePanelInProject("Create Strip Settings", "BeautifyStripSettings", "asset", "Please enter a file name to save the strip settings to"); + if (string.IsNullOrEmpty(path)) return; + + BeautifyStripSettings newSettings = ScriptableObject.CreateInstance(); + // Copy values + EditorUtility.CopySerialized(source, newSettings); + + AssetDatabase.CreateAsset(newSettings, path); + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + + feature.stripSettings = newSettings; + EditorUtility.SetDirty(feature); + serializedObject.Update(); + } + } +} diff --git a/Imports/Beautify/URP/Editor/BeautifyRenderFeatureEditor.cs.meta b/Imports/Beautify/URP/Editor/BeautifyRenderFeatureEditor.cs.meta new file mode 100644 index 00000000..25f4f327 --- /dev/null +++ b/Imports/Beautify/URP/Editor/BeautifyRenderFeatureEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8f7286e18c946445284b04f79b720134 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/BeautifySettingsEditor.cs b/Imports/Beautify/URP/Editor/BeautifySettingsEditor.cs new file mode 100644 index 00000000..16390811 --- /dev/null +++ b/Imports/Beautify/URP/Editor/BeautifySettingsEditor.cs @@ -0,0 +1,129 @@ +using UnityEngine; +using UnityEditor; + +namespace Beautify.Universal { + + [CustomEditor(typeof(BeautifySettings))] + public class BeautifySettingsEditor : Editor { + + SerializedProperty sun; + SerializedProperty depthOfFieldTarget; + SerializedProperty depthOfFieldFocusPositionEnabled; + SerializedProperty depthOfFieldFocusPosition; + + static GUIStyle sectionHeaderStyle; + static GUIStyle boxStyle; + static bool sunFoldout = true; + static bool dofFoldout = true; + + void OnEnable() { + sun = serializedObject.FindProperty("sun"); + depthOfFieldTarget = serializedObject.FindProperty("depthOfFieldTarget"); + depthOfFieldFocusPositionEnabled = serializedObject.FindProperty("depthOfFieldFocusPositionEnabled"); + depthOfFieldFocusPosition = serializedObject.FindProperty("depthOfFieldFocusPosition"); + } + + public override void OnInspectorGUI() { + serializedObject.Update(); + + SetupStyles(); + + // Header + EditorGUILayout.Space(5); + EditorGUILayout.LabelField("Beautify Scene Settings", EditorStyles.boldLabel); + EditorGUILayout.HelpBox("Configure scene-specific settings for Beautify effects. These settings override or complement the Volume profile settings.", MessageType.Info); + EditorGUILayout.Space(10); + + // Sun Section + sunFoldout = EditorGUILayout.BeginFoldoutHeaderGroup(sunFoldout, "Sun & Lighting"); + if (sunFoldout) { + EditorGUILayout.BeginVertical(boxStyle); + EditorGUILayout.PropertyField(sun, new GUIContent("Sun Transform", "The directional light used for sun flares and other lighting effects")); + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndFoldoutHeaderGroup(); + + EditorGUILayout.Space(5); + + // Depth of Field Section + dofFoldout = EditorGUILayout.BeginFoldoutHeaderGroup(dofFoldout, "Depth of Field"); + if (dofFoldout) { + EditorGUILayout.BeginVertical(boxStyle); + + // Target Transform + EditorGUILayout.LabelField("Follow Target Mode", EditorStyles.miniBoldLabel); + EditorGUILayout.PropertyField(depthOfFieldTarget, new GUIContent("Target", "Transform to focus on when using Follow Target focus mode. Sets the focal plane distance; foreground and background blur are computed relative to this distance.")); + + EditorGUILayout.Space(8); + + // Focus Position + EditorGUILayout.LabelField("Follow Position Mode", EditorStyles.miniBoldLabel); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(depthOfFieldFocusPositionEnabled, new GUIContent("Override Focus Position", "Enable to use this position instead of the Volume's Focus Position setting")); + EditorGUILayout.EndHorizontal(); + + EditorGUI.BeginDisabledGroup(!depthOfFieldFocusPositionEnabled.boolValue); + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(depthOfFieldFocusPosition, new GUIContent("Focus Position", "World position to focus on when using FollowPosition focus mode")); + EditorGUI.indentLevel--; + EditorGUI.EndDisabledGroup(); + + EditorGUILayout.EndVertical(); + } + EditorGUILayout.EndFoldoutHeaderGroup(); + + EditorGUILayout.Space(10); + + // Utility buttons + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Button("Select Beautify Volume")) { + SelectBeautifyVolume(); + } + if (GUILayout.Button("Reset to Defaults")) { + ResetToDefaults(); + } + EditorGUILayout.EndHorizontal(); + + serializedObject.ApplyModifiedProperties(); + } + + void SetupStyles() { + if (sectionHeaderStyle == null) { + sectionHeaderStyle = new GUIStyle(EditorStyles.foldoutHeader) { + fontStyle = FontStyle.Bold, + fontSize = 12 + }; + } + + if (boxStyle == null) { + boxStyle = new GUIStyle("box") { + padding = new RectOffset(10, 10, 10, 10), + margin = new RectOffset(0, 0, 5, 5) + }; + } + } + + void SelectBeautifyVolume() { + var volumes = Misc.FindObjectsOfType(); + foreach (var volume in volumes) { + if (volume.sharedProfile != null && volume.sharedProfile.TryGet(out var beautify)) { + Selection.activeObject = volume.gameObject; + EditorGUIUtility.PingObject(volume.gameObject); + break; + } + } + } + + void ResetToDefaults() { + Undo.RecordObject(target, "Reset Beautify Settings"); + BeautifySettings settings = (BeautifySettings)target; + settings.sun = null; + settings.depthOfFieldTarget = null; + settings.depthOfFieldFocusPositionEnabled = false; + settings.depthOfFieldFocusPosition = Vector3.zero; + EditorUtility.SetDirty(target); + } + } +} + diff --git a/Imports/Beautify/URP/Editor/BeautifySettingsEditor.cs.meta b/Imports/Beautify/URP/Editor/BeautifySettingsEditor.cs.meta new file mode 100644 index 00000000..acbd2398 --- /dev/null +++ b/Imports/Beautify/URP/Editor/BeautifySettingsEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 481931e89af9a499a839a88210a6bd5b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/BeautifyStripSettingsEditor.cs b/Imports/Beautify/URP/Editor/BeautifyStripSettingsEditor.cs new file mode 100644 index 00000000..61bad0a1 --- /dev/null +++ b/Imports/Beautify/URP/Editor/BeautifyStripSettingsEditor.cs @@ -0,0 +1,249 @@ +using UnityEngine; +using UnityEditor; + +namespace Beautify.Universal { + + [CustomEditor(typeof(BeautifyStripSettings))] + public class BeautifyStripSettingsEditor : Editor { + + SerializedProperty stripBeautifyTonemappingACES, stripBeautifyTonemappingACESFitted, stripBeautifyTonemappingAGX; + SerializedProperty stripBeautifySharpen, stripBeautifySharpenExclusionMask; + SerializedProperty stripBeautifyDithering, stripBeautifyEdgeAA; + SerializedProperty stripBeautifyLUT, stripBeautifyLUT3D, stripBeautifyColorTweaks; + SerializedProperty stripBeautifyBloom, stripBeautifyLensDirt, stripBeautifyChromaticAberration; + SerializedProperty stripBeautifyDoF, stripBeautifyDoFTransparentSupport; + SerializedProperty stripBeautifyEyeAdaptation, stripBeautifyPurkinje; + SerializedProperty stripBeautifyVignetting, stripBeautifyVignettingMask; + SerializedProperty stripBeautifyOutline; + SerializedProperty stripBeautifyNightVision, stripBeautifyThermalVision; + SerializedProperty stripBeautifyFrame; + SerializedProperty stripBeautifyFilmGrain; + SerializedProperty stripUnityFilmGrain, stripUnityDithering, stripUnityTonemapping; + SerializedProperty stripUnityBloom, stripUnityChromaticAberration; + SerializedProperty stripUnityDistortion, stripUnityDebugVariants; + + void OnEnable() { + try { + stripBeautifyTonemappingACES = serializedObject.FindProperty("stripBeautifyTonemappingACES"); + stripBeautifyTonemappingACESFitted = serializedObject.FindProperty("stripBeautifyTonemappingACESFitted"); + stripBeautifyTonemappingAGX = serializedObject.FindProperty("stripBeautifyTonemappingAGX"); + stripBeautifySharpen = serializedObject.FindProperty("stripBeautifySharpen"); + stripBeautifySharpenExclusionMask = serializedObject.FindProperty("stripBeautifySharpenExclusionMask"); + stripBeautifyDithering = serializedObject.FindProperty("stripBeautifyDithering"); + stripBeautifyEdgeAA = serializedObject.FindProperty("stripBeautifyEdgeAA"); + stripBeautifyLUT = serializedObject.FindProperty("stripBeautifyLUT"); + stripBeautifyLUT3D = serializedObject.FindProperty("stripBeautifyLUT3D"); + stripBeautifyColorTweaks = serializedObject.FindProperty("stripBeautifyColorTweaks"); + stripBeautifyBloom = serializedObject.FindProperty("stripBeautifyBloom"); + stripBeautifyLensDirt = serializedObject.FindProperty("stripBeautifyLensDirt"); + stripBeautifyChromaticAberration = serializedObject.FindProperty("stripBeautifyChromaticAberration"); + stripBeautifyDoF = serializedObject.FindProperty("stripBeautifyDoF"); + stripBeautifyDoFTransparentSupport = serializedObject.FindProperty("stripBeautifyDoFTransparentSupport"); + stripBeautifyEyeAdaptation = serializedObject.FindProperty("stripBeautifyEyeAdaptation"); + stripBeautifyPurkinje = serializedObject.FindProperty("stripBeautifyPurkinje"); + stripBeautifyVignetting = serializedObject.FindProperty("stripBeautifyVignetting"); + stripBeautifyVignettingMask = serializedObject.FindProperty("stripBeautifyVignettingMask"); + stripBeautifyOutline = serializedObject.FindProperty("stripBeautifyOutline"); + stripBeautifyNightVision = serializedObject.FindProperty("stripBeautifyNightVision"); + stripBeautifyThermalVision = serializedObject.FindProperty("stripBeautifyThermalVision"); + stripBeautifyFrame = serializedObject.FindProperty("stripBeautifyFrame"); + stripBeautifyFilmGrain = serializedObject.FindProperty("stripBeautifyFilmGrain"); + stripUnityFilmGrain = serializedObject.FindProperty("stripUnityFilmGrain"); + stripUnityDithering = serializedObject.FindProperty("stripUnityDithering"); + stripUnityTonemapping = serializedObject.FindProperty("stripUnityTonemapping"); + stripUnityBloom = serializedObject.FindProperty("stripUnityBloom"); + stripUnityChromaticAberration = serializedObject.FindProperty("stripUnityChromaticAberration"); + stripUnityDistortion = serializedObject.FindProperty("stripUnityDistortion"); + stripUnityDebugVariants = serializedObject.FindProperty("stripUnityDebugVariants"); + } catch { + } + } + + public override void OnInspectorGUI() { + + serializedObject.Update(); + + void DrawStripToggle(SerializedProperty property, string label) { + EditorGUILayout.BeginHorizontal(); + property.boolValue = GUILayout.Toggle(property.boolValue, "", GUILayout.Width(20)); + GUILayout.Label(label); + EditorGUILayout.EndHorizontal(); + } + + if (GUILayout.Button("Autoselect Unused Beautify Features", EditorStyles.miniButton)) { + if (EditorUtility.DisplayDialog("Autoselect Unused Beautify Features", "This will disable features not used in the current scene. Do you want to proceed?", "Yes", "No")) { + + var beautifyVolumes = Misc.FindObjectsOfType(); + + bool isFeatureUsed(System.Func predicate) { + foreach (var volume in beautifyVolumes) { + if (predicate(volume)) { + return true; + } + } + return false; + } + + stripBeautifySharpen.boolValue = !isFeatureUsed(b => b.sharpenIntensity.value > 0f); + stripBeautifySharpenExclusionMask.boolValue = !isFeatureUsed(b => b.sharpenIntensity.value > 0f && b.sharpenExclusionLayerMask.value != 0); + stripBeautifyDithering.boolValue = !isFeatureUsed(b => b.ditherIntensity.value > 0f); + stripBeautifyEdgeAA.boolValue = !isFeatureUsed(b => b.antialiasStrength.value > 0f); + stripBeautifyTonemappingACES.boolValue = !isFeatureUsed(b => b.tonemap.value == Beautify.TonemapOperator.ACES); + stripBeautifyTonemappingACESFitted.boolValue = !isFeatureUsed(b => b.tonemap.value == Beautify.TonemapOperator.ACESFitted); + stripBeautifyTonemappingAGX.boolValue = !isFeatureUsed(b => b.tonemap.value == Beautify.TonemapOperator.AGX); + stripBeautifyLUT.boolValue = !isFeatureUsed(b => b.lut.value && b.lutIntensity.value > 0 && b.lutTexture.value != null && !(b.lutTexture.value is Texture3D)); + stripBeautifyLUT3D.boolValue = !isFeatureUsed(b => b.lut.value && b.lutIntensity.value > 0 && b.lutTexture.value is Texture3D); + stripBeautifyColorTweaks.boolValue = !isFeatureUsed(b => b.sepia.value > 0 || b.daltonize.value > 0 || b.colorTempBlend.value > 0); + stripBeautifyBloom.boolValue = !isFeatureUsed(b => b.bloomIntensity.value > 0f); + stripBeautifyLensDirt.boolValue = !isFeatureUsed(b => b.lensDirtIntensity.value > 0); + stripBeautifyChromaticAberration.boolValue = !isFeatureUsed(b => b.chromaticAberrationIntensity.value > 0f); + stripBeautifyDoF.boolValue = !isFeatureUsed(b => b.depthOfField.value); + stripBeautifyDoFTransparentSupport.boolValue = !isFeatureUsed(b => b.depthOfFieldTransparentSupport.value); + stripBeautifyEyeAdaptation.boolValue = !isFeatureUsed(b => b.eyeAdaptation.value); + stripBeautifyPurkinje.boolValue = !isFeatureUsed(b => b.purkinje.value); + stripBeautifyVignetting.boolValue = !isFeatureUsed(b => b.vignettingOuterRing.value > 0f); + stripBeautifyVignettingMask.boolValue = !isFeatureUsed(b => b.vignettingOuterRing.value > 0f && b.vignettingMask.value != null); + stripBeautifyOutline.boolValue = !isFeatureUsed(b => b.outline.value); + stripBeautifyNightVision.boolValue = !isFeatureUsed(b => b.nightVision.value); + stripBeautifyThermalVision.boolValue = !isFeatureUsed(b => b.thermalVision.value); + stripBeautifyFrame.boolValue = !isFeatureUsed(b => b.frame.value); + stripBeautifyFilmGrain.boolValue = !isFeatureUsed(b => b.filmGrainEnabled.value && (b.filmGrainIntensity.value > 0f || b.filmGrainDirtSpotsAmount.value > 0f || b.filmGrainScratchesAmount.value > 0f)); + } + } + + // Image Enhancement section + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Image Enhancement", EditorStyles.boldLabel); + if (GUILayout.Button("Toggle All", EditorStyles.miniButton, GUILayout.Width(80))) { + bool allStripped = stripBeautifySharpen.boolValue && + stripBeautifySharpenExclusionMask.boolValue && + stripBeautifyDithering.boolValue && + stripBeautifyEdgeAA.boolValue; + stripBeautifySharpen.boolValue = !allStripped; + stripBeautifySharpenExclusionMask.boolValue = !allStripped; + stripBeautifyDithering.boolValue = !allStripped; + stripBeautifyEdgeAA.boolValue = !allStripped; + } + EditorGUILayout.EndHorizontal(); + DrawStripToggle(stripBeautifySharpen, "Strip Sharpen"); + DrawStripToggle(stripBeautifySharpenExclusionMask, "Strip Sharpen Exclusion Mask"); + DrawStripToggle(stripBeautifyDithering, "Strip Dithering"); + DrawStripToggle(stripBeautifyEdgeAA, "Strip Edge AA"); + + // Tonemapping section + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Tonemapping", EditorStyles.boldLabel); + if (GUILayout.Button("Toggle All", EditorStyles.miniButton, GUILayout.Width(80))) { + bool allStripped = stripBeautifyTonemappingACES.boolValue && + stripBeautifyTonemappingACESFitted.boolValue && + stripBeautifyTonemappingAGX.boolValue; + stripBeautifyTonemappingACES.boolValue = !allStripped; + stripBeautifyTonemappingACESFitted.boolValue = !allStripped; + stripBeautifyTonemappingAGX.boolValue = !allStripped; + } + EditorGUILayout.EndHorizontal(); + DrawStripToggle(stripBeautifyTonemappingACES, "Strip ACES Tonemapping"); + DrawStripToggle(stripBeautifyTonemappingACESFitted, "Strip ACES Fitted Tonemapping"); + DrawStripToggle(stripBeautifyTonemappingAGX, "Strip AGX Tonemapping"); + + // Color Grading section + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Color Grading", EditorStyles.boldLabel); + if (GUILayout.Button("Toggle All", EditorStyles.miniButton, GUILayout.Width(80))) { + bool allStripped = stripBeautifyLUT.boolValue && + stripBeautifyLUT3D.boolValue && + stripBeautifyColorTweaks.boolValue; + stripBeautifyLUT.boolValue = !allStripped; + stripBeautifyLUT3D.boolValue = !allStripped; + stripBeautifyColorTweaks.boolValue = !allStripped; + } + EditorGUILayout.EndHorizontal(); + DrawStripToggle(stripBeautifyLUT, "Strip LUT"); + DrawStripToggle(stripBeautifyLUT3D, "Strip LUT 3D"); + DrawStripToggle(stripBeautifyColorTweaks, new GUIContent("Strip Color Tweaks", "Refers to sepia, daltonize and color temperature").text); + + // Effects section + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Effects", EditorStyles.boldLabel); + if (GUILayout.Button("Toggle All", EditorStyles.miniButton, GUILayout.Width(80))) { + bool allStripped = stripBeautifyBloom.boolValue && + stripBeautifyLensDirt.boolValue && + stripBeautifyChromaticAberration.boolValue && + stripBeautifyDoF.boolValue && + stripBeautifyDoFTransparentSupport.boolValue && + stripBeautifyEyeAdaptation.boolValue && + stripBeautifyPurkinje.boolValue && + stripBeautifyVignetting.boolValue && + stripBeautifyVignettingMask.boolValue && + stripBeautifyOutline.boolValue && + stripBeautifyNightVision.boolValue && + stripBeautifyThermalVision.boolValue && + stripBeautifyFrame.boolValue && + stripBeautifyFilmGrain.boolValue; + stripBeautifyBloom.boolValue = !allStripped; + stripBeautifyLensDirt.boolValue = !allStripped; + stripBeautifyChromaticAberration.boolValue = !allStripped; + stripBeautifyDoF.boolValue = !allStripped; + stripBeautifyDoFTransparentSupport.boolValue = !allStripped; + stripBeautifyEyeAdaptation.boolValue = !allStripped; + stripBeautifyPurkinje.boolValue = !allStripped; + stripBeautifyVignetting.boolValue = !allStripped; + stripBeautifyVignettingMask.boolValue = !allStripped; + stripBeautifyOutline.boolValue = !allStripped; + stripBeautifyNightVision.boolValue = !allStripped; + stripBeautifyThermalVision.boolValue = !allStripped; + stripBeautifyFrame.boolValue = !allStripped; + stripBeautifyFilmGrain.boolValue = !allStripped; + } + EditorGUILayout.EndHorizontal(); + DrawStripToggle(stripBeautifyBloom, "Strip Bloom, Anamorphic & Sun Flares"); + DrawStripToggle(stripBeautifyLensDirt, "Strip Lens Dirt"); + DrawStripToggle(stripBeautifyChromaticAberration, "Strip Chromatic Aberration"); + DrawStripToggle(stripBeautifyDoF, "Strip Depth of Field"); + DrawStripToggle(stripBeautifyDoFTransparentSupport, "Strip DoF Transparent Support"); + DrawStripToggle(stripBeautifyEyeAdaptation, "Strip Eye Adaptation"); + DrawStripToggle(stripBeautifyPurkinje, "Strip Purkinje"); + DrawStripToggle(stripBeautifyVignetting, "Strip Vignetting"); + DrawStripToggle(stripBeautifyVignettingMask, "Strip Vignetting Mask"); + DrawStripToggle(stripBeautifyOutline, "Strip Outline"); + DrawStripToggle(stripBeautifyNightVision, "Strip Night Vision"); + DrawStripToggle(stripBeautifyThermalVision, "Strip Thermal Vision"); + DrawStripToggle(stripBeautifyFrame, "Strip Frame"); + DrawStripToggle(stripBeautifyFilmGrain, "Strip Film Grain"); + + EditorGUILayout.Separator(); + // Unity Post Processing section + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField("Unity Post Processing Stripping", EditorStyles.boldLabel); + if (GUILayout.Button("Toggle All", EditorStyles.miniButton, GUILayout.Width(80))) { + bool allStripped = stripUnityFilmGrain.boolValue && + stripUnityDithering.boolValue && + stripUnityTonemapping.boolValue && + stripUnityBloom.boolValue && + stripUnityChromaticAberration.boolValue && + stripUnityDistortion.boolValue && + stripUnityDebugVariants.boolValue; + stripUnityFilmGrain.boolValue = !allStripped; + stripUnityDithering.boolValue = !allStripped; + stripUnityTonemapping.boolValue = !allStripped; + stripUnityBloom.boolValue = !allStripped; + stripUnityChromaticAberration.boolValue = !allStripped; + stripUnityDistortion.boolValue = !allStripped; + stripUnityDebugVariants.boolValue = !allStripped; + } + EditorGUILayout.EndHorizontal(); + DrawStripToggle(stripUnityFilmGrain, "Strip Film Grain"); + DrawStripToggle(stripUnityDithering, "Strip Dithering"); + DrawStripToggle(stripUnityTonemapping, "Strip Tonemapping"); + DrawStripToggle(stripUnityBloom, "Strip Bloom"); + DrawStripToggle(stripUnityChromaticAberration, "Strip Chromatic Aberration"); + DrawStripToggle(stripUnityDistortion, "Strip Distortion"); + DrawStripToggle(stripUnityDebugVariants, "Strip Debug Variants"); + + if (serializedObject.ApplyModifiedProperties()) { + BeautifyRendererFeature.StripBeautifyFeatures(); + } + } + } +} + diff --git a/Imports/Beautify/URP/Editor/BeautifyStripSettingsEditor.cs.meta b/Imports/Beautify/URP/Editor/BeautifyStripSettingsEditor.cs.meta new file mode 100644 index 00000000..2ab63d22 --- /dev/null +++ b/Imports/Beautify/URP/Editor/BeautifyStripSettingsEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6cbc8d2d8ee56446389e96b61118a5dc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/ContactUs.cs b/Imports/Beautify/URP/Editor/ContactUs.cs new file mode 100644 index 00000000..9fae0f9b --- /dev/null +++ b/Imports/Beautify/URP/Editor/ContactUs.cs @@ -0,0 +1,212 @@ +using UnityEngine; +using UnityEditor; +using System.Collections.Generic; + +namespace Beautify.Universal { + + public class ContactUsWindow : EditorWindow { + const string OnlineGuidesUrl = "https://kronnect.com/guides"; + const string SupportUrl = "https://kronnect.com/support"; + const string YoutubeUrl = "https://youtube.com/@kronnect"; + const string TwitterUrl = "https://twitter.com/kronnect"; + const string KronnectUrl = "https://assetstore.unity.com/publishers/15018?aid=1101lGsd"; + const string ReferralInfo = "?aid=1101lGsd&pubref=beautify"; + Texture2D kronnectLogo, welcomeBanner; + GUIStyle headerStyle, bannerStyle; + + readonly List assetCategories = new List + { + new AssetCategory + { + name = "Image Effects", + assets = new List + { + new Asset { name = "Beautify 3 - Advanced Post Processing", url = "https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/beautify-3-advanced-post-processing-233073" }, + new Asset { name = "Frame Pack for Beautify", url = "https://assetstore.unity.com/packages/2d/gui/frame-pack-204058" }, + new Asset { name = "LUT Pack for Beautify", url = "https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/lut-pack-for-beautify-202502" }, + new Asset { name = "Beautify HDRP", url = "https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/beautify-hdrp-165411" }, + new Asset { name = "Cloud Shadows FX", url = "https://assetstore.unity.com/packages/vfx/shaders/cloud-shadows-fx-267702" }, + new Asset { name = "Dynamic Fog & Mist 2", url = "https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/dynamic-fog-mist-2-48200" }, + new Asset { name = "Edge Fusion", url = "https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/edge-fusion-smooth-surface-contacts-334484" }, + new Asset { name = "Global Snow 2", url = "https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/global-snow-2-248191" }, + new Asset { name = "Luma Based Ambient Occlusion (SSAO 2D)", url = "https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/luma-based-ambient-occlusion-2-ssao-2d-249066" }, + new Asset { name = "Radiant Global Illumination", url = "https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/radiant-global-illumination-225934" }, + new Asset { name = "Shiny SSR 2", url = "https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/shiny-ssr-2-screen-space-reflections-188638" }, + new Asset { name = "Sun Flares HDRP", url = "https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/sun-flares-hdrp-171177" }, + new Asset { name = "Umbra Soft Shadows", url = "https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/umbra-soft-shadows-better-directional-contact-shadows-for-urp-282485" }, + new Asset { name = "Volumetric Fog & Mist 2", url = "https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/volumetric-fog-mist-2-162694" }, + new Asset { name = "Volumetric Lights 2", url = "https://assetstore.unity.com/packages/vfx/shaders/volumetric-lights-2-234539" }, + new Asset { name = "Volumetric Lights Set", url = "https://assetstore.unity.com/packages/3d/props/volumetric-lights-set-237873" }, + new Asset { name = "Volumetric Lights 2 HDRP", url = "https://assetstore.unity.com/packages/vfx/shaders/volumetric-lights-2-hdrp-243807" }, + } + }, + new AssetCategory + { + name = "Tools & Shaders", + assets = new List + { + new Asset { name = "Compass Navigator Pro 2", url = "https://assetstore.unity.com/packages/tools/gui/compass-navigator-pro-2-273662" }, + new Asset { name = "Highlight Plus", url = "https://assetstore.unity.com/packages/vfx/shaders/highlight-plus-all-in-one-outline-selection-effects-134149" }, + new Asset { name = "Highlight Plus 2D", url = "https://assetstore.unity.com/packages/vfx/shaders/highlight-plus-2d-138383" }, + new Asset { name = "Liquid Volume 2", url = "https://assetstore.unity.com/packages/vfx/shaders/liquid-volume-2-249127" }, + new Asset { name = "Liquid Volume Pro 2", url = "https://assetstore.unity.com/packages/vfx/shaders/liquid-volume-pro-2-129967" }, + new Asset { name = "Liquid Volume Pro 2 HDRP", url = "https://assetstore.unity.com/packages/vfx/shaders/liquid-volume-pro-2-hdrp-253786" }, + new Asset { name = "Potions & Volumetric Liquid", url = "https://assetstore.unity.com/packages/slug/123474" }, + new Asset { name = "Shader Control", url = "https://assetstore.unity.com/packages/vfx/shaders/shader-control-74817" }, + new Asset { name = "Split Screen Pro", url = "https://assetstore.unity.com/packages/tools/camera/split-screen-pro-207149" }, + new Asset { name = "Skybox Plus", url = "https://assetstore.unity.com/packages/2d/environments/skybox-plus-182966" }, + new Asset { name = "Trails FX", url = "https://assetstore.unity.com/packages/vfx/shaders/trails-fx-146898" }, + new Asset { name = "Transitions Plus", url = "https://assetstore.unity.com/packages/tools/camera/transitions-plus-266067" }, + new Asset { name = "Tunnel FX 2", url = "https://assetstore.unity.com/packages/vfx/shaders/tunnel-fx-2-86544" }, + new Asset { name = "Voxel Play 3", url = "https://assetstore.unity.com/packages/tools/game-toolkits/voxel-play-3-310775" }, + new Asset { name = "Pirates of Voxel Play", url = "https://assetstore.unity.com/packages/tools/game-toolkits/pirates-of-voxel-play-189096" }, + new Asset { name = "X-Frame FPS Accelerator", url = "https://assetstore.unity.com/packages/tools/camera/x-frame-fps-accelerator-63965" } + } + }, + new AssetCategory + { + name = "Grids & Maps", + assets = new List + { + new Asset { name = "Grids 2D", url = "https://assetstore.unity.com/packages/tools/game-toolkits/grids-2d-59981" }, + new Asset { name = "Hexasphere Grid System", url = "https://assetstore.unity.com/packages/tools/modeling/hexasphere-grid-system-89112" }, + new Asset { name = "Terrain Grid System 2", url = "https://assetstore.unity.com/packages/tools/terrain/terrain-grid-system-2-244921" }, + new Asset { name = "World Map 2D Edition 2", url = "https://assetstore.unity.com/packages/tools/gui/world-map-2d-edition-2-151238" }, + new Asset { name = "World Map Globe Edition 2", url = "https://assetstore.unity.com/packages/tools/gui/world-map-globe-edition-2-150643" }, + new Asset { name = "World Map Strategy Kit 2", url = "https://assetstore.unity.com/packages/tools/game-toolkits/world-map-strategy-kit-2-150938" }, + new Asset { name = "World Maps & Weather Symbols", url = "https://assetstore.unity.com/packages/2d/textures-materials/world-flags-and-weather-symbols-69010" }, + new Asset { name = "Military Units 2D", url = "https://assetstore.unity.com/packages/2d/textures-materials/military-units-the-stylized-art-collection-187769" }, + new Asset { name = "Military Units 3D", url = "https://assetstore.unity.com/packages/3d/vehicles/military-units-3d-246876" }, + } + } +}; + + + void OnEnable () { + kronnectLogo = Resources.Load("kronnectLogo"); + welcomeBanner = Resources.Load("welcomeBanner"); + } + + void DrawHeader (string title) { + if (headerStyle == null) { + GUIStyle skurikenModuleTitleStyle = "ShurikenModuleTitle"; + headerStyle = new GUIStyle(skurikenModuleTitleStyle) { + contentOffset = new Vector2(5f, -2f), + normal = { textColor = Color.white }, + fixedHeight = 24, + fontSize = 13 + }; + } + + GUILayout.Label(title, headerStyle); + } + + void OnGUI () { + GUILayout.BeginHorizontal(); + GUILayout.Space(10); + GUILayout.BeginVertical(); + GUILayout.Space(10); + + DrawHeader("Online Resources"); + + GUILayout.BeginHorizontal(); + GUILayout.Space(10); + GUILayout.BeginVertical(); + + if (GUILayout.Button("Asset Documentation", EditorStyles.linkLabel)) { + Application.OpenURL(OnlineGuidesUrl); + } + if (GUILayout.Button("Support & Community", EditorStyles.linkLabel)) { + Application.OpenURL(SupportUrl); + } + if (GUILayout.Button("YouTube Channel", EditorStyles.linkLabel)) { + Application.OpenURL(YoutubeUrl); + } + if (GUILayout.Button("X / Twitter", EditorStyles.linkLabel)) { + Application.OpenURL(TwitterUrl); + } + if (GUILayout.Button("Kronnect Asset Store", EditorStyles.linkLabel)) { + Application.OpenURL(KronnectUrl); + } + GUILayout.EndVertical(); + GUILayout.FlexibleSpace(); + GUILayout.BeginHorizontal(); + + if (bannerStyle == null) { + bannerStyle = new GUIStyle(GUI.skin.button); + bannerStyle.normal.background = welcomeBanner; + bannerStyle.normal.scaledBackgrounds = new[] { welcomeBanner }; + } + const float width = 1100 / 2; + const float height = 200 / 2; + + if (GUILayout.Button("", bannerStyle, GUILayout.Width(width), GUILayout.Height(height))) { + Application.OpenURL(KronnectUrl); + } + GUILayout.EndHorizontal(); + + GUILayout.EndHorizontal(); + + GUILayout.Space(20); + + DrawHeader("Kronnect Assets"); + + GUIStyle textStyle = new GUIStyle(EditorStyles.wordWrappedLabel) { + fontSize = 11 + }; + GUILayout.Label("Thank you for using this asset!\nWe invite you to explore more assets and complete your collection by visiting the affiliated links below to the Asset Store:", textStyle); + + EditorGUILayout.Space(10); + GUILayout.BeginHorizontal(); + + foreach (var category in assetCategories) { + GUILayout.BeginVertical(); + GUILayout.Label(category.name, EditorStyles.boldLabel); + foreach (var asset in category.assets) { + GUILayout.BeginHorizontal(); + GUILayout.Space(10); + if (GUILayout.Button(asset.name, EditorStyles.linkLabel)) { + Application.OpenURL(asset.url + ReferralInfo); + } + GUILayout.EndHorizontal(); + } + GUILayout.EndVertical(); + } + + GUILayout.EndHorizontal(); + + GUILayout.FlexibleSpace(); + + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Button("Close", GUILayout.Width(60))) { + Close(); + } + EditorGUILayout.Space(); + GUILayout.Label(new GUIContent(kronnectLogo), GUILayout.Width(100), GUILayout.Height(30)); + EditorGUILayout.EndHorizontal(); + + GUILayout.Space(10); + GUILayout.EndVertical(); + GUILayout.Space(10); + GUILayout.EndHorizontal(); + } + + public static void ShowScreen () { + ContactUsWindow window = GetWindow(true, "Online Resources", true); + window.minSize = window.maxSize = new Vector2(750, 640); + } + + [System.Serializable] + public class AssetCategory { + public string name; + public List assets; + } + + [System.Serializable] + public class Asset { + public string name; + public string url; + } + } + +} \ No newline at end of file diff --git a/Imports/Beautify/URP/Editor/ContactUs.cs.meta b/Imports/Beautify/URP/Editor/ContactUs.cs.meta new file mode 100644 index 00000000..b3e2efb5 --- /dev/null +++ b/Imports/Beautify/URP/Editor/ContactUs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1afc11f03842d43bfa05390519730021 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/CubeLUTImporter.cs b/Imports/Beautify/URP/Editor/CubeLUTImporter.cs new file mode 100644 index 00000000..b830b664 --- /dev/null +++ b/Imports/Beautify/URP/Editor/CubeLUTImporter.cs @@ -0,0 +1,191 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; +using System.IO; +using System.Globalization; +using System.Text; + +namespace Beautify.Universal { + + public class CubeLUTImporter : EditorWindow { + + [MenuItem("Window/Kronnect/Beautify/Import CUBE LUT")] + public static void ShowBrowser() { + string path = EditorUtility.OpenFilePanel("Select .CUBE file", "", "cube"); + if (string.IsNullOrEmpty(path)) return; + Texture tex = Import(path); + if (tex != null) { + Beautify b = BeautifySettings.sharedSettings; + b.lutIntensity.Override(1); + b.lutTexture.Override(tex); + b.lut.Override(true); + } + } + + public static Texture3D Import(string path) { + + // Check if path is within assets folder + string assetPath = path; + int k = path.IndexOf("Assets/"); + if (k >= 0) { + assetPath = assetPath.Substring(k); + } else { + assetPath = "Assets/Imported CUBE LUTs/" + Path.GetFileName(assetPath); + } + + assetPath = Path.Combine(Path.GetDirectoryName(assetPath), Path.GetFileNameWithoutExtension(assetPath)); + if (!assetPath.ToUpper().EndsWith("_LUT")) { + assetPath += "_LUT"; + } + assetPath += ".asset"; + var tex = AssetDatabase.LoadAssetAtPath(assetPath); + + if (tex != null) return tex; // safe behaviour: if file exists, do not change anything + + // Read the lut data + string[] lines = File.ReadAllLines(path); + + // Start parsing + int i = 0; + int size = -1; + int sizeCube = -1; + var table = new List(); + var domainMin = Color.black; + var domainMax = Color.white; + + while (true) { + if (i >= lines.Length) { + if (table.Count != sizeCube) + Debug.LogError("Premature end of file"); + + break; + } + + string line = FilterLine(lines[i]); + + if (string.IsNullOrEmpty(line)) + goto next; + + // Header data + if (line.StartsWith("TITLE")) + goto next; // Skip the title tag, we don't need it + + if (line.StartsWith("LUT_3D_SIZE")) { + string sizeStr = line.Substring(11).TrimStart(); + + if (!int.TryParse(sizeStr, out size)) { + Debug.LogError("Invalid data on line " + i); + break; + } + + if (size < 2 || size > 256) { + Debug.LogError("LUT size out of range"); + break; + } + + sizeCube = size * size * size; + goto next; + } + + if (line.StartsWith("DOMAIN_MIN")) { + if (!ParseDomain(i, line, ref domainMin)) break; + goto next; + } + + if (line.StartsWith("DOMAIN_MAX")) { + if (!ParseDomain(i, line, ref domainMax)) break; + goto next; + } + + // Table + string[] row = line.Split(); + + if (row.Length != 3) { + Debug.LogError("Invalid data on line " + i); + break; + } + + var color = Color.black; + for (int j = 0; j < 3; j++) { + float d; + if (!float.TryParse(row[j], NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out d)) { + Debug.LogError("Invalid data on line " + i); + break; + } + + color[j] = d; + } + + table.Add(color); + + next: + i++; + } + + if (sizeCube != table.Count) { + Debug.LogError("Wrong table size - Expected " + sizeCube + " elements, got " + table.Count); + return null; + } + + // Generate a new Texture3D + tex = new Texture3D(size, size, size, TextureFormat.RGBAHalf, false) { + anisoLevel = 0, + filterMode = FilterMode.Bilinear, + wrapMode = TextureWrapMode.Clamp, + }; + + tex.SetPixels(table.ToArray(), 0); + tex.Apply(); + + // Save to disk + AssetDatabase.CreateAsset(tex, assetPath); + + AssetDatabase.SaveAssets(); + AssetDatabase.Refresh(); + + tex = AssetDatabase.LoadAssetAtPath(assetPath); + return tex; + } + + static string FilterLine(string line) { + var filtered = new StringBuilder(); + line = line.TrimStart().TrimEnd(); + int len = line.Length; + int i = 0; + + while (i < len) { + char c = line[i]; + + if (c == '#') // Filters comment out + break; + + filtered.Append(c); + i++; + } + + return filtered.ToString(); + } + + static bool ParseDomain(int i, string line, ref Color domain) { + string[] domainStrs = line.Substring(10).TrimStart().Split(); + + if (domainStrs.Length != 3) { + Debug.LogError("Invalid data on line " + i); + return false; + } + + for (int j = 0; j < 3; j++) { + float d; + if (!float.TryParse(domainStrs[j], NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out d)) { + Debug.LogError("Invalid data on line " + i); + return false; + } + + domain[j] = d; + } + + return true; + } + } + +} \ No newline at end of file diff --git a/Imports/Beautify/URP/Editor/CubeLUTImporter.cs.meta b/Imports/Beautify/URP/Editor/CubeLUTImporter.cs.meta new file mode 100644 index 00000000..bb35fd13 --- /dev/null +++ b/Imports/Beautify/URP/Editor/CubeLUTImporter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 880fcc03372614592baab50db0731b13 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/FrameBrowser.cs b/Imports/Beautify/URP/Editor/FrameBrowser.cs new file mode 100644 index 00000000..a6c228dd --- /dev/null +++ b/Imports/Beautify/URP/Editor/FrameBrowser.cs @@ -0,0 +1,229 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; +using System.IO; + +namespace Beautify.Universal { + + public class FrameBrowser : EditorWindow { + + const string MASTER_FOLDER_NAME = "Frame Pack"; + + Material referenceMaterial; + Vector2 scrollPos; + static int columnCount = 4; + + struct FrameEntry { + public Material mat; + public Texture2D frameMask; + } + + struct FrameGroup { + public string categoryPath; + public string categoryName; + public List frames; + public bool visible; + } + FrameGroup[] groups; + + + [MenuItem("Window/Kronnect/Beautify/Frame Browser")] + public static void ShowBrowser() { + GetWindow("Frame Browser"); + } + + static class ShaderParams { + public static int frameMaskTexture = Shader.PropertyToID("_FrameMask"); + public static int lutPreview = Shader.PropertyToID("_LUTPreview"); + } + + private void OnEnable() { + RefreshFrames(); + ClearBackground(); + } + + void ClearBackground() { + Shader.SetGlobalTexture(ShaderParams.lutPreview, Texture2D.whiteTexture); + } + + private void OnGUI() { + + if (groups == null) { + EditorGUILayout.HelpBox("Frame Pack not found.", MessageType.Info); + if (GUILayout.Button("View Frame Pack on the Unity Asset Store")) { + Application.OpenURL("https://assetstore.unity.com/packages/slug/204058"); + } + if (GUILayout.Button("Reload Frame Pack")) { + RefreshFrames(); + } + return; + } + + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Button("Find Frames")) { + RefreshFrames(); + } + if (GUILayout.Button("Capture SceneView")) { + RequestCapture(CameraType.SceneView); + } + if (GUILayout.Button("Capture GameView")) { + RequestCapture(CameraType.Game); + } + if (GUILayout.Button("White Background")) { + ClearBackground(); + } + EditorGUILayout.EndHorizontal(); + + columnCount = EditorGUILayout.IntSlider("Columns:", columnCount, 1, 5); + + Texture2D wt = Texture2D.whiteTexture; + float rowHeight = 0.5f * EditorGUIUtility.currentViewWidth / columnCount; + + EditorGUILayout.HelpBox("Click on the name of a Frame to toggle it on/off.", MessageType.Info); + scrollPos = EditorGUILayout.BeginScrollView(scrollPos); + Beautify b = BeautifySettings.sharedSettings; + if (b == null) { + EditorGUILayout.HelpBox("Beautify not found in the scene.", MessageType.Warning); + } else { + for (int k = 0; k < groups.Length; k++) { + groups[k].visible = EditorGUILayout.Foldout(groups[k].visible, "Category: " + groups[k].categoryName); + if (groups[k].visible) { + int c = groups[k].frames.Count; + int matIndex = 0; + while (matIndex < c) { + EditorGUILayout.BeginVertical(); + Rect rect = EditorGUILayout.GetControlRect(); + float w = rect.width / columnCount; + rect.width = w - 5; + for (int col = 0; col < columnCount; col++) { + if (matIndex < c) { + FrameEntry frameEntry = groups[k].frames[matIndex]; + if (frameEntry.mat != null) { + rect.height = rowHeight; + frameEntry.mat.SetTexture(ShaderParams.frameMaskTexture, frameEntry.frameMask); + EditorGUI.DrawPreviewTexture(rect, wt, frameEntry.mat); + rect.y += rowHeight; + rect.height = 15; + string frameName; + if (b.frame.value && b.frame.overrideState && b.frameMask == frameEntry.frameMask) { + frameName = "✔ " + frameEntry.mat.name; + } else { + frameName = frameEntry.mat.name; + } + if (GUI.Button(rect, frameName)) { + if (b.frame.value && b.frame.overrideState && b.frameMask == frameEntry.frameMask) { + b.frame.Override(false); + } else { + b.frame.Override(true); + b.frameMask.Override(frameEntry.frameMask); + b.frameThickness.Override(1.0f); + b.frameSharpness.Override(255f); + b.frameColor.Override(Color.white); + } + EditorUtility.SetDirty(b); + if (!Application.isPlaying) { + UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(UnityEngine.SceneManagement.SceneManager.GetActiveScene()); + } + } + rect.y -= rowHeight; + rect.x += w; + } + matIndex++; + } + } + GUILayout.Space(rowHeight); + EditorGUILayout.EndVertical(); + EditorGUILayout.Separator(); + } + } + } + } + EditorGUILayout.EndScrollView(); + } + + private void OnDestroy() { + ReleaseGroups(); + } + + void ReleaseGroups() { + if (groups != null) { + foreach (FrameGroup g in groups) { + if (g.frames != null) { + foreach (FrameEntry l in g.frames) { + if (l.mat != null) { + DestroyImmediate(l.mat); + } + } + g.frames.Clear(); + } + } + } + groups = null; + } + + void RequestCapture(CameraType cameraType) { + + BeautifySettings b; + b = Misc.FindObjectOfType(); + + if (b == null) { + Debug.LogError("Beautify not found. It's requred for the LUT Browser functionality."); + return; + } + BeautifyRendererFeature.captureCameraType = cameraType; + BeautifyRendererFeature.requestScreenCapture = true; + EditorUtility.SetDirty(BeautifySettings.sharedSettings); + } + + + void RefreshFrames() { + + RequestCapture(BeautifyRendererFeature.captureCameraType); + ReleaseGroups(); + if (referenceMaterial == null) { + referenceMaterial = new Material(Shader.Find("Hidden/Beautify/FrameThumbnail")); + } + string[] res = Directory.GetDirectories(Application.dataPath, "*" + MASTER_FOLDER_NAME + "*", SearchOption.AllDirectories); + string path = null; + for (int k = 0; k < res.Length; k++) { + if (res[k].Contains("Frame Pack")) { + path = res[k]; + break; + } + } + if (path == null) { + return; + } + string[] categories = Directory.GetDirectories(path, "*", SearchOption.AllDirectories); + groups = new FrameGroup[categories.Length]; + for (int c = 0; c < categories.Length; c++) { + FrameGroup group = new FrameGroup(); + group.categoryPath = categories[c]; + group.categoryName = Path.GetFileName(group.categoryPath); + group.frames = new List(); + string[] frames = Directory.GetFiles(group.categoryPath, "*.png", SearchOption.AllDirectories); + if (frames != null) { + for (int l = 0; l < frames.Length; l++) { + string framePath = frames[l]; + int i = framePath.IndexOf("/Assets"); + if (i < 0) continue; + framePath = framePath.Substring(i + 1); + Texture2D frameMask = AssetDatabase.LoadAssetAtPath(framePath) as Texture2D; + if (frameMask != null) { + Material mat = Instantiate(referenceMaterial); + mat.name = Path.GetFileNameWithoutExtension(framePath); + FrameEntry entry = new FrameEntry(); + entry.mat = mat; + entry.frameMask = frameMask; + group.frames.Add(entry); + } + } + } + groups[c] = group; + } + + } + + } + +} \ No newline at end of file diff --git a/Imports/Beautify/URP/Editor/FrameBrowser.cs.meta b/Imports/Beautify/URP/Editor/FrameBrowser.cs.meta new file mode 100644 index 00000000..10473e00 --- /dev/null +++ b/Imports/Beautify/URP/Editor/FrameBrowser.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4b48e93dd24694f528b5e755ab766cad +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/LUTBrowser.cs b/Imports/Beautify/URP/Editor/LUTBrowser.cs new file mode 100644 index 00000000..d5f73616 --- /dev/null +++ b/Imports/Beautify/URP/Editor/LUTBrowser.cs @@ -0,0 +1,233 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; +using System.IO; +using UnityEngine.Rendering; + +namespace Beautify.Universal { + + public class LUTBrowser : EditorWindow { + + const string MASTER_FOLDER_NAME = "LUT Pack"; + + Material referenceMaterial; + Vector2 scrollPos; + static int columnCount = 4; + VolumeProfile profile; + + struct LUTEntry { + public Material mat; + public Texture2D lutTex; + } + + struct LUTGroup { + public string categoryPath; + public string categoryName; + public List luts; + public bool visible; + } + LUTGroup[] groups; + + + [MenuItem("Window/Kronnect/Beautify/LUT Browser")] + public static void ShowBrowser() { + GetWindow("LUT Browser"); + } + + static class ShaderParams { + public static int lutTex = Shader.PropertyToID("_LUTTex"); + } + + private void OnEnable() { + RefreshLUTs(); + } + + private void OnGUI() { + + if (groups == null) { + EditorGUILayout.HelpBox("LUT Pack not found.", MessageType.Info); + if (GUILayout.Button("View LUT Pack on the Unity Asset Store")) { + Application.OpenURL("https://assetstore.unity.com/packages/slug/202502"); + } + if (GUILayout.Button("Reload LUT Pack")) { + RefreshLUTs(); + } + return; + } + + EditorGUILayout.BeginHorizontal(); + if (GUILayout.Button("Find LUTs")) { + RefreshLUTs(); + } + if (GUILayout.Button("Capture SceneView")) { + RequestCapture(CameraType.SceneView); + } + if (GUILayout.Button("Capture GameView")) { + RequestCapture(CameraType.Game); + } + EditorGUILayout.EndHorizontal(); + + if (profile == null) { + profile = BeautifySettings.currentProfile; + } + EditorGUILayout.BeginHorizontal(); + profile = (VolumeProfile)EditorGUILayout.ObjectField("Current Profile:", profile, typeof(VolumeProfile), false); + if (GUILayout.Button(new GUIContent("Auto Select", "Automatically selects the profile used in a scene volume using Beautify"), GUILayout.Width(90))) { + profile = null; + } + EditorGUILayout.EndHorizontal(); + + Texture2D wt = Texture2D.whiteTexture; + float rowHeight = 0.5f * EditorGUIUtility.currentViewWidth / columnCount; + + scrollPos = EditorGUILayout.BeginScrollView(scrollPos); + Beautify b = null; + if (profile != null) { + profile.TryGet(out b); + } + if (b == null) { + EditorGUILayout.HelpBox("Beautify not found in the seleced profile.", MessageType.Warning); + } else { + columnCount = EditorGUILayout.IntSlider("Columns:", columnCount, 1, 5); + EditorGUILayout.HelpBox("Click on the name of a LUT to toggle it on/off. Use the Intensity slider in Beautify inspector to customize the LUT strength.", MessageType.Info); + for (int k = 0; k < groups.Length; k++) { + groups[k].visible = EditorGUILayout.Foldout(groups[k].visible, "Category: " + groups[k].categoryName); + if (groups[k].visible) { + int c = groups[k].luts.Count; + int matIndex = 0; + while (matIndex < c) { + EditorGUILayout.BeginVertical(); + Rect rect = EditorGUILayout.GetControlRect(); + float w = rect.width / columnCount; + rect.width = w - 5; + for (int col = 0; col < columnCount; col++) { + if (matIndex < c) { + LUTEntry lutEntry = groups[k].luts[matIndex]; + if (lutEntry.mat != null) { + rect.height = rowHeight; + lutEntry.mat.SetTexture(ShaderParams.lutTex, lutEntry.lutTex); + EditorGUI.DrawPreviewTexture(rect, wt, lutEntry.mat); + rect.y += rowHeight; + rect.height = 15; + string lutName; + if (b.lut.value && b.lut.overrideState && b.lutTexture == lutEntry.lutTex) { + lutName = "✔ " + lutEntry.mat.name; + } else { + lutName = lutEntry.mat.name; + } + if (GUI.Button(rect, lutName)) { + if (b.lut.value && b.lut.overrideState && b.lutTexture == lutEntry.lutTex) { + b.lut.Override(false); + } else { + b.lut.Override(true); + if (!b.lutIntensity.overrideState) { + b.lutIntensity.Override(1f); + } + b.lutTexture.Override(lutEntry.lutTex); + } + EditorUtility.SetDirty(b); + if (!Application.isPlaying) { + UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(UnityEngine.SceneManagement.SceneManager.GetActiveScene()); + } + } + rect.y -= rowHeight; + rect.x += w; + } + matIndex++; + } + } + GUILayout.Space(rowHeight); + EditorGUILayout.EndVertical(); + EditorGUILayout.Separator(); + } + } + } + } + EditorGUILayout.EndScrollView(); + } + + private void OnDestroy() { + ReleaseGroups(); + } + + void ReleaseGroups() { + if (groups != null) { + foreach (LUTGroup g in groups) { + if (g.luts != null) { + foreach (LUTEntry l in g.luts) { + if (l.mat != null) { + DestroyImmediate(l.mat); + } + } + g.luts.Clear(); + } + } + } + groups = null; + } + + void RequestCapture(CameraType cameraType) { + + BeautifySettings b; + b = Misc.FindObjectOfType(); + if (b == null) { + Debug.LogError("Beautify not found. It's requred for the LUT Browser functionality."); + return; + } + BeautifyRendererFeature.captureCameraType = cameraType; + BeautifyRendererFeature.requestScreenCapture = true; + EditorUtility.SetDirty(BeautifySettings.sharedSettings); + } + + + void RefreshLUTs() { + + RequestCapture(BeautifyRendererFeature.captureCameraType); + ReleaseGroups(); + if (referenceMaterial == null) { + referenceMaterial = new Material(Shader.Find("Hidden/Beautify/LUTThumbnail")); + } + string[] res = Directory.GetDirectories(Application.dataPath, "*" + MASTER_FOLDER_NAME + "*", SearchOption.AllDirectories); + string path = null; + for (int k = 0; k < res.Length; k++) { + if (res[k].Contains("LUT Pack")) { + path = res[k]; + break; + } + } + if (path == null) { + return; + } + string[] categories = Directory.GetDirectories(path, "*", SearchOption.AllDirectories); + groups = new LUTGroup[categories.Length]; + for (int c = 0; c < categories.Length; c++) { + LUTGroup group = new LUTGroup(); + group.categoryPath = categories[c]; + group.categoryName = Path.GetFileName(group.categoryPath); + group.luts = new List(); + string[] luts = Directory.GetFiles(group.categoryPath, "*.png", SearchOption.AllDirectories); + if (luts != null) { + for (int l = 0; l < luts.Length; l++) { + string lutPath = luts[l]; + int i = lutPath.IndexOf("/Assets"); + if (i < 0) continue; + lutPath = lutPath.Substring(i + 1); + Texture2D lutTex = AssetDatabase.LoadAssetAtPath(lutPath) as Texture2D; + if (lutTex != null) { + Material mat = Instantiate(referenceMaterial); + mat.name = Path.GetFileNameWithoutExtension(lutPath); + LUTEntry entry = new LUTEntry(); + entry.mat = mat; + entry.lutTex = lutTex; + group.luts.Add(entry); + } + } + } + groups[c] = group; + } + + } + + } + +} diff --git a/Imports/Beautify/URP/Editor/LUTBrowser.cs.meta b/Imports/Beautify/URP/Editor/LUTBrowser.cs.meta new file mode 100644 index 00000000..17167c40 --- /dev/null +++ b/Imports/Beautify/URP/Editor/LUTBrowser.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3ea90863c340046bab9e7c20c63fb798 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/Resources.meta b/Imports/Beautify/URP/Editor/Resources.meta new file mode 100644 index 00000000..c1355d3e --- /dev/null +++ b/Imports/Beautify/URP/Editor/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 587d57227e82a414c91432f5d37dfc30 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/Resources/FrameThumbnail.shader b/Imports/Beautify/URP/Editor/Resources/FrameThumbnail.shader new file mode 100644 index 00000000..6dbbae3e --- /dev/null +++ b/Imports/Beautify/URP/Editor/Resources/FrameThumbnail.shader @@ -0,0 +1,64 @@ +Shader "Hidden/Beautify/FrameThumbnail" +{ + Properties + { + _MainTex ("Texture", 2D) = "white" {} + _Color ("Color", color) = (1,1,1,1) + _FrameMask ("Frame Mask", 2D) = "white" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float2 uv : TEXCOORD0; + float4 vertex : SV_POSITION; + float2 clipUV : TEXCOORD1; + }; + + sampler2D _LUTPreview; + float4 _LUTPreview_ST; + sampler2D _GUIClipTexture; + uniform float4x4 unity_GUIClipTextureMatrix; + + sampler2D _FrameMask; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = v.uv; + float3 eyePos = UnityObjectToViewPos(v.vertex); + o.clipUV = mul(unity_GUIClipTextureMatrix, float4(eyePos.xy, 0, 1.0)); + return o; + } + + half4 frag (v2f i) : SV_Target + { + clip( tex2D(_GUIClipTexture, i.clipUV).a - 0.1); + + half3 rgb = tex2D(_LUTPreview, i.uv); + + half4 frameMask = tex2D(_FrameMask, i.uv); + rgb = lerp(rgb, frameMask.rgb, frameMask.a); + + return half4(rgb, 1.0); + } + ENDCG + } + } +} diff --git a/Sources/Shaders/Beautify.cginc.meta b/Imports/Beautify/URP/Editor/Resources/FrameThumbnail.shader.meta similarity index 56% rename from Sources/Shaders/Beautify.cginc.meta rename to Imports/Beautify/URP/Editor/Resources/FrameThumbnail.shader.meta index 6dbb3ff7..0452f739 100644 --- a/Sources/Shaders/Beautify.cginc.meta +++ b/Imports/Beautify/URP/Editor/Resources/FrameThumbnail.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 -guid: 83c7f2de0e89d4c59ba8b1bf830d8504 -timeCreated: 1463645543 -licenseType: Store +guid: 930de39fd5ebb4036af9ebca77f535be ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/Resources/LUTThumbnail.shader b/Imports/Beautify/URP/Editor/Resources/LUTThumbnail.shader new file mode 100644 index 00000000..fade108d --- /dev/null +++ b/Imports/Beautify/URP/Editor/Resources/LUTThumbnail.shader @@ -0,0 +1,74 @@ +Shader "Hidden/Beautify/LUTThumbnail" +{ + Properties + { + _MainTex ("Texture", 2D) = "white" {} + _Color ("Color", color) = (1,1,1,1) + _LUTTex ("LUT Texture", 2D) = "black" {} + } + SubShader + { + Tags { "RenderType"="Opaque" } + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + float2 uv : TEXCOORD0; + float4 vertex : SV_POSITION; + float2 clipUV : TEXCOORD1; + }; + + sampler2D _LUTPreview; + float4 _LUTPreview_ST;; + sampler2D _GUIClipTexture; + uniform float4x4 unity_GUIClipTextureMatrix; + + sampler2D _LUTTex; + float4 _LUTTex_TexelSize; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.uv = v.uv; + float3 eyePos = UnityObjectToViewPos(v.vertex); + o.clipUV = mul(unity_GUIClipTextureMatrix, float4(eyePos.xy, 0, 1.0)); + return o; + } + + half4 frag (v2f i) : SV_Target + { + clip( tex2D(_GUIClipTexture, i.clipUV).a - 0.1); + + half3 rgb = tex2D(_LUTPreview, i.uv); + + #if !UNITY_COLORSPACE_GAMMA + rgb = LinearToGammaSpace(rgb); + #endif + + float3 lutST = float3(_LUTTex_TexelSize.x, _LUTTex_TexelSize.y, _LUTTex_TexelSize.w - 1); + float3 lookUp = saturate(rgb) * lutST.zzz; + lookUp.xy = lutST.xy * (lookUp.xy + 0.5); + float slice = floor(lookUp.z); + lookUp.x += slice * lutST.y; + float2 lookUpNextSlice = float2(lookUp.x + lutST.y, lookUp.y); + rgb = lerp(tex2D(_LUTTex, lookUp.xy).rgb, tex2D(_LUTTex, lookUpNextSlice).rgb, lookUp.z - slice); + + return half4(rgb, 1.0); + } + ENDCG + } + } +} diff --git a/Sources/Shaders/BeautifyAdvancedParams.cginc.meta b/Imports/Beautify/URP/Editor/Resources/LUTThumbnail.shader.meta similarity index 56% rename from Sources/Shaders/BeautifyAdvancedParams.cginc.meta rename to Imports/Beautify/URP/Editor/Resources/LUTThumbnail.shader.meta index d870a5a0..1c3edb47 100644 --- a/Sources/Shaders/BeautifyAdvancedParams.cginc.meta +++ b/Imports/Beautify/URP/Editor/Resources/LUTThumbnail.shader.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 -guid: 187d6b6c578eb41029a2bf2d15920773 -timeCreated: 1488661131 -licenseType: Free +guid: 76e6e0fd1d4ad4cf7a9e2bd30b1675e1 ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/Resources/beautifyHeader.png b/Imports/Beautify/URP/Editor/Resources/beautifyHeader.png new file mode 100644 index 00000000..e8f6692d --- /dev/null +++ b/Imports/Beautify/URP/Editor/Resources/beautifyHeader.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a01f75bff6c54682a136fa816166a66d5fcad97e48c56eeb0d703c6ed970764 +size 2368 diff --git a/Imports/Beautify/URP/Editor/Resources/beautifyHeader.png.meta b/Imports/Beautify/URP/Editor/Resources/beautifyHeader.png.meta new file mode 100644 index 00000000..f43292dc --- /dev/null +++ b/Imports/Beautify/URP/Editor/Resources/beautifyHeader.png.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 6dd9cc9aaf47c43bea25b8a6e9df73d9 +timeCreated: 1462519611 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/Resources/kronnectLogo.png b/Imports/Beautify/URP/Editor/Resources/kronnectLogo.png new file mode 100644 index 00000000..179f018d --- /dev/null +++ b/Imports/Beautify/URP/Editor/Resources/kronnectLogo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aef53609db148801623c42600a1b37624d288aec65c1d98a7ca1c95e104e81fb +size 17915 diff --git a/Imports/Beautify/URP/Editor/Resources/kronnectLogo.png.meta b/Imports/Beautify/URP/Editor/Resources/kronnectLogo.png.meta new file mode 100644 index 00000000..e0f73ad9 --- /dev/null +++ b/Imports/Beautify/URP/Editor/Resources/kronnectLogo.png.meta @@ -0,0 +1,111 @@ +fileFormatVersion: 2 +guid: e631d30559be7400bafa5c6d66ad4824 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + 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: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + 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 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Editor/Resources/welcomeBanner.png b/Imports/Beautify/URP/Editor/Resources/welcomeBanner.png new file mode 100644 index 00000000..88b87412 --- /dev/null +++ b/Imports/Beautify/URP/Editor/Resources/welcomeBanner.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df7984b1d5bb8318afe18ee0b8a5ad68563735fa78c21ba1e8a26819456e9891 +size 539071 diff --git a/Imports/Beautify/URP/Editor/Resources/welcomeBanner.png.meta b/Imports/Beautify/URP/Editor/Resources/welcomeBanner.png.meta new file mode 100644 index 00000000..92c48377 --- /dev/null +++ b/Imports/Beautify/URP/Editor/Resources/welcomeBanner.png.meta @@ -0,0 +1,111 @@ +fileFormatVersion: 2 +guid: ad40dcebc3b024c5eabbae1b82de8979 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 0 + 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 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + 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 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/README.txt b/Imports/Beautify/URP/README.txt new file mode 100644 index 00000000..f2b880d6 --- /dev/null +++ b/Imports/Beautify/URP/README.txt @@ -0,0 +1,343 @@ +Welcome to Beautify for Universal Rendering Pipeline! + +Requirements: +- Unity 2022.3.24 or later +- URP (Universal RP package, install it from Package Manager) + +Please check the Documentation folder for detailed setup instructions and more details. +To use Beautify, add Beautify override to a Post Processing Volume and customize! +Setup video: https://youtu.be/6fpeiysj6KM + + +License +------- +Beautify is licensed under the Unity Asset Store EULA or Kronnect EULA (depending where you purchased the asset). +Beautify also includes two optional custom ports of tonemap operators (ACES Fitted and AGX) which are licensed under the MIT license: +https://opensource.org/license/mit +Check the BeautifyACESFitted.hlsl and BeautifyAGX.hlsl files respectively. You can clear them if you don't use these tonemappers. + + +Change Log +---------- + +Version 30.0.3 +- Inspector: improved performance +- [Fix] Fixed a depth of field console warning under Render Graph on Unity 6.3 + +Version 30.0.2 +- [Fix] Fixed rendering when an intermediate texture is not available +- [Fix] Defensive clamp on the source descriptor width/height to a minimum of 1 +- [Fix] Unity 6.4: removed deprecation warnings for FindObjectsByType API calls + +Version 30.0 +- Added support for Unity 6.4 + +Version 27.1 +- Outline: added option to render before transparent objects (under Customize section) + +Version 27.0 +- Final Blur is now Creative Blur including options like tilt shift and radial blur + +Version 26.0 +- Improved Beautify Antialiasing quality with no extra performance cost +- DoF: Beautify Depth of Field works now better with the integrated antialiasing +- DoF: Added "FollowPosition" mode +- DoF: Added "Beautify DoF Target Per Camera" script which can be added to a camera to specify different dof targets per camera with autofocus +- Stripping options can now be store in an external scriptable object which can be shared among URP assets +- API: added new user events: BeautifySettings.OnCameraBeforeFocus & BeautifySettings.OnCameraBeforeAutofocus + +Version 25.1.3 +- Added support for UpdateAlphaClipRenderers to Render Graph path +- API: added BeautifyCutOutDoFRenderer component which can be added to cut out objects to register them more efficiently at runtime when Alpha Test DoF option is used + +Version 25.1 +- Added compatibilty with upscalers in Render Graph + +Version 25.0 +- Revamped Eye Adaptation effect with new options. Tutorial: https://youtu.be/4U2szVMgZjk + +Version 24.2 +- Sharpen: added "Exclusion Mask" support +- Depth of Field: added "Use Physical Camera Properties". When enabled, beautify settings will use physical camera properties such as focal length, aperture and sensor size. +- Frame: added thickness and sharpness parameters in Border mode + +Version 24.1 +- Depth of field: added "Affects Bloom" option. If enabled, bloom will affect the output of depth of field effect. + +Version 24.0 +- New effect: film grain +- Outline: added "Outer Only" option for per-object-id technique +- [Fix] Bloom tint can now be used without enabling "Customize" option +- [Fix] The command "Clear Effects" now resets saturate setting + +Version 23.0 +- Important change: Stripping options have been moved to the Beautify Render Feature inspector improving robustness and preventing conflicts with multiple volume configurations +For details, check https://kronnect.com/guides/build-tips-beautify-urp/ + +Version 22.4 +- Eye Adaptation: added metering mode with depth & mask options +- [Fix] Fixed DoF autofocus issue when using multiple cameras + +Version 22.2.1 +- Added DOTs Instancing support to custom prepasses + +Version 22.2 +- Outline: added new technique option based on per-object-id prepass +- DoF: added "Resolution Invariant" option + +Version 22.1 +- Outline: added saturation change detection for improved results +- Optimization Options: added "Ignore Depth Texture". Beautify won't request a depth texture but some effects or options that requires depth data will be unavailable. +- Keywords optimization: outline and edge antialiasing are now mutually exclusive resulting in less variants + +Version 22.0 +- Added AGX tonemapper +- Depth of field: added max CoC radius setting + +Version 21.3 +- Improved VR state detection + +Version 21.2.1 +- [Fix] Fixed an issue when using a combination of multiple URP renderers and stacked cameras + +Version 21.2 +- Bloom & Anamorphic Flares: new options to include or exclude specific layers +- Outline with exclusion layers now uses depth clipping +- Outline: added new option "Use Optimized Shader" + +Version 21.1 +- Outline: added CutOff option +- [Fix] Fixed an import issue on Unity 2023.2 + +Version 21.0 +- Outline: added Downscale Blur option which can be disabled to increase outline quality/sharpness +- Outline: added Min Depth Threshold option + +Version 20.0 +- Added support for Unity 2023.3 Render Graph +- Outline: added "Layer Mask" option (let you add outline over specific opaque objects) + +Version 12.0 +- Minimum Unity version required is now Unity 2021.3.16 +- LUT Browser: added option to specify a custom volume profile +- Automatic stripping of unused effects is now enabled by default + +Version 11.5 +- Beautify no longer applies default effects if there's no volume in the scene. Instead, a "Quick Settings" button has been added to Beautify inspector so the default settings can be quickly applied if desired. + +Version 11.4 +- Bloom: added individual tint color options per each layer in best quality mode for improved artistic control when bloom compose option is enabled + +Version 11.3 +- "Direct Write To Camera" option on Unity 2022.3 now uses URP swap buffers + +Version 11.2 +- Added "Max Brightness" option to anamorphic flares + +Version 11.1 +- Added new Compare Mode styles +- Added "Clear Color Buffer" option to render feature. This option is a workaround for a bug in OpenXR and occlusion mesh implementation which causes light leaking when bloom is enabled. + +Version 11.0 +- Added "Max Visible Depth" option to Night Vision effect +- Improved compatibility with Unity 2023 + +Version 10.9 +- Sun Flares: added "Depth Occlusion Mode". None = no depth buffer checking. Simple = sample depth buffer at Sun position. Smooth = sample 4 positions around Sun position and interpolate value across frames. + +Version 10.8 +- Added "Conservative" threshold option to bloom and anamorphic flares + +Version 10.7.1.1 +- [Fix] Fixed bloom / anamorphic flares exclusion layers depth buffer issue + +Version 10.7.1 +- [Fix] Fixed artifacts on very bright pixels and using dithering +- [Fix] Fixed "Direct Write To Camera" not working in Unity 2021.3.18 + +Version 10.7 +- Depth of Field: new "min/max" distance and "fallback" options +- Anamorphic Flares: spread range adjusted based on screen aspect ratio +- Added "Thermal Vision" distortion amount parameter +- Vignette: added Fit Mode to Circular shape option +- Pixelate: added instructions to inspector + +Version 10.6 +- Added "Thermal Vision" effect (under Artistic Choices section) +- Added "Keep Source On Top" option to Final Blur effect (useful to create blur edge effect) +- Editor: stripped features now display a label instead of just being hidden + +Version 10.5.1 +- [Fix] Fixed Unity PPS chromatic aberration being stripped + +Version 10.5 +- Chromatic Aberration: added "Separate Pass" option +- Bloom & anamorphic exclude layer options now support transparent objects + +Version 10.4 +- Anamorphic Flares: added Exclusion Mask options +- Bloom & Anamorphic Flares: removed upper cap to threshold parameters +- ACES: added "Max Input Brightness" option to avoid artifacts due to NaN or out of range pixel values +- Added option to demo scene DoF to toggle the effect +- [Fix] Fixed Bloom customize option issue in VR when using multiple cameras + +Version 10.3 +- Added "Downscale Mode" option +- [Fix] Fixed LUT effect being stripped from build + +Version 10.2 +- Edge Antialias: added "Max Spread" option + +Version 10.1 +- Added "Motion Restore Speed". Improved accuracy of motion sensibility. +- Edge Antialias: added "Depth Attenuation". Reduces antialias effect on distance + +Version 10.0 +- Added "Edge Antialiasing" option +- Frame: added "Cinematic Bands" style +- Bloom: added "Bloom Spread" option +- Bloom: added "Quicker Blur" option +- Bloom: uncapped "Depth Attenuation" limit +- Anamorphic Flares: added "Quicker Blur" option +- Anamorphic Flares: uncapped "Depth Attenuation" limit +- Outline: added "Outline Depth Fade" option (requires "Outline Customize" to be enabled) +- Chromatic Aberration: added "Hue Shift" parameter +- Chromatic Aberration: added CHROMATIC_ABERRATION_ALT shader option (see documentation) +- Depth of field: improved foreground blur effect +- Depth of field: improved bokeh effect in Single Pass Instanced mode +- Added "Camera Layer Mask" to the render feature. This option let you specify which cameras can render Beautify effects +- Volume inspector GUI performance optimizations +- [Fix] Fixed bloom & anamorphic flares not showing in secondary camera on VR setups +- [Fix] Fixes for Unity 2022.2 beta + +Version 9.0.1 +- Direct Write to Camera option works again (requires Unity 2021.3.3 or later) + +Version 9.0 +- Added "Ignore Post Processing Option" in Beautify Render Feature so no need to enable Post Processing option in cameras +- Added "Flip Vertically" option to compensate vertical flip in 2D renderer with camera stacking +- [Fix] Sun flares now use the direction set by the assigned Sun transform and not the main directional light +- [Fix] Fixed flipped input image with 2D renderer and camera stacking + +Version 8.9 +- Added new options to compare mode +- Added LUT 3D texture support and option to import CUBE LUT format + +Version 8.8.1 +- Change: adjusted opacity of vignette mask plus vignette color alpha now controls overall opacity as well + +Version 8.8 +- Depth of field: added real camera settings + +Version 8.7 +- Depth of field: added "Transparent Alpha Test Support" options +- Added "Render Pass Event" option to the Beautify Render Feature inspector + +Version 8.6.3 +- Final Blur now applies after depth of field +- Added "Double Sided" option to transparent depth of field option +- [Fix] Fixed inspector issue which hides chromatic aberration section when lens dirt feature is stripped + +Version 8.6.2 +- [Fix] BeautifySettings gameobject is no longer created if Beautify is not being used in the scene when camera post processing is enabled + +Version 8.6.1 +- [Fix] Fixes to Sun Flares effect in VR + +Version 8.6 +- Added Frame Pack browser + +Version 8.5.1 +- LUT browser UI improvements + +Version 8.5 +- Depth of Field: added Composition option for bokeh +- Added Depth of Field demo scene + +Version 8.4 +- Added LUT Browser (access it from the Windows menu) + +Version 8.3.1 +- Beautify cached profiles get updated now automatically when loading new scenes + +Version 8.3 +- Added "Blur Mask" option to Final Blur effect +- [Fix] Fixed some issues with Unity 2021.2 beta + +Version 8.2 +- Added new Outline options +- Version number upped to 8.2 to sync with built-in version + +Version 2.0 +- Added Chromatic Aberration effect +- [Fix] Fixed blink method issue when changing scenes + +Version 1.7.3 18/Mar/2021 +- DoF: added blur spread option to foreground blur +- [Fix] Fixed depth of field CoC radius calculation issue when using multiple cameras + +Version 1.7.2 25/Feb/2021 +- [Fix] Fixed Single Pass Stereo/MultiView issues due to Blit bug on XR +- [Fix] Fixed transparent support for Depth of Field not rendering in Editor + +Version 1.7.1 8/Feb/2021 +- [Fix] Fixed depth of field issue on Android with Unity 2020.2 + +Version 1.7 24/Jan/2021 +- Added support for orthographic camera + +Version 1.6 +- Added "Vignetting Blink Style" option +- Added "Vignetting Center" option +- Added "Bloom Near Attenuation" option +- Added "Anamorphic Flares Near Attenuation" option +- Added new debug layers to Debug View + +Version 1.5 +- Added Depth Of Field Transparent Support option + +Version 1.4 +- Added Sun Flares "Occlusion Layer Mask" option +- Added Sun Flares "Attenuation Speed" (works with Occlusion Layer Mask option) +- [Fix] Fixed an issue that could produce Beautify to use a disabled camera when computing Sun Flares effect + +Version 1.3.1 15/NOV/2020 +- Improved compatibility with URP 10.1 +- [Fix] Fixed an issue that prevents correct shader keyword stripping (ie. cloud build) + +Version 1.3 18/OCT/2020 +- Added "Bloom Exclusion Mask" option +- Added new demo scene "LUT Blending" +- [Fix] Fixed regression which disabled sharpen in build + +Version 1.2.2 23/SEP/2020 +- Optimized scriptable render pass initialization + +Version 1.2.1 31/AGO/2020 +- Support for LUT textures of 256x8 size +- [Fix] Fixed DoF material memory leak + +Version 1.2 24/JUL/2020 +- Added bloom color tint option under "Customize Bloom" section +- [Fix] Inspector fixes + +Version 1.1 28/MAY/2020 +- Added "Downscaling" option to Optimizations section + +Version 1.0.2 19/MAY/2020 +- Added Depth of Field "Distance Shift" parameter + +Version 1.0.1 1/MAY/2020 +- [Fix] Fixed max clamp values for some sharpen parameters + +Version 1.0 April/2020 +- Tested on Windows, Mac, Android. +- Added VR Single Pass Stereo support (tested with Oculus Quest) +- Added Beautify and Unity Post Processing build optimization options +- Added Best Performance Mode +- Added Final Blur effect +- Added White Balance color grading option +- Added Night Vision effect +- Added "Direct Write To Camera" option in Performance section + + diff --git a/Imports/Beautify/URP/README.txt.meta b/Imports/Beautify/URP/README.txt.meta new file mode 100644 index 00000000..1c17ac5c --- /dev/null +++ b/Imports/Beautify/URP/README.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3c034cc80ca524a40b59335501a9adfe +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime.meta b/Imports/Beautify/URP/Runtime.meta new file mode 100644 index 00000000..36114a8d --- /dev/null +++ b/Imports/Beautify/URP/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 820c4942f0a864f0081f41ee03106463 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Beautify.cs b/Imports/Beautify/URP/Runtime/Beautify.cs new file mode 100644 index 00000000..38cdda73 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Beautify.cs @@ -0,0 +1,1246 @@ +using System; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace Beautify.Universal { + + [ExecuteInEditMode, VolumeComponentMenu("Kronnect/Beautify")] + public class Beautify : VolumeComponent, IPostProcessComponent { + + [AttributeUsage(AttributeTargets.Field)] + public class SectionGroup : Attribute { + } + + [AttributeUsage(AttributeTargets.Field)] + public class SettingsGroup : Attribute { + + bool? expanded; + + public bool IsExpanded { + get { +#if UNITY_EDITOR + if (!expanded.HasValue) { + expanded = UnityEditor.EditorPrefs.GetBool("BeautifyURP" + GetType().ToString(), false); + } + return expanded.Value; +#else + return false; +#endif + } + set { +#if UNITY_EDITOR + if (expanded.Value != value) { + expanded = value; + UnityEditor.EditorPrefs.SetBool("BeautifyURP" + GetType().ToString(), value); + } +#endif + } + } + + } + + public class GeneralSettings : SectionGroup { } + public class ImageEnhancement : SectionGroup { } + public class TonemappingAndColorGrading : SectionGroup { } + public class LensAndLightingEffects : SectionGroup { } + public class ArtisticChoices : SectionGroup { } + + public class OptimizeBeautifyBuild : SettingsGroup { } + public class OptimizeUnityPostProcessingBuild : SettingsGroup { } + public class Performance : SettingsGroup { } + public class Dither : SettingsGroup { } + public class Sharpen : SettingsGroup { } + public class EdgeAntialiasing : SettingsGroup { } + public class TonemapSettings : SettingsGroup { } + public class WhiteBalance : SettingsGroup { } + public class LUT : SettingsGroup { } + public class Bloom : SettingsGroup { } + public class AnamorphicFlares : SettingsGroup { } + public class SunFlares : SettingsGroup { } + public class LensDirt : SettingsGroup { } + public class ChromaticAberration : SettingsGroup { } + public class DepthOfField : SettingsGroup { } + public class EyeAdaptation : SettingsGroup { } + public class PurkinjeShift : SettingsGroup { } + + public class Vignette : SettingsGroup { } + public class Outline : SettingsGroup { } + public class NightVision : SettingsGroup { } + public class ThermalVision : SettingsGroup { } + public class FilmGrainAndArtifacts : SettingsGroup { } + public class CreativeBlur : SettingsGroup { } + public class Frame : SettingsGroup { } + + + [AttributeUsage(AttributeTargets.Field)] + public class DisplayName : Attribute { + public string name; + + public DisplayName(string name) { + this.name = name; + } + } + + [AttributeUsage(AttributeTargets.Field)] + public class DisplayConditionEnum : Attribute { + public string field; + public int enumValueIndex; + public bool isEqual; + + public DisplayConditionEnum(string field, int enumValueIndex, bool isEqual = true) { + this.field = field; + this.enumValueIndex = enumValueIndex; + this.isEqual = isEqual; + } + } + + + [AttributeUsage(AttributeTargets.Field)] + public class DisplayConditionBool : Attribute { + public string field; + public bool value; + public string field2; + public bool value2; + + public DisplayConditionBool(string field, bool value = true, string field2 = null, bool value2 = true) { + this.field = field; + this.value = value; + this.field2 = field2; + this.value2 = value2; + } + } + + + [AttributeUsage(AttributeTargets.Field)] + public class ToggleAllFields : Attribute { + } + + + [AttributeUsage(AttributeTargets.Field)] + public class GlobalOverride : Attribute { + } + + [AttributeUsage(AttributeTargets.Field)] + public class ShowStrippedLabel : Attribute { + } + + public enum CompareStyle { + FreeAngle, + VerticalLine, + SameSide + } + + public enum TonemapOperator { + Linear = 0, + ACESFitted = 1, + ACES = 2, + AGX = 3 + } + + public enum DoFFocusMode { + FixedDistance, + AutoFocus, + FollowTarget, + FollowPosition + } + + public enum DoFTargetFallback { + KeepCurrentFocalDistance, + SwitchToAutofocus, + FixedDistanceFocus, + DisableEffect + } + + public enum DoFBokehComposition { + Integrated, + Separated + } + + public enum DoFCameraSettings { + Classic, + Real + } + + public enum VignetteFitMode { + FitToWidth, + FitToHeight + } + + public enum DebugOutput { + Nothing, + BloomAndFlares = 10, + BloomExclusionPass = 11, + AnamorphicFlaresExclusionPass = 12, + DepthOfFieldCoC = 20, + DepthOfFieldTransparentPass = 21 + } + + public enum BlinkStyle { + Cutscene, + Human + } + + public enum OutlineStage { + BeforeBloom = 0, + AfterBloom = 10, + BeforeTransparents = 20 + } + + public enum OutlineTechnique { + Depth = 0, + PerObjectId = 1 + } + + public enum DownsamplingMode { + BeautifyEffectsOnly = 0, + FullFrame = 10 + } + + public enum SunFlaresDepthOcclusionMode { + None, + Simple, + Smooth + } + + public enum BloomLayersFilterMethod { + SelectedLayersOnly, + ExcludeSelectedLayers + } + + public enum EyeAdaptationMeteringMode { + FullFrame, + Mask + } + + public enum CreativeBlurStyle { + ScreenBlur = 0, + TiltShift = 1, + RadialBlur = 2 + } + + [Serializable] + public sealed class BeautifyCompareStyleParameter : VolumeParameter { } + + [Serializable] + public sealed class BeautifyDownsamplingModeParameter : VolumeParameter { } + + [Serializable] + public sealed class BeautifyTonemapOperatorParameter : VolumeParameter { } + + [Serializable] + public sealed class BeautifyDoFFocusModeParameter : VolumeParameter { } + + [Serializable] + public sealed class DoFTargetFallbackParameter : VolumeParameter { } + + [Serializable] + public sealed class BeautifyDoFFilterModeParameter : VolumeParameter { } + + [Serializable] + public sealed class BeautifyDoFBokehCompositionParameter : VolumeParameter { } + + [Serializable] + public sealed class BeautifyDoFCameraSettingsParameter : VolumeParameter { } + + [Serializable] + public sealed class BeautifyLayerMaskParameter : VolumeParameter { } + + [Serializable] + public sealed class BeautifyDebugOutputParameter : VolumeParameter { + public BeautifyDebugOutputParameter(DebugOutput debugOutput = DebugOutput.Nothing, bool overrideState = false) : base(debugOutput, overrideState) { } + } + + [Serializable] + public sealed class BeautifyBlinkStyleParameter : VolumeParameter { } + + [Serializable] + public sealed class BeautifyVignetteFitModeParameter : VolumeParameter { } + + [Serializable] + public sealed class BeautifySunFlaresDepthOcclusionModeParameter : VolumeParameter { } + + [Serializable] + public sealed class BeautifyEyeAdaptationMeteringModeParameter : VolumeParameter { } + + [Serializable] + public sealed class MinMaxFloatParameter : VolumeParameter { + public float min; + public float max; + + public MinMaxFloatParameter(Vector2 value, float min, float max, bool overrideState = false) + : base(value, overrideState) { + this.min = min; + this.max = max; + } + } + + + [Serializable] + public sealed class BeautifyBloomLayersFilterMethodParameter : VolumeParameter { } + + [Serializable] + public sealed class BeautifyCreativeBlurStyleParameter : VolumeParameter { } + + + #region General settings + + [GeneralSettings, DisplayName("Disable Beautify Effects"), GlobalOverride, Tooltip("Ignore all Beautify effects. This option overrides any existing profile.")] + public BoolParameter disabled = new BoolParameter(false, overrideState: true); + + [GeneralSettings, DisplayName("Enable Compare Mode"), ToggleAllFields, GlobalOverride] + public BoolParameter compareMode = new BoolParameter(false, overrideState: true); + + [GeneralSettings, DisplayName("Style"), DisplayConditionBool("compareMode")] + public BeautifyCompareStyleParameter compareStyle = new BeautifyCompareStyleParameter(); + + [GeneralSettings, DisplayName("Panning"), DisplayConditionEnum("compareStyle", (int)CompareStyle.FreeAngle, false)] + public ClampedFloatParameter comparePanning = new ClampedFloatParameter(0.25f, 0, 0.5f); + + [GeneralSettings, DisplayName("Angle"), DisplayConditionEnum("compareStyle", (int)CompareStyle.FreeAngle, true)] + public FloatParameter compareLineAngle = new ClampedFloatParameter(1.4f, -Mathf.PI, Mathf.PI); + + [GeneralSettings, DisplayName("Line Width"), DisplayConditionBool("compareMode")] + public FloatParameter compareLineWidth = new ClampedFloatParameter(0.002f, 0.0001f, 0.05f); + + [GeneralSettings, DisplayName("Flip Vertically"), GlobalOverride, Tooltip("Inverts vertical orientation of image when blitting. This option can be used to overcome an issue in certain versions of URP.")] + public BoolParameter flipY = new BoolParameter(false, overrideState: true); + + [GeneralSettings, DisplayName("Hide In SceneView"), GlobalOverride] + public BoolParameter hideInSceneView = new BoolParameter(false, overrideState: true); + + [GeneralSettings, DisplayName("Debug Output"), GlobalOverride, DisplayConditionBool("compareMode", false)] + public BeautifyDebugOutputParameter debugOutput = new BeautifyDebugOutputParameter(); + + [GeneralSettings, Performance, DisplayName("Prioritize Shader Performance"), GlobalOverride, Tooltip("Sharpen, bloom and anamorphic flares will reduce quality a bit to improve performance. This option can be useful on less powerful platforms or devices.")] + public BoolParameter turboMode = new BoolParameter(false, overrideState: true); + + [GeneralSettings, Performance, DisplayName("Direct Write To Camera"), GlobalOverride, Tooltip("Writes result directly to camera target saving intermediate blits. This option will overwrite any previous post-processing effects so make sure there's no other effects being executed besides Beautify.")] + public BoolParameter directWrite = new BoolParameter(false, overrideState: true); + + [GeneralSettings, Performance, DisplayName("Ignore Depth Texture"), GlobalOverride, Tooltip("Doesn't request depth texture - effects or options that rely on depth will be disabled.")] + public BoolParameter ignoreDepthTexture = new BoolParameter(false, overrideState: true); + + [GeneralSettings, Performance, DisplayName("Downsampling"), GlobalOverride, Tooltip("Reduces camera target before applying Beautify effects This option can contribute to compensate render scale if it's set to greater than 1 or to improve performance.")] + public BoolParameter downsampling = new BoolParameter(false, overrideState: true); + + [GeneralSettings, Performance, DisplayName("Mode"), GlobalOverride, Tooltip("How downsampling is applied."), DisplayConditionBool("downsampling")] + public BeautifyDownsamplingModeParameter downsamplingMode = new BeautifyDownsamplingModeParameter { value = DownsamplingMode.BeautifyEffectsOnly }; + + [GeneralSettings, Performance, DisplayName("Multiplier"), GlobalOverride, Tooltip("Downsampling multiplier."), DisplayConditionBool("downsampling")] + public ClampedFloatParameter downsamplingMultiplier = new ClampedFloatParameter(1, 1, 64f); + + [GeneralSettings, Performance, DisplayName("Bilinear Filtering"), GlobalOverride, Tooltip("Enables bilinear filtering when using downsampling."), DisplayConditionBool("downsampling")] + public BoolParameter downsamplingBilinear = new BoolParameter(false); + + #endregion + + #region Sharpen settings + + [ImageEnhancement, Sharpen, DisplayName("Intensity"), ShowStrippedLabel] + public ClampedFloatParameter sharpenIntensity = new ClampedFloatParameter(0f, 0f, 25f); + + [ImageEnhancement, Sharpen, DisplayName("Depth Threshold"), DisplayConditionBool("turboMode", false, "ignoreDepthTexture", false), Tooltip("By default, sharpen ignores edges to avoid aliasing. Increase this property to also include edges. Edge detection is based on scene depth.")] + public ClampedFloatParameter sharpenDepthThreshold = new ClampedFloatParameter(0.035f, 0f, 0.05f); + + [ImageEnhancement, Sharpen, DisplayName("Depth Range"), DisplayConditionBool("turboMode", false, "ignoreDepthTexture", false), Tooltip("Restricts sharpen to a scene depth range.")] + public MinMaxFloatParameter sharpenMinMaxDepth = new MinMaxFloatParameter(new Vector2(0, 0.999f), 0, 1.1f); + + [ImageEnhancement, Sharpen, DisplayName("Depth Range FallOff"), DisplayConditionBool("turboMode", false, "ignoreDepthTexture", false)] + public ClampedFloatParameter sharpenMinMaxDepthFallOff = new ClampedFloatParameter(0f, 0f, 1f); + + [ImageEnhancement, Sharpen, DisplayName("Relaxation"), Tooltip("Reduces sharpen intensity based on area brightness.")] + public ClampedFloatParameter sharpenRelaxation = new ClampedFloatParameter(0.08f, 0, 0.2f); + + [ImageEnhancement, Sharpen, DisplayName("Clamp"), Tooltip("Reduces final sharpen modifier.")] + public ClampedFloatParameter sharpenClamp = new ClampedFloatParameter(0.45f, 0, 1f); + + [ImageEnhancement, Sharpen, DisplayName("Motion Sensibility"), Tooltip("Reduces sharpen gracefully when camera moves or rotates. This setting reduces flickering while contributes to a motion blur sense.")] + public ClampedFloatParameter sharpenMotionSensibility = new ClampedFloatParameter(0.5f, 0, 1f); + + [ImageEnhancement, Sharpen, DisplayName("Motion Restore Speed"), Tooltip("The speed at which the sharpen intensity restores when camera stops moving.")] + public ClampedFloatParameter sharpenMotionRestoreSpeed = new ClampedFloatParameter(0.5f, 0.01f, 5f); + + [ImageEnhancement, Sharpen, DisplayName("Exclusion Layers"), Tooltip("Layers to exclude from sharpening."), ShowStrippedLabel] + public BeautifyLayerMaskParameter sharpenExclusionLayerMask = new BeautifyLayerMaskParameter { value = 0 }; + + #endregion + + #region Edge AA + + [ImageEnhancement, EdgeAntialiasing, DisplayName("Strength"), DisplayConditionBool("ignoreDepthTexture", false), Tooltip("Strength of the integrated edge antialiasing. A value of 0 disables this feature."), ShowStrippedLabel] + public ClampedFloatParameter antialiasStrength = new ClampedFloatParameter(0, 0, 20); + + [ImageEnhancement, EdgeAntialiasing, DisplayName("Depth Threshold"), Tooltip("Minimum difference in depth between neighbour pixels to determine if edge antialiasing should be applied.")] + public ClampedFloatParameter antialiasDepthThreshold = new ClampedFloatParameter(0.000001f, 0, 0.001f); + + [ImageEnhancement, EdgeAntialiasing, DisplayName("Max Spread"), Tooltip("The maximum extent of antialiasing.")] + public ClampedFloatParameter antialiasSpread = new ClampedFloatParameter(3f, 0.1f, 8f); + + [ImageEnhancement, EdgeAntialiasing, DisplayName("Depth Attenuation"), Tooltip("Reduces antialias effect on the distance.")] + public FloatParameter antialiasDepthAttenuation = new FloatParameter(0); + + #endregion + + #region Tonemapping and Color Grading + + [TonemappingAndColorGrading, ShowStrippedLabel] + public BeautifyTonemapOperatorParameter tonemap = new BeautifyTonemapOperatorParameter { value = TonemapOperator.Linear }; + + [TonemappingAndColorGrading, DisplayName("Gamma"), Tooltip("Gamma applied to the AGX tonemapper."), DisplayConditionEnum("tonemap", (int)TonemapOperator.AGX, true)] + public FloatParameter tonemapAGXGamma = new ClampedFloatParameter(2.5f, 0, 5f); + + [TonemappingAndColorGrading, Min(0), DisplayName("Max Input Brightness"), Tooltip("Clamps input image brightness to avoid artifacts due to NaN or out of range pixel values."), DisplayConditionEnum("tonemap", (int)TonemapOperator.Linear, false)] + public FloatParameter tonemapMaxInputBrightness = new FloatParameter(1000f); + + [TonemappingAndColorGrading, Min(0), DisplayName("Pre Exposure"), Tooltip("Brightness multiplier before applying tonemap operator."), DisplayConditionEnum("tonemap", (int)TonemapOperator.Linear, false)] + public FloatParameter tonemapExposurePre = new FloatParameter(1f); + + [TonemappingAndColorGrading, Min(0), DisplayName("Post Brightness"), Tooltip("Brightness multiplier after applying tonemap operator."), DisplayConditionEnum("tonemap", (int)TonemapOperator.Linear, false)] + public FloatParameter tonemapBrightnessPost = new FloatParameter(1f); + + [TonemappingAndColorGrading] + public ClampedFloatParameter saturate = new ClampedFloatParameter(0f, -2f, 3f); + + [TonemappingAndColorGrading] + public ClampedFloatParameter brightness = new ClampedFloatParameter(1.0f, 0f, 2f); + + [TonemappingAndColorGrading] + public ClampedFloatParameter contrast = new ClampedFloatParameter(1.0f, 0.5f, 1.5f); + + [TonemappingAndColorGrading, ShowStrippedLabel] + public ClampedFloatParameter daltonize = new ClampedFloatParameter(0f, 0f, 2f); + + [TonemappingAndColorGrading, ShowStrippedLabel] + public ClampedFloatParameter sepia = new ClampedFloatParameter(0f, 0f, 1f); + + [TonemappingAndColorGrading] + public ColorParameter tintColor = new ColorParameter(new Color(1, 1, 1, 0)); + + [TonemappingAndColorGrading, WhiteBalance, DisplayName("Blend"), ShowStrippedLabel] + public ClampedFloatParameter colorTempBlend = new ClampedFloatParameter(0f, 0f, 1f); + + [TonemappingAndColorGrading, WhiteBalance, DisplayName("Temperature")] + public ClampedFloatParameter colorTemp = new ClampedFloatParameter(6550f, 1000f, 40000f); + + #endregion + + #region LUT + + [TonemappingAndColorGrading, LUT, DisplayName("Enable LUT"), ToggleAllFields, ShowStrippedLabel] + public BoolParameter lut = new BoolParameter(false); + + [TonemappingAndColorGrading, LUT, DisplayName("Intensity")] + public ClampedFloatParameter lutIntensity = new ClampedFloatParameter(0f, 0, 1f); + + [TonemappingAndColorGrading, LUT, DisplayName("LUT Texture")] + public TextureParameter lutTexture = new TextureParameter(null); + + #endregion + + #region Bloom + + [LensAndLightingEffects, Bloom, DisplayName("Intensity"), ShowStrippedLabel] + public FloatParameter bloomIntensity = new FloatParameter(0); + + [LensAndLightingEffects, Bloom, DisplayName("Threshold")] + public FloatParameter bloomThreshold = new FloatParameter(0.75f); + + [LensAndLightingEffects, Bloom, DisplayName("Conservative Threshold"), Tooltip("A convervative threshold keeps the ratio of the rgb values after applying the thresholding")] + public BoolParameter bloomConservativeThreshold = new BoolParameter(false); + + [LensAndLightingEffects, Bloom, DisplayName("Spread")] + public ClampedFloatParameter bloomSpread = new ClampedFloatParameter(0.5f, 0, 1); + + [LensAndLightingEffects, Bloom, DisplayName("Max Brightness")] + public FloatParameter bloomMaxBrightness = new FloatParameter(1000f); + + [LensAndLightingEffects, Bloom, DisplayName("Tint Color"), Tooltip("Use Alpha channel to blend original bloom color with the tinted color.")] + public ColorParameter bloomTint = new ColorParameter(new Color(0.5f, 0.5f, 1f, 0f)); + + [LensAndLightingEffects, Bloom, DisplayName("Depth Attenuation"), DisplayConditionBool("ignoreDepthTexture", false)] + public FloatParameter bloomDepthAtten = new FloatParameter(0f); + + [LensAndLightingEffects, Bloom, DisplayName("Near Attenuation"), DisplayConditionBool("ignoreDepthTexture", false), Min(0)] + public FloatParameter bloomNearAtten = new FloatParameter(0f); + + [LensAndLightingEffects, Bloom, DisplayName("Use Layers"), DisplayConditionBool("ignoreDepthTexture", false)] + public BoolParameter bloomExcludeLayers = new BoolParameter(false); + + [LensAndLightingEffects, Bloom, DisplayName("Include/Exclude Layers"), DisplayConditionBool("bloomExcludeLayers", true, "ignoreDepthTexture", false), Tooltip("Choose if bloom should be applied only to specified layers or if bloom should be excluded from the specified layers.")] + public BeautifyBloomLayersFilterMethodParameter bloomLayersFilterMethod = new BeautifyBloomLayersFilterMethodParameter { value = BloomLayersFilterMethod.ExcludeSelectedLayers }; + + [LensAndLightingEffects, Bloom, DisplayName("Layers"), DisplayConditionBool("bloomExcludeLayers", true, "ignoreDepthTexture", false)] + public BeautifyLayerMaskParameter bloomExclusionLayerMask = new BeautifyLayerMaskParameter { value = 0 }; + + [LensAndLightingEffects, Bloom, DisplayName("Antiflicker")] + public BoolParameter bloomAntiflicker = new BoolParameter(false); + + [LensAndLightingEffects, Bloom, DisplayName("Resolution")] + public ClampedIntParameter bloomResolution = new ClampedIntParameter(1, 1, 10); + + [LensAndLightingEffects, Bloom, DisplayName("Quicker Blur")] + public BoolParameter bloomQuickerBlur = new BoolParameter(false); + + [LensAndLightingEffects, Bloom, DisplayName("Customize"), ToggleAllFields] + public BoolParameter bloomCustomize = new BoolParameter(false); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 1 Weight")] + public ClampedFloatParameter bloomWeight0 = new ClampedFloatParameter(0.5f, 0, 1f); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 1 Boost")] + public ClampedFloatParameter bloomBoost0 = new ClampedFloatParameter(0f, 0, 3f); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 1 Tint Color")] + [ColorUsage(false, true)] + public ColorParameter bloomTint0 = new ColorParameter(Color.white); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 2 Weight")] + public ClampedFloatParameter bloomWeight1 = new ClampedFloatParameter(0.5f, 0, 1f); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 2 Boost")] + public ClampedFloatParameter bloomBoost1 = new ClampedFloatParameter(0f, 0, 3f); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 2 Tint Color")] + [ColorUsage(false, true)] + public ColorParameter bloomTint1 = new ColorParameter(Color.white); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 3 Weight")] + public ClampedFloatParameter bloomWeight2 = new ClampedFloatParameter(0.5f, 0, 1f); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 3 Boost")] + public ClampedFloatParameter bloomBoost2 = new ClampedFloatParameter(0f, 0, 3f); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 3 Tint Color")] + [ColorUsage(false, true)] + public ColorParameter bloomTint2 = new ColorParameter(Color.white); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 4 Weight")] + public ClampedFloatParameter bloomWeight3 = new ClampedFloatParameter(0.5f, 0, 1f); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 4 Boost")] + public ClampedFloatParameter bloomBoost3 = new ClampedFloatParameter(0f, 0, 3f); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 4 Tint Color")] + [ColorUsage(false, true)] + public ColorParameter bloomTint3 = new ColorParameter(Color.white); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 5 Weight")] + public ClampedFloatParameter bloomWeight4 = new ClampedFloatParameter(0.5f, 0, 1f); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 5 Boost")] + public ClampedFloatParameter bloomBoost4 = new ClampedFloatParameter(0f, 0, 3f); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 5 Tint Color")] + [ColorUsage(false, true)] + public ColorParameter bloomTint4 = new ColorParameter(Color.white); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 6 Weight")] + public ClampedFloatParameter bloomWeight5 = new ClampedFloatParameter(0.5f, 0, 1f); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 6 Boost")] + public ClampedFloatParameter bloomBoost5 = new ClampedFloatParameter(0f, 0, 3f); + + [LensAndLightingEffects, Bloom, DisplayName("Layer 6 Tint Color")] + [ColorUsage(false, true)] + public ColorParameter bloomTint5 = new ColorParameter(Color.white); + + + #endregion + + #region Anamorphic flares + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Intensity"), ShowStrippedLabel] + public FloatParameter anamorphicFlaresIntensity = new FloatParameter(0f); + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Threshold")] + public FloatParameter anamorphicFlaresThreshold = new FloatParameter(0.75f); + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Conservative Threshold"), Tooltip("A convervative threshold keeps the ratio of the rgb values after applying the thresholding")] + public BoolParameter anamorphicFlaresConservativeThreshold = new BoolParameter(false); + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Tint Color"), Tooltip("Ignore all Beautify effects. This option overrides any existing profile.")] + public ColorParameter anamorphicFlaresTint = new ColorParameter(new Color(0.5f, 0.5f, 1f, 0f)); + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Vertical")] + public BoolParameter anamorphicFlaresVertical = new BoolParameter(false); + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Spread")] + public ClampedFloatParameter anamorphicFlaresSpread = new ClampedFloatParameter(1f, 0.1f, 2f); + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Max Brightness")] + public FloatParameter anamorphicFlaresMaxBrightness = new FloatParameter(1000f); + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Depth Attenuation"), DisplayConditionBool("ignoreDepthTexture", false)] + public FloatParameter anamorphicFlaresDepthAtten = new FloatParameter(0f); + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Near Attenuation"), DisplayConditionBool("ignoreDepthTexture", false), Min(0)] + public FloatParameter anamorphicFlaresNearAtten = new FloatParameter(0f); + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Use Layers"), DisplayConditionBool("ignoreDepthTexture", false)] + public BoolParameter anamorphicFlaresExcludeLayers = new BoolParameter(false); + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Include/Exclude Layers"), DisplayConditionBool("anamorphicFlaresExcludeLayers", true, "ignoreDepthTexture", false), Tooltip("Choose if the effect should be applied only on the specified layers or if it should be excluded instead.")] + public BeautifyBloomLayersFilterMethodParameter anamorphicFlaresLayersFilterMethod = new BeautifyBloomLayersFilterMethodParameter { value = BloomLayersFilterMethod.ExcludeSelectedLayers }; + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Layers"), DisplayConditionBool("anamorphicFlaresExcludeLayers", true, "ignoreDepthTexture", false)] + public BeautifyLayerMaskParameter anamorphicFlaresExclusionLayerMask = new BeautifyLayerMaskParameter { value = 0 }; + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Antiflicker")] + public BoolParameter anamorphicFlaresAntiflicker = new BoolParameter(false); + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Resolution")] + public ClampedIntParameter anamorphicFlaresResolution = new ClampedIntParameter(1, 1, 10); + + [LensAndLightingEffects, AnamorphicFlares, DisplayName("Quicker Blur")] + public BoolParameter anamorphicFlaresQuickerBlur = new BoolParameter(false); + + #endregion + + #region Sun Flares + + [LensAndLightingEffects, SunFlares, DisplayName("Global Intensity"), ShowStrippedLabel] + public ClampedFloatParameter sunFlaresIntensity = new ClampedFloatParameter(0.0f, 0, 1f); + + [LensAndLightingEffects, SunFlares, DisplayName("Tint Color")] + public ColorParameter sunFlaresTint = new ColorParameter(new Color(1, 1, 1)); + + [LensAndLightingEffects, SunFlares, DisplayName("Solar Wind Speed")] + public ClampedFloatParameter sunFlaresSolarWindSpeed = new ClampedFloatParameter(0.01f, 0, 1f); + + [LensAndLightingEffects, SunFlares, DisplayName("Rotation Dead Zone")] + public BoolParameter sunFlaresRotationDeadZone = new BoolParameter(false); + + [LensAndLightingEffects, SunFlares, DisplayName("Downsampling")] + public ClampedIntParameter sunFlaresDownsampling = new ClampedIntParameter(1, 1, 5); + + [LensAndLightingEffects, SunFlares, DisplayName("Depth Occlusion Mode"), DisplayConditionBool("ignoreDepthTexture", false), Tooltip("None = no depth buffer checking. Simple = sample depth buffer at Sun position. Smooth = sample 4 positions around Sun position and interpolate value across frames.")] + public BeautifySunFlaresDepthOcclusionModeParameter sunFlaresDepthOcclusionMode = new BeautifySunFlaresDepthOcclusionModeParameter { value = SunFlaresDepthOcclusionMode.Simple }; + + [LensAndLightingEffects, SunFlares, DisplayName("Occlusion Threshold"), DisplayConditionEnum("sunFlaresDepthOcclusionMode", (int)SunFlaresDepthOcclusionMode.Smooth)] + public ClampedFloatParameter sunFlaresDepthOcclusionThreshold = new ClampedFloatParameter(0.5f, 0, 1f); + + [LensAndLightingEffects, SunFlares, DisplayName("Use Layer Mask"), Tooltip("Specifies if occluding objects will be detected by raycasting.")] + public BoolParameter sunFlaresUseLayerMask = new BoolParameter(false); + + [LensAndLightingEffects, SunFlares, DisplayName("Occluding Layer Mask"), DisplayConditionBool("sunFlaresUseLayerMask")] + public BeautifyLayerMaskParameter sunFlaresLayerMask = new BeautifyLayerMaskParameter { value = -1 }; + + [LensAndLightingEffects, SunFlares, DisplayName("Occlusion Speed"), DisplayConditionBool("sunFlaresUseLayerMask"), DisplayConditionEnum("sunFlaresDepthOcclusionMode", (int)SunFlaresDepthOcclusionMode.Smooth)] + public FloatParameter sunFlaresAttenSpeed = new FloatParameter(30f); + + [Header("Sun"), LensAndLightingEffects, SunFlares, DisplayName("Intensity")] + public ClampedFloatParameter sunFlaresSunIntensity = new ClampedFloatParameter(0.1f, 0, 1f); + + [LensAndLightingEffects, SunFlares, DisplayName("Disk Size")] + public ClampedFloatParameter sunFlaresSunDiskSize = new ClampedFloatParameter(0.05f, 0, 1f); + + [LensAndLightingEffects, SunFlares, DisplayName("Diffraction Intensity")] + public ClampedFloatParameter sunFlaresSunRayDiffractionIntensity = new ClampedFloatParameter(3.5f, 0, 25f); + + [LensAndLightingEffects, SunFlares, DisplayName("Diffraction Threshold")] + public ClampedFloatParameter sunFlaresSunRayDiffractionThreshold = new ClampedFloatParameter(0.13f, 0, 1f); + + [Header("Corona Rays Group 1"), LensAndLightingEffects, SunFlares, DisplayName("Length")] + public ClampedFloatParameter sunFlaresCoronaRays1Length = new ClampedFloatParameter(0.02f, 0, 0.2f); + + [LensAndLightingEffects, SunFlares, DisplayName("Streaks")] + public ClampedIntParameter sunFlaresCoronaRays1Streaks = new ClampedIntParameter(12, 2, 30); + + [LensAndLightingEffects, SunFlares, DisplayName("Spread")] + public ClampedFloatParameter sunFlaresCoronaRays1Spread = new ClampedFloatParameter(0.001f, 0, 0.1f); + + [LensAndLightingEffects, SunFlares, DisplayName("Angle Offset")] + public ClampedFloatParameter sunFlaresCoronaRays1AngleOffset = new ClampedFloatParameter(0f, 0, 2f * Mathf.PI); + + [Header("Corona Rays Group 2"), LensAndLightingEffects, SunFlares, DisplayName("Length")] + public ClampedFloatParameter sunFlaresCoronaRays2Length = new ClampedFloatParameter(0.05f, 0, 0.2f); + + [LensAndLightingEffects, SunFlares, DisplayName("Streaks")] + public ClampedIntParameter sunFlaresCoronaRays2Streaks = new ClampedIntParameter(12, 2, 30); + + [LensAndLightingEffects, SunFlares, DisplayName("Spread")] + public ClampedFloatParameter sunFlaresCoronaRays2Spread = new ClampedFloatParameter(0.1f, 0, 0.1f); + + [LensAndLightingEffects, SunFlares, DisplayName("Angle Offset")] + public ClampedFloatParameter sunFlaresCoronaRays2AngleOffset = new ClampedFloatParameter(0f, 0, 2f * Mathf.PI); + + [Header("Ghost 1"), LensAndLightingEffects, SunFlares, DisplayName("Size")] + public ClampedFloatParameter sunFlaresGhosts1Size = new ClampedFloatParameter(0.03f, 0f, 1f); + + [LensAndLightingEffects, SunFlares, DisplayName("Offset")] + public ClampedFloatParameter sunFlaresGhosts1Offset = new ClampedFloatParameter(1.04f, -3f, 3f); + + [LensAndLightingEffects, SunFlares, DisplayName("Brightness")] + public ClampedFloatParameter sunFlaresGhosts1Brightness = new ClampedFloatParameter(0.037f, 0f, 1f); + + [Header("Ghost 2"), LensAndLightingEffects, SunFlares, DisplayName("Size")] + public ClampedFloatParameter sunFlaresGhosts2Size = new ClampedFloatParameter(0.1f, 0f, 1f); + + [LensAndLightingEffects, SunFlares, DisplayName("Offset")] + public ClampedFloatParameter sunFlaresGhosts2Offset = new ClampedFloatParameter(0.71f, -3f, 3f); + + [LensAndLightingEffects, SunFlares, DisplayName("Brightness")] + public ClampedFloatParameter sunFlaresGhosts2Brightness = new ClampedFloatParameter(0.03f, 0f, 1f); + + [Header("Ghost 3"), LensAndLightingEffects, SunFlares, DisplayName("Size")] + public ClampedFloatParameter sunFlaresGhosts3Size = new ClampedFloatParameter(0.24f, 0, 1f); + + [LensAndLightingEffects, SunFlares, DisplayName("Offset")] + public ClampedFloatParameter sunFlaresGhosts3Offset = new ClampedFloatParameter(0.31f, -3f, 3f); + + [LensAndLightingEffects, SunFlares, DisplayName("Brightness")] + public ClampedFloatParameter sunFlaresGhosts3Brightness = new ClampedFloatParameter(0.025f, 0f, 1f); + + [Header("Ghost 4"), LensAndLightingEffects, SunFlares, DisplayName("Size")] + public ClampedFloatParameter sunFlaresGhosts4Size = new ClampedFloatParameter(0.016f, 0f, 1f); + + [LensAndLightingEffects, SunFlares, DisplayName("Offset")] + public ClampedFloatParameter sunFlaresGhosts4Offset = new ClampedFloatParameter(0f, -3f, 3f); + + [LensAndLightingEffects, SunFlares, DisplayName("Brightness")] + public ClampedFloatParameter sunFlaresGhosts4Brightness = new ClampedFloatParameter(0.017f, 0, 1f); + + [Header("Halo"), LensAndLightingEffects, SunFlares, DisplayName("Offset")] + public ClampedFloatParameter sunFlaresHaloOffset = new ClampedFloatParameter(0.22f, 0, 1f); + + [LensAndLightingEffects, SunFlares, DisplayName("Amplitude")] + public ClampedFloatParameter sunFlaresHaloAmplitude = new ClampedFloatParameter(15.1415f, 0, 50f); + + [LensAndLightingEffects, SunFlares, DisplayName("Intensity")] + public ClampedFloatParameter sunFlaresHaloIntensity = new ClampedFloatParameter(0.01f, 0, 1f); + + #endregion + + #region Lens Dirt + + [LensAndLightingEffects, LensDirt, DisplayName("Intensity"), Min(0), ShowStrippedLabel] + public FloatParameter lensDirtIntensity = new FloatParameter(0f); + + [LensAndLightingEffects, LensDirt, DisplayName("Threshold")] + public ClampedFloatParameter lensDirtThreshold = new ClampedFloatParameter(0.5f, 0, 1f); + + [LensAndLightingEffects, LensDirt, DisplayName("Dirt Texture")] + public TextureParameter lensDirtTexture = new TextureParameter(null); + + [LensAndLightingEffects, LensDirt, DisplayName("Spread")] + public ClampedIntParameter lensDirtSpread = new ClampedIntParameter(3, 3, 5); + + #endregion + + #region Chromatic Aberration + + [LensAndLightingEffects, ChromaticAberration, DisplayName("Intensity"), Min(0), ShowStrippedLabel] + public FloatParameter chromaticAberrationIntensity = new ClampedFloatParameter(0f, 0f, 0.1f); + + [LensAndLightingEffects, ChromaticAberration, DisplayName("Hue Shift"), Min(0), DisplayConditionBool("turboMode", false)] + public ClampedFloatParameter chromaticAberrationShift = new ClampedFloatParameter(0, -1, 1); + + [LensAndLightingEffects, ChromaticAberration, DisplayName("Smoothing"), DisplayConditionBool("turboMode", false)] + public FloatParameter chromaticAberrationSmoothing = new ClampedFloatParameter(0f, 0f, 32f); + + [LensAndLightingEffects, ChromaticAberration, DisplayName("Separate Pass")] + public BoolParameter chromaticAberrationSeparatePass = new BoolParameter(false); + + #endregion + + #region Depth of Field + + [LensAndLightingEffects, DepthOfField, DisplayName("Enable"), ToggleAllFields, DisplayConditionBool("ignoreDepthTexture", false), ShowStrippedLabel] + public BoolParameter depthOfField = new BoolParameter(false); + + [Header("Focus")] + [LensAndLightingEffects, DepthOfField, DisplayName("Focus Mode")] + public BeautifyDoFFocusModeParameter depthOfFieldFocusMode = new BeautifyDoFFocusModeParameter { value = DoFFocusMode.FixedDistance }; + + [LensAndLightingEffects, DepthOfField, DisplayName("Min Distance"), DisplayConditionEnum("depthOfFieldFocusMode", (int)DoFFocusMode.FixedDistance, isEqual: false)] + public FloatParameter depthOfFieldAutofocusMinDistance = new FloatParameter(0); + + [LensAndLightingEffects, DepthOfField, DisplayName("Max Distance"), DisplayConditionEnum("depthOfFieldFocusMode", (int)DoFFocusMode.FixedDistance, isEqual: false)] + public FloatParameter depthOfFieldAutofocusMaxDistance = new FloatParameter(10000); + + [LensAndLightingEffects, DepthOfField, DisplayName("Fallback"), Tooltip("Focus behaviour if object is not visible on the screen"), DisplayConditionEnum("depthOfFieldFocusMode", (int)DoFFocusMode.FollowTarget)] + public DoFTargetFallbackParameter depthOfFieldTargetFallback = new DoFTargetFallbackParameter { value = DoFTargetFallback.KeepCurrentFocalDistance }; + + [LensAndLightingEffects, DepthOfField, DisplayName("Distance"), DisplayConditionEnum("depthOfFieldTargetFallback", (int)DoFTargetFallback.FixedDistanceFocus)] + public FloatParameter depthOfFieldTargetFallbackFixedDistance = new FloatParameter(1000f); + + [LensAndLightingEffects, DepthOfField, DisplayName("Fade Duration"), DisplayConditionEnum("depthOfFieldTargetFallback", (int)DoFTargetFallback.DisableEffect)] + [Tooltip("Duration in seconds to gracefully fade out/in the DoF effect when target is not visible")] + public ClampedFloatParameter depthOfFieldFallbackFadeDuration = new ClampedFloatParameter(0.5f, 0.01f, 3f); + + [LensAndLightingEffects, DepthOfField, DisplayName("Viewport Point"), DisplayConditionEnum("depthOfFieldFocusMode", (int)DoFFocusMode.AutoFocus)] + public Vector2Parameter depthOfFieldAutofocusViewportPoint = new Vector2Parameter(new Vector2(0.5f, 0.5f)); + + [LensAndLightingEffects, DepthOfField, DisplayName("Distance Shift"), DisplayConditionEnum("depthOfFieldFocusMode", (int)DoFFocusMode.AutoFocus), Tooltip("Custom distance adjustment (positive or negative)")] + public FloatParameter depthOfFieldAutofocusDistanceShift = new FloatParameter(0); + + [LensAndLightingEffects, DepthOfField, DisplayName("Layer Mask"), DisplayConditionEnum("depthOfFieldFocusMode", (int)DoFFocusMode.AutoFocus)] + public BeautifyLayerMaskParameter depthOfFieldAutofocusLayerMask = new BeautifyLayerMaskParameter { value = -1 }; + + [LensAndLightingEffects, DepthOfField, DisplayName("Focus Position"), DisplayConditionEnum("depthOfFieldFocusMode", (int)DoFFocusMode.FollowPosition)] + [Tooltip("World position to focus on")] + public Vector3Parameter depthOfFieldFocusPosition = new Vector3Parameter(Vector3.zero); + + [LensAndLightingEffects, DepthOfField, DisplayName("Fallback"), Tooltip("Focus behaviour if position is not visible on the screen"), DisplayConditionEnum("depthOfFieldFocusMode", (int)DoFFocusMode.FollowPosition)] + public DoFTargetFallbackParameter depthOfFieldPositionFallback = new DoFTargetFallbackParameter { value = DoFTargetFallback.KeepCurrentFocalDistance }; + + //public ClampedFloatParameter depthOfFieldTransparencySupportDownsampling = new ClampedFloatParameter(1f, 1f, 4f); + //public ClampedFloatParameter depthOfFieldExclusionBias = new ClampedFloatParameter(0.99f, 0.9f, 1f); + + [LensAndLightingEffects, DepthOfField, DisplayName("Distance"), DisplayConditionEnum("depthOfFieldFocusMode", (int)DoFFocusMode.FixedDistance), Min(0)] + public FloatParameter depthOfFieldDistance = new FloatParameter(10f); + + [LensAndLightingEffects, DepthOfField, DisplayName("Camera Lens Settings")] + public BeautifyDoFCameraSettingsParameter depthOfFieldCameraSettings = new BeautifyDoFCameraSettingsParameter { value = DoFCameraSettings.Classic }; + + [LensAndLightingEffects, DepthOfField, DisplayName("Focal Length"), DisplayConditionEnum("depthOfFieldCameraSettings", 0)] + public ClampedFloatParameter depthOfFieldFocalLength = new ClampedFloatParameter(0.050f, 0.005f, 0.5f); + + [LensAndLightingEffects, DepthOfField, DisplayName("Aperture"), Min(0), DisplayConditionEnum("depthOfFieldCameraSettings", 0)] + public FloatParameter depthOfFieldAperture = new FloatParameter(2.8f); + + [LensAndLightingEffects, DepthOfField, DisplayName("Focal Length"), DisplayConditionEnum("depthOfFieldCameraSettings", 1)] + [Tooltip("The distance between the lens center and the camera's sensor in mm.")] + public ClampedFloatParameter depthOfFieldFocalLengthReal = new ClampedFloatParameter(50, 1, 300); + + [LensAndLightingEffects, DepthOfField, DisplayName("F-Stop"), DisplayConditionEnum("depthOfFieldCameraSettings", 1)] + [Tooltip("The F-stop or F-number is the relation between the focal length and the diameter of the aperture")] + public ClampedFloatParameter depthOfFieldFStop = new ClampedFloatParameter(2, 0.3f, 32); + + [LensAndLightingEffects, DepthOfField, DisplayName("Image Sensor Height"), DisplayConditionEnum("depthOfFieldCameraSettings", 1)] + [Tooltip("Represents the height of the virtual image sensor. By default, it uses a 24mm image sensor of a classic full-frame camera")] + public ClampedFloatParameter depthOfFieldImageSensorHeight = new ClampedFloatParameter(24, 1, 48); + + [LensAndLightingEffects, DepthOfField, DisplayName("Use Physical Camera Properties"), DisplayConditionEnum("depthOfFieldCameraSettings", 1)] + [Tooltip("When enabled, uses the focal length, f-stop and image sensor size from the current physical camera settings")] + public BoolParameter depthOfFieldUsePhysicalCamera = new BoolParameter(false); + + [LensAndLightingEffects, DepthOfField, DisplayName("Focus Speed")] + public ClampedFloatParameter depthOfFieldFocusSpeed = new ClampedFloatParameter(1f, 0.001f, 5f); + + [Header("Extra Features")] + + [LensAndLightingEffects, DepthOfField, DisplayName("Transparency Support"), ShowStrippedLabel] + public BoolParameter depthOfFieldTransparentSupport = new BoolParameter(false); + + [LensAndLightingEffects, DepthOfField, DisplayName("Layer Mask"), DisplayConditionBool("depthOfFieldTransparentSupport")] + public BeautifyLayerMaskParameter depthOfFieldTransparentLayerMask = new BeautifyLayerMaskParameter { value = 1 }; + + [LensAndLightingEffects, DepthOfField, DisplayName("Double Sided"), DisplayConditionBool("depthOfFieldTransparentSupport")] + [Tooltip("When enabled, transparent geometry is rendered with cull off.")] + public BoolParameter depthOfFieldTransparentDoubleSided = new BoolParameter(false); + + [LensAndLightingEffects, DepthOfField, DisplayName("Transparency Alpha Test Support"), ShowStrippedLabel] + [Tooltip("When enabled, transparent materials using alpha clipping will be included in the transparent mask")] + public BoolParameter depthOfFieldAlphaTestSupport = new BoolParameter(false); + + [LensAndLightingEffects, DepthOfField, DisplayName("Layer Mask"), DisplayConditionBool("depthOfFieldAlphaTestSupport")] + public BeautifyLayerMaskParameter depthOfFieldAlphaTestLayerMask = new BeautifyLayerMaskParameter { value = 1 }; + + [LensAndLightingEffects, DepthOfField, DisplayName("Double Sided"), DisplayConditionBool("depthOfFieldAlphaTestSupport")] + [Tooltip("When enabled, transparent geometry is rendered with cull off.")] + public BoolParameter depthOfFieldAlphaTestDoubleSided = new BoolParameter(false); + + [LensAndLightingEffects, DepthOfField, DisplayName("Foreground Blur")] + public BoolParameter depthOfFieldForegroundBlur = new BoolParameter(true); + + [LensAndLightingEffects, DepthOfField, DisplayName("Blur HQ"), DisplayConditionBool("depthOfFieldForegroundBlur")] + public BoolParameter depthOfFieldForegroundBlurHQ = new BoolParameter(false); + + [LensAndLightingEffects, DepthOfField, DisplayName("Blur Spread"), DisplayConditionBool("depthOfFieldForegroundBlurHQ")] + public ClampedFloatParameter depthOfFieldForegroundBlurHQSpread = new ClampedFloatParameter(4, 0, 32); + + [LensAndLightingEffects, DepthOfField, DisplayName("Distance"), DisplayConditionBool("depthOfFieldForegroundBlur")] + [Tooltip("Optional offset in front of the focal plane. Foreground blur is based on each pixel's distance from the focal plane; this value reduces blur for objects within this distance in front of the plane. Set to 0 for no offset.")] + public FloatParameter depthOfFieldForegroundDistance = new FloatParameter(0.25f); + + [LensAndLightingEffects, DepthOfField, DisplayName("Bokeh Effect")] + public BoolParameter depthOfFieldBokeh = new BoolParameter(true); + + [LensAndLightingEffects, DepthOfField, DisplayName("Composition"), DisplayConditionBool("depthOfFieldBokeh")] + [Tooltip("Specifies if the pass to compute bokeh is integrated (faster) or separated (stronger)")] + public BeautifyDoFBokehCompositionParameter depthOfFieldBokehComposition = new BeautifyDoFBokehCompositionParameter { value = DoFBokehComposition.Integrated }; + + [LensAndLightingEffects, DepthOfField, DisplayName("Threshold"), DisplayConditionBool("depthOfFieldBokeh")] + public ClampedFloatParameter depthOfFieldBokehThreshold = new ClampedFloatParameter(1f, 0f, 3f); + + [LensAndLightingEffects, DepthOfField, DisplayName("Intensity"), DisplayConditionBool("depthOfFieldBokeh")] + public ClampedFloatParameter depthOfFieldBokehIntensity = new ClampedFloatParameter(2f, 0, 8f); + + [LensAndLightingEffects, DepthOfField, DisplayName("Affects Bloom"), Tooltip("When enabled, bloom and anamorphic flares will be computed after depth of field is applied")] + public BoolParameter depthOfFieldAffectsBloom = new BoolParameter(false); + + + [Header("Quality")] + + [LensAndLightingEffects, DepthOfField, DisplayName("Downsampling")] + public ClampedIntParameter depthOfFieldDownsampling = new ClampedIntParameter(2, 1, 5); + + [LensAndLightingEffects, DepthOfField, DisplayName("Sample Count")] + public ClampedIntParameter depthOfFieldMaxSamples = new ClampedIntParameter(6, 2, 16); + + [LensAndLightingEffects, DepthOfField, DisplayName("Max Brightness")] + public FloatParameter depthOfFieldMaxBrightness = new FloatParameter(1000f); + + [LensAndLightingEffects, DepthOfField, DisplayName("Max Blur Radius")] + public FloatParameter depthOfFieldMaxBlurRadius = new FloatParameter(1000f); + + [LensAndLightingEffects, DepthOfField, DisplayName("Resolution Invariant"), Tooltip("Adjusts circle of confusion radius based on screen resolution.")] + public BoolParameter depthOfFieldResolutionInvariant = new BoolParameter(false); + + [LensAndLightingEffects, DepthOfField, DisplayName("Max Depth")] + public ClampedFloatParameter depthOfFieldMaxDistance = new ClampedFloatParameter(1f, 0, 1f); + + [LensAndLightingEffects, DepthOfField, DisplayName("Filter Mode")] + public BeautifyDoFFilterModeParameter depthOfFieldFilterMode = new BeautifyDoFFilterModeParameter { value = FilterMode.Bilinear }; + + #endregion + + #region Eye Adaptation + + [LensAndLightingEffects, EyeAdaptation, DisplayName("Enable"), ToggleAllFields, ShowStrippedLabel] + public BoolParameter eyeAdaptation = new BoolParameter(false); + + [LensAndLightingEffects, EyeAdaptation, DisplayName("Min Exposure")] + public ClampedFloatParameter eyeAdaptationMinExposure = new ClampedFloatParameter(0.2f, 0, 1); + + [LensAndLightingEffects, EyeAdaptation, DisplayName("Max Exposure")] + public ClampedFloatParameter eyeAdaptationMaxExposure = new ClampedFloatParameter(5f, 1f, 100f); + + [LensAndLightingEffects, EyeAdaptation, DisplayName("Light Adapt Speed"), Min(0)] + public FloatParameter eyeAdaptationSpeedToLight = new FloatParameter(0.4f); + + [LensAndLightingEffects, EyeAdaptation, DisplayName("Dark Adapt Speed"), Min(0)] + public FloatParameter eyeAdaptationSpeedToDark = new FloatParameter(0.2f); + + [LensAndLightingEffects, EyeAdaptation, DisplayName("Metering Mode")] + public BeautifyEyeAdaptationMeteringModeParameter eyeAdaptationMeteringMode = new BeautifyEyeAdaptationMeteringModeParameter { value = EyeAdaptationMeteringMode.FullFrame }; + + [LensAndLightingEffects, EyeAdaptation, DisplayName("Mask (A)"), Tooltip("When assigned, eye adaptation will be applied only to the pixels within the mask (red channel)"), DisplayConditionEnum("eyeAdaptationMeteringMode", (int)EyeAdaptationMeteringMode.Mask)] + public TextureParameter eyeAdaptationMask = new TextureParameter(null); + + [LensAndLightingEffects, EyeAdaptation, DisplayName("Center Weight"), Tooltip("Controls the strength of center-weighted metering (if no mask is used). 0 = uniform, higher values bias metering toward the screen center."), DisplayConditionEnum("eyeAdaptationMeteringMode", (int)EyeAdaptationMeteringMode.FullFrame)] + public ClampedFloatParameter eyeAdaptationCenterWeight = new ClampedFloatParameter(1f, 0f, 8f); + + [LensAndLightingEffects, EyeAdaptation, DisplayName("Metering Min Distance"), Tooltip("Minimum object depth in meters to consider for eye adaptation")] + public FloatParameter eyeAdaptationMinCameraDistance = new FloatParameter(0f); + + [LensAndLightingEffects, EyeAdaptation, DisplayName("Middle Gray"), Tooltip("The 'neutral' brightness your auto‑exposure targets or roughly how bright an average surface should look. Lower values make scenes appear darker; higher values make them appear brighter.")] + public ClampedFloatParameter eyeAdaptationMiddleGray = new ClampedFloatParameter(0.18f, 0.001f, 0.5f); + + #endregion + + #region Purkinje effect + + [LensAndLightingEffects, PurkinjeShift, DisplayName("Enable"), ToggleAllFields, ShowStrippedLabel] + public BoolParameter purkinje = new BoolParameter(false); + + [LensAndLightingEffects, PurkinjeShift, DisplayName("Shift Amount")] + public ClampedFloatParameter purkinjeAmount = new ClampedFloatParameter(1f, 0f, 5f); + + [LensAndLightingEffects, PurkinjeShift, DisplayName("Threshold")] + public ClampedFloatParameter purkinjeLuminanceThreshold = new ClampedFloatParameter(0.15f, 0f, 1f); + + #endregion + + #region Vignetting + + [ArtisticChoices, Vignette, DisplayName("Outer Ring"), ShowStrippedLabel] + public ClampedFloatParameter vignettingOuterRing = new ClampedFloatParameter(0f, -2f, 1f); + + [ArtisticChoices, Vignette, DisplayName("Inner Ring")] + public ClampedFloatParameter vignettingInnerRing = new ClampedFloatParameter(0, 0, 1f); + + [ArtisticChoices, Vignette, DisplayName("Fade")] + public ClampedFloatParameter vignettingFade = new ClampedFloatParameter(0, 0, 1f); + + [ArtisticChoices, Vignette, DisplayName("Circular Shape")] + public BoolParameter vignettingCircularShape = new BoolParameter(false); + + [ArtisticChoices, Vignette, DisplayName("Fit Mode"), DisplayConditionBool("vignettingCircularShape")] + public BeautifyVignetteFitModeParameter vignettingCircularShapeFitMode = new BeautifyVignetteFitModeParameter { value = VignetteFitMode.FitToWidth }; + + [ArtisticChoices, Vignette, DisplayName("Aspect Ratio"), DisplayConditionBool("vignettingCircularShape", false)] + public ClampedFloatParameter vignettingAspectRatio = new ClampedFloatParameter(1f, 0, 1f); + + [ArtisticChoices, Vignette, DisplayName("Blink")] + public ClampedFloatParameter vignettingBlink = new ClampedFloatParameter(0f, 0, 1); + + [ArtisticChoices, Vignette, DisplayName("Blink Style")] + public BeautifyBlinkStyleParameter vignettingBlinkStyle = new BeautifyBlinkStyleParameter { value = BlinkStyle.Cutscene }; + + [ArtisticChoices, Vignette, DisplayName("Center")] + public Vector2Parameter vignettingCenter = new Vector2Parameter(new Vector2(0.5f, 0.5f)); + + [ArtisticChoices, Vignette, DisplayName("Tint Color")] + public ColorParameter vignettingColor = new ColorParameter(new Color(0f, 0f, 0f, 1f)); + + [ArtisticChoices, Vignette, DisplayName("Texture Mask"), ShowStrippedLabel] + public TextureParameter vignettingMask = new TextureParameter(null); + + #endregion + + #region Outline + + [Serializable] + public sealed class BeautifyOutlineStageParameter : VolumeParameter { } + + [Serializable] + public sealed class BeautifyOutlineTechniqueParameter : VolumeParameter { } + + [ArtisticChoices, Outline, DisplayConditionBool("ignoreDepthTexture", false), ShowStrippedLabel] + public BoolParameter outline = new BoolParameter(false); + + [ArtisticChoices, Outline, DisplayName("Color")] + public ColorParameter outlineColor = new ColorParameter(value: new Color(0, 0, 0, 0.8f), hdr: true, showAlpha: false, showEyeDropper: true); + + [ArtisticChoices, Outline, DisplayName("Technique"), Tooltip("Depth: uses scene depth to find edges. Per Object Id: performs a custom pre-pass which renders meshes id to identify independent objects.")] + public BeautifyOutlineTechniqueParameter outlineTechnique = new BeautifyOutlineTechniqueParameter { value = OutlineTechnique.Depth }; + + [ArtisticChoices, Outline, DisplayName("Minimum Separation"), DisplayConditionEnum("outlineTechnique", (int)OutlineTechnique.PerObjectId)] + public ClampedIntParameter outlineMinSeparation = new ClampedIntParameter(1, 1, 5); + + [ArtisticChoices, Outline, DisplayName("Outer Only"), DisplayConditionEnum("outlineTechnique", (int)OutlineTechnique.PerObjectId)] + public BoolParameter outlineOuterOnly = new BoolParameter(false); + + [ArtisticChoices, Outline, DisplayName("Normal Angle Threshold"), DisplayConditionEnum("outlineTechnique", (int)OutlineTechnique.Depth), Tooltip("Threshold for normal angle difference. Lower values detect sharper surface angle changes. Based on dot product of computed normals.")] + public ClampedFloatParameter outlineThreshold = new ClampedFloatParameter(0.2f, 0f, 0.5f); + + [ArtisticChoices, Outline, DisplayName("Min Depth Difference"), DisplayConditionEnum("outlineTechnique", (int)OutlineTechnique.Depth), Tooltip("Minimum depth difference between neighboring pixels to detect an edge. Higher values require larger depth discontinuities.")] + public ClampedFloatParameter outlineMinDepthThreshold = new ClampedFloatParameter(0.0005f, 0f, 0.01f); + + [ArtisticChoices, Outline, DisplayName("Min Color Saturation Difference"), DisplayConditionEnum("outlineTechnique", (int)OutlineTechnique.Depth), Tooltip("Minimum color saturation difference between neighboring pixels to detect an edge. Higher values require more distinct color changes.")] + public ClampedFloatParameter outlineSaturationDiffThreshold = new ClampedFloatParameter(0.015f, 0f, 0.5f); + + [ArtisticChoices, Outline, DisplayName("Customize")] + public BoolParameter outlineCustomize = new BoolParameter(false); + + [ArtisticChoices, Outline, DisplayName("Layer Mask"), DisplayConditionBool("outlineCustomize"), Tooltip("Optionally specify which objects should receive the outline effect")] + public LayerMaskParameter outlineLayerMask = new LayerMaskParameter(-1); + + [ArtisticChoices, Outline, DisplayName("Render Stage"), DisplayConditionBool("outlineCustomize")] + public BeautifyOutlineStageParameter outlineStageParameter = new BeautifyOutlineStageParameter { value = OutlineStage.BeforeBloom }; + + [ArtisticChoices, Outline, DisplayName("Spread"), DisplayConditionBool("outlineCustomize")] + public ClampedFloatParameter outlineSpread = new ClampedFloatParameter(1f, 0, 1.3f); + + [ArtisticChoices, Outline, DisplayName("Blur Count"), DisplayConditionBool("outlineCustomize")] + public ClampedIntParameter outlineBlurPassCount = new ClampedIntParameter(1, 1, 5); + + [ArtisticChoices, Outline, DisplayName("Downscale Blur"), DisplayConditionBool("outlineCustomize")] + public BoolParameter outlineBlurDownscale = new BoolParameter(false); + + [ArtisticChoices, Outline, DisplayName("Intensity Multiplier"), DisplayConditionBool("outlineCustomize")] + public ClampedFloatParameter outlineIntensityMultiplier = new ClampedFloatParameter(1, 0, 8); + + [Tooltip("Maximum distance in meters from the camera")] + [ArtisticChoices, Outline, DisplayName("Distance Fade"), DisplayConditionBool("outlineCustomize")] + public FloatParameter outlineDistanceFade = new FloatParameter(0); + + [ArtisticChoices, Outline, DisplayName("Use Optimized Shader"), DisplayConditionBool("outlineCustomize"), Tooltip("Uses a depth-only custom shader which should be faster. This option is only used when outline technique is set to Depth. If the scene uses shaders that transform the vertices coordinates, you may want to disable this option.")] + public BoolParameter outlineUsesOptimizedShader = new BoolParameter(false); + +#if UNITY_2022_3_OR_NEWER + [ArtisticChoices, Outline, DisplayName("Cut Off"), DisplayConditionBool("outlineUsesOptimizedShader"), Tooltip("Optionally set the alpha test/cut off. Only applies if optimized shader is used.")] + public ClampedFloatParameter outlineLayerCutOff = new ClampedFloatParameter(0f, 0, 1); +#endif + + + #endregion + + #region Night Vision + + [ArtisticChoices, NightVision, DisplayName("Enable"), ShowStrippedLabel] + public BoolParameter nightVision = new BoolParameter(false); + + [ArtisticChoices, NightVision, DisplayName("Scan Lines Color")] + public ColorParameter nightVisionColor = new ColorParameter(new Color(0.5f, 1f, 0.5f, 0.5f)); + + [ArtisticChoices, NightVision, DisplayName("Max Visible Depth")] + public FloatParameter nightVisionDepth = new FloatParameter(100000); + + [ArtisticChoices, NightVision, DisplayName("Max Visible Depth Fall Off")] + public ClampedFloatParameter nightVisionDepthFallOff = new ClampedFloatParameter(1, 0.01f, 10); + + #endregion + + #region Thermal Vision + + [ArtisticChoices, ThermalVision, DisplayName("Enable"), ShowStrippedLabel] + public BoolParameter thermalVision = new BoolParameter(false); + + [ArtisticChoices, ThermalVision, DisplayName("Scan Lines")] + public BoolParameter thermalVisionScanLines = new BoolParameter(true); + + [ArtisticChoices, ThermalVision, DisplayName("Distortion Amount")] + public ClampedFloatParameter thermalVisionDistortionAmount = new ClampedFloatParameter(9f, 0, 100f); + + #endregion + + #region RGB Dither + + [ImageEnhancement, Dither, DisplayName("Intensity"), ShowStrippedLabel] + public ClampedFloatParameter ditherIntensity = new ClampedFloatParameter(0.0f, 0, 0.02f); + + #endregion + + #region Frame + + public enum FrameStyle { + Border, + CinematicBands + } + + [Serializable] + public sealed class BeautifyFrameStyleParameter : VolumeParameter { } + + [ArtisticChoices, Frame, DisplayName("Enable"), ToggleAllFields, ShowStrippedLabel] + public BoolParameter frame = new BoolParameter(false); + + [ArtisticChoices, Frame, DisplayName("Style")] + public BeautifyFrameStyleParameter frameStyle = new BeautifyFrameStyleParameter { value = FrameStyle.Border }; + + [ArtisticChoices, Frame, DisplayName("Horizontal Bands Size"), DisplayConditionEnum("frameStyle", (int)FrameStyle.CinematicBands)] + public ClampedFloatParameter frameBandHorizontalSize = new ClampedFloatParameter(0, 0, 0.5f); + + [ArtisticChoices, Frame, DisplayName("Horizontal Bands Smoothness"), DisplayConditionEnum("frameStyle", (int)FrameStyle.CinematicBands)] + public ClampedFloatParameter frameBandHorizontalSmoothness = new ClampedFloatParameter(0, 0, 1); + + [ArtisticChoices, Frame, DisplayName("Vertical Bands Size"), DisplayConditionEnum("frameStyle", (int)FrameStyle.CinematicBands)] + public ClampedFloatParameter frameBandVerticalSize = new ClampedFloatParameter(0.1f, 0, 0.5f); + + [ArtisticChoices, Frame, DisplayName("Vertical Bands Smoothness"), DisplayConditionEnum("frameStyle", (int)FrameStyle.CinematicBands)] + public ClampedFloatParameter frameBandVerticalSmoothness = new ClampedFloatParameter(0, 0, 1); + + [ArtisticChoices, Frame, DisplayName("Color"), DisplayConditionEnum("frameStyle", (int)FrameStyle.Border)] + public ColorParameter frameColor = new ColorParameter(new Color(1, 1, 1, 1)); + + [ArtisticChoices, Frame, DisplayName("Thickness"), DisplayConditionEnum("frameStyle", (int)FrameStyle.Border)] + public ClampedFloatParameter frameThickness = new ClampedFloatParameter(0.047f, 0, 1); + + [ArtisticChoices, Frame, DisplayName("Sharpness"), DisplayConditionEnum("frameStyle", (int)FrameStyle.Border)] + public ClampedFloatParameter frameSharpness = new ClampedFloatParameter(50f, 1f, 255f); + + [ArtisticChoices, Frame, DisplayName("Texture Mask"), ShowStrippedLabel] + public TextureParameter frameMask = new TextureParameter(null); + + + + #endregion + + #region Film Grain + + [ArtisticChoices, FilmGrainAndArtifacts, DisplayName("Enable"), ToggleAllFields, ShowStrippedLabel] + public BoolParameter filmGrainEnabled = new BoolParameter(false); + + [ArtisticChoices, FilmGrainAndArtifacts, DisplayName("Grain Intensity")] + public ClampedFloatParameter filmGrainIntensity = new ClampedFloatParameter(0, 0, 1); + + [ArtisticChoices, FilmGrainAndArtifacts, DisplayName("Resolution")] + public ClampedFloatParameter filmGrainResolution = new ClampedFloatParameter(0.85f, 0.001f, 1f); + + [ArtisticChoices, FilmGrainAndArtifacts, DisplayName("Luma Attenuation"), Tooltip("Controls how much grain is visible on bright areas. 0 for equally noise on all areas, 1 for reduced noise on bright areas.")] + public ClampedFloatParameter filmGrainLumaAttenuation = new ClampedFloatParameter(0.8f, 0, 1f); + + [ArtisticChoices, FilmGrainAndArtifacts, DisplayName("Dirt Spots Amount"), Tooltip("Controls the frequency of dirt spots appearing on the film."), DisplayConditionBool("turboMode", false)] + public ClampedFloatParameter filmGrainDirtSpotsAmount = new ClampedFloatParameter(0.0f, 0, 1f); + + [ArtisticChoices, FilmGrainAndArtifacts, DisplayName("Dirt Spots Intensity"), Tooltip("Controls the visibility/brightness of dirt spots."), DisplayConditionBool("turboMode", false)] + public ClampedFloatParameter filmGrainDirtSpotsIntensity = new ClampedFloatParameter(0.2f, 0, 1f); + + [ArtisticChoices, FilmGrainAndArtifacts, DisplayName("Scratches Amount"), Tooltip("Controls the frequency of scratches appearing on the film."), DisplayConditionBool("turboMode", false)] + public ClampedFloatParameter filmGrainScratchesAmount = new ClampedFloatParameter(0.0f, 0, 1f); + + [ArtisticChoices, FilmGrainAndArtifacts, DisplayName("Scratches Intensity"), Tooltip("Controls the visibility/brightness of scratches."), DisplayConditionBool("turboMode", false)] + public ClampedFloatParameter filmGrainScratchesIntensity = new ClampedFloatParameter(0.3f, 0, 1f); + + #endregion + + #region Creative Blur + + [ArtisticChoices, CreativeBlur, DisplayName("Intensity")] + public ClampedFloatParameter blurIntensity = new ClampedFloatParameter(0f, 0f, 64f); + + [ArtisticChoices, CreativeBlur, DisplayName("Style")] + public BeautifyCreativeBlurStyleParameter blurStyle = new BeautifyCreativeBlurStyleParameter { value = CreativeBlurStyle.ScreenBlur }; + + [ArtisticChoices, CreativeBlur, DisplayName("Mask"), DisplayConditionEnum("blurStyle", (int)CreativeBlurStyle.ScreenBlur)] + public TextureParameter blurMask = new TextureParameter(null); + + [ArtisticChoices, CreativeBlur, DisplayName("Center"), DisplayConditionEnum("blurStyle", (int)CreativeBlurStyle.ScreenBlur, false)] + public Vector2Parameter blurCenter = new Vector2Parameter(new Vector2(0.5f, 0.5f)); + + [ArtisticChoices, CreativeBlur, DisplayName("Width"), DisplayConditionEnum("blurStyle", (int)CreativeBlurStyle.TiltShift)] + public ClampedFloatParameter blurTiltShiftWidth = new ClampedFloatParameter(0.2f, 0f, 1f); + + [ArtisticChoices, CreativeBlur, DisplayName("Falloff"), DisplayConditionEnum("blurStyle", (int)CreativeBlurStyle.TiltShift)] + public ClampedFloatParameter blurTiltShiftFalloff = new ClampedFloatParameter(0.2f, 0f, 1f); + + [ArtisticChoices, CreativeBlur, DisplayName("Radius"), DisplayConditionEnum("blurStyle", (int)CreativeBlurStyle.RadialBlur)] + public ClampedFloatParameter blurRadialBlurRadius = new ClampedFloatParameter(0.2f, 0f, 1f); + + [ArtisticChoices, CreativeBlur, DisplayName("Falloff"), DisplayConditionEnum("blurStyle", (int)CreativeBlurStyle.RadialBlur)] + public ClampedFloatParameter blurRadialBlurFalloff = new ClampedFloatParameter(0.35f, 0f, 1f); + + [ArtisticChoices, CreativeBlur, DisplayName("Desaturation"), Tooltip("Reduces color saturation based on blur intensity.")] + public ClampedFloatParameter blurDesaturation = new ClampedFloatParameter(0f, 0f, 1f); + + [ArtisticChoices, CreativeBlur, DisplayName("Keep Source On Top"), DisplayConditionEnum("blurStyle", (int)CreativeBlurStyle.ScreenBlur)] + public BoolParameter blurKeepSourceOnTop = new BoolParameter(false); + + [ArtisticChoices, CreativeBlur, DisplayName("Rect"), DisplayConditionBool("blurKeepSourceOnTop")] + public Vector4Parameter blurSourceRect = new Vector4Parameter(new Vector4(0.1f, 0.1f, 0.8f, 0.8f)); + + [ArtisticChoices, CreativeBlur, DisplayName("Edge Blending Width"), DisplayConditionBool("blurKeepSourceOnTop")] + public ClampedFloatParameter blurSourceEdgeBlendWidth = new ClampedFloatParameter(0, 0, 1); + + [ArtisticChoices, CreativeBlur, DisplayName("Edge Blending Strength"), DisplayConditionBool("blurKeepSourceOnTop")] + public FloatParameter blurSourceEdgeBlendStrength = new FloatParameter(20); + + [ArtisticChoices, CreativeBlur, DisplayName("Show Mask")] + public BoolParameter blurShowMask = new BoolParameter(false); + + #endregion + + public bool IsActive() => !disabled.value; + + public bool IsTileCompatible() => true; + + public bool RequiresDepthTexture() { + return sharpenIntensity.value > 0 || antialiasStrength.value > 0 || depthOfField.value || bloomDepthAtten.value > 0 || bloomNearAtten.value > 0 || anamorphicFlaresDepthAtten.value > 0 || anamorphicFlaresNearAtten.value > 0 || sunFlaresIntensity.value > 0 || outline.value; + } + + int downsamplingUsed; + + + void OnValidate() { + bloomIntensity.value = Mathf.Max(bloomIntensity.value, 0); + bloomDepthAtten.value = Mathf.Max(bloomDepthAtten.value, 0); + bloomNearAtten.value = Mathf.Max(bloomNearAtten.value, 0); + bloomThreshold.value = Mathf.Max(bloomThreshold.value, 0); + anamorphicFlaresIntensity.value = Mathf.Max(anamorphicFlaresIntensity.value, 0); + anamorphicFlaresDepthAtten.value = Mathf.Max(anamorphicFlaresDepthAtten.value, 0); + anamorphicFlaresNearAtten.value = Mathf.Max(anamorphicFlaresNearAtten.value, 0); + anamorphicFlaresThreshold.value = Mathf.Max(anamorphicFlaresThreshold.value, 0); + depthOfFieldDistance.value = Mathf.Max(depthOfFieldDistance.value, depthOfFieldFocalLength.value); + outlineDistanceFade.value = Mathf.Max(outlineDistanceFade.value, 0); + antialiasDepthAttenuation.value = Mathf.Max(antialiasDepthAttenuation.value, 0); + nightVisionDepth.value = Mathf.Max(0, nightVisionDepth.value); + depthOfFieldMaxBlurRadius.value = Mathf.Max(0, depthOfFieldMaxBlurRadius.value); + tonemapMaxInputBrightness.value = Mathf.Max(0, tonemapMaxInputBrightness.value); + eyeAdaptationMinCameraDistance.value = Mathf.Max(0, eyeAdaptationMinCameraDistance.value); + + if (!downsampling.value && downsamplingUsed == 1) { + // deactivate downsampling on the pipeline + UniversalRenderPipelineAsset pipe = (UniversalRenderPipelineAsset)GraphicsSettings.currentRenderPipeline; + pipe.renderScale = 1f; + } + downsamplingUsed = downsampling.value ? 1 : -1; + blurSourceEdgeBlendStrength.value = Mathf.Max(blurSourceEdgeBlendStrength.value, 0); + + } + + + } +} diff --git a/Imports/Beautify/URP/Runtime/Beautify.cs.meta b/Imports/Beautify/URP/Runtime/Beautify.cs.meta new file mode 100644 index 00000000..b8f878a9 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Beautify.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c133717c76e564a5fa90d7f12908d17e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/BeautifyAsmRef.asmref b/Imports/Beautify/URP/Runtime/BeautifyAsmRef.asmref new file mode 100644 index 00000000..cb3b0b05 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifyAsmRef.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:15fc0a57446b3144c949da3e2b9737a9" +} \ No newline at end of file diff --git a/Imports/Beautify/URP/Runtime/BeautifyAsmRef.asmref.meta b/Imports/Beautify/URP/Runtime/BeautifyAsmRef.asmref.meta new file mode 100644 index 00000000..535746fc --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifyAsmRef.asmref.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a150e8e335e554cae8e97ed470edd5ca +AssemblyDefinitionReferenceImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/BeautifyCutOutDoFRenderer.cs b/Imports/Beautify/URP/Runtime/BeautifyCutOutDoFRenderer.cs new file mode 100644 index 00000000..c73038d5 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifyCutOutDoFRenderer.cs @@ -0,0 +1,26 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace Beautify.Universal { + + [DisallowMultipleComponent] + [ExecuteAlways] + public sealed class BeautifyCutOutDoFRenderer : MonoBehaviour { + + readonly List cachedRenderers = new List(32); + + void OnEnable () { + gameObject.GetComponentsInChildren(true, cachedRenderers); + BeautifyRendererFeature.BeautifyDoFTransparentMaskPass.RegisterCutOutRenderers(cachedRenderers); + } + + void OnDisable () { + BeautifyRendererFeature.BeautifyDoFTransparentMaskPass.UnregisterCutOutRenderers(cachedRenderers); + cachedRenderers.Clear(); + } + + } + +} + + diff --git a/Imports/Beautify/URP/Runtime/BeautifyCutOutDoFRenderer.cs.meta b/Imports/Beautify/URP/Runtime/BeautifyCutOutDoFRenderer.cs.meta new file mode 100644 index 00000000..bbb80987 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifyCutOutDoFRenderer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 72793f31a1e394078bf1d32d706da27b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/BeautifyDoFTargetPerCamera.cs b/Imports/Beautify/URP/Runtime/BeautifyDoFTargetPerCamera.cs new file mode 100644 index 00000000..a67e8df7 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifyDoFTargetPerCamera.cs @@ -0,0 +1,28 @@ +using UnityEngine; + +namespace Beautify.Universal { + + [ExecuteAlways, RequireComponent(typeof(Camera))] + public class BeautifyDoFTargetPerCamera : MonoBehaviour { + + public Transform target; + Camera _cam; + + void OnEnable () { + _cam = GetComponent(); + var s = BeautifySettings.instance; + if (s != null) s.OnCameraBeforeAutofocus += Handle; + } + + void OnDisable () { + var s = BeautifySettings.instance; + if (s != null) s.OnCameraBeforeAutofocus -= Handle; + } + + void Handle (Camera cam, ref Transform current) { + if (cam != _cam) return; + if (target != null) current = target; + } + } + +} \ No newline at end of file diff --git a/Imports/Beautify/URP/Runtime/BeautifyDoFTargetPerCamera.cs.meta b/Imports/Beautify/URP/Runtime/BeautifyDoFTargetPerCamera.cs.meta new file mode 100644 index 00000000..fa6c193e --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifyDoFTargetPerCamera.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 21dc93e690eed47cdbc3a616c6aafe03 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/BeautifyRendererFeature.Legacy.cs b/Imports/Beautify/URP/Runtime/BeautifyRendererFeature.Legacy.cs new file mode 100644 index 00000000..fece7027 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifyRendererFeature.Legacy.cs @@ -0,0 +1,472 @@ +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; +using static Beautify.Universal.Beautify; + +#if !UNITY_6000_4_OR_NEWER +namespace Beautify.Universal { + + public partial class BeautifyRendererFeature { + +#if UNITY_2022_1_OR_NEWER +#if UNITY_6000_2_OR_NEWER + [System.Obsolete] +#endif + public override void SetupRenderPasses(ScriptableRenderer renderer, + in RenderingData renderingData) { + + CameraData cameraData = renderingData.cameraData; + Camera cam = cameraData.camera; + if ((cameraLayerMask & (1 << cam.gameObject.layer)) == 0) return; + + if (cam.targetTexture != null && cam.targetTexture.format == RenderTextureFormat.Depth) return; // ignore depth pre-pass cams! + + m_BeautifyRenderPass.SetupRenderTargets(renderer); + m_BeautifyBloomLumMaskPass.SetupRenderTargets(renderer); + m_BeautifyAnamorphicFlaresLumMaskPass.SetupRenderTargets(renderer); + m_BeautifySharpenExclusionMaskPass.SetupRenderTargets(renderer); + } +#endif + + partial class BeautifyRenderPass { + +#if UNITY_2022_1_OR_NEWER + public void SetupRenderTargets(ScriptableRenderer renderer) { + BeautifyRenderPass.renderer = renderer; +#if UNITY_2022_2_OR_NEWER +#pragma warning disable CS0618 + source = renderer.cameraColorTargetHandle; +#pragma warning restore CS0618 +#else + source = renderer.cameraColorTarget; +#endif + } +#else + public override void OnCameraSetup (CommandBuffer cmd, ref RenderingData renderingData) { + source = renderer.cameraColorTarget; + } +#endif + + public override void Configure (CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) { + + if (bMat == null) return; + + if (beautify == null) { + beautify = VolumeManager.instance.stack.GetComponent(); + } + if (beautify == null || !beautify.IsActive()) return; + + sourceDesc = cameraTextureDescriptor; + sourceDesc.msaaSamples = 1; + sourceDesc.depthBufferBits = 0; + + if (beautify.downsampling.value) { + UniversalRenderPipelineAsset pipe = (UniversalRenderPipelineAsset)GraphicsSettings.currentRenderPipeline; + float downsamplingMultiplier = 1f / beautify.downsamplingMultiplier.value; + if (downsamplingMultiplier < 1f) { + DownsamplingMode mode = beautify.downsamplingMode.value; + if (mode == DownsamplingMode.BeautifyEffectsOnly) { + sourceDesc.width = (int)(sourceDesc.width * downsamplingMultiplier); + sourceDesc.height = (int)(sourceDesc.height * downsamplingMultiplier); + if (pipe.renderScale != 1f) { + pipe.renderScale = 1f; + } + } + else { + if (pipe.renderScale != downsamplingMultiplier) { + pipe.renderScale = downsamplingMultiplier; + beautify.downsamplingMultiplier.value = 1f / pipe.renderScale; + } + } + } + else { + if (pipe.renderScale != 1f) { + pipe.renderScale = 1f; + } + } + } + + sourceDescHP = sourceDesc; + if (supportsFPTextures) { + sourceDescHP.colorFormat = RenderTextureFormat.ARGBHalf; + } + + if (!beautify.ignoreDepthTexture.value) { + ConfigureInput(ScriptableRenderPassInput.Depth); + } + } + + public override void Execute (ScriptableRenderContext context, ref RenderingData renderingData) { + if (bMat == null) { + Debug.LogError("Beautify material not initialized."); + return; + } + + Camera cam = cameraData.camera; + if (beautify == null || cam == null || !beautify.IsActive()) return; + +#if !UNITY_2022_1_OR_NEWER + if (!usesDirectWriteToCamera) { + source = renderer.cameraColorTarget; + } +#endif + var cmd = CommandBufferPool.Get("Beautify"); + + passData.camera = cam; + passData.cmd = cmd; + + ExecutePass(passData); + context.ExecuteCommandBuffer(cmd); + + CommandBufferPool.Release(cmd); + } + } + + partial class BeautifySharpenExclusionMaskPass { + +#if UNITY_2022_1_OR_NEWER + public void SetupRenderTargets(ScriptableRenderer renderer) { +#if UNITY_2022_2_OR_NEWER +#pragma warning disable CS0618 + depthRT = renderer.cameraDepthTargetHandle; +#pragma warning restore CS0618 +#else + depthRT = renderer.cameraDepthTarget; +#endif + } +#else + public override void OnCameraSetup (CommandBuffer cmd, ref RenderingData renderingData) { + depthRT = renderingData.cameraData.renderer.cameraDepthTarget; + } +#endif + + public override void Configure (CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) { + RenderTextureDescriptor maskDesc = cameraTextureDescriptor; + maskDesc.colorFormat = canUse16Bit ? RenderTextureFormat.RGB565 : RenderTextureFormat.ARGB32; + maskDesc.depthBufferBits = 0; + cmd.GetTemporaryRT(sharpenExclusionMaskId, maskDesc, FilterMode.Point); + cmd.SetGlobalTexture(sharpenExclusionMaskRT, sharpenExclusionMaskId); + ConfigureTarget(maskRT, depthRT); + ConfigureClear(ClearFlag.Color, Color.black); + } + + public override void Execute (ScriptableRenderContext context, ref RenderingData renderingData) { + + SortingCriteria sortingCriteria = SortingCriteria.None; + var drawingSettings = CreateDrawingSettings(m_ShaderTagIdList, ref renderingData, sortingCriteria); + var filter = new FilteringSettings(RenderQueueRange.all) { layerMask = BeautifySettings.sharpenExclusionMask }; +#if UNITY_2023_1_OR_NEWER + CommandBuffer cmd = CommandBufferPool.Get("Beautify Sharpen Exclusion Mask"); + RendererListParams listParams = new RendererListParams(renderingData.cullResults, drawingSettings, filter); + RendererList list = context.CreateRendererList(ref listParams); + cmd.DrawRendererList(list); + context.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); +#else + context.DrawRenderers(renderingData.cullResults, ref drawingSettings, ref filter); +#endif + } + } + + partial class BeautifyBloomLumMaskPass { + +#if UNITY_2022_1_OR_NEWER + public void SetupRenderTargets(ScriptableRenderer renderer) { +#if UNITY_2022_2_OR_NEWER +#pragma warning disable CS0618 + depthRT = renderer.cameraDepthTargetHandle; +#pragma warning restore CS0618 +#else + depthRT = renderer.cameraDepthTarget; +#endif + } +#else + public override void OnCameraSetup (CommandBuffer cmd, ref RenderingData renderingData) { + depthRT = renderingData.cameraData.renderer.cameraDepthTarget; + } +#endif + + public override void Configure (CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) { + RenderTextureDescriptor depthDesc = cameraTextureDescriptor; + depthDesc.colorFormat = RenderTextureFormat.ARGB32; + depthDesc.depthBufferBits = 0; + cmd.GetTemporaryRT(bloomSourceDepthId, depthDesc, FilterMode.Point); + cmd.SetGlobalTexture(bloomSourceDepthRT, bloomSourceDepthId); + if (BeautifySettings.anamorphicFlaresExcludeMask == BeautifySettings.bloomExcludeMask) { + cmd.SetGlobalTexture(BeautifyAnamorphicFlaresLumMaskPass.afSourceDepthRT, bloomSourceDepthId); + } + ConfigureTarget(maskRT, depthRT); + ConfigureClear(ClearFlag.Color, Color.black); + } + + public override void Execute (ScriptableRenderContext context, ref RenderingData renderingData) { + + SortingCriteria sortingCriteria = SortingCriteria.None; + var drawingSettings = CreateDrawingSettings(m_ShaderTagIdList, ref renderingData, sortingCriteria); + var filter = new FilteringSettings(RenderQueueRange.all) { layerMask = BeautifySettings.bloomExcludeMask }; +#if UNITY_2023_1_OR_NEWER + CommandBuffer cmd = CommandBufferPool.Get("Beautify Luma Mask"); + RendererListParams listParams = new RendererListParams(renderingData.cullResults, drawingSettings, filter); + RendererList list = context.CreateRendererList(ref listParams); + cmd.DrawRendererList(list); + context.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); +#else + context.DrawRenderers(renderingData.cullResults, ref drawingSettings, ref filter); +#endif + } + } + + partial class BeautifyAnamorphicFlaresLumMaskPass { + +#if UNITY_2022_1_OR_NEWER + public void SetupRenderTargets(ScriptableRenderer renderer) { +#if UNITY_2022_2_OR_NEWER +#pragma warning disable CS0618 + depthRT = renderer.cameraDepthTargetHandle; +#pragma warning restore CS0618 +#else + depthRT = renderer.cameraDepthTarget; +#endif + } +#else + public override void OnCameraSetup (CommandBuffer cmd, ref RenderingData renderingData) { + depthRT = renderingData.cameraData.renderer.cameraDepthTarget; + } +#endif + + public override void Configure (CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) { + RenderTextureDescriptor depthDesc = cameraTextureDescriptor; + depthDesc.colorFormat = RenderTextureFormat.ARGB32; + depthDesc.depthBufferBits = 0; + cmd.GetTemporaryRT(afSourceDepthId, depthDesc, FilterMode.Point); + cmd.SetGlobalTexture(afSourceDepthRT, afSourceDepthId); + ConfigureTarget(maskRT, depthRT); + ConfigureClear(ClearFlag.Color, Color.black); + } + + public override void Execute (ScriptableRenderContext context, ref RenderingData renderingData) { + + SortingCriteria sortingCriteria = SortingCriteria.None; + var drawingSettings = CreateDrawingSettings(m_ShaderTagIdList, ref renderingData, sortingCriteria); + var filter = new FilteringSettings(RenderQueueRange.all) { layerMask = BeautifySettings.anamorphicFlaresExcludeMask }; +#if UNITY_2023_1_OR_NEWER + CommandBuffer cmd = CommandBufferPool.Get("AF Luma Mask"); + RendererListParams listParams = new RendererListParams(renderingData.cullResults, drawingSettings, filter); + RendererList list = context.CreateRendererList(ref listParams); + cmd.DrawRendererList(list); + context.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); +#else + context.DrawRenderers(renderingData.cullResults, ref drawingSettings, ref filter); +#endif + } + } + + internal partial class BeautifyDoFTransparentMaskPass { + + public override void Configure (CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) { + RenderTextureDescriptor depthDesc = cameraTextureDescriptor; + depthDesc.colorFormat = RenderTextureFormat.Depth; + depthDesc.depthBufferBits = 24; + depthDesc.msaaSamples = 1; + cmd.GetTemporaryRT(dofTransparentDepthId, depthDesc, FilterMode.Point); + cmd.SetGlobalTexture(dofTransparentDepthRT, dofTransparentDepthId); + ConfigureTarget(m_Depth); + ConfigureClear(ClearFlag.All, Color.black); + } + + public override void Execute (ScriptableRenderContext context, ref RenderingData renderingData) { + + CommandBuffer cmd = CommandBufferPool.Get(m_ProfilerTag); + cmd.Clear(); + + if (BeautifySettings.dofAlphaTestSupport) { + if (BeautifySettings.dofAlphaTestLayerMask != 0) { + if (BeautifySettings.dofAlphaTestLayerMask != currentAlphaCutoutLayerMask || BeautifySettings._refreshAlphaClipRenderers) { + FindAlphaClippingRenderers(); + } + if (depthOnlyMaterialCutOff == null) { + Shader depthOnlyCutOff = Shader.Find(m_DepthOnlyShader); + depthOnlyMaterialCutOff = new Material(depthOnlyCutOff); + } + int renderersCount = cutOutRenderers.Count; + if (depthOverrideMaterials == null || depthOverrideMaterials.Length < renderersCount) { + depthOverrideMaterials = new Material[renderersCount]; + } + for (int k = 0; k < renderersCount; k++) { + Renderer renderer = cutOutRenderers[k]; + if (renderer != null && renderer.isVisible) { + Material mat = renderer.sharedMaterial; + if (mat != null) { + if (depthOverrideMaterials[k] == null) { + depthOverrideMaterials[k] = Instantiate(depthOnlyMaterialCutOff); + depthOverrideMaterials[k].EnableKeyword(ShaderParams.SKW_CUSTOM_DEPTH_ALPHA_TEST); + } + Material overrideMaterial = depthOverrideMaterials[k]; + + if (mat.HasProperty(ShaderParams.CustomDepthAlphaCutoff)) { + overrideMaterial.SetFloat(ShaderParams.CustomDepthAlphaCutoff, mat.GetFloat(ShaderParams.CustomDepthAlphaCutoff)); + } + else { + overrideMaterial.SetFloat(ShaderParams.CustomDepthAlphaCutoff, 0.5f); + } + if (mat.HasProperty(ShaderParams.CustomDepthBaseMap)) { + overrideMaterial.SetTexture(ShaderParams.CustomDepthBaseMap, mat.GetTexture(ShaderParams.CustomDepthBaseMap)); + } + else if (mat.HasProperty(ShaderParams.mainTex)) { + overrideMaterial.SetTexture(ShaderParams.CustomDepthBaseMap, mat.GetTexture(ShaderParams.mainTex)); + } + overrideMaterial.SetInt(m_CullPropertyId, BeautifySettings.dofAlphaTestDoubleSided ? (int)CullMode.Off : (int)CullMode.Back); + + cmd.DrawRenderer(renderer, overrideMaterial); + } + } + } + + } + } + + // Render transparent objects + if (BeautifySettings.dofTransparentSupport) { + if (depthOnlyMaterial == null) { + depthOnlyMaterial = new Material(Shader.Find(m_DepthOnlyShader)); + } + depthOnlyMaterial.SetInt(m_CullPropertyId, BeautifySettings.dofTransparentDoubleSided ? (int)CullMode.Off : (int)CullMode.Back); + + SortingCriteria sortingCriteria = renderingData.cameraData.defaultOpaqueSortFlags; + var drawingSettings = CreateDrawingSettings(m_ShaderTagIdList, ref renderingData, sortingCriteria); + drawingSettings.perObjectData = PerObjectData.None; + drawingSettings.overrideMaterial = depthOnlyMaterial; + var filter = new FilteringSettings(RenderQueueRange.transparent) { layerMask = BeautifySettings.dofTransparentLayerMask }; +#if UNITY_2023_1_OR_NEWER + RendererListParams listParams = new RendererListParams(renderingData.cullResults, drawingSettings, filter); + RendererList list = context.CreateRendererList(ref listParams); + cmd.DrawRendererList(list); +#else + context.DrawRenderers(renderingData.cullResults, ref drawingSettings, ref filter); +#endif + } + + context.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); + } + } + + partial class BeautifyOutlineDepthPrepass { + + public override void Configure (CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor) { + RenderTextureDescriptor depthDesc = cameraTextureDescriptor; + depthDesc.colorFormat = BeautifySettings.outlineUseObjectId ? RenderTextureFormat.RFloat : RenderTextureFormat.Depth; + depthDesc.depthBufferBits = 24; + depthDesc.msaaSamples = 1; + cmd.GetTemporaryRT(outlineDepthId, depthDesc, FilterMode.Point); + if (BeautifySettings.outlineUseObjectId) { + cmd.SetGlobalTexture(outlineObjectIdRT, outlineDepthId, RenderTextureSubElement.Color); + cmd.SetGlobalTexture(outlineDepthRT, outlineDepthId, RenderTextureSubElement.Depth); + } + else { + cmd.SetGlobalTexture(outlineDepthRT, outlineDepthId); + } +#if UNITY_2022_2_OR_NEWER + ConfigureTarget(outlineDepthHandle); +#else + RenderTargetIdentifier rti = new RenderTargetIdentifier(outlineDepthId, 0, CubemapFace.Unknown, -1); + ConfigureTarget(rti); +#endif + if (BeautifySettings.outlineUseObjectId) { + ConfigureClear(ClearFlag.Depth | ClearFlag.Color, Color.black); + } + else { + ConfigureClear(ClearFlag.Depth, Color.black); + } + } + + public override void Execute (ScriptableRenderContext context, ref RenderingData renderingData) { + + if (!BeautifySettings.outlineDepthPrepass) return; + + SortingCriteria sortingCriteria = renderingData.cameraData.defaultOpaqueSortFlags; + var drawingSettings = CreateDrawingSettings(m_ShaderTagIdList, ref renderingData, sortingCriteria); + drawingSettings.perObjectData = PerObjectData.None; + + if (BeautifySettings.outlineDepthPrepassUseOptimizedShader) { +#if UNITY_2022_3_OR_NEWER + if (BeautifySettings.outlineLayerCutOff > 0) { + Shader alphaTestShader = null; + if (BeautifySettings.outlineUseObjectId) { + if (depthOnlyShaderWithAlphaTestObjectId == null) { + depthOnlyShaderWithAlphaTestObjectId = Shader.Find(m_DepthOnlyWithObjectIdAlphaTestShader); + } + alphaTestShader = depthOnlyShaderWithAlphaTestObjectId; + } else { + if (depthOnlyShaderWithAlphaTest == null) { + depthOnlyShaderWithAlphaTest = Shader.Find(m_DepthOnlyAlphaTestShader); + } + alphaTestShader = depthOnlyShaderWithAlphaTest; + } + drawingSettings.overrideShader = alphaTestShader; + Shader.SetGlobalFloat(ShaderParams.CustomDepthAlphaTestCutoff, BeautifySettings.outlineLayerCutOff); + } else +#endif + { + Material depthMaterial = null; + if (BeautifySettings.outlineUseObjectId) { + if (depthOnlyMaterialWithObjectId == null) { + depthOnlyMaterialWithObjectId = new Material(Shader.Find(m_DepthOnlyWithObjectIdShader)); + } + depthMaterial = depthOnlyMaterialWithObjectId; + } + else { + if (depthOnlyMaterial == null) { + depthOnlyMaterial = new Material(Shader.Find(m_DepthOnlyShader)); + } + depthMaterial = depthOnlyMaterial; + } + depthMaterial.SetInt(m_CullPropertyId, (int)CullMode.Back); + depthMaterial.DisableKeyword(ShaderParams.SKW_CUSTOM_DEPTH_ALPHA_TEST); + drawingSettings.overrideMaterial = depthMaterial; + } + } + + var filter = new FilteringSettings(RenderQueueRange.opaque) { layerMask = BeautifySettings.outlineLayerMask }; +#if UNITY_2023_1_OR_NEWER + CommandBuffer cmd = CommandBufferPool.Get(m_ProfilerTag); + cmd.Clear(); + RendererListParams listParams = new RendererListParams(renderingData.cullResults, drawingSettings, filter); + RendererList list = context.CreateRendererList(ref listParams); + cmd.DrawRendererList(list); + context.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); +#else + context.DrawRenderers(renderingData.cullResults, ref drawingSettings, ref filter); +#endif + + } + } + + partial class BeautifyClearColorTarget { + + public override void Execute (ScriptableRenderContext context, ref RenderingData renderingData) { + + CommandBuffer cmd = CommandBufferPool.Get(m_ProfilerTag); + cmd.ClearRenderTarget(false, true, new Color(0, 0, 0, 0)); + context.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); + } + } + + partial class BeautifyOutlineEffectPass { + + public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) { + if (!BeautifyRenderPass.CanExecuteOutlineBeforeTransparents) return; + + CommandBuffer cmd = CommandBufferPool.Get(m_ProfilerTag); + BeautifyRenderPass.ExecuteOutlineBeforeTransparents(cmd); + context.ExecuteCommandBuffer(cmd); + CommandBufferPool.Release(cmd); + } + } + } +} +#endif diff --git a/Imports/Beautify/URP/Runtime/BeautifyRendererFeature.Legacy.cs.meta b/Imports/Beautify/URP/Runtime/BeautifyRendererFeature.Legacy.cs.meta new file mode 100644 index 00000000..b28fbf96 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifyRendererFeature.Legacy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2a683fd4599c640ffb34e721cc5ed19a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/BeautifyRendererFeature.cs b/Imports/Beautify/URP/Runtime/BeautifyRendererFeature.cs new file mode 100644 index 00000000..eda94953 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifyRendererFeature.cs @@ -0,0 +1,3239 @@ +using System; +using System.Collections.Generic; +#if UNITY_EDITOR +using System.Reflection; +using UnityEditor.Build.Reporting; + +#endif +using UnityEngine; +using UnityEngine.Rendering; +#if UNITY_2023_3_OR_NEWER +using UnityEngine.Rendering.RenderGraphModule; +#endif +using UnityEngine.Rendering.Universal; +using UnityEngine.SceneManagement; +using static Beautify.Universal.Beautify; + +namespace Beautify.Universal { + + public static class ShaderParams { + public static int mainTex = Shader.PropertyToID("_MainTex"); + public static int inputTex = Shader.PropertyToID("_BeautifyInputTex"); + public static int blueNoiseTex = Shader.PropertyToID("_BlueNoise"); + + public static int sharpen = Shader.PropertyToID("_Sharpen"); + public static int colorParams = Shader.PropertyToID("_Params"); + public static int colorBoost = Shader.PropertyToID("_ColorBoost"); + public static int tintColor = Shader.PropertyToID("_TintColor"); + public static int compareTex = Shader.PropertyToID("_CompareTex"); + public static int compareParams = Shader.PropertyToID("_CompareParams"); + public static int fxColor = Shader.PropertyToID("_FXColor"); + public static int lutTex = Shader.PropertyToID("_LUTTex"); + public static int lut3DTexture = Shader.PropertyToID("_LUT3DTex"); + public static int lut3DParams = Shader.PropertyToID("_LUT3DParams"); + public static int colorTemp = Shader.PropertyToID("_ColorTemp"); + public static int flipY = Shader.PropertyToID("_FlipY"); + public static int tonemapAGXGamma = Shader.PropertyToID("_TonemapAGXGamma"); + + public static int blurScale = Shader.PropertyToID("_BlurScale"); + public static int tempBlurRT = Shader.PropertyToID("_BeautifyTempBlurRT"); + public static int tempBloomCustomComposeRT = Shader.PropertyToID("_BeautifyTempBloomCustomComposeRT"); + public static int tempBloomCustomComposeRTOriginal = Shader.PropertyToID("_BeautifyTempBloomCustomComposeRT"); + public static int tempBlurOneDirRT = Shader.PropertyToID("_BeautifyTempBlurOneDir0"); + public static int tempBlurOneDirRTOriginal = Shader.PropertyToID("_BeautifyTempBlurOneDir0"); + public static int tempBlurDownscaling = Shader.PropertyToID("_BeautifyTempBlurDownscaling"); + + public static int bloom = Shader.PropertyToID("_Bloom"); + public static int bloomWeights = Shader.PropertyToID("_BloomWeights"); + public static int bloomWeights2 = Shader.PropertyToID("_BloomWeights2"); + public static int bloomDepthThreshold = Shader.PropertyToID("_BloomDepthThreshold"); + public static int bloomNearThreshold = Shader.PropertyToID("_BloomNearThreshold"); + public static int bloomTex = Shader.PropertyToID("_BloomTex"); + public static int bloomTex1 = Shader.PropertyToID("_BloomTex1"); + public static int bloomTex2 = Shader.PropertyToID("_BloomTex2"); + public static int bloomTex3 = Shader.PropertyToID("_BloomTex3"); + public static int bloomTex4 = Shader.PropertyToID("_BloomTex4"); + public static int bloomTint = Shader.PropertyToID("_BloomTint"); + public static int bloomTint0 = Shader.PropertyToID("_BloomTint0"); + public static int bloomTint1 = Shader.PropertyToID("_BloomTint1"); + public static int bloomTint2 = Shader.PropertyToID("_BloomTint2"); + public static int bloomTint3 = Shader.PropertyToID("_BloomTint3"); + public static int bloomTint4 = Shader.PropertyToID("_BloomTint4"); + public static int bloomTint5 = Shader.PropertyToID("_BloomTint5"); + public static int bloomSpread = Shader.PropertyToID("_BloomSpread"); + public static int bloomExclusionZBias = Shader.PropertyToID("_BloomLayerZBias"); + + public static int dirt = Shader.PropertyToID("_Dirt"); + public static int dirtTex = Shader.PropertyToID("_OverlayTex"); + public static int screenLum = Shader.PropertyToID("_ScreenLum"); + + public static int afData = Shader.PropertyToID("_AFData"); + public static int afDepthThreshold = Shader.PropertyToID("_AFDepthThreshold"); + public static int afNearThreshold = Shader.PropertyToID("_AFNearThreshold"); + public static int afTintColor = Shader.PropertyToID("_AFTint"); + public static int afCombineTex = Shader.PropertyToID("_CombineTex"); + + public static int sfSunData = Shader.PropertyToID("_SunData"); + public static int sfSunPos = Shader.PropertyToID("_SunPos"); + public static int sfSunDir = Shader.PropertyToID("_SunDir"); + public static int sfSunTintColor = Shader.PropertyToID("_SunTint"); + public static int sfOcclusionThreshold = Shader.PropertyToID("_SunOcclusionThreshold"); + public static int sfCoronaRays1 = Shader.PropertyToID("_SunCoronaRays1"); + public static int sfCoronaRays2 = Shader.PropertyToID("_SunCoronaRays2"); + public static int sfGhosts1 = Shader.PropertyToID("_SunGhosts1"); + public static int sfGhosts2 = Shader.PropertyToID("_SunGhosts2"); + public static int sfGhosts3 = Shader.PropertyToID("_SunGhosts3"); + public static int sfGhosts4 = Shader.PropertyToID("_SunGhosts4"); + public static int sfHalo = Shader.PropertyToID("_SunHalo"); + public static int sfRT = Shader.PropertyToID("_BeautifyTempSF0"); + public static int sfFlareTex = Shader.PropertyToID("_FlareTex"); + public static int sfAspectRatio = Shader.PropertyToID("_SunFlaresAspectRatio"); + public static int sfOcclusionTex = Shader.PropertyToID("_OcclusionTex"); + + public static int dofRT = Shader.PropertyToID("_DoFTex"); + public static int dofTempBlurDoFAlphaRT = Shader.PropertyToID("_BeautifyTempBlurAlphaDoF"); + public static int dofTempBlurDoFTemp1RT = Shader.PropertyToID("_BeautifyTempBlurPass1DoF"); + public static int dofTempBlurDoFTemp2RT = Shader.PropertyToID("_BeautifyTempBlurPass2DoF"); + public static int dofBokehData = Shader.PropertyToID("_BokehData"); + public static int dofBokehData2 = Shader.PropertyToID("_BokehData2"); + public static int dofBokehData3 = Shader.PropertyToID("_BokehData3"); + public static int dofBokehRT = Shader.PropertyToID("_DofBokeh"); + + public static int vignette = Shader.PropertyToID("_Vignetting"); + public static int vignetteData = Shader.PropertyToID("_VignettingData"); + public static int vignetteData2 = Shader.PropertyToID("_VignettingData2"); + public static int vignetteMask = Shader.PropertyToID("_VignettingMask"); + + public static int purkinje = Shader.PropertyToID("_Purkinje"); + + public static int eaLumSrc = Shader.PropertyToID("_EALumSrc"); + public static int eaHist = Shader.PropertyToID("_EAHist"); + public static int eaParams = Shader.PropertyToID("_EyeAdaptation"); + public static int eaParams2 = Shader.PropertyToID("_EyeAdaptation2"); + public static int eaMinCameraDistance = Shader.PropertyToID("_EyeAdaptationMinCameraDistance"); + public static int eaMask = Shader.PropertyToID("_EAMask"); + public static int outline = Shader.PropertyToID("_Outline"); + public static int outlineData = Shader.PropertyToID("_OutlineData"); + public static int outlineRT = Shader.PropertyToID("_OutlineRT"); + + public static int blurRT = Shader.PropertyToID("_BlurTex"); + public static int blurMaskedRT = Shader.PropertyToID("_BlurMaskedTex"); + public static int blurMask = Shader.PropertyToID("_BlurMask"); + public static int blurData = Shader.PropertyToID("_BlurData"); // xy = center, z = width/radius, w = falloff + public static int blurData2 = Shader.PropertyToID("_BlurData2"); // x = style, y = show mask + + public static int nightVision = Shader.PropertyToID("_NightVision"); + public static int nightVisionDepth = Shader.PropertyToID("_NightVisionDepth"); + + public static int chromaticAberrationData = Shader.PropertyToID("_ChromaticAberrationData"); + public static int chromaticTempTex = Shader.PropertyToID("_ChromaticTex"); + + public static int lutPreview = Shader.PropertyToID("_LUTPreview"); + + public static int frameColor = Shader.PropertyToID("_Frame"); + public static int frameMask = Shader.PropertyToID("_FrameMask"); + public static int frameData = Shader.PropertyToID("_FrameData"); + + public static int CustomDepthAlphaCutoff = Shader.PropertyToID("_Cutoff"); + public static int CustomDepthAlphaTestCutoff = Shader.PropertyToID("_OutlineCutOff"); + public static int CustomDepthBaseMap = Shader.PropertyToID("_BaseMap"); + + public static int edgeAntialiasing = Shader.PropertyToID("_AntialiasData"); + + public static int miniViewTex = Shader.PropertyToID("_MiniViewTex"); + public static int miniViewRect = Shader.PropertyToID("_MiniViewRect"); + public static int miniViewBlend = Shader.PropertyToID("_MiniViewBlend"); + + public static int filmGrainData = Shader.PropertyToID("_FilmGrainData"); + public static int filmArtifactsData = Shader.PropertyToID("_FilmArtifactsData"); + + public const string SKW_SHARPEN = "BEAUTIFY_SHARPEN"; + public const string SKW_SHARPEN_EXCLUSION_MASK = "BEAUTIFY_EXCLUSION_MASK_SHARPEN"; + public const string SKW_TONEMAP_ACES = "BEAUTIFY_ACES_TONEMAP"; + public const string SKW_TONEMAP_ACES_FITTED = "BEAUTIFY_ACES_FITTED_TONEMAP"; + public const string SKW_TONEMAP_AGX = "BEAUTIFY_AGX_TONEMAP"; + public const string SKW_LUT = "BEAUTIFY_LUT"; + public const string SKW_LUT3D = "BEAUTIFY_3DLUT"; + public const string SKW_BLOOM = "BEAUTIFY_BLOOM"; + public const string SKW_BLOOM_USE_DEPTH = "BEAUTIFY_BLOOM_USE_DEPTH"; + public const string SKW_BLOOM_USE_LAYER = "BEAUTIFY_BLOOM_USE_LAYER"; + public const string SKW_BLOOM_USE_LAYER_INCLUSION = "BEAUTIFY_BLOOM_USE_LAYER_INCLUSION"; + public const string SKW_BLOOM_PROP_THRESHOLDING = "BEAUTIFY_BLOOM_PROP_THRESHOLDING"; + public const string SKW_DIRT = "BEAUTIFY_DIRT"; + public const string SKW_ANAMORPHIC_FLARES_USE_DEPTH = "BEAUTIFY_ANAMORPHIC_FLARES_USE_DEPTH"; + public const string SKW_ANAMORPHIC_FLARES_USE_LAYER = "BEAUTIFY_ANAMORPHIC_FLARES_USE_LAYER"; + public const string SKW_ANAMORPHIC_FLARES_USE_LAYER_INCLUSION = "BEAUTIFY_ANAMORPHIC_FLARES_USE_LAYER_INCLUSION"; + public const string SKW_ANAMORPHIC_PROP_THRESHOLDING = "BEAUTIFY_ANAMORPHIC_PROP_THRESHOLDING"; + public const string SKW_EA_USE_DEPTH = "BEAUTIFY_EA_USE_DEPTH"; + public const string SKW_EA_USE_MASK = "BEAUTIFY_EA_USE_MASK"; + public const string SKW_DEPTH_OF_FIELD = "BEAUTIFY_DEPTH_OF_FIELD"; + public const string SKW_DEPTH_OF_FIELD_TRANSPARENT = "BEAUTIFY_DOF_TRANSPARENT"; + public const string SKW_VIGNETTING = "BEAUTIFY_VIGNETTING"; + public const string SKW_VIGNETTING_MASK = "BEAUTIFY_VIGNET_MASK"; + public const string SKW_PURKINJE = "BEAUTIFY_PURKINJE"; + public const string SKW_EYE_ADAPTATION = "BEAUTIFY_EYE_ADAPTATION"; + public const string SKW_OUTLINE = "BEAUTIFY_OUTLINE"; + public const string SKW_OUTLINE_DEPTH_FADE = "BEAUTIFY_DEPTH_FADE"; + public const string SKW_TURBO = "BEAUTIFY_TURBO"; + public const string SKW_COLOR_TWEAKS = "BEAUTIFY_COLOR_TWEAKS"; + public const string SKW_NIGHT_VISION = "BEAUTIFY_NIGHT_VISION"; + public const string SKW_THERMAL_VISION = "BEAUTIFY_THERMAL_VISION"; + public const string SKW_DITHER = "BEAUTIFY_DITHER"; + public const string SKW_CHROMATIC_ABERRATION = "BEAUTIFY_CABERRATION"; + public const string SKW_FRAME = "BEAUTIFY_FRAME"; + public const string SKW_FILM_GRAIN = "BEAUTIFY_FILM_GRAIN"; + public const string SKW_SUN_FLARES_USE_GHOSTS = "BEAUTIFY_SF_USE_GHOSTS"; + public const string SKW_SUN_FLARES_OCCLUSION_INIT = "BEAUTIFY_SF_OCCLUSION_INIT"; + public const string SKW_SUN_FLARES_OCCLUSION_SIMPLE = "BEAUTIFY_SF_OCCLUSION_SIMPLE"; + public const string SKW_SUN_FLARES_OCCLUSION_SMOOTH = "BEAUTIFY_SF_OCCLUSION_SMOOTH"; + public const string SKW_CUSTOM_DEPTH_ALPHA_TEST = "DEPTH_PREPASS_ALPHA_TEST"; + public const string SKW_EDGE_ANTIALIASING = "BEAUTIFY_EDGE_AA"; + public const string SKW_EDGE_ANTIALIASING_DOF = "BEAUTIFY_EDGE_AA_DOF"; + public const string SKW_OUTLINE_CUSTOM_DEPTH = "BEAUTIFY_OUTLINE_CUSTOM_DEPTH"; + public const string SKW_OUTLINE_OBJECT_ID = "BEAUTIFY_OUTLINE_OBJECT_ID"; + public const string SKW_OUTLINE_MIN_SEPARATION = "BEAUTIFY_OUTLINE_MIN_SEPARATION"; + public const string SKW_OUTLINE_OUTER_ONLY = "BEAUTIFY_OUTLINE_OUTER_ONLY"; + } + + public partial class BeautifyRendererFeature : ScriptableRendererFeature { + + class PassData { + public Camera camera; + public CommandBuffer cmd; +#if UNITY_2023_3_OR_NEWER + public TextureHandle colorTexture; +#endif + } + + partial class BeautifyRenderPass : ScriptableRenderPass { + + enum Pass { + CopyExact = 0, + Compare = 1, + Beautify = 2, + BloomLuminance = 3, + BloomDebug = 4, + BlurHoriz = 5, + BlurVert = 6, + BloomCompose = 7, + BloomResample = 8, + BloomResampleAndCombine = 9, + BloomLuminanceAntiflicker = 10, + AnamorphicFlaresResample = 11, + AnamorphicFlaresResampleAndCombine = 12, + ComputeScreenLum = 13, + DownsampleScreenLum = 14, + BlendScreenLum = 15, + SimpleBlendLum = 16, + AnamorphicFlaresLuminance = 17, + AnamorphicFlaresLuminanceAntiflicker = 18, + SunFlares = 19, + SunFlaresAdditive = 20, + DoFCoC = 21, + DoFCoCDebug = 22, + DoFBlur = 23, + DoFBlurWithoutBokeh = 24, + DoFBlurHorizontally = 25, + DoFBlurVertically = 26, + CopyBilinear = 27, + BloomExclusionLayerDebug = 28, + DoFDebugTransparent = 29, + ChromaticAberration = 30, + OutlineDetect = 31, + OutlineBlurH = 32, + OutlineBlurV = 33, + OutlineBlend = 34, + BlurMask = 35, + DoFBokeh = 36, + DoFAdditive = 37, + DoFBlurBokeh = 38, + AnamorphicFlaresExclusionLayerDebug = 39, + CopyWithMiniView = 40, + SunFlaresOcclusionTest = 41 + } + + struct BloomMipData { + public int rtDown, rtUp, width, height; + public int rtDownOriginal, rtUpOriginal; + } + + const int PYRAMID_COUNT_BLOOM = 5; + const int PYRAMID_COUNT_BLOOM_TURBO = 3; + const int PYRAMID_COUNT_EA = 9; + + readonly PassData passData = new PassData(); + + static readonly List keywords = new List(); + static string[] keywordsArray; + bool setup; + + static Beautify beautify; + static Material bMat; + static ScriptableRenderer renderer; +#if UNITY_2022_2_OR_NEWER + static RTHandle source; +#else + static RenderTargetIdentifier source; +#endif + static CameraData cameraData; + static RenderTextureDescriptor sourceDesc, sourceDescHP; + static bool supportsFPTextures; + static BloomMipData[] rt, rtAF; + static int[] rtEA; + static Texture2D dirtTexture, flareTex; + + class PerCamData { + public RenderTexture rtEAacum, rtEAHist; + public RTHandle rtSunFlaresOcclusion; + public float sunFlareCurrentIntensity; + public Vector4 sunLastScrPos; + public float sunLastRot; + public float sunFlareTime; + public float dofPrevDistance = -1; + public float dofLastAutofocusDistance; + public Vector4 dofLastBokehData; + public float dofFadeIntensity = 1f; + } + + readonly static Dictionary perCamData = new Dictionary(); + static PerCamData camData; + static bool requiresSunFlaresOcclusionRTInit; + + static bool requiresLuminanceComputation; + static bool usesBloomAndFlares, usesDepthOfField, usesVignetting, usesSeparateOutline; + static bool usesSharpenExclusionMask; + static int sharpenExclusionLayerMask; + static Matrix4x4 matrix4x4identity = Matrix4x4.identity; + static bool supportsR8Format, supportsARGBHalfFormat; + static RenderTexture rtCapture; + static RTHandle dofGlobalRT; + + static bool usesDirectWriteToCamera; + + public bool Setup (Shader shader, ScriptableRenderer renderer, RenderingData renderingData, RenderPassEvent renderingPassEvent, bool ignorePostProcessingOption) { + + // Configures where the render pass should be injected. + beautify = VolumeManager.instance.stack.GetComponent(); + bool isActive = true; + if (beautify != null) { + isActive = beautify.IsActive(); + usesDirectWriteToCamera = beautify.directWrite.value; + canUseDepthTexture = !beautify.ignoreDepthTexture.value; + +#if UNITY_EDITOR + if (renderingData.cameraData.camera.cameraType == CameraType.SceneView) { + usesDirectWriteToCamera = false; + } +#endif + +#if UNITY_2023_3_OR_NEWER + + if (usingRenderGraph && canUseDepthTexture && beautify.outline.value && beautify.outlineCustomize.value && (beautify.outlineStageParameter.value != OutlineStage.BeforeBloom || beautify.bloomIntensity.value <= 0)) { + usesDirectWriteToCamera = false; // seprate outline can't use direct write to camera in render graph + } +#endif + +#if !UNITY_2022_3_OR_NEWER + if (usesDirectWriteToCamera) { + renderingPassEvent = RenderPassEvent.AfterRenderingPostProcessing; + renderingPassEvent++; + if (ignorePostProcessingOption) { + renderingPassEvent = RenderPassEvent.AfterRendering + 3; // queue after FinalBlit is present + } + } +#endif + } + + renderPassEvent = renderingPassEvent; + + cameraData = renderingData.cameraData; + BeautifyRenderPass.renderer = renderer; + +#if UNITY_2023_3_OR_NEWER + requiresIntermediateTexture = true; +#endif + + if (setup && cameraData.camera != null && bMat != null) return isActive; + setup = true; + + CheckSceneSettings(); + BeautifySettings.UnloadBeautify(); // reset any cached profile + + supportsFPTextures = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGBHalf); + supportsR8Format = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.R8); + + if (bMat == null) { + if (shader == null) { + Debug.LogWarning("Could not load Beautify shader. Please make sure BeautifyCore.shader is present."); + } + else { + bMat = CoreUtils.CreateEngineMaterial(shader); + bMat.SetTexture(ShaderParams.blueNoiseTex, Resources.Load("Textures/blueNoise")); + } + } + + // Initialize bloom buffers descriptors + if (rt == null || rt.Length != PYRAMID_COUNT_BLOOM + 1) { + rt = new BloomMipData[PYRAMID_COUNT_BLOOM + 1]; + } + for (int k = 0; k < rt.Length; k++) { + rt[k].rtDown = rt[k].rtDownOriginal = Shader.PropertyToID("_BeautifyBloomDownMip" + k); + rt[k].rtUp = rt[k].rtUpOriginal = Shader.PropertyToID("_BeautifyBloomUpMip" + k); + } + + // Initialize anamorphic flare buffers descriptors + if (rtAF == null || rtAF.Length != PYRAMID_COUNT_BLOOM + 1) { + rtAF = new BloomMipData[PYRAMID_COUNT_BLOOM + 1]; + } + for (int k = 0; k < rtAF.Length; k++) { + rtAF[k].rtDown = rtAF[k].rtDownOriginal = Shader.PropertyToID("_BeautifyAFDownMip" + k); + rtAF[k].rtUp = rtAF[k].rtUpOriginal = Shader.PropertyToID("_BeautifyAFUpMip" + k); + } + + // Initialize eye adaptation buffers descriptors + if (rtEA == null || rtEA.Length != PYRAMID_COUNT_EA) { + rtEA = new int[PYRAMID_COUNT_EA]; + } + for (int k = 0; k < rtEA.Length; k++) { + rtEA[k] = Shader.PropertyToID("_BeautifyEAMip" + k); + } + return isActive; + } + + +#if UNITY_2023_3_OR_NEWER + public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { + + using (var builder = renderGraph.AddUnsafePass("Beautify Pass RG", out var passData)) { + passData.camera = frameData.Get().camera; + + UniversalResourceData resourceData = frameData.Get(); + passData.colorTexture = resourceData.activeColorTexture; + + builder.UseTexture(resourceData.activeColorTexture, AccessFlags.ReadWrite); + if (!beautify.ignoreDepthTexture.value) { + builder.UseTexture(resourceData.activeDepthTexture, AccessFlags.Read); + ConfigureInput(ScriptableRenderPassInput.Depth); + } + + if (usesDirectWriteToCamera) { + if (resourceData.isActiveTargetBackBuffer) { + usesDirectWriteToCamera = false; + } else { + var cameraData = frameData.Get(); + var descriptor = cameraData.cameraTargetDescriptor; + descriptor.msaaSamples = 1; + descriptor.depthBufferBits = 0; + directWriteTextureHandle = UniversalRenderer.CreateRenderGraphTexture(renderGraph, descriptor, "BlitMaterialRefTex_Beautify", false); + resourceData.cameraColor = directWriteTextureHandle; + builder.UseTexture(directWriteTextureHandle, AccessFlags.WriteAll); + } + } + + builder.SetRenderFunc((PassData passData, UnsafeGraphContext context) => { + CommandBuffer cmd = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + passData.cmd = cmd; + source = passData.colorTexture; + + if (bMat == null) return; + + if (beautify == null) { + beautify = VolumeManager.instance.stack.GetComponent(); + } + if (beautify == null || !beautify.IsActive()) return; + + if (source.rt != null) { + sourceDesc = source.rt.descriptor; + } + sourceDesc.msaaSamples = 1; + sourceDesc.depthBufferBits = 0; + if (sourceDesc.width <= 0) sourceDesc.width = 1; + if (sourceDesc.height <= 0) sourceDesc.height = 1; + + if (beautify.downsampling.value) { + UniversalRenderPipelineAsset pipe = (UniversalRenderPipelineAsset)GraphicsSettings.currentRenderPipeline; + float downsamplingMultiplier = 1f / beautify.downsamplingMultiplier.value; + if (downsamplingMultiplier < 1f) { + DownsamplingMode mode = beautify.downsamplingMode.value; + if (mode == DownsamplingMode.BeautifyEffectsOnly) { + sourceDesc.width = (int)(sourceDesc.width * downsamplingMultiplier); + sourceDesc.height = (int)(sourceDesc.height * downsamplingMultiplier); + if (sourceDesc.width <= 0) sourceDesc.width = 1; + if (sourceDesc.height <= 0) sourceDesc.height = 1; + if (pipe.renderScale != 1f) { + pipe.renderScale = 1f; + } + } else { + if (pipe.renderScale != downsamplingMultiplier) { + pipe.renderScale = downsamplingMultiplier; + beautify.downsamplingMultiplier.value = 1f / pipe.renderScale; + } + } + } + else { + if (pipe.renderScale != 1f) { + pipe.renderScale = 1f; + } + } + } + + sourceDescHP = sourceDesc; + if (supportsFPTextures) { + sourceDescHP.colorFormat = RenderTextureFormat.ARGBHalf; + } + + ExecutePass(passData); + }); + } + } +#endif + + static void ExecutePass (PassData passData) { + + Camera cam = passData.camera; + CommandBuffer cmd = passData.cmd; + +#if UNITY_EDITOR + if (requestScreenCapture && cam != null && cam.cameraType == captureCameraType) { + requestScreenCapture = false; + if (rtCapture != null) { + rtCapture.Release(); + } + rtCapture = new RenderTexture(sourceDesc); + FullScreenBlit(cmd, source, rtCapture, bMat, (int)Pass.CopyExact); + cmd.SetGlobalTexture(ShaderParams.lutPreview, rtCapture); + } + else { + if (cam.cameraType == CameraType.SceneView && beautify.hideInSceneView.value && !requestScreenCapture) return; + } +#else + if (cam.cameraType == CameraType.SceneView && beautify.hideInSceneView.value) return; +#endif + + + RestoreRTBufferIds(); + + bMat.SetFloat(ShaderParams.flipY, beautify.flipY.value ? -1 : 1); // workaround for 2D renderer bug with camera stacking + + if (requiresLuminanceComputation || usesBloomAndFlares || usesDepthOfField) { + if (!perCamData.TryGetValue(cam, out camData)) { + camData = new PerCamData(); + perCamData[cam] = camData; + } + if (camData.rtSunFlaresOcclusion == null) { + camData.rtSunFlaresOcclusion = RTHandles.Alloc(2, 2, colorFormat: UnityEngine.Experimental.Rendering.GraphicsFormat.R16G16B16A16_SFloat); + requiresSunFlaresOcclusionRTInit = true; + } + else { + requiresSunFlaresOcclusionRTInit = false; + } + } + + if (usesSeparateOutline && !BeautifySettings.outlineBeforeTransparents && beautify.outlineStageParameter.value == OutlineStage.BeforeBloom) { + DoSeparateOutline(cmd); + } + + bool dofAffectsBloom = usesDepthOfField && usesBloomAndFlares && beautify.depthOfFieldAffectsBloom.value; + if (dofAffectsBloom) { + DoDoF(cmd); + } + + if (usesBloomAndFlares) { + DoBloomAndFlares(cmd, dofAffectsBloom); + } + + if (usesSeparateOutline && !BeautifySettings.outlineBeforeTransparents && beautify.outlineStageParameter.value == OutlineStage.AfterBloom) { + DoSeparateOutline(cmd); + } + + if (requiresLuminanceComputation) { + DoEyeAdaptation(cmd); + } + + if (usesDepthOfField && !dofAffectsBloom) { + DoDoF(cmd); + } + + if (usesVignetting) { + DoVignette(); + } + + bool usesChromaticAberrationAsPost = beautify.chromaticAberrationIntensity.value > 0 && (beautify.depthOfField.value || beautify.chromaticAberrationSeparatePass.value); + bool usesFinalBlur = beautify.blurIntensity.value > 0; + int blurComposePass = usesFinalBlur && beautify.blurKeepSourceOnTop.value ? (int)Pass.CopyWithMiniView : (int)Pass.CopyBilinear; + + if (usesDirectWriteToCamera) { + // direct output to camera + if (beautify.debugOutput.value == DebugOutput.DepthOfFieldCoC) { + if (beautify.depthOfField.value) { + // we ignore input contents + FullScreenBlitToCamera(cmd, source, BuiltinRenderTextureType.CameraTarget, bMat, (int)Pass.DoFCoCDebug); + } + } + else if (beautify.debugOutput.value == DebugOutput.BloomAndFlares) { + if (beautify.bloomIntensity.value > 0 || beautify.anamorphicFlaresIntensity.value > 0 || beautify.sunFlaresIntensity.value > 0 || beautify.lensDirtIntensity.value > 0) { + // we ignore input contents + FullScreenBlitToCamera(cmd, source, BuiltinRenderTextureType.CameraTarget, bMat, (int)Pass.BloomDebug); + } + } + else if (beautify.debugOutput.value == DebugOutput.BloomExclusionPass) { + if (beautify.bloomIntensity.value > 0 && beautify.bloomExcludeLayers.value) { + // we ignore input contents + FullScreenBlitToCamera(cmd, source, BuiltinRenderTextureType.CameraTarget, bMat, (int)Pass.BloomExclusionLayerDebug); + } + } + else if (beautify.debugOutput.value == DebugOutput.AnamorphicFlaresExclusionPass) { + if (beautify.anamorphicFlaresIntensity.value > 0 && beautify.anamorphicFlaresExcludeLayers.value) { + // we ignore input contents + FullScreenBlitToCamera(cmd, source, BuiltinRenderTextureType.CameraTarget, bMat, (int)Pass.AnamorphicFlaresExclusionLayerDebug); + } + } + else if (beautify.debugOutput.value == DebugOutput.DepthOfFieldTransparentPass) { + if (beautify.depthOfField.value && (beautify.depthOfFieldTransparentSupport.value || beautify.depthOfFieldAlphaTestSupport.value)) { + // we ignore input contents + FullScreenBlitToCamera(cmd, source, BuiltinRenderTextureType.CameraTarget, bMat, (int)Pass.DoFDebugTransparent); + } + } + else if (beautify.compareMode.value) { + cmd.GetTemporaryRT(ShaderParams.compareTex, sourceDesc, FilterMode.Point); + if (usesChromaticAberrationAsPost) { + // chromatic aberration added as a post-pass due to depth of field + cmd.GetTemporaryRT(ShaderParams.chromaticTempTex, sourceDesc, FilterMode.Point); + FullScreenBlit(cmd, source, ShaderParams.chromaticTempTex, bMat, (int)Pass.Beautify); + FullScreenBlit(cmd, ShaderParams.chromaticTempTex, ShaderParams.compareTex, bMat, (int)Pass.ChromaticAberration); + cmd.ReleaseTemporaryRT(ShaderParams.chromaticTempTex); + } + else { + FullScreenBlit(cmd, source, ShaderParams.compareTex, bMat, (int)Pass.Beautify); + } + if (usesFinalBlur) { + // final blur + int blurSource = ApplyFinalBlur(cmd, ShaderParams.compareTex); + FullScreenBlit(cmd, blurSource, ShaderParams.compareTex, bMat, blurComposePass); + } + FullScreenBlitToCamera(cmd, source, BuiltinRenderTextureType.CameraTarget, bMat, (int)Pass.Compare); + cmd.ReleaseTemporaryRT(ShaderParams.compareTex); + } + else { + RenderTargetIdentifier preBlurDest = BuiltinRenderTextureType.CameraTarget; + if (usesFinalBlur) { + cmd.GetTemporaryRT(ShaderParams.inputTex, sourceDesc, FilterMode.Point); + preBlurDest = ShaderParams.inputTex; + } + if (usesChromaticAberrationAsPost) { + // chromatic aberration added as a post-pass due to depth of field + cmd.GetTemporaryRT(ShaderParams.chromaticTempTex, sourceDesc, FilterMode.Point); + FullScreenBlit(cmd, source, ShaderParams.chromaticTempTex, bMat, (int)Pass.Beautify); + FullScreenBlitToCamera(cmd, ShaderParams.chromaticTempTex, preBlurDest, bMat, (int)Pass.ChromaticAberration); + cmd.ReleaseTemporaryRT(ShaderParams.chromaticTempTex); + } + else { + FullScreenBlitToCamera(cmd, source, preBlurDest, bMat, (int)Pass.Beautify); + } + if (usesFinalBlur) { + // final blur + int blurSource = ApplyFinalBlur(cmd, preBlurDest); + FullScreenBlitToCamera(cmd, blurSource, BuiltinRenderTextureType.CameraTarget, bMat, blurComposePass); + cmd.ReleaseTemporaryRT(ShaderParams.inputTex); + } + } + + } + else { + + // non direct to camera + + bool useBilinearFiltering = beautify.downsampling.value && beautify.downsamplingMultiplier.value > 1f && beautify.downsamplingBilinear.value; + int copyPass = useBilinearFiltering ? (int)Pass.CopyBilinear : (int)Pass.CopyExact; + + cmd.GetTemporaryRT(ShaderParams.inputTex, sourceDesc, (!beautify.downsampling.value || (beautify.downsamplingMultiplier.value > 1f && !beautify.downsamplingBilinear.value)) ? FilterMode.Point : FilterMode.Bilinear); + + if (beautify.debugOutput.value == DebugOutput.DepthOfFieldCoC) { + if (beautify.depthOfField.value) { + // we ignore input contents + FullScreenBlit(cmd, ShaderParams.inputTex, source, bMat, (int)Pass.DoFCoCDebug); + } + } + else if (beautify.debugOutput.value == DebugOutput.BloomAndFlares) { + if (beautify.bloomIntensity.value > 0 || beautify.anamorphicFlaresIntensity.value > 0 || beautify.sunFlaresIntensity.value > 0 || beautify.lensDirtIntensity.value > 0) { + // we ignore input contents + FullScreenBlit(cmd, ShaderParams.inputTex, source, bMat, (int)Pass.BloomDebug); + } + } + else if (beautify.debugOutput.value == DebugOutput.BloomExclusionPass) { + if (beautify.bloomIntensity.value > 0 && beautify.bloomExcludeLayers.value) { + // we ignore input contents + FullScreenBlit(cmd, ShaderParams.inputTex, source, bMat, (int)Pass.BloomExclusionLayerDebug); + } + } + else if (beautify.debugOutput.value == DebugOutput.AnamorphicFlaresExclusionPass) { + if (beautify.anamorphicFlaresIntensity.value > 0 && beautify.anamorphicFlaresExcludeLayers.value) { + // we ignore input contents + FullScreenBlit(cmd, ShaderParams.inputTex, source, bMat, (int)Pass.AnamorphicFlaresExclusionLayerDebug); + } + } + else if (beautify.debugOutput.value == DebugOutput.DepthOfFieldTransparentPass) { + if (beautify.depthOfField.value && (beautify.depthOfFieldTransparentSupport.value || beautify.depthOfFieldAlphaTestSupport.value)) { + // we ignore input contents + FullScreenBlit(cmd, ShaderParams.inputTex, source, bMat, (int)Pass.DoFDebugTransparent); + } + } + else if (beautify.compareMode.value) { + cmd.GetTemporaryRT(ShaderParams.compareTex, sourceDesc, FilterMode.Point); + if (usesChromaticAberrationAsPost) { + // chromatic aberration added as a post-pass due to depth of field + FullScreenBlit(cmd, source, ShaderParams.inputTex, bMat, (int)Pass.Beautify); + FullScreenBlit(cmd, ShaderParams.inputTex, ShaderParams.compareTex, bMat, (int)Pass.ChromaticAberration); + } + else { + FullScreenBlit(cmd, source, ShaderParams.compareTex, bMat, (int)Pass.Beautify); + } + if (usesFinalBlur) { + // final blur + int blurSource = ApplyFinalBlur(cmd, ShaderParams.compareTex); + FullScreenBlit(cmd, blurSource, ShaderParams.compareTex, bMat, blurComposePass); + } + FullScreenBlit(cmd, source, ShaderParams.inputTex, bMat, copyPass); + FullScreenBlit(cmd, ShaderParams.inputTex, source, bMat, (int)Pass.Compare); + cmd.ReleaseTemporaryRT(ShaderParams.compareTex); + } + else { + if (usesChromaticAberrationAsPost) { + // chromatic aberration added as a post-pass due to depth of field + FullScreenBlit(cmd, source, ShaderParams.inputTex, bMat, (int)Pass.Beautify); + FullScreenBlit(cmd, ShaderParams.inputTex, source, bMat, (int)Pass.ChromaticAberration); + } + else { + FullScreenBlit(cmd, source, ShaderParams.inputTex, bMat, copyPass); + FullScreenBlit(cmd, ShaderParams.inputTex, source, bMat, (int)Pass.Beautify); + } + if (usesFinalBlur) { + // final blur + int blurSource = ApplyFinalBlur(cmd, source); + FullScreenBlit(cmd, blurSource, source, bMat, blurComposePass); + } + cmd.ReleaseTemporaryRT(ShaderParams.miniViewTex); + } + + cmd.ReleaseTemporaryRT(ShaderParams.inputTex); + } + + } + + static Mesh _fullScreenMesh; + + static Mesh fullscreenMesh { + get { + if (_fullScreenMesh != null) { + return _fullScreenMesh; + } + Mesh val = new Mesh(); + _fullScreenMesh = val; + _fullScreenMesh.SetVertices(new List { + new Vector3 (-1f, -1f, 0f), + new Vector3 (-1f, 1f, 0f), + new Vector3 (1f, -1f, 0f), + new Vector3 (1f, 1f, 0f) + }); + _fullScreenMesh.SetUVs(0, new List { + new Vector2 (0f, 0f), + new Vector2 (0f, 1f), + new Vector2 (1f, 0f), + new Vector2 (1f, 1f) + }); + _fullScreenMesh.SetIndices(new int[6] { 0, 1, 2, 2, 1, 3 }, (MeshTopology)0, 0, false); + _fullScreenMesh.UploadMeshData(true); + return _fullScreenMesh; + } + } + + + static void FullScreenBlit (CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination, Material material, int passIndex) { + destination = new RenderTargetIdentifier(destination, 0, CubemapFace.Unknown, -1); + cmd.SetRenderTarget(destination); + cmd.SetGlobalTexture(ShaderParams.mainTex, source); + cmd.DrawMesh(fullscreenMesh, matrix4x4identity, material, 0, passIndex); + } + + static void FullScreenBlitToCamera (CommandBuffer cmd, RenderTargetIdentifier source, RenderTargetIdentifier destination, Material material, int passIndex) { +#if UNITY_2022_3_OR_NEWER + // if destination is camera, make use of swap buffers + if (destination == BuiltinRenderTextureType.CameraTarget) { +#if UNITY_2023_3_OR_NEWER + if (usingRenderGraph) { + RenderTargetIdentifier dest = directWriteTextureHandle; + dest = new RenderTargetIdentifier(dest, 0, CubemapFace.Unknown, -1); + cmd.SetRenderTarget(dest); + cmd.SetGlobalTexture(ShaderParams.mainTex, source); + cmd.DrawMesh(fullscreenMesh, matrix4x4identity, material, 0, passIndex); + } else +#endif +#if !UNITY_6000_3_OR_NEWER + { +#pragma warning disable 0618 + RenderTargetIdentifier dest = renderer.GetCameraColorFrontBuffer(cmd); +#pragma warning restore 0618 + dest = new RenderTargetIdentifier(dest, 0, CubemapFace.Unknown, -1); + cmd.SetRenderTarget(dest); + cmd.SetGlobalTexture(ShaderParams.mainTex, source); + cmd.DrawMesh(fullscreenMesh, matrix4x4identity, material, 0, passIndex); + renderer.SwapColorBuffer(cmd); + } +#endif + return; + } +#endif + FullScreenBlit(cmd, source, destination, material, passIndex); + } + + + public void Cleanup () { + + UniversalRenderPipelineAsset pipe = (UniversalRenderPipelineAsset)GraphicsSettings.currentRenderPipeline; + if (beautify != null && pipe != null && beautify.downsampling.value) { + pipe.renderScale = 1f; + } + + CoreUtils.Destroy(bMat); + + foreach (PerCamData data in perCamData.Values) { + if (data.rtSunFlaresOcclusion != null) { + data.rtSunFlaresOcclusion.Release(); + } + } + + if (dofGlobalRT != null) { + dofGlobalRT.Release(); + dofGlobalRT = null; + } + +#if UNITY_EDITOR + if (rtCapture != null) { + rtCapture.Release(); + } +#endif + } + + + static void RestoreRTBufferIds () { + // Restore temorary rt ids + for (int k = 0; k < rt.Length; k++) { + rt[k].rtDown = rt[k].rtDownOriginal; + rt[k].rtUp = rt[k].rtUpOriginal; + } + for (int k = 0; k < rtAF.Length; k++) { + rtAF[k].rtDown = rtAF[k].rtDownOriginal; + rtAF[k].rtUp = rtAF[k].rtUpOriginal; + } + ShaderParams.tempBlurOneDirRT = ShaderParams.tempBlurOneDirRTOriginal; + ShaderParams.tempBloomCustomComposeRT = ShaderParams.tempBloomCustomComposeRTOriginal; + } + + static int ApplyFinalBlur (CommandBuffer cmd, RenderTargetIdentifier source) { + + if (beautify.blurKeepSourceOnTop.value) { + Vector4 rect = beautify.blurSourceRect.value; + RenderTextureDescriptor miniViewDesc = sourceDesc; + miniViewDesc.width = (int)(miniViewDesc.width * rect.z); + if (miniViewDesc.width < 1) miniViewDesc.width = 1; + miniViewDesc.height = (int)(miniViewDesc.height * rect.w); + if (miniViewDesc.height < 1) miniViewDesc.height = 1; + cmd.GetTemporaryRT(ShaderParams.miniViewTex, miniViewDesc, FilterMode.Bilinear); + FullScreenBlit(cmd, source, ShaderParams.miniViewTex, bMat, (int)Pass.CopyBilinear); + bMat.SetVector(ShaderParams.miniViewRect, rect); + float fparam = (1.00001f - beautify.blurSourceEdgeBlendWidth.value) * 0.5f; + float wparam = beautify.blurSourceEdgeBlendStrength.value; + bMat.SetVector(ShaderParams.miniViewBlend, new Vector4(fparam, wparam, fparam, wparam)); + } + + int size; + RenderTextureDescriptor rtBlurDesc = sourceDescHP; + + float blurIntensity = beautify.blurIntensity.value; + if (blurIntensity < 1f) { + size = (int)Mathf.Lerp(rtBlurDesc.width, 512, blurIntensity); + } + else { + size = (int)(512 / blurIntensity); + } + float aspectRatio = (float)sourceDesc.height / sourceDesc.width; + rtBlurDesc.width = size; + rtBlurDesc.height = Mathf.Max(1, (int)(size * aspectRatio)); + cmd.GetTemporaryRT(ShaderParams.blurRT, rtBlurDesc, FilterMode.Bilinear); + + float ratio = (float)sourceDesc.width / size; + float blurScale = blurIntensity > 1f ? 1f : blurIntensity; + + cmd.GetTemporaryRT(ShaderParams.tempBlurDownscaling, rtBlurDesc, FilterMode.Bilinear); + cmd.SetGlobalFloat(ShaderParams.blurScale, blurScale * ratio); + FullScreenBlit(cmd, source, ShaderParams.tempBlurDownscaling, bMat, (int)Pass.BlurHoriz); + cmd.SetGlobalFloat(ShaderParams.blurScale, blurScale); + FullScreenBlit(cmd, ShaderParams.tempBlurDownscaling, ShaderParams.blurRT, bMat, (int)Pass.BlurVert); + cmd.ReleaseTemporaryRT(ShaderParams.tempBlurDownscaling); + + BlurThis(cmd, rtBlurDesc, ShaderParams.blurRT, rtBlurDesc.width, rtBlurDesc.height, bMat, blurScale); + if (!beautify.turboMode.value) { + BlurThis(cmd, rtBlurDesc, ShaderParams.blurRT, rtBlurDesc.width, rtBlurDesc.height, bMat, blurScale); + BlurThis(cmd, rtBlurDesc, ShaderParams.blurRT, rtBlurDesc.width, rtBlurDesc.height, bMat, blurScale); + } + + Beautify.CreativeBlurStyle style = beautify.blurStyle.value; + bool hasMask = beautify.blurMask.value != null; + bool useMask = hasMask || style != Beautify.CreativeBlurStyle.ScreenBlur || beautify.blurDesaturation.value > 0; + + if (useMask) { + float styleVal = (float)style; + float width = style == Beautify.CreativeBlurStyle.TiltShift ? beautify.blurTiltShiftWidth.value : beautify.blurRadialBlurRadius.value; + float falloff = style == Beautify.CreativeBlurStyle.TiltShift ? beautify.blurTiltShiftFalloff.value : beautify.blurRadialBlurFalloff.value; + + Vector4 blurData = new Vector4(beautify.blurCenter.value.x, beautify.blurCenter.value.y, width, falloff); + cmd.SetGlobalVector(ShaderParams.blurData, blurData); + + Vector4 blurData2 = new Vector4(styleVal, beautify.blurShowMask.value ? 1f : 0f, beautify.blurDesaturation.value, hasMask ? 1f : 0f); + cmd.SetGlobalVector(ShaderParams.blurData2, blurData2); + + cmd.GetTemporaryRT(ShaderParams.blurMaskedRT, sourceDesc); + FullScreenBlit(cmd, source, ShaderParams.blurMaskedRT, bMat, (int)Pass.BlurMask); + return ShaderParams.blurMaskedRT; + } + else { + return ShaderParams.blurRT; + } + } + + + + static void DoBloomAndFlares (CommandBuffer cmd, bool dofAffectsBloom) { + + Camera cam = cameraData.camera; + bool sunFlareEnabled = false; + if (beautify.sunFlaresIntensity.value > 0) { + CheckSun(); + sunFlareEnabled = sceneSettings != null && sceneSettings.sun != null; + } + + RenderTargetIdentifier source = dofAffectsBloom && dofGlobalRT != null ? dofGlobalRT : BeautifyRenderPass.source; + + if (beautify.lensDirtIntensity.value > 0 || beautify.bloomIntensity.value > 0 || beautify.anamorphicFlaresIntensity.value > 0 || sunFlareEnabled) { + + int mipCount = beautify.turboMode.value ? PYRAMID_COUNT_BLOOM_TURBO : PYRAMID_COUNT_BLOOM; + float aspectRatio = (float)sourceDesc.height / sourceDesc.width; + int rtBloom = -1; + int downsamping = beautify.turboMode.value ? 4 : 2; + int lensDirtSpread = beautify.turboMode.value ? 2 : beautify.lensDirtSpread.value; + + if (beautify.bloomIntensity.value > 0 || (beautify.lensDirtIntensity.value > 0 && beautify.anamorphicFlaresIntensity.value <= 0)) { + + int size = (int)(Mathf.Lerp(512, sourceDesc.width, beautify.bloomResolution.value / 10f) / 4f) * 4; + RenderTextureDescriptor bloomDesc = sourceDescHP; + for (int k = 0; k <= mipCount; k++) { + rt[k].width = size; + rt[k].height = Mathf.Max(1, (int)(size * aspectRatio)); + bloomDesc.width = rt[k].width; + bloomDesc.height = rt[k].height; + cmd.ReleaseTemporaryRT(rt[k].rtDown); + cmd.GetTemporaryRT(rt[k].rtDown, bloomDesc, FilterMode.Bilinear); + cmd.ReleaseTemporaryRT(rt[k].rtUp); + cmd.GetTemporaryRT(rt[k].rtUp, bloomDesc, FilterMode.Bilinear); + size /= downsamping; + } + + rtBloom = rt[0].rtDown; + if (beautify.bloomAntiflicker.value) { + FullScreenBlit(cmd, source, rtBloom, bMat, (int)Pass.BloomLuminanceAntiflicker); + } + else { + FullScreenBlit(cmd, source, rtBloom, bMat, (int)Pass.BloomLuminance); + } + + // Blitting down... + if (beautify.bloomQuickerBlur.value) { + for (int k = 0; k < mipCount; k++) { + BlurThisDownsampling(cmd, bloomDesc, rt[k].rtDown, rt[k + 1].rtDown, rt[k + 1].width, rt[k + 1].height, bMat); + } + } + else { + for (int k = 0; k < mipCount; k++) { + FullScreenBlit(cmd, rt[k].rtDown, rt[k + 1].rtDown, bMat, (int)Pass.BloomResample); + BlurThis(cmd, bloomDesc, rt[k + 1].rtDown, rt[k + 1].width, rt[k + 1].height, bMat); + } + } + if (beautify.bloomIntensity.value > 0 || beautify.lensDirtIntensity.value > 0) { + // Blitting up... + rtBloom = rt[mipCount].rtDown; + for (int k = mipCount; k > 0; k--) { + cmd.SetGlobalTexture(ShaderParams.bloomTex, rt[k - 1].rtDown); + FullScreenBlit(cmd, rtBloom, rt[k - 1].rtUp, bMat, (int)Pass.BloomResampleAndCombine); + rtBloom = rt[k - 1].rtUp; + } + if (beautify.bloomCustomize.value) { + cmd.SetGlobalTexture(ShaderParams.bloomTex4, mipCount < 4 ? rt[3].rtUp : rt[4].rtUp); + cmd.SetGlobalTexture(ShaderParams.bloomTex3, rt[3].rtUp); + cmd.SetGlobalTexture(ShaderParams.bloomTex2, rt[2].rtUp); + cmd.SetGlobalTexture(ShaderParams.bloomTex1, rt[1].rtUp); + cmd.SetGlobalTexture(ShaderParams.bloomTex, rt[0].rtUp); + bloomDesc.width = rt[0].width; + bloomDesc.height = rt[0].height; + cmd.ReleaseTemporaryRT(ShaderParams.tempBloomCustomComposeRT); + cmd.GetTemporaryRT(ShaderParams.tempBloomCustomComposeRT, bloomDesc, FilterMode.Bilinear); + rtBloom = ShaderParams.tempBloomCustomComposeRT; + FullScreenBlit(cmd, rt[mipCount].rtUp, rtBloom, bMat, (int)Pass.BloomCompose); + } + } + } + + // anamorphic flares + if (beautify.anamorphicFlaresIntensity.value > 0) { + + int sizeAF = (int)(Mathf.Lerp(512, sourceDescHP.width, beautify.anamorphicFlaresResolution.value / 10f) / 4f) * 4; + + RenderTextureDescriptor afDesc = sourceDescHP; + + float spread = (1920 / 1080f) * beautify.anamorphicFlaresSpread.value * sizeAF / 512f; + for (int origSize = sizeAF, k = 0; k <= mipCount; k++) { + int w = Mathf.Max(1, (int)(sizeAF / spread)); + if (beautify.anamorphicFlaresVertical.value) { + rtAF[k].width = origSize; + rtAF[k].height = w; + } + else { + rtAF[k].width = w; + rtAF[k].height = origSize; + } + afDesc.width = rtAF[k].width; + afDesc.height = rtAF[k].height; + cmd.ReleaseTemporaryRT(rtAF[k].rtDown); + cmd.GetTemporaryRT(rtAF[k].rtDown, afDesc, FilterMode.Bilinear); + cmd.ReleaseTemporaryRT(rtAF[k].rtUp); + cmd.GetTemporaryRT(rtAF[k].rtUp, afDesc, FilterMode.Bilinear); + sizeAF /= downsamping; + } + + if (beautify.anamorphicFlaresAntiflicker.value) { + FullScreenBlit(cmd, source, rtAF[0].rtDown, bMat, (int)Pass.AnamorphicFlaresLuminanceAntiflicker); + } + else { + FullScreenBlit(cmd, source, rtAF[0].rtDown, bMat, (int)Pass.AnamorphicFlaresLuminance); + } + + BlurThisOneDirection(cmd, afDesc, ref rtAF[0].rtDown, rtAF[0].width, rtAF[0].height, beautify.anamorphicFlaresVertical.value); + + if (beautify.anamorphicFlaresQuickerBlur.value) { + for (int k = 0; k < mipCount; k++) { + BlurThisOneDirectionDownscaling(cmd, afDesc, rtAF[k].rtDown, rtAF[k + 1].rtDown, rtAF[k + 1].width, rtAF[k + 1].height, beautify.anamorphicFlaresVertical.value); + } + } + else { + for (int k = 0; k < mipCount; k++) { + FullScreenBlit(cmd, rtAF[k].rtDown, rtAF[k + 1].rtDown, bMat, (int)Pass.BloomResample); + BlurThisOneDirection(cmd, afDesc, ref rtAF[k + 1].rtDown, rtAF[k + 1].width, rtAF[k + 1].height, beautify.anamorphicFlaresVertical.value); + } + } + + int last = rtAF[mipCount].rtDown; + for (int k = mipCount; k > 0; k--) { + cmd.SetGlobalTexture(ShaderParams.bloomTex, rtAF[k].rtDown); + if (k == 1) { + FullScreenBlit(cmd, last, rtAF[k - 1].rtUp, bMat, (int)Pass.AnamorphicFlaresResample); // applies intensity in last stage + } + else { + FullScreenBlit(cmd, last, rtAF[k - 1].rtUp, bMat, (int)Pass.BloomResampleAndCombine); + } + last = rtAF[k - 1].rtUp; + } + if (beautify.bloomIntensity.value > 0) { + if (beautify.lensDirtIntensity.value > 0) { + BlendOneOne(cmd, rtAF[lensDirtSpread].rtUp, ref rt[lensDirtSpread].rtUp, ref rt[lensDirtSpread].rtDown); + } + BlendOneOne(cmd, last, ref rtBloom, ref rt[0].rtDown); + } + else { + rtBloom = last; + } + } + + if (sunFlareEnabled) { + // check if Sun is visible + Vector3 sunDirection = sceneSettings.sun.transform.forward; + Vector3 sunWorldPosition = cam.transform.position - sunDirection * 1000f; + float flareIntensity = 0; + Vector3 sunScrPos = cam.WorldToViewportPoint(sunWorldPosition); + bool sunVisible = sunScrPos.z > 0 && sunScrPos.x >= -0.1f && sunScrPos.x < 1.1f && sunScrPos.y >= -0.1f && sunScrPos.y < 1.1f; + if (sunVisible) { + if (beautify.sunFlaresUseLayerMask.value) { + Ray ray = new Ray(cam.transform.position, -sunDirection); + if (Physics.Raycast(ray, cam.farClipPlane, beautify.sunFlaresLayerMask.value)) { + sunVisible = false; + } + } + if (sunVisible) { + Vector2 dd = sunScrPos - new Vector3(0.5f, 0.5f, 0.5f); + flareIntensity = beautify.sunFlaresIntensity.value * Mathf.Clamp01((0.7f - Mathf.Max(Mathf.Abs(dd.x), Mathf.Abs(dd.y))) / 0.7f); + } + } + + if (beautify.bloomIntensity.value <= 0 && beautify.anamorphicFlaresIntensity.value <= 0) { // ensure _Bloom.x is 1 into the shader for sun flares to be visible if no bloom nor anamorphic flares are enabled + bMat.SetVector(ShaderParams.bloom, Vector4.one); + } + else { + flareIntensity /= (beautify.bloomIntensity.value + 0.0001f); + } + camData.sunFlareCurrentIntensity = Mathf.Lerp(camData.sunFlareCurrentIntensity, flareIntensity, Application.isPlaying ? beautify.sunFlaresAttenSpeed.value * Time.deltaTime : 1f); + if (camData.sunFlareCurrentIntensity > 0) { + if (flareIntensity > 0) { + camData.sunLastScrPos = sunScrPos; + if (canUseDepthTexture) { + if (beautify.sunFlaresDepthOcclusionMode.value == SunFlaresDepthOcclusionMode.Smooth) { + if (requiresSunFlaresOcclusionRTInit || !Application.isPlaying) { + bMat.EnableKeyword(ShaderParams.SKW_SUN_FLARES_OCCLUSION_INIT); + } + else { + bMat.DisableKeyword(ShaderParams.SKW_SUN_FLARES_OCCLUSION_INIT); + } + FullScreenBlit(cmd, source, camData.rtSunFlaresOcclusion, bMat, (int)Pass.SunFlaresOcclusionTest); + } + } + } + + bMat.SetTexture(ShaderParams.sfOcclusionTex, camData.rtSunFlaresOcclusion); + Color sunTintColor = beautify.sunFlaresTint.value; + sunTintColor.r *= camData.sunFlareCurrentIntensity; + sunTintColor.g *= camData.sunFlareCurrentIntensity; + sunTintColor.b *= camData.sunFlareCurrentIntensity; + sunTintColor.a = beautify.sunFlaresAttenSpeed.value; + + bMat.SetColor(ShaderParams.sfSunTintColor, sunTintColor); + camData.sunLastScrPos.z = 0.5f + camData.sunFlareTime * beautify.sunFlaresSolarWindSpeed.value; + Vector2 sfDist = new Vector2(0.5f - camData.sunLastScrPos.y, camData.sunLastScrPos.x - 0.5f); + if (!beautify.sunFlaresRotationDeadZone.value || sfDist.sqrMagnitude > 0.00025f) { + camData.sunLastRot = Mathf.Atan2(sfDist.x, sfDist.y); + } + camData.sunLastScrPos.w = camData.sunLastRot; + camData.sunFlareTime += Time.unscaledDeltaTime; + bMat.SetVector(ShaderParams.sfSunPos, camData.sunLastScrPos); + bMat.SetVector(ShaderParams.sfSunDir, sunDirection); + RenderTextureDescriptor sfDesc = sourceDesc; + sfDesc.width /= beautify.sunFlaresDownsampling.value; + sfDesc.height /= beautify.sunFlaresDownsampling.value; + bMat.SetFloat(ShaderParams.sfAspectRatio, (float)sourceDesc.height / sourceDesc.width); + cmd.GetTemporaryRT(ShaderParams.sfRT, sfDesc, FilterMode.Bilinear); + if (rtBloom >= 0) { + FullScreenBlit(cmd, rtBloom, ShaderParams.sfRT, bMat, (int)Pass.SunFlaresAdditive); + } + else { + FullScreenBlit(cmd, source, ShaderParams.sfRT, bMat, (int)Pass.SunFlares); + } + if (beautify.lensDirtIntensity.value > 0 && beautify.bloomIntensity.value > 0) { + BlendOneOne(cmd, ShaderParams.sfRT, ref rt[lensDirtSpread].rtUp, ref rt[lensDirtSpread].rtDown); + } + rtBloom = ShaderParams.sfRT; + } + } + + if (rtBloom >= 0) { + cmd.SetGlobalTexture(ShaderParams.bloomTex, rtBloom); + } + else { + bMat.DisableKeyword(ShaderParams.SKW_BLOOM); + } + + if (beautify.lensDirtIntensity.value > 0) { + int rtID = (beautify.anamorphicFlaresIntensity.value > 0 && beautify.bloomIntensity.value <= 0) ? rtAF[lensDirtSpread].rtUp : rt[lensDirtSpread].rtUp; + cmd.SetGlobalTexture(ShaderParams.screenLum, rtID); + } + + } + } + + static void BlendOneOne (CommandBuffer cmd, int source, ref int destination, ref int tempBuffer) { + cmd.SetGlobalTexture(ShaderParams.afCombineTex, destination); // _BloomTex used as temporary rt for combining + FullScreenBlit(cmd, source, tempBuffer, bMat, (int)Pass.AnamorphicFlaresResampleAndCombine); + // swap buffers + int tmp = destination; + destination = tempBuffer; + tempBuffer = tmp; + } + + static void BlurThis (CommandBuffer cmd, RenderTextureDescriptor desc, int rt, int width, int height, Material blurMat, float blurScale = 1f) { + desc.width = width; + desc.height = height; + cmd.GetTemporaryRT(ShaderParams.tempBlurRT, desc, FilterMode.Bilinear); + cmd.SetGlobalFloat(ShaderParams.blurScale, blurScale); + FullScreenBlit(cmd, rt, ShaderParams.tempBlurRT, blurMat, (int)Pass.BlurHoriz); + FullScreenBlit(cmd, ShaderParams.tempBlurRT, rt, blurMat, (int)Pass.BlurVert); + cmd.ReleaseTemporaryRT(ShaderParams.tempBlurRT); + } + + static void BlurThisDownsampling (CommandBuffer cmd, RenderTextureDescriptor desc, int rtSource, int rt, int width, int height, Material blurMat, float blurScale = 1f) { + desc.width = width; + desc.height = height; + cmd.GetTemporaryRT(ShaderParams.tempBlurRT, desc, FilterMode.Bilinear); + cmd.SetGlobalFloat(ShaderParams.blurScale, blurScale * 4f); + FullScreenBlit(cmd, rtSource, ShaderParams.tempBlurRT, blurMat, (int)Pass.BlurHoriz); + cmd.SetGlobalFloat(ShaderParams.blurScale, blurScale); + FullScreenBlit(cmd, ShaderParams.tempBlurRT, rt, blurMat, (int)Pass.BlurVert); + cmd.ReleaseTemporaryRT(ShaderParams.tempBlurRT); + } + + static void BlurThisOneDirection (CommandBuffer cmd, RenderTextureDescriptor desc, ref int rt, int width, int height, bool vertical, float blurScale = 1f) { + desc.width = width; + desc.height = height; + cmd.ReleaseTemporaryRT(ShaderParams.tempBlurOneDirRT); + cmd.GetTemporaryRT(ShaderParams.tempBlurOneDirRT, desc, FilterMode.Bilinear); + cmd.SetGlobalFloat(ShaderParams.blurScale, blurScale); + FullScreenBlit(cmd, rt, ShaderParams.tempBlurOneDirRT, bMat, vertical ? (int)Pass.BlurVert : (int)Pass.BlurHoriz); + int aux = rt; + rt = ShaderParams.tempBlurOneDirRT; + ShaderParams.tempBlurOneDirRT = aux; + } + + static void BlurThisOneDirectionDownscaling (CommandBuffer cmd, RenderTextureDescriptor desc, int rtSource, int rt, int width, int height, bool vertical, float blurScale = 1f) { + cmd.SetGlobalFloat(ShaderParams.blurScale, blurScale * 2f); + FullScreenBlit(cmd, rtSource, rt, bMat, vertical ? (int)Pass.BlurVert : (int)Pass.BlurHoriz); + } + + static void DoDoF (CommandBuffer cmd) { + + Camera cam = cameraData.camera; + if (cam.cameraType != CameraType.Game) { + bMat.DisableKeyword(ShaderParams.SKW_DEPTH_OF_FIELD); + bMat.DisableKeyword(ShaderParams.SKW_DEPTH_OF_FIELD_TRANSPARENT); + return; + } + + UpdateDepthOfFieldData(cmd); + + // Skip expensive DoF rendering if completely faded out (performance optimization) + // The UpdateDepthOfFieldData call above still runs to track fade state for re-enabling + if (camData.dofFadeIntensity <= 0.001f) { + bMat.DisableKeyword(ShaderParams.SKW_DEPTH_OF_FIELD); + bMat.DisableKeyword(ShaderParams.SKW_DEPTH_OF_FIELD_TRANSPARENT); + return; + } + + BeautifySettings.dofTransparentLayerMask = beautify.depthOfFieldTransparentLayerMask.value; + BeautifySettings.dofTransparentDoubleSided = beautify.depthOfFieldTransparentDoubleSided.value; + + int width = cam.pixelWidth / beautify.depthOfFieldDownsampling.value; + int height = cam.pixelHeight / beautify.depthOfFieldDownsampling.value; + RenderTextureDescriptor dofDesc = sourceDescHP; + dofDesc.width = width; + dofDesc.height = height; + dofDesc.colorFormat = RenderTextureFormat.ARGBHalf; + if (dofGlobalRT == null || dofGlobalRT.rt == null || dofGlobalRT.rt.width != dofDesc.width || dofGlobalRT.rt.height != dofDesc.height) { + dofGlobalRT?.Release(); + dofGlobalRT = RTHandles.Alloc(dofDesc.width, dofDesc.height, colorFormat: UnityEngine.Experimental.Rendering.GraphicsFormat.R16G16B16A16_SFloat, filterMode: FilterMode.Bilinear, name: "_DoFTexRT"); + } + FullScreenBlit(cmd, source, dofGlobalRT, bMat, (int)Pass.DoFCoC); + + if (beautify.depthOfFieldForegroundBlur.value && beautify.depthOfFieldForegroundBlurHQ.value) { + BlurThisAlpha(cmd, dofDesc, dofGlobalRT, beautify.depthOfFieldForegroundBlurHQSpread.value); + } + + if (beautify.depthOfFieldBokehComposition.value == Beautify.DoFBokehComposition.Integrated || !beautify.depthOfFieldBokeh.value) { + Pass pass = beautify.depthOfFieldBokeh.value ? Pass.DoFBlur : Pass.DoFBlurWithoutBokeh; + BlurThisDoF(cmd, dofDesc, dofGlobalRT, (int)pass); + } + else { + BlurThisDoF(cmd, dofDesc, dofGlobalRT, (int)Pass.DoFBlurWithoutBokeh); + + // separate & blend bokeh + cmd.GetTemporaryRT(ShaderParams.dofBokehRT, dofDesc, FilterMode.Bilinear); + FullScreenBlit(cmd, source, ShaderParams.dofBokehRT, bMat, (int)Pass.DoFBokeh); + BlurThisDoF(cmd, dofDesc, ShaderParams.dofBokehRT, (int)Pass.DoFBlurBokeh); + FullScreenBlit(cmd, ShaderParams.dofBokehRT, dofGlobalRT, bMat, (int)Pass.DoFAdditive); + cmd.ReleaseTemporaryRT(ShaderParams.dofBokehRT); + } + + + cmd.SetGlobalTexture(ShaderParams.dofRT, dofGlobalRT); + } + + static void BlurThisDoF (CommandBuffer cmd, RenderTextureDescriptor dofDesc, RenderTargetIdentifier rt, int renderPass) { + cmd.GetTemporaryRT(ShaderParams.dofTempBlurDoFTemp1RT, dofDesc, beautify.depthOfFieldFilterMode.value); + cmd.GetTemporaryRT(ShaderParams.dofTempBlurDoFTemp2RT, dofDesc, beautify.depthOfFieldFilterMode.value); + + UpdateDepthOfFieldBlurData(cmd, new Vector2(0.44721f, -0.89443f)); + FullScreenBlit(cmd, rt, ShaderParams.dofTempBlurDoFTemp1RT, bMat, renderPass); + + UpdateDepthOfFieldBlurData(cmd, new Vector2(-1f, 0f)); + FullScreenBlit(cmd, ShaderParams.dofTempBlurDoFTemp1RT, ShaderParams.dofTempBlurDoFTemp2RT, bMat, renderPass); + + UpdateDepthOfFieldBlurData(cmd, new Vector2(0.44721f, 0.89443f)); + FullScreenBlit(cmd, ShaderParams.dofTempBlurDoFTemp2RT, rt, bMat, renderPass); + + cmd.ReleaseTemporaryRT(ShaderParams.dofTempBlurDoFTemp2RT); + cmd.ReleaseTemporaryRT(ShaderParams.dofTempBlurDoFTemp1RT); + } + + + static void BlurThisAlpha (CommandBuffer cmd, RenderTextureDescriptor dofDesc, RenderTargetIdentifier rt, float blurScale = 1f) { + cmd.GetTemporaryRT(ShaderParams.dofTempBlurDoFAlphaRT, dofDesc, FilterMode.Bilinear); + cmd.SetGlobalFloat(ShaderParams.blurScale, blurScale); + FullScreenBlit(cmd, rt, ShaderParams.dofTempBlurDoFAlphaRT, bMat, (int)Pass.DoFBlurHorizontally); + FullScreenBlit(cmd, ShaderParams.dofTempBlurDoFAlphaRT, rt, bMat, (int)Pass.DoFBlurVertically); + cmd.ReleaseTemporaryRT(ShaderParams.dofTempBlurDoFAlphaRT); + } + + static void UpdateDepthOfFieldBlurData (CommandBuffer cmd, Vector2 blurDir) { + float downsamplingRatio = 1f / (float)beautify.depthOfFieldDownsampling.value; + blurDir *= downsamplingRatio; + camData.dofLastBokehData.z = blurDir.x; + camData.dofLastBokehData.w = blurDir.y; + cmd.SetGlobalVector(ShaderParams.dofBokehData, camData.dofLastBokehData); + } + + static void DoVignette () { + float outerRing = 1f - beautify.vignettingOuterRing.value; + float innerRing = 1f - beautify.vignettingInnerRing.value; + bool vignettingEnabled = outerRing < 1 || innerRing < 1f || beautify.vignettingFade.value > 0 || beautify.vignettingBlink.value > 0; + if (vignettingEnabled) { + Color vignettingColorAdjusted = beautify.vignettingColor.value; + float vb = 1f - beautify.vignettingBlink.value * 2f; + if (vb < 0) vb = 0; + vignettingColorAdjusted.r *= vb; + vignettingColorAdjusted.g *= vb; + vignettingColorAdjusted.b *= vb; + bMat.SetColor(ShaderParams.vignette, vignettingColorAdjusted); + Camera cam = cameraData.camera; + float vignetteAspect; + float vignetteData2 = 1f; + if (beautify.vignettingCircularShape.value && beautify.vignettingBlink.value <= 0) { + if (beautify.vignettingCircularShapeFitMode.value == VignetteFitMode.FitToWidth) { + vignetteAspect = 1.0f / cam.aspect; + } + else { + vignetteAspect = 1f; + vignetteData2 = cam.aspect; + } + } + else { + vignetteAspect = beautify.vignettingAspectRatio.value + 1.001f / (1.001f - beautify.vignettingBlink.value) - 1f; + } + Vector4 vignetteData = new Vector4(beautify.vignettingCenter.value.x, beautify.vignettingCenter.value.y, vignetteAspect, outerRing); + if (beautify.vignettingBlinkStyle.value == BlinkStyle.Human) { + vignetteData.y -= beautify.vignettingBlink.value * 0.5f; + } + bMat.SetVector(ShaderParams.vignetteData, vignetteData); + bMat.SetFloat(ShaderParams.vignetteData2, vignetteData2); + } + } + + static void DoEyeAdaptation (CommandBuffer cmd) { + + int rtEALength = rtEA.Length; + int sizeEA = (int)Mathf.Pow(2, rtEALength); + + RenderTextureDescriptor eaDesc = sourceDescHP; + for (int k = 0; k < rtEALength; k++) { + eaDesc.width = eaDesc.height = sizeEA; + cmd.GetTemporaryRT(rtEA[k], eaDesc, FilterMode.Bilinear); + sizeEA /= 2; + } + + FullScreenBlit(cmd, source, rtEA[0], bMat, (int)Pass.CopyBilinear); + + int lumRT = rtEALength - 1; + for (int k = 0; k < lumRT; k++) { + FullScreenBlit(cmd, rtEA[k], rtEA[k + 1], bMat, k == 0 ? (int)Pass.ComputeScreenLum : (int)Pass.DownsampleScreenLum); + } + cmd.SetGlobalTexture(ShaderParams.eaLumSrc, rtEA[lumRT]); + bool firstBlend = false; + if (camData.rtEAacum == null) { + RenderTextureDescriptor rtEASmallDesc = sourceDescHP; + rtEASmallDesc.width = rtEASmallDesc.height = 2; + rtEASmallDesc.colorFormat = RenderTextureFormat.ARGBFloat; + camData.rtEAacum = new RenderTexture(rtEASmallDesc); + camData.rtEAacum.Create(); + camData.rtEAHist = new RenderTexture(rtEASmallDesc); + camData.rtEAHist.Create(); + firstBlend = true; + } + if (firstBlend || Time.timeSinceLevelLoad < 0.5f) { + FullScreenBlit(cmd, rtEA[lumRT], camData.rtEAacum, bMat, (int)Pass.CopyExact); + FullScreenBlit(cmd, camData.rtEAacum, camData.rtEAHist, bMat, (int)Pass.CopyExact); + } + else { + FullScreenBlit(cmd, rtEA[lumRT], camData.rtEAacum, bMat, (int)Pass.BlendScreenLum); + FullScreenBlit(cmd, camData.rtEAacum, camData.rtEAHist, bMat, (int)Pass.SimpleBlendLum); + } + cmd.SetGlobalTexture(ShaderParams.eaHist, camData.rtEAHist); + } + + static void DoSeparateOutline (CommandBuffer cmd) { + RenderTextureDescriptor rtOutlineDescriptor = sourceDesc; + rtOutlineDescriptor.colorFormat = supportsR8Format ? RenderTextureFormat.R8 : sourceDesc.colorFormat; + cmd.GetTemporaryRT(ShaderParams.outlineRT, rtOutlineDescriptor); + FullScreenBlit(cmd, source, ShaderParams.outlineRT, bMat, (int)Pass.OutlineDetect); + int passCount = beautify.outlineBlurPassCount.value; + float spread = beautify.outlineSpread.value; + bool downscale = beautify.outlineBlurDownscale.value; + for (int k = 1; k <= passCount; k++) { + BlurThisOutline(cmd, rtOutlineDescriptor, spread, downscale ? k : 1); + } + FullScreenBlit(cmd, ShaderParams.outlineRT, source, bMat, (int)Pass.OutlineBlend); + cmd.ReleaseTemporaryRT(ShaderParams.outlineRT); + } + + static void BlurThisOutline (CommandBuffer cmd, RenderTextureDescriptor desc, float blurScale, int downscale) { + desc.width = desc.width / downscale; + desc.height = desc.height / downscale; + cmd.GetTemporaryRT(ShaderParams.tempBlurRT, desc, FilterMode.Bilinear); + cmd.SetGlobalFloat(ShaderParams.blurScale, blurScale); + FullScreenBlit(cmd, ShaderParams.outlineRT, ShaderParams.tempBlurRT, bMat, (int)Pass.OutlineBlurH); + float ratio = (float)desc.height / desc.width; + cmd.SetGlobalFloat(ShaderParams.blurScale, blurScale * ratio); + FullScreenBlit(cmd, ShaderParams.tempBlurRT, ShaderParams.outlineRT, bMat, (int)Pass.OutlineBlurV); + cmd.ReleaseTemporaryRT(ShaderParams.tempBlurRT); + } + + internal static void ExecuteOutlineBeforeTransparents(CommandBuffer cmd) { + if (bMat == null || beautify == null || !usesSeparateOutline) return; + DoSeparateOutline(cmd); + } + + internal static bool CanExecuteOutlineBeforeTransparents => bMat != null && beautify != null && usesSeparateOutline && BeautifySettings.outlineBeforeTransparents; + + static Vector3 camPrevPos; + static Quaternion camPrevRotation; + static float currSens; + static bool canUseDepthTexture; + + public void UpdateMaterialProperties (Camera cam) { + + if (bMat == null) return; + + keywords.Clear(); + + // Compute motion sensibility + float sharpenIntensity = beautify.sharpenIntensity.value; + bool usesSharpen = sharpenIntensity > 0; + sharpenExclusionLayerMask = beautify.sharpenExclusionLayerMask.value; + // If exclusion mask is set to everything, disable sharpen + if (sharpenExclusionLayerMask == -1) { + usesSharpen = false; + sharpenExclusionLayerMask = 0; + } + + BeautifySettings.sharpenExclusionMask = sharpenExclusionLayerMask; + usesSharpenExclusionMask = usesSharpen && sharpenExclusionLayerMask != 0; + + if (usesSharpen) { + float tempSharpen = sharpenIntensity; + float sensibility = beautify.sharpenMotionSensibility.value; + if (sensibility > 0) { + + // Motion sensibility v2 + Vector3 pos = cam.transform.position; + Quaternion q = cam.transform.rotation; + + float dt = Time.deltaTime; + if (pos != camPrevPos || q.x != camPrevRotation.x || q.y != camPrevRotation.y || q.z != camPrevRotation.z || q.w != camPrevRotation.w) { + currSens = Mathf.Lerp(currSens, sharpenIntensity * sensibility, 30f * sensibility * dt); + camPrevPos = pos; + camPrevRotation = q; + } + else { + currSens -= 30f * beautify.sharpenMotionRestoreSpeed.value * dt; + } + + currSens = Mathf.Clamp(currSens, 0, sharpenIntensity); + tempSharpen = sharpenIntensity - currSens; + } + bMat.SetVector(ShaderParams.sharpen, new Vector4(tempSharpen, canUseDepthTexture ? beautify.sharpenDepthThreshold.value + 0.000001f : 1f, beautify.sharpenClamp.value, beautify.sharpenRelaxation.value)); + + if (usesSharpenExclusionMask) { + keywords.Add(ShaderParams.SKW_SHARPEN_EXCLUSION_MASK); + } + else { + keywords.Add(ShaderParams.SKW_SHARPEN); + } + } + + + bool isOrtho = cam.orthographic; + bool linearColorSpace = QualitySettings.activeColorSpace == ColorSpace.Linear; + + bMat.SetVector(ShaderParams.colorParams, new Vector4(beautify.sepia.value, beautify.daltonize.value, (beautify.sharpenMinMaxDepth.value.x + beautify.sharpenMinMaxDepth.value.y) * 0.5f, Mathf.Abs(beautify.sharpenMinMaxDepth.value.y - beautify.sharpenMinMaxDepth.value.x) * 0.5f + (isOrtho ? 1000.0f : 0f))); + + float contrast = linearColorSpace ? 1.0f + (beautify.contrast.value - 1.0f) / 2.2f : beautify.contrast.value; + bMat.SetVector(ShaderParams.colorBoost, new Vector4(beautify.brightness.value, contrast, beautify.saturate.value, beautify.downsamplingMultiplier.value > 1f ? 0 : beautify.ditherIntensity.value)); + bMat.SetColor(ShaderParams.tintColor, beautify.tintColor.value); + + bMat.SetVector(ShaderParams.colorTemp, new Vector4(beautify.colorTemp.value, beautify.colorTempBlend.value, 0)); + + if (beautify.compareMode.value) { + float angle, panningValue; + switch (beautify.compareStyle.value) { + case CompareStyle.FreeAngle: + angle = beautify.compareLineAngle.value; + panningValue = -10; + break; + case CompareStyle.SameSide: + angle = Mathf.PI * 0.5f; + panningValue = beautify.comparePanning.value; + break; + default: + angle = Mathf.PI * 0.5f; + panningValue = -20f + beautify.comparePanning.value * 2f; + break; + } + bMat.SetVector(ShaderParams.compareParams, new Vector4(Mathf.Cos(angle), Mathf.Sin(angle), panningValue, beautify.compareLineWidth.value)); + } + + bMat.SetVector(ShaderParams.fxColor, new Color(beautify.tonemapExposurePre.value, beautify.tonemapBrightnessPost.value, beautify.tonemapMaxInputBrightness.value, beautify.lutIntensity.value)); + + // bloom related + usesBloomAndFlares = false; + BeautifySettings.bloomExcludeMask = 0; + BeautifySettings.anamorphicFlaresExcludeMask = 0; + bool sunFlareEnabled = false; + if (beautify.sunFlaresIntensity.value > 0) { + CheckSun(); + sunFlareEnabled = sceneSettings != null && sceneSettings.sun != null; + } + + if (beautify.lensDirtIntensity.value > 0 || beautify.bloomIntensity.value > 0 || beautify.anamorphicFlaresIntensity.value > 0 || sunFlareEnabled) { + + BeautifySettings.bloomExcludeMask = beautify.bloomIntensity.value > 0 && beautify.bloomExcludeLayers.value ? (int)beautify.bloomExclusionLayerMask.value : 0; + + float bloomWeightsSum = 0.00001f + beautify.bloomWeight0.value + beautify.bloomWeight1.value + beautify.bloomWeight2.value + beautify.bloomWeight3.value + beautify.bloomWeight4.value + beautify.bloomWeight5.value; + bMat.SetVector(ShaderParams.bloomWeights2, new Vector4(beautify.bloomWeight4.value / bloomWeightsSum + beautify.bloomBoost4.value, beautify.bloomWeight5.value / bloomWeightsSum + beautify.bloomBoost5.value, beautify.bloomMaxBrightness.value, bloomWeightsSum)); + if (beautify.bloomCustomize.value) { + bMat.SetColor(ShaderParams.bloomTint0, beautify.bloomTint0.value); + bMat.SetColor(ShaderParams.bloomTint1, beautify.bloomTint1.value); + bMat.SetColor(ShaderParams.bloomTint2, beautify.bloomTint2.value); + bMat.SetColor(ShaderParams.bloomTint3, beautify.bloomTint3.value); + bMat.SetColor(ShaderParams.bloomTint4, beautify.bloomTint4.value); + bMat.SetColor(ShaderParams.bloomTint5, beautify.bloomTint5.value); + } + bMat.SetColor(ShaderParams.bloomTint, beautify.bloomTint.value); + + float spread = Mathf.Lerp(0.05f, 0.95f, beautify.bloomSpread.value); + bMat.SetFloat(ShaderParams.bloomSpread, spread); + + UpdateMaterialBloomIntensityAndThreshold(); + if (beautify.bloomIntensity.value > 0 || (beautify.lensDirtIntensity.value > 0 && beautify.anamorphicFlaresIntensity.value <= 0)) { + bMat.SetVector(ShaderParams.bloomWeights, new Vector4(beautify.bloomWeight0.value / bloomWeightsSum + beautify.bloomBoost0.value, beautify.bloomWeight1.value / bloomWeightsSum + beautify.bloomBoost1.value, beautify.bloomWeight2.value / bloomWeightsSum + beautify.bloomBoost2.value, beautify.bloomWeight3.value / bloomWeightsSum + beautify.bloomBoost3.value)); + if (canUseDepthTexture) { + if (beautify.bloomDepthAtten.value > 0 || beautify.bloomNearAtten.value > 0) { + keywords.Add(ShaderParams.SKW_BLOOM_USE_DEPTH); + bMat.SetFloat(ShaderParams.bloomDepthThreshold, beautify.bloomDepthAtten.value); + bMat.SetFloat(ShaderParams.bloomNearThreshold, (beautify.bloomNearAtten.value / cam.farClipPlane) + 0.00001f); + } + if (BeautifySettings.bloomExcludeMask != 0) { + if (beautify.bloomLayersFilterMethod.value == BloomLayersFilterMethod.ExcludeSelectedLayers) { + keywords.Add(ShaderParams.SKW_BLOOM_USE_LAYER); + } + else { + keywords.Add(ShaderParams.SKW_BLOOM_USE_LAYER_INCLUSION); + } + } + } + if (beautify.bloomConservativeThreshold.value) { + keywords.Add(ShaderParams.SKW_BLOOM_PROP_THRESHOLDING); + } + } + keywords.Add(ShaderParams.SKW_BLOOM); + usesBloomAndFlares = true; + + if (beautify.lensDirtIntensity.value > 0) { + Vector4 dirtData = new Vector4(1.0f, beautify.lensDirtIntensity.value * beautify.lensDirtIntensity.value, beautify.lensDirtThreshold.value, Mathf.Max(beautify.bloomIntensity.value, 1f)); + bMat.SetVector(ShaderParams.dirt, dirtData); + Texture tex = beautify.lensDirtTexture.value; + if (tex == null) { + if (dirtTexture == null) { + dirtTexture = Resources.Load("Textures/lensDirt") as Texture2D; + } + tex = dirtTexture; + } + if (tex != null) { + bMat.SetTexture(ShaderParams.dirtTex, tex); + keywords.Add(ShaderParams.SKW_DIRT); + } + } + } + + // anamorphic flares related + if (beautify.anamorphicFlaresIntensity.value > 0) { + + usesBloomAndFlares = true; + if (canUseDepthTexture) { + if (beautify.anamorphicFlaresDepthAtten.value > 0 || beautify.anamorphicFlaresNearAtten.value > 0) { + keywords.Add(ShaderParams.SKW_ANAMORPHIC_FLARES_USE_DEPTH); + bMat.SetFloat(ShaderParams.afDepthThreshold, beautify.anamorphicFlaresDepthAtten.value); + bMat.SetFloat(ShaderParams.afNearThreshold, (beautify.anamorphicFlaresNearAtten.value / cam.farClipPlane) + 0.00001f); + } + BeautifySettings.anamorphicFlaresExcludeMask = beautify.anamorphicFlaresExcludeLayers.value ? (int)beautify.anamorphicFlaresExclusionLayerMask.value : 0; + if (BeautifySettings.anamorphicFlaresExcludeMask != 0) { + if (beautify.anamorphicFlaresLayersFilterMethod.value == BloomLayersFilterMethod.ExcludeSelectedLayers) { + keywords.Add(ShaderParams.SKW_ANAMORPHIC_FLARES_USE_LAYER); + } + else { + keywords.Add(ShaderParams.SKW_ANAMORPHIC_FLARES_USE_LAYER_INCLUSION); + } + } + } + + if (beautify.anamorphicFlaresConservativeThreshold.value) { + keywords.Add(ShaderParams.SKW_ANAMORPHIC_PROP_THRESHOLDING); + } + bMat.SetColor(ShaderParams.afTintColor, beautify.anamorphicFlaresTint.value); + } + + // sun flares related + if (sunFlareEnabled) { + usesBloomAndFlares = true; + bMat.SetVector(ShaderParams.sfSunData, new Vector4(beautify.sunFlaresSunIntensity.value, beautify.sunFlaresSunDiskSize.value, beautify.sunFlaresSunRayDiffractionIntensity.value, beautify.sunFlaresSunRayDiffractionThreshold.value)); + bMat.SetVector(ShaderParams.sfCoronaRays1, new Vector4(beautify.sunFlaresCoronaRays1Length.value, Mathf.Max(beautify.sunFlaresCoronaRays1Streaks.value / 2f, 1), Mathf.Max(beautify.sunFlaresCoronaRays1Spread.value, 0.0001f), beautify.sunFlaresCoronaRays1AngleOffset.value)); + bMat.SetVector(ShaderParams.sfCoronaRays2, new Vector4(beautify.sunFlaresCoronaRays2Length.value, Mathf.Max(beautify.sunFlaresCoronaRays2Streaks.value / 2f, 1), Mathf.Max(beautify.sunFlaresCoronaRays2Spread.value, 0.0001f), beautify.sunFlaresCoronaRays2AngleOffset.value)); + if (canUseDepthTexture) { + SunFlaresDepthOcclusionMode occlusionMode = beautify.sunFlaresDepthOcclusionMode.value; + if (occlusionMode == SunFlaresDepthOcclusionMode.Simple) { + keywords.Add(ShaderParams.SKW_SUN_FLARES_OCCLUSION_SIMPLE); + } + else if (occlusionMode == SunFlaresDepthOcclusionMode.Smooth) { + keywords.Add(ShaderParams.SKW_SUN_FLARES_OCCLUSION_SMOOTH); + bMat.SetFloat(ShaderParams.sfOcclusionThreshold, beautify.sunFlaresDepthOcclusionThreshold.value); + } + } +#if UNITY_2020_3_OR_NEWER + +#if ENABLE_VR && ENABLE_XR_MODULE + if (!cameraData.xrRendering) +#endif + { + keywords.Add(ShaderParams.SKW_SUN_FLARES_USE_GHOSTS); + bMat.SetVector(ShaderParams.sfGhosts1, new Vector4(0, beautify.sunFlaresGhosts1Size.value, beautify.sunFlaresGhosts1Offset.value, beautify.sunFlaresGhosts1Brightness.value)); + bMat.SetVector(ShaderParams.sfGhosts2, new Vector4(0, beautify.sunFlaresGhosts2Size.value, beautify.sunFlaresGhosts2Offset.value, beautify.sunFlaresGhosts2Brightness.value)); + bMat.SetVector(ShaderParams.sfGhosts3, new Vector4(0, beautify.sunFlaresGhosts3Size.value, beautify.sunFlaresGhosts3Offset.value, beautify.sunFlaresGhosts3Brightness.value)); + bMat.SetVector(ShaderParams.sfGhosts4, new Vector4(0, beautify.sunFlaresGhosts4Size.value, beautify.sunFlaresGhosts4Offset.value, beautify.sunFlaresGhosts4Brightness.value)); + bMat.SetVector(ShaderParams.sfHalo, new Vector4(beautify.sunFlaresHaloOffset.value, beautify.sunFlaresHaloAmplitude.value, beautify.sunFlaresHaloIntensity.value * 100f, 0)); + } +#else + if (sourceDesc.vrUsage == VRTextureUsage.None) { + keywords.Add(ShaderParams.SKW_SUN_FLARES_USE_GHOSTS); + bMat.SetVector(ShaderParams.sfGhosts1, new Vector4(0, beautify.sunFlaresGhosts1Size.value, beautify.sunFlaresGhosts1Offset.value, beautify.sunFlaresGhosts1Brightness.value)); + bMat.SetVector(ShaderParams.sfGhosts2, new Vector4(0, beautify.sunFlaresGhosts2Size.value, beautify.sunFlaresGhosts2Offset.value, beautify.sunFlaresGhosts2Brightness.value)); + bMat.SetVector(ShaderParams.sfGhosts3, new Vector4(0, beautify.sunFlaresGhosts3Size.value, beautify.sunFlaresGhosts3Offset.value, beautify.sunFlaresGhosts3Brightness.value)); + bMat.SetVector(ShaderParams.sfGhosts4, new Vector4(0, beautify.sunFlaresGhosts4Size.value, beautify.sunFlaresGhosts4Offset.value, beautify.sunFlaresGhosts4Brightness.value)); + bMat.SetVector(ShaderParams.sfHalo, new Vector4(beautify.sunFlaresHaloOffset.value, beautify.sunFlaresHaloAmplitude.value, beautify.sunFlaresHaloIntensity.value * 100f, 0)); + } +#endif + if (flareTex == null) { + flareTex = Resources.Load("Textures/flareNoise") as Texture2D; + } + bMat.SetTexture(ShaderParams.sfFlareTex, flareTex); + } + + + // DoF + usesDepthOfField = false; + BeautifySettings.dofTransparentSupport = false; + BeautifySettings.dofAlphaTestSupport = false; + if (canUseDepthTexture && beautify.depthOfField.value) { + usesDepthOfField = true; + bool transparentSupport = beautify.depthOfFieldTransparentSupport.value && beautify.depthOfFieldTransparentLayerMask.value > 0; + bool alphaTestSupport = beautify.depthOfFieldAlphaTestSupport.value && beautify.depthOfFieldAlphaTestLayerMask.value > 0; + if (transparentSupport || alphaTestSupport) { + keywords.Add(ShaderParams.SKW_DEPTH_OF_FIELD_TRANSPARENT); + BeautifySettings.dofTransparentSupport = transparentSupport; + if (alphaTestSupport) { + BeautifySettings.dofAlphaTestSupport = true; + BeautifySettings.dofAlphaTestLayerMask = beautify.depthOfFieldAlphaTestLayerMask.value; + BeautifySettings.dofAlphaTestDoubleSided = beautify.depthOfFieldAlphaTestDoubleSided.value; + } + } + else { + keywords.Add(ShaderParams.SKW_DEPTH_OF_FIELD); + } + } + + // Vignette + usesVignetting = false; + float innerRing = 1f - beautify.vignettingInnerRing.value; + float outerRing = 1f - beautify.vignettingOuterRing.value; + usesVignetting = outerRing < 1 || innerRing < 1f || beautify.vignettingFade.value > 0 || beautify.vignettingBlink.value > 0; + if (innerRing >= outerRing) { + innerRing = outerRing - 0.0001f; + } + if (usesVignetting) { + if (beautify.vignettingMask.value != null) { + bMat.SetTexture(ShaderParams.vignetteMask, beautify.vignettingMask.value); + keywords.Add(ShaderParams.SKW_VIGNETTING_MASK); + } + else { + keywords.Add(ShaderParams.SKW_VIGNETTING); + } + } + + // Frame + if (beautify.frame.value) { + keywords.Add(ShaderParams.SKW_FRAME); + Color frameColorAdjusted = beautify.frameColor.value; + if (beautify.frameMask.value != null) { + bMat.SetTexture(ShaderParams.frameMask, beautify.frameMask.value); + } + else { + bMat.SetTexture(ShaderParams.frameMask, Texture2D.whiteTexture); + } + if (beautify.frameStyle.value == FrameStyle.Border) { + bMat.SetColor(ShaderParams.frameColor, frameColorAdjusted); + bMat.SetVector(ShaderParams.frameData, new Vector4(beautify.frameThickness.value, beautify.frameSharpness.value, 0, 0)); + } + else { + bMat.SetColor(ShaderParams.frameColor, Color.black); + bMat.SetVector(ShaderParams.frameData, new Vector4(0.5f - beautify.frameBandHorizontalSize.value, 1f / (0.0001f + beautify.frameBandHorizontalSmoothness.value), 0.5f - beautify.frameBandVerticalSize.value, 1f / (0.0001f + beautify.frameBandVerticalSmoothness.value))); + } + } + + // Purkinje and vignetting data + bool usesPurkinje = beautify.purkinje.value; + if (usesPurkinje || usesVignetting) { + float vd = beautify.vignettingFade.value + beautify.vignettingBlink.value * 0.5f; + if (beautify.vignettingBlink.value > 0.99f) vd = 1f; + Vector4 purkinjeData = new Vector4(beautify.purkinjeAmount.value, beautify.purkinjeLuminanceThreshold.value, vd, innerRing); + bMat.SetVector(ShaderParams.purkinje, purkinjeData); + if (beautify.purkinje.value) { + keywords.Add(ShaderParams.SKW_PURKINJE); + } + } + + // Eye adaptation + bool usesEyeAdaptation = beautify.eyeAdaptation.value; + requiresLuminanceComputation = Application.isPlaying && (usesEyeAdaptation || usesPurkinje); + if (requiresLuminanceComputation) { + Vector4 eaData = new Vector4(beautify.eyeAdaptationMinExposure.value, beautify.eyeAdaptationMaxExposure.value, beautify.eyeAdaptationSpeedToDark.value, beautify.eyeAdaptationSpeedToLight.value); + bMat.SetVector(ShaderParams.eaParams, eaData); + if (usesEyeAdaptation) { + bMat.SetVector(ShaderParams.eaParams2, new Vector4(beautify.eyeAdaptationCenterWeight.value, beautify.eyeAdaptationMinCameraDistance.value, beautify.eyeAdaptationMiddleGray.value, 0f)); + keywords.Add(ShaderParams.SKW_EYE_ADAPTATION); + if (beautify.eyeAdaptationMinCameraDistance.value > 0) { + keywords.Add(ShaderParams.SKW_EA_USE_DEPTH); + } + else if (beautify.eyeAdaptationMeteringMode.value == EyeAdaptationMeteringMode.Mask) { + Texture eaMask = beautify.eyeAdaptationMask.value; + if (eaMask != null) { + bMat.SetTexture(ShaderParams.eaMask, eaMask); + keywords.Add(ShaderParams.SKW_EA_USE_MASK); + } + } + } + } + + // Outline + usesSeparateOutline = false; + BeautifySettings.outlineDepthPrepass = false; + BeautifySettings.outlineDepthPrepassUseOptimizedShader = false; + BeautifySettings.outlineUseObjectId = false; + if (canUseDepthTexture) { + bool useOutlinePerObjectId = beautify.outlineTechnique.value == OutlineTechnique.PerObjectId; + if (useOutlinePerObjectId) { + beautify.outlineCustomize.Override(true); + beautify.outlineUsesOptimizedShader.Override(true); + } + if (beautify.outline.value) { + usesSeparateOutline = beautify.outlineCustomize.value; + BeautifySettings.outlineBeforeTransparents = usesSeparateOutline && beautify.outlineStageParameter.value == OutlineStage.BeforeTransparents; + float outlineDistanceFade = 1; + if (usesSeparateOutline) { + bool useOptimizedShader = beautify.outlineUsesOptimizedShader.value; + BeautifySettings.outlineUseObjectId = useOutlinePerObjectId; + if (beautify.outlineLayerMask.value != -1 || useOutlinePerObjectId) { + BeautifySettings.outlineDepthPrepass = true; + BeautifySettings.outlineDepthPrepassUseOptimizedShader = useOptimizedShader; + BeautifySettings.outlineLayerMask = beautify.outlineLayerMask.value; +#if UNITY_2022_3_OR_NEWER + BeautifySettings.outlineLayerCutOff = beautify.outlineLayerCutOff.value; +#endif + if (useOutlinePerObjectId) { + keywords.Add(ShaderParams.SKW_OUTLINE_OBJECT_ID); + } + else { + keywords.Add(ShaderParams.SKW_OUTLINE_CUSTOM_DEPTH); + } + } + outlineDistanceFade = beautify.outlineDistanceFade.value / cam.farClipPlane; + if (outlineDistanceFade > 0) { + keywords.Add(ShaderParams.SKW_OUTLINE_DEPTH_FADE); + } + } + else { + keywords.Add(ShaderParams.SKW_OUTLINE); + } + float outlineZParam; + if (useOutlinePerObjectId) { + outlineZParam = beautify.outlineMinSeparation.value; + if (outlineZParam > 1f) { + keywords.Add(ShaderParams.SKW_OUTLINE_MIN_SEPARATION); + } + if (beautify.outlineOuterOnly.value) { + keywords.Add(ShaderParams.SKW_OUTLINE_OUTER_ONLY); + } + } + else { + outlineZParam = beautify.outlineMinDepthThreshold.value; + } + bMat.SetVector(ShaderParams.outlineData, new Vector4(beautify.outlineIntensityMultiplier.value, outlineDistanceFade, outlineZParam, beautify.outlineSaturationDiffThreshold.value)); + Color color = beautify.outlineColor.value; + color.a = 1f - beautify.outlineThreshold.value; + bMat.SetColor(ShaderParams.outline, color); + } + else { + // edge AA related - only apply if outline is not used + float aaStrength = beautify.antialiasStrength.value; + if (aaStrength > 0) { + bMat.SetVector(ShaderParams.edgeAntialiasing, new Vector4(aaStrength, beautify.antialiasDepthThreshold.value, beautify.antialiasDepthAttenuation.value * 10f, beautify.antialiasSpread.value)); + if (usesDepthOfField) { + keywords.Add(ShaderParams.SKW_EDGE_ANTIALIASING_DOF); + } + else { + keywords.Add(ShaderParams.SKW_EDGE_ANTIALIASING); + } + } + } + } + + // Color tweaks + if (beautify.sepia.value > 0 || beautify.daltonize.value > 0 || beautify.colorTempBlend.value > 0) { + keywords.Add(ShaderParams.SKW_COLOR_TWEAKS); + } + + // ACES Tonemapping + if (beautify.tonemap.value == TonemapOperator.ACES) { + keywords.Add(ShaderParams.SKW_TONEMAP_ACES); + } + else if (beautify.tonemap.value == TonemapOperator.ACESFitted) { + keywords.Add(ShaderParams.SKW_TONEMAP_ACES_FITTED); + } + else if (beautify.tonemap.value == TonemapOperator.AGX) { + bMat.SetFloat(ShaderParams.tonemapAGXGamma, linearColorSpace ? beautify.tonemapAGXGamma.value : beautify.tonemapAGXGamma.value * 0.5f); + keywords.Add(ShaderParams.SKW_TONEMAP_AGX); + } + + // LUT or Nightvision + Texture lutTex = beautify.lutTexture.value; + bool hasLut = beautify.lut.value && beautify.lutIntensity.value > 0 && lutTex != null; + bool hasLut3D = hasLut && lutTex is Texture3D; + + if (hasLut || hasLut3D) { + if (hasLut3D) { + bMat.SetTexture(ShaderParams.lut3DTexture, lutTex); + float x = 1f / lutTex.width; + float y = lutTex.width - 1f; + bMat.SetVector(ShaderParams.lut3DParams, new Vector4(x * 0.5f, x * y, 0, 0)); + keywords.Add(ShaderParams.SKW_LUT3D); + } + else { + bMat.SetTexture(ShaderParams.lutTex, beautify.lutTexture.value); + keywords.Add(ShaderParams.SKW_LUT); + } + } + else if (beautify.nightVision.value) { + keywords.Add(ShaderParams.SKW_NIGHT_VISION); + Color nightVisionAdjusted = beautify.nightVisionColor.value; + if (linearColorSpace) { + nightVisionAdjusted.a *= 5.0f * nightVisionAdjusted.a; + } + else { + nightVisionAdjusted.a *= 3.0f * nightVisionAdjusted.a; + } + nightVisionAdjusted.r *= nightVisionAdjusted.a; + nightVisionAdjusted.g *= nightVisionAdjusted.a; + nightVisionAdjusted.b *= nightVisionAdjusted.a; + bMat.SetColor(ShaderParams.nightVision, nightVisionAdjusted); + bMat.SetVector(ShaderParams.nightVisionDepth, new Vector4(beautify.nightVisionDepth.value, beautify.nightVisionDepthFallOff.value, 0, 0)); + } + else if (beautify.thermalVision.value) { + keywords.Add(ShaderParams.SKW_THERMAL_VISION); + bMat.SetColor(ShaderParams.nightVision, new Color(0, 0, beautify.thermalVisionDistortionAmount.value / 10000f, beautify.thermalVisionScanLines.value ? 0.4f : -1)); + } + + // Best performance mode + if (beautify.turboMode.value) { + keywords.Add(ShaderParams.SKW_TURBO); + } + + // Chromatic Aberration + if (beautify.chromaticAberrationIntensity.value > 0f) { + bMat.SetVector(ShaderParams.chromaticAberrationData, new Vector4(beautify.chromaticAberrationIntensity.value, beautify.chromaticAberrationSmoothing.value, beautify.chromaticAberrationShift.value, 0)); + if (!beautify.depthOfField.value) { + keywords.Add(ShaderParams.SKW_CHROMATIC_ABERRATION); + } + } + + // Final blur mask + if (beautify.blurIntensity.value > 0 && beautify.blurMask.value != null) { + bMat.SetTexture(ShaderParams.blurMask, beautify.blurMask.value); + } + + // Film grain + if (beautify.filmGrainEnabled.value) { + keywords.Add(ShaderParams.SKW_FILM_GRAIN); + // Make film grain resolution independent by scaling inversely with screen resolution + float resolutionScale = 1920f / cam.pixelWidth; // Use 1920 as reference resolution + float adjustedResolution = beautify.filmGrainResolution.value * resolutionScale; + bMat.SetVector(ShaderParams.filmGrainData, new Vector4( + beautify.filmGrainIntensity.value, + beautify.filmGrainLumaAttenuation.value, + adjustedResolution, + 0 + )); + float dirtSpotsIntensity = beautify.filmGrainDirtSpotsIntensity.value; + float filmScrachesAmount = 1f - beautify.filmGrainScratchesAmount.value * 0.05f; + float filmScrachesIntensity = beautify.filmGrainScratchesIntensity.value; + bMat.SetVector(ShaderParams.filmArtifactsData, new Vector4( + dirtSpotsIntensity > 0 ? 1f - beautify.filmGrainDirtSpotsAmount.value * 0.1f : 0, + dirtSpotsIntensity, + filmScrachesIntensity > 0 ? filmScrachesAmount : 0, + filmScrachesIntensity + )); + } + else + // Dither + if (beautify.ditherIntensity.value > 0f) { + keywords.Add(ShaderParams.SKW_DITHER); + } + + + int keywordsCount = keywords.Count; + if (keywordsArray == null || keywordsArray.Length < keywordsCount) { + keywordsArray = new string[keywordsCount]; + } + int keywordsArrayLength = keywordsArray.Length; + for (int k = 0; k < keywordsArrayLength; k++) { + if (k < keywordsCount) { + keywordsArray[k] = keywords[k]; + } + else { + keywordsArray[k] = ""; + } + } + bMat.shaderKeywords = keywordsArray; + } + + + + static void UpdateMaterialBloomIntensityAndThreshold () { + float bloomThreshold = beautify.bloomThreshold.value; + float anamorphicThreshold = beautify.anamorphicFlaresThreshold.value; + if (QualitySettings.activeColorSpace == ColorSpace.Linear) { + bloomThreshold *= bloomThreshold; + anamorphicThreshold *= anamorphicThreshold; + } + float anamorphicFlaresIntensity = beautify.turboMode.value ? beautify.anamorphicFlaresIntensity.value * 2f : beautify.anamorphicFlaresIntensity.value; + float bloomIntensity = beautify.turboMode.value ? beautify.bloomIntensity.value * 2f : beautify.bloomIntensity.value; + if (anamorphicFlaresIntensity > 0) { + float intensity = anamorphicFlaresIntensity / (bloomIntensity + 0.0001f); + bMat.SetVector(ShaderParams.afData, new Vector4(intensity, anamorphicThreshold, 0, beautify.anamorphicFlaresMaxBrightness.value)); + } + Vector4 b4 = new Vector4(bloomIntensity + (anamorphicFlaresIntensity > 0 ? 0.0001f : 0f), 0, 0, bloomThreshold); + bMat.SetVector(ShaderParams.bloom, b4); + } + + static void UpdateDepthOfFieldData (CommandBuffer cmd) { + // TODO: get focal length from camera FOV: FOV = 2 arctan (x/2f) x = diagonal of film (0.024mm) + if (!CheckSceneSettings()) return; + Camera cam = cameraData.camera; + float d = beautify.depthOfFieldDistance.value; + Transform target = sceneSettings.depthOfFieldTarget; + if (sceneSettings.OnCameraBeforeAutofocus != null) { + sceneSettings.OnCameraBeforeAutofocus(cam, ref target); + } + switch ((int)beautify.depthOfFieldFocusMode.value) { + case (int)DoFFocusMode.AutoFocus: + UpdateDoFAutofocusDistance(cam); + d = camData.dofLastAutofocusDistance; + break; + case (int)DoFFocusMode.FollowTarget: + if (target != null) { + Vector3 spos = cam.WorldToViewportPoint(target.position); + bool isTargetVisible = spos.z >= 0 && spos.x >= 0 && spos.x <= 1 && spos.y >= 0 && spos.y <= 1; + if (!isTargetVisible) { + switch (beautify.depthOfFieldTargetFallback.value) { + case DoFTargetFallback.SwitchToAutofocus: + UpdateDoFAutofocusDistance(cam); + d = camData.dofLastAutofocusDistance; + break; + case DoFTargetFallback.FixedDistanceFocus: + d = beautify.depthOfFieldTargetFallbackFixedDistance.value; + break; + case DoFTargetFallback.DisableEffect: + // Fade out gracefully + float fadeOutSpeed = 1f / beautify.depthOfFieldFallbackFadeDuration.value; + camData.dofFadeIntensity = Mathf.Max(0f, camData.dofFadeIntensity - fadeOutSpeed * Time.unscaledDeltaTime); + d = camData.dofPrevDistance; // Keep current distance while fading + break; + default: + d = camData.dofPrevDistance; + break; + } + } + else { + d = Vector3.Distance(cam.transform.position, target.position); + d = Mathf.Clamp(d, beautify.depthOfFieldAutofocusMinDistance.value, beautify.depthOfFieldAutofocusMaxDistance.value); + // Fade back in when using DisableEffect fallback + if (beautify.depthOfFieldTargetFallback.value == DoFTargetFallback.DisableEffect && camData.dofFadeIntensity < 1f) { + float fadeInSpeed = 1f / beautify.depthOfFieldFallbackFadeDuration.value; + camData.dofFadeIntensity = Mathf.Min(1f, camData.dofFadeIntensity + fadeInSpeed * Time.unscaledDeltaTime); + } else { + camData.dofFadeIntensity = 1f; + } + } + } else { + // No target assigned - handle as if target not visible + if (beautify.depthOfFieldTargetFallback.value == DoFTargetFallback.DisableEffect) { + float fadeOutSpeed = 1f / beautify.depthOfFieldFallbackFadeDuration.value; + camData.dofFadeIntensity = Mathf.Max(0f, camData.dofFadeIntensity - fadeOutSpeed * Time.unscaledDeltaTime); + } + } + break; + case (int)DoFFocusMode.FollowPosition: + Vector3 focusPos = sceneSettings.depthOfFieldFocusPositionEnabled ? sceneSettings.depthOfFieldFocusPosition : beautify.depthOfFieldFocusPosition.value; + Vector3 screenPos = cam.WorldToViewportPoint(focusPos); + bool isPosVisible = screenPos.z >= 0 && screenPos.x >= 0 && screenPos.x <= 1 && screenPos.y >= 0 && screenPos.y <= 1; + if (!isPosVisible) { + switch (beautify.depthOfFieldPositionFallback.value) { + case DoFTargetFallback.SwitchToAutofocus: + UpdateDoFAutofocusDistance(cam); + d = camData.dofLastAutofocusDistance; + break; + case DoFTargetFallback.FixedDistanceFocus: + d = beautify.depthOfFieldTargetFallbackFixedDistance.value; + break; + case DoFTargetFallback.DisableEffect: + // Fade out gracefully + float fadeOutSpeed = 1f / beautify.depthOfFieldFallbackFadeDuration.value; + camData.dofFadeIntensity = Mathf.Max(0f, camData.dofFadeIntensity - fadeOutSpeed * Time.unscaledDeltaTime); + d = camData.dofPrevDistance; // Keep current distance while fading + break; + default: + d = camData.dofPrevDistance; + break; + } + } + else { + d = Vector3.Distance(cam.transform.position, focusPos); + d = Mathf.Clamp(d, beautify.depthOfFieldAutofocusMinDistance.value, beautify.depthOfFieldAutofocusMaxDistance.value); + // Fade back in when using DisableEffect fallback + if (beautify.depthOfFieldPositionFallback.value == DoFTargetFallback.DisableEffect && camData.dofFadeIntensity < 1f) { + float fadeInSpeed = 1f / beautify.depthOfFieldFallbackFadeDuration.value; + camData.dofFadeIntensity = Mathf.Min(1f, camData.dofFadeIntensity + fadeInSpeed * Time.unscaledDeltaTime); + } else { + camData.dofFadeIntensity = 1f; + } + } + break; + } + + if (sceneSettings.OnBeforeFocus != null) { + d = sceneSettings.OnBeforeFocus(d); + } + if (sceneSettings.OnCameraBeforeFocus != null) { + sceneSettings.OnCameraBeforeFocus(cam, ref d); + } + float t; + if (camData.dofPrevDistance < 0 || !Application.isPlaying) { + t = 1; + } + else { + t = beautify.depthOfFieldFocusSpeed.value * Time.unscaledDeltaTime * 30f; + } + camData.dofPrevDistance = Mathf.Lerp(camData.dofPrevDistance, d, t); + float dofCoc; + if (beautify.depthOfFieldCameraSettings.value == Beautify.DoFCameraSettings.Real) { + float focalLength, fStop, imageSensorHeight; + + if (beautify.depthOfFieldUsePhysicalCamera.value && cam.usePhysicalProperties) { + // Use physical camera properties + focalLength = cam.focalLength; +#if UNITY_2022_1_OR_NEWER + fStop = cam.aperture; +#else + fStop = beautify.depthOfFieldFStop.value; +#endif + imageSensorHeight = cam.sensorSize.y; + } + else { + // Use Beautify settings + focalLength = beautify.depthOfFieldFocalLengthReal.value; + fStop = beautify.depthOfFieldFStop.value; + imageSensorHeight = beautify.depthOfFieldImageSensorHeight.value; + } + float aperture = focalLength / fStop; + dofCoc = aperture * (focalLength / Mathf.Max(camData.dofPrevDistance * 1000f - focalLength, 0.001f)) * (1f / imageSensorHeight) * cam.pixelHeight; + } + else { + // focal length in meters; aperture in mm + dofCoc = beautify.depthOfFieldAperture.value * (beautify.depthOfFieldFocalLength.value / Mathf.Max(camData.dofPrevDistance - beautify.depthOfFieldFocalLength.value, 0.001f)) * (1f / 0.024f); + } + float cocMultiplier = beautify.depthOfFieldResolutionInvariant.value ? cam.pixelWidth / 1920f : 1f; + // Apply fade intensity for graceful disable transition + dofCoc *= camData.dofFadeIntensity; + camData.dofLastBokehData = new Vector4(camData.dofPrevDistance, dofCoc * cocMultiplier, 0, 0); + cmd.SetGlobalVector(ShaderParams.dofBokehData, camData.dofLastBokehData); + bMat.SetVector(ShaderParams.dofBokehData2, new Vector4(beautify.depthOfFieldForegroundBlur.value ? beautify.depthOfFieldForegroundDistance.value : cam.farClipPlane, beautify.depthOfFieldMaxSamples.value, beautify.depthOfFieldBokehThreshold.value, beautify.depthOfFieldBokehIntensity.value * beautify.depthOfFieldBokehIntensity.value)); + bMat.SetVector(ShaderParams.dofBokehData3, new Vector4(beautify.depthOfFieldMaxBrightness.value, beautify.depthOfFieldMaxDistance.value * (cam.farClipPlane + 1f), beautify.depthOfFieldMaxBlurRadius.value, 0)); + } + + + static void UpdateDoFAutofocusDistance (Camera cam) { + Vector3 p = beautify.depthOfFieldAutofocusViewportPoint.value; + p.z = 10f; + Ray r = cam.ViewportPointToRay(p); + if (Physics.Raycast(r, out RaycastHit hit, cam.farClipPlane, beautify.depthOfFieldAutofocusLayerMask.value)) { + // we don't use hit.distance as ray origin has a small shift from camera + float distance = Vector3.Distance(cam.transform.position, hit.point); + distance += beautify.depthOfFieldAutofocusDistanceShift.value; + camData.dofLastAutofocusDistance = distance; + } + else { + camData.dofLastAutofocusDistance = cam.farClipPlane; + } + camData.dofLastAutofocusDistance = Mathf.Clamp(camData.dofLastAutofocusDistance, beautify.depthOfFieldAutofocusMinDistance.value, beautify.depthOfFieldAutofocusMaxDistance.value); + BeautifySettings.depthOfFieldCurrentFocalPointDistance = camData.dofLastAutofocusDistance; + } + + + // Scene dependant settings + static BeautifySettings sceneSettings; + + static void CheckSun () { + + if (!CheckSceneSettings()) return; + + // Fetch a valid Sun reference + if (sceneSettings.sun == null) { + if (RenderSettings.sun != null) { + sceneSettings.sun = RenderSettings.sun.transform; + } + } + if (sceneSettings.sun == null) { + Light[] lights = Misc.FindObjectsOfType(); + for (int k = 0; k < lights.Length; k++) { + Light light = lights[k]; + if (light.type == LightType.Directional && light.isActiveAndEnabled) { + sceneSettings.sun = light.transform; + break; + } + } + } + } + + static bool CheckSceneSettings () { + sceneSettings = BeautifySettings.instance; + return sceneSettings != null; + } + + } + + + partial class BeautifySharpenExclusionMaskPass : ScriptableRenderPass { + + static readonly List m_ShaderTagIdList = new List(); + + const string sharpenExclusionMaskRT = "_SharpenExclusionMask"; + static int sharpenExclusionMaskId = Shader.PropertyToID(sharpenExclusionMaskRT); + RTHandle maskRT; + static bool canUse16Bit; + + public BeautifySharpenExclusionMaskPass () { + RenderTargetIdentifier rti = new RenderTargetIdentifier(sharpenExclusionMaskRT, 0, CubemapFace.Unknown, -1); + maskRT = RTHandles.Alloc(rti, name: sharpenExclusionMaskRT); + renderPassEvent = RenderPassEvent.AfterRenderingOpaques; + m_ShaderTagIdList.Clear(); + m_ShaderTagIdList.Add(new ShaderTagId("SRPDefaultUnlit")); + m_ShaderTagIdList.Add(new ShaderTagId("UniversalForward")); + m_ShaderTagIdList.Add(new ShaderTagId("LightweightForward")); + m_ShaderTagIdList.Add(new ShaderTagId("Universal2D")); + canUse16Bit = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.RGB565); + } + +#if UNITY_2022_2_OR_NEWER + RTHandle depthRT; +#else + RenderTargetIdentifier depthRT; +#endif + + +#if UNITY_2023_3_OR_NEWER + class PassData { + public TextureHandle depthTexture; + public RendererListHandle rendererListHandle; + public UniversalCameraData cameraData; + public int targetWidth; + public int targetHeight; + } + + public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { + + using (var builder = renderGraph.AddUnsafePass("Beautify Sharpen Exclusion Mask Pass", out var passData)) { + + builder.AllowPassCulling(false); + + UniversalResourceData resourceData = frameData.Get(); + UniversalRenderingData renderingData = frameData.Get(); + UniversalLightData lightData = frameData.Get(); + UniversalCameraData cameraData = frameData.Get(); + passData.depthTexture = resourceData.activeDepthTexture; + passData.cameraData = cameraData; + UnityEngine.Rendering.RenderGraphModule.TextureDesc activeDepthDesc = renderGraph.GetTextureDesc(resourceData.activeDepthTexture); + passData.targetWidth = activeDepthDesc.width; + passData.targetHeight = activeDepthDesc.height; + + SortingCriteria sortingCriteria = SortingCriteria.None; + var drawingSettings = CreateDrawingSettings(m_ShaderTagIdList, renderingData, cameraData, lightData, sortingCriteria); + var filter = new FilteringSettings(RenderQueueRange.all) { layerMask = BeautifySettings.sharpenExclusionMask }; + RendererListParams listParams = new RendererListParams(renderingData.cullResults, drawingSettings, filter); + passData.rendererListHandle = renderGraph.CreateRendererList(listParams); + + builder.UseRendererList(passData.rendererListHandle); + builder.UseTexture(resourceData.activeDepthTexture, AccessFlags.Read); + + builder.SetRenderFunc((PassData passData, UnsafeGraphContext context) => { + CommandBuffer cmd = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + + RenderTextureDescriptor maskDesc = passData.cameraData.cameraTargetDescriptor; + maskDesc.width = passData.targetWidth; + maskDesc.height = passData.targetHeight; + maskDesc.colorFormat = canUse16Bit ? RenderTextureFormat.RGB565 : RenderTextureFormat.ARGB32; + maskDesc.depthBufferBits = 0; + cmd.GetTemporaryRT(sharpenExclusionMaskId, maskDesc, FilterMode.Point); + cmd.SetGlobalTexture(sharpenExclusionMaskRT, sharpenExclusionMaskId); + RenderTargetIdentifier rti = new RenderTargetIdentifier(sharpenExclusionMaskId, 0, CubemapFace.Unknown, -1); + cmd.SetRenderTarget(rti, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, passData.depthTexture, RenderBufferLoadAction.Load, RenderBufferStoreAction.Store); + cmd.ClearRenderTarget(false, true, Color.black); + + cmd.DrawRendererList(passData.rendererListHandle); + }); + } + } +#else + public override void FrameCleanup (CommandBuffer cmd) { + if (cmd == null) return; + cmd.ReleaseTemporaryRT(sharpenExclusionMaskId); + } +#endif + + } + + partial class BeautifyBloomLumMaskPass : ScriptableRenderPass { + + static readonly List m_ShaderTagIdList = new List(); + + const string bloomSourceDepthRT = "_BloomSourceDepth"; + static int bloomSourceDepthId = Shader.PropertyToID(bloomSourceDepthRT); + RTHandle maskRT; + + public BeautifyBloomLumMaskPass () { + RenderTargetIdentifier rti = new RenderTargetIdentifier(bloomSourceDepthRT, 0, CubemapFace.Unknown, -1); + maskRT = RTHandles.Alloc(rti, name: bloomSourceDepthRT); + renderPassEvent = RenderPassEvent.AfterRenderingOpaques; + m_ShaderTagIdList.Clear(); + m_ShaderTagIdList.Add(new ShaderTagId("SRPDefaultUnlit")); + m_ShaderTagIdList.Add(new ShaderTagId("UniversalForward")); + m_ShaderTagIdList.Add(new ShaderTagId("LightweightForward")); + } + +#if UNITY_2022_2_OR_NEWER + RTHandle depthRT; +#else + RenderTargetIdentifier depthRT; +#endif + + +#if UNITY_2023_3_OR_NEWER + class PassData { + public TextureHandle depthTexture; + public RendererListHandle rendererListHandle; + public UniversalCameraData cameraData; + public int targetWidth; + public int targetHeight; + } + + public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { + + using (var builder = renderGraph.AddUnsafePass("Beautify Bloom Luminance Mask Pass", out var passData)) { + + builder.AllowPassCulling(false); + + UniversalResourceData resourceData = frameData.Get(); + UniversalRenderingData renderingData = frameData.Get(); + UniversalLightData lightData = frameData.Get(); + UniversalCameraData cameraData = frameData.Get(); + passData.depthTexture = resourceData.activeDepthTexture; + passData.cameraData = cameraData; + UnityEngine.Rendering.RenderGraphModule.TextureDesc activeDepthDesc = renderGraph.GetTextureDesc(resourceData.activeDepthTexture); + passData.targetWidth = activeDepthDesc.width; + passData.targetHeight = activeDepthDesc.height; + + SortingCriteria sortingCriteria = SortingCriteria.None; + var drawingSettings = CreateDrawingSettings(m_ShaderTagIdList, renderingData, cameraData, lightData, sortingCriteria); + var filter = new FilteringSettings(RenderQueueRange.all) { layerMask = BeautifySettings.bloomExcludeMask }; + RendererListParams listParams = new RendererListParams(renderingData.cullResults, drawingSettings, filter); + passData.rendererListHandle = renderGraph.CreateRendererList(listParams); + + builder.UseRendererList(passData.rendererListHandle); + builder.UseTexture(resourceData.activeDepthTexture, AccessFlags.Read); + + builder.SetRenderFunc((PassData passData, UnsafeGraphContext context) => { + CommandBuffer cmd = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + + RenderTextureDescriptor depthDesc = passData.cameraData.cameraTargetDescriptor; + depthDesc.width = passData.targetWidth; + depthDesc.height = passData.targetHeight; + depthDesc.colorFormat = RenderTextureFormat.ARGB32; + depthDesc.depthBufferBits = 0; + cmd.GetTemporaryRT(bloomSourceDepthId, depthDesc, FilterMode.Point); + cmd.SetGlobalTexture(bloomSourceDepthRT, bloomSourceDepthId); + if (BeautifySettings.anamorphicFlaresExcludeMask == BeautifySettings.bloomExcludeMask) { + cmd.SetGlobalTexture(BeautifyAnamorphicFlaresLumMaskPass.afSourceDepthRT, bloomSourceDepthId); + } + RenderTargetIdentifier rti = new RenderTargetIdentifier(bloomSourceDepthId, 0, CubemapFace.Unknown, -1); + cmd.SetRenderTarget(rti, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, passData.depthTexture, RenderBufferLoadAction.Load, RenderBufferStoreAction.Store); + cmd.ClearRenderTarget(false, true, Color.black); + + cmd.DrawRendererList(passData.rendererListHandle); + }); + } + } +#else + public override void FrameCleanup (CommandBuffer cmd) { + if (cmd == null) return; + cmd.ReleaseTemporaryRT(bloomSourceDepthId); + } +#endif + + } + + + partial class BeautifyAnamorphicFlaresLumMaskPass : ScriptableRenderPass { + + static readonly List m_ShaderTagIdList = new List(); + + public const string afSourceDepthRT = "_AFSourceDepth"; + static int afSourceDepthId = Shader.PropertyToID(afSourceDepthRT); + RTHandle maskRT; + + public BeautifyAnamorphicFlaresLumMaskPass () { + RenderTargetIdentifier rti = new RenderTargetIdentifier(afSourceDepthRT, 0, CubemapFace.Unknown, -1); + maskRT = RTHandles.Alloc(rti, name: afSourceDepthRT); + renderPassEvent = RenderPassEvent.BeforeRenderingTransparents; + m_ShaderTagIdList.Clear(); + m_ShaderTagIdList.Add(new ShaderTagId("SRPDefaultUnlit")); + m_ShaderTagIdList.Add(new ShaderTagId("UniversalForward")); + m_ShaderTagIdList.Add(new ShaderTagId("LightweightForward")); + } + +#if UNITY_2022_2_OR_NEWER + RTHandle depthRT; +#else + RenderTargetIdentifier depthRT; +#endif + + +#if UNITY_2023_3_OR_NEWER + class PassData { + public TextureHandle depthTexture; + public RendererListHandle rendererListHandle; + public UniversalCameraData cameraData; + public int targetWidth; + public int targetHeight; + } + + public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { + + using (var builder = renderGraph.AddUnsafePass("Beautify AF Luminance Mask Pass", out var passData)) { + builder.AllowPassCulling(false); + + UniversalResourceData resourceData = frameData.Get(); + UniversalRenderingData renderingData = frameData.Get(); + UniversalLightData lightData = frameData.Get(); + UniversalCameraData cameraData = frameData.Get(); + passData.depthTexture = resourceData.activeDepthTexture; + builder.UseTexture(resourceData.activeDepthTexture, AccessFlags.Read); + passData.cameraData = cameraData; + UnityEngine.Rendering.RenderGraphModule.TextureDesc activeDepthDesc = renderGraph.GetTextureDesc(resourceData.activeDepthTexture); + passData.targetWidth = activeDepthDesc.width; + passData.targetHeight = activeDepthDesc.height; + + SortingCriteria sortingCriteria = SortingCriteria.None; + var drawingSettings = CreateDrawingSettings(m_ShaderTagIdList, renderingData, cameraData, lightData, sortingCriteria); + var filter = new FilteringSettings(RenderQueueRange.all) { layerMask = BeautifySettings.anamorphicFlaresExcludeMask }; + RendererListParams listParams = new RendererListParams(renderingData.cullResults, drawingSettings, filter); + passData.rendererListHandle = renderGraph.CreateRendererList(listParams); + + builder.UseRendererList(passData.rendererListHandle); + + builder.SetRenderFunc((PassData passData, UnsafeGraphContext context) => { + CommandBuffer cmd = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + + RenderTextureDescriptor depthDesc = passData.cameraData.cameraTargetDescriptor; + depthDesc.width = passData.targetWidth; + depthDesc.height = passData.targetHeight; + depthDesc.colorFormat = RenderTextureFormat.ARGB32; + depthDesc.depthBufferBits = 0; + cmd.GetTemporaryRT(afSourceDepthId, depthDesc, FilterMode.Point); + cmd.SetGlobalTexture(afSourceDepthRT, afSourceDepthId); + RenderTargetIdentifier rti = new RenderTargetIdentifier(afSourceDepthId, 0, CubemapFace.Unknown, -1); + cmd.SetRenderTarget(rti, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, passData.depthTexture, RenderBufferLoadAction.Load, RenderBufferStoreAction.Store); + cmd.ClearRenderTarget(false, true, Color.black); + + cmd.DrawRendererList(passData.rendererListHandle); + }); + } + } +#else + public override void FrameCleanup (CommandBuffer cmd) { + if (cmd == null) return; + cmd.ReleaseTemporaryRT(afSourceDepthId); + } +#endif + + } + + internal partial class BeautifyDoFTransparentMaskPass : ScriptableRenderPass { + + static readonly List m_ShaderTagIdList = new List(); + static readonly List cutOutRenderers = new List(); + static readonly List userCutOutRenderers = new List(); + static readonly List s_TempRootObjects = new List(64); + static readonly List s_TempRenderers = new List(1024); + + const string dofTransparentDepthRT = "_DoFTransparentDepth"; + static int dofTransparentDepthId = Shader.PropertyToID(dofTransparentDepthRT); + static int m_CullPropertyId = Shader.PropertyToID("_Cull"); + const string m_ProfilerTag = "CustomDepthPrePass"; + const string m_DepthOnlyShader = "Hidden/Beautify2/DepthOnly"; + + RTHandle m_Depth; + + static Material depthOnlyMaterial, depthOnlyMaterialCutOff; + static int currentAlphaCutoutLayerMask = -999; + static Material[] depthOverrideMaterials; + + public BeautifyDoFTransparentMaskPass () { + RenderTargetIdentifier rti = new RenderTargetIdentifier(dofTransparentDepthRT, 0, CubemapFace.Unknown, -1); + m_Depth = RTHandles.Alloc(rti, name: dofTransparentDepthRT); + renderPassEvent = RenderPassEvent.AfterRenderingOpaques; + m_ShaderTagIdList.Clear(); + m_ShaderTagIdList.Add(new ShaderTagId("SRPDefaultUnlit")); + m_ShaderTagIdList.Add(new ShaderTagId("UniversalForward")); + m_ShaderTagIdList.Add(new ShaderTagId("LightweightForward")); + } + + + static void FindAlphaClippingRenderers () { + BeautifySettings._refreshAlphaClipRenderers = false; + cutOutRenderers.Clear(); + currentAlphaCutoutLayerMask = BeautifySettings.dofAlphaTestLayerMask; + int sceneCount = SceneManager.sceneCount; + for (int si = 0; si < sceneCount; si++) { + Scene scene = SceneManager.GetSceneAt(si); + if (!scene.isLoaded) continue; + scene.GetRootGameObjects(s_TempRootObjects); + int rootCount = s_TempRootObjects.Count; + for (int ri = 0; ri < rootCount; ri++) { + GameObject root = s_TempRootObjects[ri]; + if (root == null) continue; + root.GetComponentsInChildren(false, s_TempRenderers); + int rrLength = s_TempRenderers.Count; + for (int r = 0; r < rrLength; r++) { + Renderer renderer = s_TempRenderers[r]; + if (renderer != null && ((1 << renderer.gameObject.layer) & currentAlphaCutoutLayerMask) != 0) { + cutOutRenderers.Add(renderer); + } + } + } + } + int userCount = userCutOutRenderers.Count; + for (int i = 0; i < userCount; i++) { + Renderer mr = userCutOutRenderers[i]; + if (mr != null && !cutOutRenderers.Contains(mr)) { + cutOutRenderers.Add(mr); + } + } + } + + public static void RegisterCutOutRenderers (List renderers) { + if (renderers == null) return; + int count = renderers.Count; + for (int i = 0; i < count; i++) { + Renderer r = renderers[i]; + if (r == null) continue; + if (!userCutOutRenderers.Contains(r)) userCutOutRenderers.Add(r); + if (!cutOutRenderers.Contains(r)) cutOutRenderers.Add(r); + } + } + + public static void UnregisterCutOutRenderers (List renderers) { + if (renderers == null) return; + int count = renderers.Count; + for (int i = 0; i < count; i++) { + Renderer r = renderers[i]; + if (r == null) continue; + userCutOutRenderers.Remove(r); + cutOutRenderers.Remove(r); + } + } + + +#if UNITY_2023_3_OR_NEWER + class PassData { + public UniversalCameraData cameraData; + public RendererListHandle rendererListHandle; + public int targetWidth; + public int targetHeight; + } + + public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { + + using (var builder = renderGraph.AddUnsafePass("Beautify DoF Transp Mask Pass RG", out var passData)) { + + builder.AllowPassCulling(false); + + UniversalResourceData resourceData = frameData.Get(); + UniversalRenderingData renderingData = frameData.Get(); + UniversalCameraData cameraData = frameData.Get(); + UniversalLightData lightData = frameData.Get(); + passData.cameraData = cameraData; + TextureDesc activeColorDesc = renderGraph.GetTextureDesc(resourceData.activeColorTexture); + passData.targetWidth = activeColorDesc.width; + passData.targetHeight = activeColorDesc.height; + + if (BeautifySettings.dofTransparentSupport) { + SortingCriteria sortingCriteria = cameraData.defaultOpaqueSortFlags; + var drawingSettings = CreateDrawingSettings(m_ShaderTagIdList, renderingData, cameraData, lightData, sortingCriteria); + drawingSettings.perObjectData = PerObjectData.None; + if (depthOnlyMaterial == null) { + depthOnlyMaterial = new Material(Shader.Find(m_DepthOnlyShader)); + } + depthOnlyMaterial.SetInt(m_CullPropertyId, BeautifySettings.dofTransparentDoubleSided ? (int)CullMode.Off : (int)CullMode.Back); + drawingSettings.overrideMaterial = depthOnlyMaterial; + var filter = new FilteringSettings(RenderQueueRange.transparent) { layerMask = BeautifySettings.dofTransparentLayerMask }; + RendererListParams listParams = new RendererListParams(renderingData.cullResults, drawingSettings, filter); + passData.rendererListHandle = renderGraph.CreateRendererList(listParams); + builder.UseRendererList(passData.rendererListHandle); + } + + builder.SetRenderFunc((PassData passData, UnsafeGraphContext context) => { + + CommandBuffer cmd = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + + RenderTextureDescriptor depthDesc = passData.cameraData.cameraTargetDescriptor; + depthDesc.colorFormat = RenderTextureFormat.Depth; + depthDesc.depthBufferBits = 24; + depthDesc.msaaSamples = 1; + cmd.GetTemporaryRT(dofTransparentDepthId, depthDesc, FilterMode.Point); + cmd.SetGlobalTexture(dofTransparentDepthRT, dofTransparentDepthId); + + RenderTargetIdentifier rti = new RenderTargetIdentifier(dofTransparentDepthId, 0, CubemapFace.Unknown, -1); + cmd.SetRenderTarget(rti, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store); + cmd.ClearRenderTarget(true, true, Color.black); + + if (BeautifySettings.dofAlphaTestSupport) { + if (BeautifySettings.dofAlphaTestLayerMask != 0) { + if (BeautifySettings.dofAlphaTestLayerMask != currentAlphaCutoutLayerMask || BeautifySettings._refreshAlphaClipRenderers) { + FindAlphaClippingRenderers(); + } + if (depthOnlyMaterialCutOff == null) { + Shader depthOnlyCutOff = Shader.Find(m_DepthOnlyShader); + depthOnlyMaterialCutOff = new Material(depthOnlyCutOff); + } + int renderersCount = cutOutRenderers.Count; + if (depthOverrideMaterials == null || depthOverrideMaterials.Length < renderersCount) { + depthOverrideMaterials = new Material[renderersCount]; + } + for (int k = 0; k < renderersCount; k++) { + Renderer renderer = cutOutRenderers[k]; + if (renderer != null && renderer.isVisible) { + Material mat = renderer.sharedMaterial; + if (mat != null) { + if (depthOverrideMaterials[k] == null) { + depthOverrideMaterials[k] = Instantiate(depthOnlyMaterialCutOff); + depthOverrideMaterials[k].EnableKeyword(ShaderParams.SKW_CUSTOM_DEPTH_ALPHA_TEST); + } + Material overrideMaterial = depthOverrideMaterials[k]; + + if (mat.HasProperty(ShaderParams.CustomDepthAlphaCutoff)) { + overrideMaterial.SetFloat(ShaderParams.CustomDepthAlphaCutoff, mat.GetFloat(ShaderParams.CustomDepthAlphaCutoff)); + } else { + overrideMaterial.SetFloat(ShaderParams.CustomDepthAlphaCutoff, 0.5f); + } + if (mat.HasProperty(ShaderParams.CustomDepthBaseMap)) { + overrideMaterial.SetTexture(ShaderParams.CustomDepthBaseMap, mat.GetTexture(ShaderParams.CustomDepthBaseMap)); + } else if (mat.HasProperty(ShaderParams.mainTex)) { + overrideMaterial.SetTexture(ShaderParams.CustomDepthBaseMap, mat.GetTexture(ShaderParams.mainTex)); + } + overrideMaterial.SetInt(m_CullPropertyId, BeautifySettings.dofAlphaTestDoubleSided ? (int)CullMode.Off : (int)CullMode.Back); + + cmd.DrawRenderer(renderer, overrideMaterial); + } + } + } + + } + } + + // Render transparent objects + if (BeautifySettings.dofTransparentSupport) { + cmd.DrawRendererList(passData.rendererListHandle); + } + }); + } + } +#else + public override void FrameCleanup (CommandBuffer cmd) { + if (cmd == null) return; + cmd.ReleaseTemporaryRT(dofTransparentDepthId); + } +#endif + } + + + partial class BeautifyOutlineDepthPrepass : ScriptableRenderPass { + + static readonly List m_ShaderTagIdList = new List(); + + const string outlineObjectIdRT = "_OutlineObjectId"; + const string outlineDepthRT = "_OutlineDepth"; + static int outlineDepthId = Shader.PropertyToID(outlineDepthRT); + static int m_CullPropertyId = Shader.PropertyToID("_Cull"); + const string m_ProfilerTag = "CustomOutlineDepthPrePass"; + const string m_DepthOnlyShader = "Hidden/Beautify2/DepthOnly"; + const string m_DepthOnlyWithObjectIdShader = "Hidden/Beautify2/DepthOnlyWithObjectId"; + const string m_DepthOnlyAlphaTestShader = "Hidden/Beautify2/DepthOnlyAlphaTest"; + const string m_DepthOnlyWithObjectIdAlphaTestShader = "Hidden/Beautify2/DepthOnlyWithObjectIdAlphaTest"; + + static Material depthOnlyMaterial, depthOnlyMaterialWithObjectId; + Shader depthOnlyShaderWithAlphaTest, depthOnlyShaderWithAlphaTestObjectId; + RTHandle outlineDepthHandle; + + public BeautifyOutlineDepthPrepass () { + renderPassEvent = RenderPassEvent.AfterRenderingOpaques; + m_ShaderTagIdList.Clear(); + m_ShaderTagIdList.Add(new ShaderTagId("SRPDefaultUnlit")); + m_ShaderTagIdList.Add(new ShaderTagId("UniversalForward")); + m_ShaderTagIdList.Add(new ShaderTagId("LightweightForward")); + RenderTargetIdentifier rti = new RenderTargetIdentifier(outlineDepthRT, 0, CubemapFace.Unknown, -1); + outlineDepthHandle = RTHandles.Alloc(rti, name: outlineDepthRT); + } + + +#if UNITY_2023_3_OR_NEWER + class PassData { + public UniversalCameraData cameraData; + public RendererListHandle rendererListHandle; + public int targetWidth; + public int targetHeight; + } + + public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { + + using (var builder = renderGraph.AddUnsafePass("Beautify Outline Depth Prepass RG", out var passData)) { + + builder.AllowPassCulling(false); + + UniversalResourceData resourceData = frameData.Get(); + UniversalRenderingData renderingData = frameData.Get(); + UniversalCameraData cameraData = frameData.Get(); + UniversalLightData lightData = frameData.Get(); + passData.cameraData = cameraData; + TextureDesc activeColorDesc = renderGraph.GetTextureDesc(resourceData.activeColorTexture); + passData.targetWidth = activeColorDesc.width; + passData.targetHeight = activeColorDesc.height; + + SortingCriteria sortingCriteria = cameraData.defaultOpaqueSortFlags; + var drawingSettings = CreateDrawingSettings(m_ShaderTagIdList, renderingData, cameraData, lightData, sortingCriteria); + drawingSettings.perObjectData = PerObjectData.None; + + if (BeautifySettings.outlineDepthPrepassUseOptimizedShader) { + if (BeautifySettings.outlineLayerCutOff > 0) { + Shader alphaTestShader = null; + if (BeautifySettings.outlineUseObjectId) { + if (depthOnlyShaderWithAlphaTestObjectId == null) { + depthOnlyShaderWithAlphaTestObjectId = Shader.Find(m_DepthOnlyWithObjectIdAlphaTestShader); + } + alphaTestShader = depthOnlyShaderWithAlphaTestObjectId; + } else { + if (depthOnlyShaderWithAlphaTest == null) { + depthOnlyShaderWithAlphaTest = Shader.Find(m_DepthOnlyAlphaTestShader); + } + alphaTestShader = depthOnlyShaderWithAlphaTest; + } + drawingSettings.overrideShader = alphaTestShader; + Shader.SetGlobalFloat(ShaderParams.CustomDepthAlphaTestCutoff, BeautifySettings.outlineLayerCutOff); + } else { + Material depthMaterial = null; + if (BeautifySettings.outlineUseObjectId) { + if (depthOnlyMaterialWithObjectId == null) { + depthOnlyMaterialWithObjectId = new Material(Shader.Find(m_DepthOnlyWithObjectIdShader)); + } + depthMaterial = depthOnlyMaterialWithObjectId; + } else { + if (depthOnlyMaterial == null) { + depthOnlyMaterial = new Material(Shader.Find(m_DepthOnlyShader)); + } + depthMaterial = depthOnlyMaterial; + } + depthMaterial.SetInt(m_CullPropertyId, (int)CullMode.Back); + depthMaterial.DisableKeyword(ShaderParams.SKW_CUSTOM_DEPTH_ALPHA_TEST); + drawingSettings.overrideMaterial = depthMaterial; + } + } + + var filter = new FilteringSettings(RenderQueueRange.opaque) { layerMask = BeautifySettings.outlineLayerMask }; + RendererListParams listParams = new RendererListParams(renderingData.cullResults, drawingSettings, filter); + passData.rendererListHandle = renderGraph.CreateRendererList(listParams); + builder.UseRendererList(passData.rendererListHandle); + + builder.SetRenderFunc((PassData passData, UnsafeGraphContext context) => { + + CommandBuffer cmd = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + + RenderTextureDescriptor depthDesc = passData.cameraData.cameraTargetDescriptor; + depthDesc.width = passData.targetWidth; + depthDesc.height = passData.targetHeight; + depthDesc.msaaSamples = 1; + depthDesc.colorFormat = BeautifySettings.outlineUseObjectId ? RenderTextureFormat.RFloat : RenderTextureFormat.Depth; + depthDesc.depthBufferBits = 24; + cmd.GetTemporaryRT(outlineDepthId, depthDesc, FilterMode.Point); + if (BeautifySettings.outlineUseObjectId) { + cmd.SetGlobalTexture(outlineObjectIdRT, outlineDepthId, RenderTextureSubElement.Color); + cmd.SetGlobalTexture(outlineDepthRT, outlineDepthId, RenderTextureSubElement.Depth); + } else { + cmd.SetGlobalTexture(outlineDepthRT, outlineDepthId); + } + + RenderTargetIdentifier rti = new RenderTargetIdentifier(outlineDepthId, 0, CubemapFace.Unknown, -1); + cmd.SetRenderTarget(rti, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store); + cmd.ClearRenderTarget(true, BeautifySettings.outlineUseObjectId, Color.black); + cmd.DrawRendererList(passData.rendererListHandle); + }); + } + } +#endif + } + + partial class BeautifyClearColorTarget : ScriptableRenderPass { + + const string m_ProfilerTag = "Beautify Clear Color Target"; + + public BeautifyClearColorTarget () { + renderPassEvent = RenderPassEvent.BeforeRenderingOpaques; + } + +#if UNITY_2023_3_OR_NEWER + public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { + using (var builder = renderGraph.AddUnsafePass(m_ProfilerTag, out var passData)) { + UniversalResourceData resourceData = frameData.Get(); + builder.UseTexture(resourceData.activeColorTexture, AccessFlags.ReadWrite); + + builder.SetRenderFunc((PassData passData, UnsafeGraphContext context) => { + CommandBuffer cmd = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + cmd.ClearRenderTarget(false, true, new Color(0, 0, 0, 0)); + }); + } + } +#endif + } + + partial class BeautifyOutlineEffectPass : ScriptableRenderPass { + + const string m_ProfilerTag = "Beautify Outline Effect"; + + public BeautifyOutlineEffectPass() { + renderPassEvent = RenderPassEvent.BeforeRenderingTransparents; + } + +#if UNITY_2023_3_OR_NEWER + public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) { + if (!BeautifyRenderPass.CanExecuteOutlineBeforeTransparents) return; + + using (var builder = renderGraph.AddUnsafePass(m_ProfilerTag, out var passData)) { + UniversalResourceData resourceData = frameData.Get(); + builder.UseTexture(resourceData.activeColorTexture, AccessFlags.ReadWrite); + + builder.SetRenderFunc((PassData passData, UnsafeGraphContext context) => { + CommandBuffer cmd = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + BeautifyRenderPass.ExecuteOutlineBeforeTransparents(cmd); + }); + } + } +#endif + } + + [SerializeField, HideInInspector] + Shader shader; + BeautifyRenderPass m_BeautifyRenderPass; + BeautifyDoFTransparentMaskPass m_BeautifyDoFTransparentMaskPass; + BeautifyBloomLumMaskPass m_BeautifyBloomLumMaskPass; + BeautifyAnamorphicFlaresLumMaskPass m_BeautifyAnamorphicFlaresLumMaskPass; + BeautifySharpenExclusionMaskPass m_BeautifySharpenExclusionMaskPass; + BeautifyClearColorTarget m_BeautifyClearColorTarget; + BeautifyOutlineDepthPrepass m_BeautifyOutlineDepthPrepass; + BeautifyOutlineEffectPass m_BeautifyOutlineEffectPass; + + [Tooltip("Note: this option is ignored if Direct Write To Camera option in Beautify volume inspector is enabled.")] + public RenderPassEvent renderPassEvent = RenderPassEvent.AfterRenderingTransparents; + + [Tooltip("Allows Beautify to be executed even if camera has Post Processing option disabled.")] + public bool ignorePostProcessingOption; + +#if ENABLE_VR && ENABLE_XR_MODULE + [Tooltip("Ensures color buffer is cleared before rendering in XR. This option solves an issue with OpenXR and occlusion mesh which causes color bleeding when bloom is enabled.")] + public bool clearXRColorBuffer; +#endif + + [Tooltip("Specify which cameras can render Beautify effects")] + public LayerMask cameraLayerMask = -1; + + public BeautifyStripSettings stripSettings; + + [Tooltip("Do not compile ACES tonemapping shader feature, reducing build time.")] + public bool stripBeautifyTonemappingACES; + + [Tooltip("Do not compile ACES Fitted tonemapping shader feature, reducing build time.")] + public bool stripBeautifyTonemappingACESFitted; + + [Tooltip("Do not compile AGX tonemapping shader feature, reducing build time.")] + public bool stripBeautifyTonemappingAGX; + + [Tooltip("Do not compile sharpen shader feature, reducing build time.")] + public bool stripBeautifySharpen; + + [Tooltip("Do not compile sharpen exclusion mask shader feature, reducing build time.")] + public bool stripBeautifySharpenExclusionMask = true; + + [Tooltip("Do not compile dithering shader feature, reducing build time.")] + public bool stripBeautifyDithering; + + [Tooltip("Do not compile edge antialiasing shader feature, reducing build time.")] + public bool stripBeautifyEdgeAA; + + [Tooltip("Do not compile LUT shader feature, reducing build time.")] + public bool stripBeautifyLUT; + + [Tooltip("Do not compile LUT 3D shader feature, reducing build time.")] + public bool stripBeautifyLUT3D = true; + + [Tooltip("Do not compile daltonize, sepia or white balance shader feature, reducing build time.")] + public bool stripBeautifyColorTweaks; + + [Tooltip("Do not compile Bloom, Anamorphic & Sun Flares shader features, reducing build time.")] + public bool stripBeautifyBloom; + + [Tooltip("Do not compile Lens Dirt shader feature, reducing build time.")] + public bool stripBeautifyLensDirt; + + [Tooltip("Do not compile Chromatic Aberration shader feature, reducing build time.")] + public bool stripBeautifyChromaticAberration; + + [Tooltip("Do not compile Depth Of Field shader feature, reducing build time.")] + public bool stripBeautifyDoF; + + [Tooltip("Do not compile Depth Of Field transparency support shader feature, reducing build time.")] + public bool stripBeautifyDoFTransparentSupport = true; + + [Tooltip("Do not compile Purkinje Shift shader feature, reducing build time.")] + public bool stripBeautifyEyeAdaptation = true; + + [Tooltip("Do not compile Purkinje Shift shader feature, reducing build time.")] + public bool stripBeautifyPurkinje = true; + + [Tooltip("Do not compile Vignetting shader features, reducing build time.")] + public bool stripBeautifyVignetting; + + [Tooltip("Do not compile Vignetting Mask shader feature, reducing build time.")] + public bool stripBeautifyVignettingMask = true; + + [Tooltip("Do not compile Outline shader feature, reducing build time.")] + public bool stripBeautifyOutline = true; + + [Tooltip("Do not compile Night Vision shader feature, reducing build time.")] + public bool stripBeautifyNightVision = true; + + [Tooltip("Do not compile Thermal Vision shader feature, reducing build time.")] + public bool stripBeautifyThermalVision = true; + + [Tooltip("Do not compile Frame shader features, reducing build time.")] + public bool stripBeautifyFrame = true; + + [Tooltip("Do not compile Film Grain shader feature, reducing build time.")] + public bool stripBeautifyFilmGrain = true; + + [Tooltip("Do not compile Unity Post Processing's Film Grain shader feature, reducing build time.")] + public bool stripUnityFilmGrain; + + [Tooltip("Do not compile Unity Post Processing's Dithering shader feature, reducing build time.")] + public bool stripUnityDithering; + + [Tooltip("Do not compile Unity Post Processing's Tonemapping shader feature, reducing build time.")] + public bool stripUnityTonemapping; + + [Tooltip("Do not compile Unity Post Processing's Bloom shader feature, reducing build time.")] + public bool stripUnityBloom; + + [Tooltip("Do not compile Unity Post Processing's Chromatic Aberration shader feature, reducing build time.")] + public bool stripUnityChromaticAberration; + + [Tooltip("Do not compile Unity Post Processing's Screen Distortion features, reducing build time.")] + public bool stripUnityDistortion; + + [Tooltip("Do not compile Unity Post Processing's debug variants, reducing build time.")] + public bool stripUnityDebugVariants; + + public static bool installed; + public static bool ignoringPostProcessingOption; + + + + +#if UNITY_2023_3_OR_NEWER + public static bool usingRenderGraph; + static TextureHandle directWriteTextureHandle; +#endif + +#if UNITY_EDITOR + public static CameraType captureCameraType = CameraType.SceneView; + public static bool requestScreenCapture; +#endif + + + void OnDisable () { + if (m_BeautifyRenderPass != null) { + m_BeautifyRenderPass.Cleanup(); + } + installed = false; + } + + + public override void Create () { + name = "Beautify"; + m_BeautifyRenderPass = new BeautifyRenderPass(); + m_BeautifyBloomLumMaskPass = new BeautifyBloomLumMaskPass(); + m_BeautifyAnamorphicFlaresLumMaskPass = new BeautifyAnamorphicFlaresLumMaskPass(); + m_BeautifySharpenExclusionMaskPass = new BeautifySharpenExclusionMaskPass(); + m_BeautifyDoFTransparentMaskPass = new BeautifyDoFTransparentMaskPass(); + m_BeautifyOutlineDepthPrepass = new BeautifyOutlineDepthPrepass(); + m_BeautifyOutlineEffectPass = new BeautifyOutlineEffectPass(); + +#if ENABLE_VR && ENABLE_XR_MODULE + m_BeautifyClearColorTarget = new BeautifyClearColorTarget(); +#endif + shader = Shader.Find("Hidden/Kronnect/Beautify"); + +#if UNITY_EDITOR + SetStripShaderKeywords(); +#endif + } + + public override void AddRenderPasses (ScriptableRenderer renderer, ref RenderingData renderingData) { + installed = true; + ignoringPostProcessingOption = ignorePostProcessingOption; + +#if UNITY_EDITOR + // Check if shader compilation or preparation is happening in background + if (UnityEditor.ShaderUtil.anythingCompiling) { + return; + } +#endif + +#if UNITY_6000_4_OR_NEWER + usingRenderGraph = true; +#elif UNITY_2023_3_OR_NEWER + var renderGraphSettings = GraphicsSettings.GetRenderPipelineSettings(); + usingRenderGraph = !renderGraphSettings.enableRenderCompatibilityMode; +#endif + + if (ignorePostProcessingOption || renderingData.cameraData.postProcessEnabled) { + CameraData cameraData = renderingData.cameraData; + Camera cam = cameraData.camera; + if ((cameraLayerMask & (1 << cam.gameObject.layer)) == 0) return; + + if (cam.targetTexture != null && cam.targetTexture.format == RenderTextureFormat.Depth) return; // ignore depth pre-pass cams! + + if (m_BeautifyRenderPass.Setup(shader, renderer, renderingData, renderPassEvent, ignorePostProcessingOption)) { + + m_BeautifyRenderPass.UpdateMaterialProperties(cam); + if (BeautifySettings.bloomExcludeMask != 0) { + renderer.EnqueuePass(m_BeautifyBloomLumMaskPass); + } + if (BeautifySettings.anamorphicFlaresExcludeMask != 0 && BeautifySettings.anamorphicFlaresExcludeMask != BeautifySettings.bloomExcludeMask) { + renderer.EnqueuePass(m_BeautifyAnamorphicFlaresLumMaskPass); + } + if (BeautifySettings.sharpenExclusionMask != 0) { + renderer.EnqueuePass(m_BeautifySharpenExclusionMaskPass); + } + if (BeautifySettings.dofTransparentSupport || BeautifySettings.dofAlphaTestSupport) { + if (cam.cameraType == CameraType.Game) { + renderer.EnqueuePass(m_BeautifyDoFTransparentMaskPass); + } + } + if (BeautifySettings.outlineDepthPrepass) { + renderer.EnqueuePass(m_BeautifyOutlineDepthPrepass); + } + if (BeautifySettings.outlineBeforeTransparents) { + renderer.EnqueuePass(m_BeautifyOutlineEffectPass); + } + renderer.EnqueuePass(m_BeautifyRenderPass); + +#if ENABLE_VR && ENABLE_XR_MODULE + if (clearXRColorBuffer && renderingData.cameraData.xrRendering) { + renderer.EnqueuePass(m_BeautifyClearColorTarget); + } +#endif + } + } + } + + +#if UNITY_EDITOR + + public const string PLAYER_PREF_KEYNAME = "BeautifyStripKeywordSet"; + + + [System.NonSerialized] + private BeautifyStripSettings m_InternalStripSettings; + + public BeautifyStripSettings settings { + get { + if (stripSettings != null) return stripSettings; + if (m_InternalStripSettings == null) UpdateInternalStripSettings(); + return m_InternalStripSettings; + } + } + + public void UpdateInternalStripSettings() { + if (m_InternalStripSettings == null) m_InternalStripSettings = ScriptableObject.CreateInstance(); + m_InternalStripSettings.stripBeautifyTonemappingACES = stripBeautifyTonemappingACES; + m_InternalStripSettings.stripBeautifyTonemappingACESFitted = stripBeautifyTonemappingACESFitted; + m_InternalStripSettings.stripBeautifyTonemappingAGX = stripBeautifyTonemappingAGX; + m_InternalStripSettings.stripBeautifySharpen = stripBeautifySharpen; + m_InternalStripSettings.stripBeautifySharpenExclusionMask = stripBeautifySharpenExclusionMask; + m_InternalStripSettings.stripBeautifyDithering = stripBeautifyDithering; + m_InternalStripSettings.stripBeautifyEdgeAA = stripBeautifyEdgeAA; + m_InternalStripSettings.stripBeautifyLUT = stripBeautifyLUT; + m_InternalStripSettings.stripBeautifyLUT3D = stripBeautifyLUT3D; + m_InternalStripSettings.stripBeautifyColorTweaks = stripBeautifyColorTweaks; + m_InternalStripSettings.stripBeautifyBloom = stripBeautifyBloom; + m_InternalStripSettings.stripBeautifyLensDirt = stripBeautifyLensDirt; + m_InternalStripSettings.stripBeautifyChromaticAberration = stripBeautifyChromaticAberration; + m_InternalStripSettings.stripBeautifyDoF = stripBeautifyDoF; + m_InternalStripSettings.stripBeautifyDoFTransparentSupport = stripBeautifyDoFTransparentSupport; + m_InternalStripSettings.stripBeautifyEyeAdaptation = stripBeautifyEyeAdaptation; + m_InternalStripSettings.stripBeautifyPurkinje = stripBeautifyPurkinje; + m_InternalStripSettings.stripBeautifyVignetting = stripBeautifyVignetting; + m_InternalStripSettings.stripBeautifyVignettingMask = stripBeautifyVignettingMask; + m_InternalStripSettings.stripBeautifyOutline = stripBeautifyOutline; + m_InternalStripSettings.stripBeautifyNightVision = stripBeautifyNightVision; + m_InternalStripSettings.stripBeautifyThermalVision = stripBeautifyThermalVision; + m_InternalStripSettings.stripBeautifyFrame = stripBeautifyFrame; + m_InternalStripSettings.stripBeautifyFilmGrain = stripBeautifyFilmGrain; + m_InternalStripSettings.stripUnityFilmGrain = stripUnityFilmGrain; + m_InternalStripSettings.stripUnityDithering = stripUnityDithering; + m_InternalStripSettings.stripUnityTonemapping = stripUnityTonemapping; + m_InternalStripSettings.stripUnityBloom = stripUnityBloom; + m_InternalStripSettings.stripUnityChromaticAberration = stripUnityChromaticAberration; + m_InternalStripSettings.stripUnityDistortion = stripUnityDistortion; + m_InternalStripSettings.stripUnityDebugVariants = stripUnityDebugVariants; + } + + public void SyncInternalToLegacy() { + if (m_InternalStripSettings == null) return; + stripBeautifyTonemappingACES = m_InternalStripSettings.stripBeautifyTonemappingACES; + stripBeautifyTonemappingACESFitted = m_InternalStripSettings.stripBeautifyTonemappingACESFitted; + stripBeautifyTonemappingAGX = m_InternalStripSettings.stripBeautifyTonemappingAGX; + stripBeautifySharpen = m_InternalStripSettings.stripBeautifySharpen; + stripBeautifySharpenExclusionMask = m_InternalStripSettings.stripBeautifySharpenExclusionMask; + stripBeautifyDithering = m_InternalStripSettings.stripBeautifyDithering; + stripBeautifyEdgeAA = m_InternalStripSettings.stripBeautifyEdgeAA; + stripBeautifyLUT = m_InternalStripSettings.stripBeautifyLUT; + stripBeautifyLUT3D = m_InternalStripSettings.stripBeautifyLUT3D; + stripBeautifyColorTweaks = m_InternalStripSettings.stripBeautifyColorTweaks; + stripBeautifyBloom = m_InternalStripSettings.stripBeautifyBloom; + stripBeautifyLensDirt = m_InternalStripSettings.stripBeautifyLensDirt; + stripBeautifyChromaticAberration = m_InternalStripSettings.stripBeautifyChromaticAberration; + stripBeautifyDoF = m_InternalStripSettings.stripBeautifyDoF; + stripBeautifyDoFTransparentSupport = m_InternalStripSettings.stripBeautifyDoFTransparentSupport; + stripBeautifyEyeAdaptation = m_InternalStripSettings.stripBeautifyEyeAdaptation; + stripBeautifyPurkinje = m_InternalStripSettings.stripBeautifyPurkinje; + stripBeautifyVignetting = m_InternalStripSettings.stripBeautifyVignetting; + stripBeautifyVignettingMask = m_InternalStripSettings.stripBeautifyVignettingMask; + stripBeautifyOutline = m_InternalStripSettings.stripBeautifyOutline; + stripBeautifyNightVision = m_InternalStripSettings.stripBeautifyNightVision; + stripBeautifyThermalVision = m_InternalStripSettings.stripBeautifyThermalVision; + stripBeautifyFrame = m_InternalStripSettings.stripBeautifyFrame; + stripBeautifyFilmGrain = m_InternalStripSettings.stripBeautifyFilmGrain; + stripUnityFilmGrain = m_InternalStripSettings.stripUnityFilmGrain; + stripUnityDithering = m_InternalStripSettings.stripUnityDithering; + stripUnityTonemapping = m_InternalStripSettings.stripUnityTonemapping; + stripUnityBloom = m_InternalStripSettings.stripUnityBloom; + stripUnityChromaticAberration = m_InternalStripSettings.stripUnityChromaticAberration; + stripUnityDistortion = m_InternalStripSettings.stripUnityDistortion; + stripUnityDebugVariants = m_InternalStripSettings.stripUnityDebugVariants; + } + + public void SetStripShaderKeywords () { + + if (Application.isPlaying) return; + + BeautifyStripSettings settings; + if (stripSettings != null) { + settings = stripSettings; + } else { + if (m_InternalStripSettings == null) UpdateInternalStripSettings(); + settings = m_InternalStripSettings; + } + + System.Text.StringBuilder sb = new System.Text.StringBuilder(); + if (settings.stripBeautifyEdgeAA) { + sb.Append(ShaderParams.SKW_EDGE_ANTIALIASING); + sb.Append(ShaderParams.SKW_EDGE_ANTIALIASING_DOF); + } + if (settings.stripBeautifyBloom) { + sb.Append(ShaderParams.SKW_BLOOM); + sb.Append(ShaderParams.SKW_BLOOM_USE_DEPTH); + sb.Append(ShaderParams.SKW_BLOOM_USE_LAYER); + sb.Append(ShaderParams.SKW_BLOOM_USE_LAYER_INCLUSION); + sb.Append(ShaderParams.SKW_BLOOM_PROP_THRESHOLDING); + sb.Append(ShaderParams.SKW_ANAMORPHIC_FLARES_USE_DEPTH); + sb.Append(ShaderParams.SKW_ANAMORPHIC_FLARES_USE_LAYER); + sb.Append(ShaderParams.SKW_ANAMORPHIC_FLARES_USE_LAYER_INCLUSION); + sb.Append(ShaderParams.SKW_ANAMORPHIC_PROP_THRESHOLDING); + sb.Append(ShaderParams.SKW_SUN_FLARES_USE_GHOSTS); + sb.Append(ShaderParams.SKW_SUN_FLARES_OCCLUSION_INIT); + sb.Append(ShaderParams.SKW_SUN_FLARES_OCCLUSION_SIMPLE); + sb.Append(ShaderParams.SKW_SUN_FLARES_OCCLUSION_SMOOTH); + } + if (settings.stripBeautifyDoF) { + sb.Append(ShaderParams.SKW_DEPTH_OF_FIELD); + sb.Append(ShaderParams.SKW_DEPTH_OF_FIELD_TRANSPARENT); + sb.Append(ShaderParams.SKW_EDGE_ANTIALIASING_DOF); + } + else if (settings.stripBeautifyDoFTransparentSupport) { + sb.Append(ShaderParams.SKW_DEPTH_OF_FIELD_TRANSPARENT); + } + + if (settings.stripBeautifyLensDirt) { + sb.Append(ShaderParams.SKW_DIRT); + } + if (settings.stripBeautifyLUT3D) { + sb.Append(ShaderParams.SKW_LUT3D); + } + if (settings.stripBeautifyLUT) { + sb.Append(ShaderParams.SKW_LUT); + } + if (settings.stripBeautifyOutline) { + sb.Append(ShaderParams.SKW_OUTLINE); + sb.Append(ShaderParams.SKW_OUTLINE_CUSTOM_DEPTH); + sb.Append(ShaderParams.SKW_OUTLINE_OBJECT_ID); + sb.Append(ShaderParams.SKW_OUTLINE_MIN_SEPARATION); + sb.Append(ShaderParams.SKW_OUTLINE_OUTER_ONLY); + sb.Append(ShaderParams.SKW_OUTLINE_DEPTH_FADE); + } + if (settings.stripBeautifyNightVision) { + sb.Append(ShaderParams.SKW_NIGHT_VISION); + } + if (settings.stripBeautifyThermalVision) { + sb.Append(ShaderParams.SKW_THERMAL_VISION); + } + if (settings.stripBeautifyColorTweaks) { + sb.Append(ShaderParams.SKW_COLOR_TWEAKS); + } + if (settings.stripBeautifyPurkinje) { + sb.Append(ShaderParams.SKW_PURKINJE); + } + if (settings.stripBeautifyTonemappingACES) { + sb.Append(ShaderParams.SKW_TONEMAP_ACES); + } + if (settings.stripBeautifyTonemappingACESFitted) { + sb.Append(ShaderParams.SKW_TONEMAP_ACES_FITTED); + } + if (settings.stripBeautifyTonemappingAGX) { + sb.Append(ShaderParams.SKW_TONEMAP_AGX); + } + if (settings.stripBeautifyDithering) { + sb.Append(ShaderParams.SKW_DITHER); + } + if (settings.stripBeautifySharpen) { + sb.Append(ShaderParams.SKW_SHARPEN); + sb.Append(ShaderParams.SKW_SHARPEN_EXCLUSION_MASK); + } + else if (settings.stripBeautifySharpenExclusionMask) { + sb.Append(ShaderParams.SKW_SHARPEN_EXCLUSION_MASK); + } + if (settings.stripBeautifyEyeAdaptation) { + sb.Append(ShaderParams.SKW_EYE_ADAPTATION); + sb.Append(ShaderParams.SKW_EA_USE_DEPTH); + sb.Append(ShaderParams.SKW_EA_USE_MASK); + } + if (settings.stripBeautifyChromaticAberration) { + sb.Append(ShaderParams.SKW_CHROMATIC_ABERRATION); + } + if (settings.stripBeautifyVignetting) { + sb.Append(ShaderParams.SKW_VIGNETTING); + sb.Append(ShaderParams.SKW_VIGNETTING_MASK); + } + else if (settings.stripBeautifyVignettingMask) { + sb.Append(ShaderParams.SKW_VIGNETTING_MASK); + } + if (settings.stripBeautifyFrame) { + sb.Append(ShaderParams.SKW_FRAME); + } + if (settings.stripBeautifyFilmGrain) { + sb.Append(ShaderParams.SKW_FILM_GRAIN); + } + + if (settings.stripUnityBloom) { + sb.Append("_BLOOM_LQ _BLOOM_HQ _BLOOM_LQ_DIRT _BLOOM_HQ_DIRT"); + } + if (settings.stripUnityChromaticAberration) { + sb.Append("_CHROMATIC_ABERRATION"); + } + if (settings.stripUnityDistortion) { + sb.Append("_DISTORTION"); + } + if (settings.stripUnityFilmGrain) { + sb.Append("_FILM_GRAIN"); + } + if (settings.stripUnityDithering) { + sb.Append("_DITHERING"); + } + if (settings.stripUnityTonemapping) { + sb.Append("_TONEMAP_ACES _TONEMAP_NEUTRAL"); + } + if (settings.stripUnityDebugVariants) { + sb.Append("DEBUG_DISPLAY"); + } + PlayerPrefs.SetString(PLAYER_PREF_KEYNAME, sb.ToString()); + } + + public static void StripBeautifyFeatures () { + var asset = UniversalRenderPipeline.asset; + if (asset == null) return; + + try { + if (asset.scriptableRenderer is not UniversalRenderer renderer) return; + + var rendererFeaturesField = typeof(ScriptableRenderer) + .GetField("m_RendererFeatures", BindingFlags.NonPublic | BindingFlags.Instance); + + if (rendererFeaturesField == null) return; + + if (rendererFeaturesField.GetValue(renderer) is not List rendererFeatures) return; + + foreach (var feature in rendererFeatures) { + if (feature is BeautifyRendererFeature beautifyFeature) { + beautifyFeature.SetStripShaderKeywords(); + return; + } + } + } + catch { } + } + +#endif + + } +} diff --git a/Imports/Beautify/URP/Runtime/BeautifyRendererFeature.cs.meta b/Imports/Beautify/URP/Runtime/BeautifyRendererFeature.cs.meta new file mode 100644 index 00000000..66de2415 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifyRendererFeature.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 7cbabd8e2cb2e4f8a930752453adf79a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: + - settings: {fileID: 11400000, guid: 68dde9df85a05a54fbc92e3b6f3a8c42, type: 2} + - hbaoShader: {fileID: 4800000, guid: bf610497676b34e4dbe0f14fe3fe311c, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/BeautifySettings.cs b/Imports/Beautify/URP/Runtime/BeautifySettings.cs new file mode 100644 index 00000000..f776f6cc --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifySettings.cs @@ -0,0 +1,231 @@ +using System; +using System.Collections; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; +using UnityEngine.SceneManagement; + +namespace Beautify.Universal { + + public delegate float OnBeforeFocusEvent(float currentFocusDistance); + public delegate void OnCameraBeforeFocusEvent(Camera camera, ref float currentFocusDistance); + public delegate void OnCameraBeforeAutofocusEvent(Camera camera, ref Transform target); + + + [ExecuteAlways] + public class BeautifySettings : MonoBehaviour { + + public Transform sun; + public Transform depthOfFieldTarget; + + [Tooltip("Enable to use Focus Position instead of volume setting")] + public bool depthOfFieldFocusPositionEnabled; + + [Tooltip("World position to focus on when FollowPosition mode is selected")] + public Vector3 depthOfFieldFocusPosition; + + public OnBeforeFocusEvent OnBeforeFocus; + public OnCameraBeforeFocusEvent OnCameraBeforeFocus; + public OnCameraBeforeAutofocusEvent OnCameraBeforeAutofocus; + + public static float depthOfFieldCurrentFocalPointDistance; + + public static int bloomExcludeMask; + + public static int anamorphicFlaresExcludeMask; + + public static int sharpenExclusionMask; + + public static bool dofTransparentSupport; + + public static int dofTransparentLayerMask; + + public static bool dofTransparentDoubleSided; + + public static bool dofAlphaTestSupport; + + public static int dofAlphaTestLayerMask; + + public static bool dofAlphaTestDoubleSided; + + public static bool outlineDepthPrepass; + public static bool outlineUseObjectId; + public static int outlineLayerMask; + public static float outlineLayerCutOff; + public static bool outlineBeforeTransparents; + + public static bool outlineDepthPrepassUseOptimizedShader; + + internal static bool _refreshAlphaClipRenderers; + + static BeautifySettings _instance; + static Volume _beautifyVolume; + static Beautify _beautify; + + /// + /// Forces a reset of the internal cached settings of Beautify. Call this method if Beautify settings are not resetted when switching scenes. + /// + public static void UnloadBeautify() { + _instance = null; + _beautifyVolume = null; + _beautify = null; + } + + /// + /// Returns a reference to the Beautify Settings component attached to the Post Processing Layer or camera + /// + /// The instance. + public static BeautifySettings instance { + get { + if (_instance != null) return _instance; + + // Fallback: auto-create BeautifySettings on the Beautify volume if it doesn't exist + _beautifyVolume = FindBeautifyVolume(); + if (_beautifyVolume == null) { + return null; + } + GameObject go = _beautifyVolume.gameObject; + _instance = go.GetComponent(); + if (_instance == null) { + _instance = go.AddComponent(); + } + return _instance; + } + } + + + static Volume FindBeautifyVolume() { + Volume[] vols = Misc.FindObjectsOfType(); + foreach (Volume volume in vols) { + if (volume.sharedProfile != null && volume.sharedProfile.Has()) { + _beautifyVolume = volume; + return volume; + } + } + return null; + } + + /// + /// Returns a reference to the settings of Beautify in the Post Processing Profile + /// + /// The shared settings. + public static Beautify sharedSettings { + get { + if (_beautify != null) return _beautify; + if (_beautifyVolume == null) FindBeautifyVolume(); + if (_beautifyVolume == null) return null; + + bool foundEffectSettings = _beautifyVolume.sharedProfile.TryGet(out _beautify); + if (!foundEffectSettings) { + Debug.Log("Cant load Beautify settings"); + return null; + } + return _beautify; + } + } + + /// + /// Returns the profile of the volume in the scene where Beautify has been found + /// + public static VolumeProfile currentProfile { + get { + if (_beautifyVolume == null) { + FindBeautifyVolume(); + } + if (_beautifyVolume == null) return null; + return _beautifyVolume.sharedProfile; + } + } + + /// + /// Returns a copy of the settings of Beautify in the Post Processing Profile + /// + /// The settings. + public static Beautify settings { + get { + if (_beautify != null) return _beautify; + if (_beautifyVolume == null) FindBeautifyVolume(); + if (_beautifyVolume == null) return null; + + bool foundEffectSettings = _beautifyVolume.profile.TryGet(out _beautify); + if (!foundEffectSettings) { + Debug.Log("Cant load Beautify settings"); + return null; + } + return _beautify; + } + } + + + public static void Blink(float duration, float maxValue = 1) { + if (duration <= 0) + return; + BeautifySettings i = instance; + if (i == null) return; + i.StartCoroutine(i.DoBlink(duration, maxValue)); + } + + IEnumerator DoBlink(float duration, float maxValue) { + + Beautify beautify = settings; + if (beautify == null) yield break; + float start = Time.time; + WaitForEndOfFrame w = new WaitForEndOfFrame(); + beautify.vignettingBlink.overrideState = true; + float t; + // Close + do { + t = (Time.time - start) / duration; + if (t > 1f) + t = 1f; + float easeOut = t * (2f - t); + beautify.vignettingBlink.value = easeOut * maxValue; + yield return w; + } while (t < 1f); + + // Open + start = Time.time; + do { + t = (Time.time - start) / duration; + if (t > 1f) + t = 1f; + float easeIn = t * t; + beautify.vignettingBlink.value = (1f - easeIn) * maxValue; + yield return w; + } while (t < 1f); + beautify.vignettingBlink.overrideState = false; + } + + void OnEnable() { + if (_instance == null) { + _instance = this; + } + #if UNITY_EDITOR + if (!Application.isPlaying) { + BeautifyRendererFeature.StripBeautifyFeatures(); + } + #endif + SceneManager.sceneLoaded += SceneManager_sceneLoaded; + } + + private void OnDisable() { + if (_instance == this) { + _instance = null; + } + SceneManager.sceneLoaded -= SceneManager_sceneLoaded; + } + + private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1) { + UnloadBeautify(); + } + + + /// + /// Updates the list of alpha clip renderers + /// + public static void UpdateAlphaClipRenderers() { + _refreshAlphaClipRenderers = true; + } + + } +} diff --git a/Imports/Beautify/URP/Runtime/BeautifySettings.cs.meta b/Imports/Beautify/URP/Runtime/BeautifySettings.cs.meta new file mode 100644 index 00000000..6703b56a --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifySettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4b900b6d691ae49f8a12753b63b449e7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/BeautifyStripSettings.cs b/Imports/Beautify/URP/Runtime/BeautifyStripSettings.cs new file mode 100644 index 00000000..f7b0f98c --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifyStripSettings.cs @@ -0,0 +1,100 @@ +using UnityEngine; + +namespace Beautify.Universal { + + public class BeautifyStripSettings : ScriptableObject { + + [Tooltip("Do not compile ACES tonemapping shader feature, reducing build time.")] + public bool stripBeautifyTonemappingACES; + + [Tooltip("Do not compile ACES Fitted tonemapping shader feature, reducing build time.")] + public bool stripBeautifyTonemappingACESFitted; + + [Tooltip("Do not compile AGX tonemapping shader feature, reducing build time.")] + public bool stripBeautifyTonemappingAGX; + + [Tooltip("Do not compile sharpen shader feature, reducing build time.")] + public bool stripBeautifySharpen; + + [Tooltip("Do not compile sharpen exclusion mask shader feature, reducing build time.")] + public bool stripBeautifySharpenExclusionMask = true; + + [Tooltip("Do not compile dithering shader feature, reducing build time.")] + public bool stripBeautifyDithering; + + [Tooltip("Do not compile edge antialiasing shader feature, reducing build time.")] + public bool stripBeautifyEdgeAA; + + [Tooltip("Do not compile LUT shader feature, reducing build time.")] + public bool stripBeautifyLUT; + + [Tooltip("Do not compile LUT 3D shader feature, reducing build time.")] + public bool stripBeautifyLUT3D = true; + + [Tooltip("Do not compile daltonize, sepia or white balance shader feature, reducing build time.")] + public bool stripBeautifyColorTweaks; + + [Tooltip("Do not compile Bloom, Anamorphic & Sun Flares shader features, reducing build time.")] + public bool stripBeautifyBloom; + + [Tooltip("Do not compile Lens Dirt shader feature, reducing build time.")] + public bool stripBeautifyLensDirt; + + [Tooltip("Do not compile Chromatic Aberration shader feature, reducing build time.")] + public bool stripBeautifyChromaticAberration; + + [Tooltip("Do not compile Depth Of Field shader feature, reducing build time.")] + public bool stripBeautifyDoF; + + [Tooltip("Do not compile Depth Of Field transparency support shader feature, reducing build time.")] + public bool stripBeautifyDoFTransparentSupport = true; + + [Tooltip("Do not compile Purkinje Shift shader feature, reducing build time.")] + public bool stripBeautifyEyeAdaptation = true; + + [Tooltip("Do not compile Purkinje Shift shader feature, reducing build time.")] + public bool stripBeautifyPurkinje = true; + + [Tooltip("Do not compile Vignetting shader features, reducing build time.")] + public bool stripBeautifyVignetting; + + [Tooltip("Do not compile Vignetting Mask shader feature, reducing build time.")] + public bool stripBeautifyVignettingMask = true; + + [Tooltip("Do not compile Outline shader feature, reducing build time.")] + public bool stripBeautifyOutline = true; + + [Tooltip("Do not compile Night Vision shader feature, reducing build time.")] + public bool stripBeautifyNightVision = true; + + [Tooltip("Do not compile Thermal Vision shader feature, reducing build time.")] + public bool stripBeautifyThermalVision = true; + + [Tooltip("Do not compile Frame shader features, reducing build time.")] + public bool stripBeautifyFrame = true; + + [Tooltip("Do not compile Film Grain shader feature, reducing build time.")] + public bool stripBeautifyFilmGrain = true; + + [Tooltip("Do not compile Unity Post Processing's Film Grain shader feature, reducing build time.")] + public bool stripUnityFilmGrain; + + [Tooltip("Do not compile Unity Post Processing's Dithering shader feature, reducing build time.")] + public bool stripUnityDithering; + + [Tooltip("Do not compile Unity Post Processing's Tonemapping shader feature, reducing build time.")] + public bool stripUnityTonemapping; + + [Tooltip("Do not compile Unity Post Processing's Bloom shader feature, reducing build time.")] + public bool stripUnityBloom; + + [Tooltip("Do not compile Unity Post Processing's Chromatic Aberration shader feature, reducing build time.")] + public bool stripUnityChromaticAberration; + + [Tooltip("Do not compile Unity Post Processing's Screen Distortion features, reducing build time.")] + public bool stripUnityDistortion; + + public bool stripUnityDebugVariants; + } +} + diff --git a/Imports/Beautify/URP/Runtime/BeautifyStripSettings.cs.meta b/Imports/Beautify/URP/Runtime/BeautifyStripSettings.cs.meta new file mode 100644 index 00000000..992a14c4 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/BeautifyStripSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7fe56ef6322124921a051ba92ac4fa44 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Misc.cs b/Imports/Beautify/URP/Runtime/Misc.cs new file mode 100644 index 00000000..510a32dc --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Misc.cs @@ -0,0 +1,37 @@ +using UnityEngine; +using System; + +namespace Beautify.Universal { + + public class Misc { + public static T FindObjectOfType(bool includeInactive = false) where T : UnityEngine.Object { +#if UNITY_2023_1_OR_NEWER + return UnityEngine.Object.FindAnyObjectByType(includeInactive ? FindObjectsInactive.Include : FindObjectsInactive.Exclude); +#else + return UnityEngine.Object.FindObjectOfType(includeInactive); +#endif + } + + public static UnityEngine.Object[] FindObjectsOfType(Type type, bool includeInactive = false) { +#if UNITY_6000_4_OR_NEWER + return UnityEngine.Object.FindObjectsByType(type, includeInactive ? FindObjectsInactive.Include : FindObjectsInactive.Exclude); +#elif UNITY_2023_1_OR_NEWER + return UnityEngine.Object.FindObjectsByType(type, includeInactive ? FindObjectsInactive.Include : FindObjectsInactive.Exclude, FindObjectsSortMode.None); +#else + return UnityEngine.Object.FindObjectsOfType(type, includeInactive); +#endif + } + + + public static T[] FindObjectsOfType(bool includeInactive = false) where T : UnityEngine.Object { +#if UNITY_6000_4_OR_NEWER + return UnityEngine.Object.FindObjectsByType(includeInactive ? FindObjectsInactive.Include : FindObjectsInactive.Exclude); +#elif UNITY_2023_1_OR_NEWER + return UnityEngine.Object.FindObjectsByType(includeInactive ? FindObjectsInactive.Include : FindObjectsInactive.Exclude, FindObjectsSortMode.None); +#else + return UnityEngine.Object.FindObjectsOfType(includeInactive); +#endif + } + } + +} diff --git a/Imports/Beautify/URP/Runtime/Misc.cs.meta b/Imports/Beautify/URP/Runtime/Misc.cs.meta new file mode 100644 index 00000000..c4d1350e --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Misc.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 485b0e9a05a74b01ba64faaaae04f89d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources.meta b/Imports/Beautify/URP/Runtime/Resources.meta new file mode 100644 index 00000000..d0f5fffd --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fd2fa24da90af4844be20dbbe575d1a3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders.meta new file mode 100644 index 00000000..95f0b7dc --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 237b12990f9ca472dad17b772b02c39c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyAA.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyAA.hlsl new file mode 100644 index 00000000..02701650 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyAA.hlsl @@ -0,0 +1,29 @@ +#ifndef BEAUTIFY_AA_FX +#define BEAUTIFY_AA_FX + +float4 _AntialiasData; +#define ANTIALIAS_STRENGTH _AntialiasData.x +#define ANTIALIAS_THRESHOLD _AntialiasData.y +#define ANTIALIAS_DEPTH_ATTEN _AntialiasData.z +#define ANTIALIAS_CLAMP _AntialiasData.w + +float3 ApplyEdgeAA(float2 uv, float3 rgbM, float dDepth, float depthCenter, float lumaN, float lumaS, float lumaW, float lumaE, float minLuma, float maxLuma, float2 texelSize) { + float2 gradient = float2(lumaN - lumaS, lumaW - lumaE); + float2 absGradient = abs(gradient); + float gradientAmp = max(absGradient.x, absGradient.y) + 1e-5; + float2 dir = gradient / gradientAmp; + float sampleRadius = min(gradientAmp * ANTIALIAS_STRENGTH, ANTIALIAS_CLAMP); + float2 n = dir * sampleRadius; + float antialiasDepthAtten = 1.0 - saturate(depthCenter * ANTIALIAS_DEPTH_ATTEN); + n *= texelSize * antialiasDepthAtten; + + float3 rgbA = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv - n * 0.166667).rgb + SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv + n * 0.166667).rgb; + float3 rgbB = 0.25 * (rgbA + SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv - n * 0.5).rgb + SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv + n * 0.5).rgb); + float lumaB = getLuma(rgbB); + if (lumaB < minLuma || lumaB > maxLuma) rgbB = rgbA * 0.5; + + return rgbB; +} + +#endif + diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyAA.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyAA.hlsl.meta new file mode 100644 index 00000000..818a6900 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyAA.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 76a62ec60ec8e4611859a7a93049e981 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Sources/Shaders/BeautifyACESFitted.cginc b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyACESFitted.hlsl similarity index 70% rename from Sources/Shaders/BeautifyACESFitted.cginc rename to Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyACESFitted.hlsl index c8398eaf..9d1d80d9 100644 --- a/Sources/Shaders/BeautifyACESFitted.cginc +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyACESFitted.hlsl @@ -1,4 +1,6 @@ -//================================================================================================= +// This file "BeautifyACESFitted.hlsl" is covered by MIT license as follows: +// +//================================================================================================= // // ACES Fitted, an alternate ACES tonemap operator by MJP and David Neubelt // http://mynameismjp.wordpress.com/ @@ -6,10 +8,12 @@ // Licensed under the MIT license // //================================================================================================= - // The code in this file was originally written by Stephen Hill (@self_shadow), who deserves all // credit for coming up with this fit and implementing it. Buy him a beer next time you see him. :) +#ifndef BEAUTIFY_ACES_FITTED +#define BEAUTIFY_ACES_FITTED + // sRGB => XYZ => D65_2_D60 => AP1 => RRT_SAT static const float3x3 ACESInputMat = { @@ -33,17 +37,19 @@ float3 RRTAndODTFit(float3 v) return a / b; } -float3 ACESFitted(float3 color) +float3 ACESFitted(float3 val) { - color = mul(ACESInputMat, color); + val = mul(ACESInputMat, val); // Apply RRT and ODT - color = RRTAndODTFit(color); + val = RRTAndODTFit(val); - color = mul(ACESOutputMat, color); + val = mul(ACESOutputMat, val); // Clamp to [0, 1] - color = saturate(color); + //val = saturate(val); - return color; -} \ No newline at end of file + return val; +} + +#endif // BEAUTIFY_ACES_FITTED \ No newline at end of file diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyACESFitted.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyACESFitted.hlsl.meta new file mode 100644 index 00000000..1a169102 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyACESFitted.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 2a60bf244efbd4a2cb2d66d73177f740 +timeCreated: 1517506872 +licenseType: Pro +ShaderImporter: + externalObjects: {} + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyAGX.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyAGX.hlsl new file mode 100644 index 00000000..5614bf29 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyAGX.hlsl @@ -0,0 +1,96 @@ +// This file (BeautifyAGX.hlsl) is covered by MIT license as follows: +// +// MIT License +// +// Copyright (c) 2024 Missing Deadlines (Benjamin Wrensch) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright and this permission shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// All values used to derive this implementation are sourced from Troy’s initial AgX implementation/OCIO config file available here: +// https://github.com/sobotka/AgX +// Adaptation to HLSL for Unity by Kronnect + +#ifndef BEAUTIFY_AGX +#define BEAUTIFY_AGX + +float _TonemapAGXGamma; + +static const float3x3 agx_mat = float3x3( + 0.842479062253094, 0.0784335999999992, 0.0792237451477643, + 0.0423282422610123, 0.878468636469772, 0.0791661274605434, + 0.0423756549057051, 0.0784336, 0.879142973793104); + +static const float3x3 agx_mat_inv = float3x3( + 1.19687900512017, -0.0980208811401368, -0.0990297440797205, + -0.0528968517574562, 1.15190312990417, -0.0989611768448433, + -0.0529716355144438, -0.0980434501171241, 1.15107367264116); + +// Mean error^2: 3.6705141e-06 +float3 agxDefaultContrastApprox(float3 x) { + float3 x2 = x * x; + float3 x4 = x2 * x2; + + return 15.5 * x4 * x2 + - 40.14 * x4 * x + + 31.96 * x4 + - 6.868 * x2 * x + + 0.4298 * x2 + + 0.1191 * x + - 0.00232; +} + + +float3 agx(float3 val) { + + const float min_ev = -12.47393f; + const float max_ev = 4.026069f; + + // Input transform (inset) + val = mul(agx_mat, val); + + // Log2 space encoding + val = clamp(log2(val), min_ev, max_ev); + val = (val - min_ev) / (max_ev - min_ev); + + // Apply sigmoid function approximation + val = agxDefaultContrastApprox(val); + + return val; +} + +float3 agxEotf(float3 val) { + + // Inverse input transform (outset) + val = mul(agx_mat_inv, val); + + // sRGB IEC 61966-2-1 2.2 Exponent Reference EOTF Display + // NOTE: We're linearizing the output here. Comment/adjust when + // *not* using a sRGB render target + val = pow(val, _TonemapAGXGamma); + + return val; +} + +float3 AGXFitted(float3 value) { + value = agx(value); + value = agxEotf(value); + return value; +} + +#endif \ No newline at end of file diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyAGX.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyAGX.hlsl.meta new file mode 100644 index 00000000..60a47288 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyAGX.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f1496f614c1d5445583417c070512078 +timeCreated: 1517506872 +licenseType: Pro +ShaderImporter: + externalObjects: {} + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCAberration.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCAberration.hlsl new file mode 100644 index 00000000..99ca3a45 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCAberration.hlsl @@ -0,0 +1,21 @@ +#ifndef BEAUTIFY_CABERRATION_INCLUDE +#define BEAUTIFY_CABERRATION_INCLUDE + + // Copyright 2020-2021 Kronnect - All Rights Reserved. + #include "BeautifyCommon.hlsl" + + TEXTURE2D_X(_MainTex); + SAMPLER(sampler_MainTex); + float4 _MainTex_TexelSize; + + #include "BeautifyDistortion.hlsl" + + float4 fragChromaticAberration (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + float4 pixel = GetDistortedColor(i.uv); + return pixel; + } + + +#endif // BEAUTIFY_CABERRATION_INCLUDE \ No newline at end of file diff --git a/Sources/Shaders/Beautify.shader.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCAberration.hlsl.meta similarity index 56% rename from Sources/Shaders/Beautify.shader.meta rename to Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCAberration.hlsl.meta index e8932e04..8b91c430 100644 --- a/Sources/Shaders/Beautify.shader.meta +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCAberration.hlsl.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 -guid: 1cb716be5dc9d4230ada327d9468ff41 -timeCreated: 1462519614 -licenseType: Store +guid: 1fff09f3f51e64815b1cf93c283fb99a ShaderImporter: + externalObjects: {} defaultTextures: [] + nonModifiableTextures: [] userData: assetBundleName: assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyColorTemp.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyColorTemp.hlsl new file mode 100644 index 00000000..142b4900 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyColorTemp.hlsl @@ -0,0 +1,28 @@ +#ifndef BEAUTIFY_COLOR_TEMP +#define BEAUTIFY_COLOR_TEMP + +const float LuminancePreservationFactor = 1.0; + +const float PI2 = 6.2831853071; + +// kelvin = { 1000 - 40000 } +float3 KelvinToRGB(float kelvin) { + const float3x3 cold = float3x3(float3(0.0, -2902.1955373783176, -8257.7997278925690), + float3(0.0, 1669.5803561666639, 2575.2827530017594), + float3(1.0, 1.3302673723350029, 1.8993753891711275)); + const float3x3 hot = float3x3(float3(0.0, -2902.1955373783176, -8257.7997278925690), + float3(0.0, 1669.5803561666639, 2575.2827530017594), + float3(1.0, 1.3302673723350029, 1.8993753891711275)); + + float3x3 m = (kelvin <= 6500.0) ? cold : hot; + + float3 m0 = float3(m[0][0], m[0][1], m[0][2]); + float3 m1 = float3(m[1][0], m[1][1], m[1][2]); + float3 m2 = float3(m[2][0], m[2][1], m[2][2]); + float3 cm = lerp(( m0 / (clamp(kelvin, 1000.0, 40000.0).xxx + m1) + m2), + 1.0.xxx, + smoothstep(1000.0, 0.0, kelvin)); + return cm; +} + +#endif // BEAUTIFY_COLOR_TEMP \ No newline at end of file diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyColorTemp.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyColorTemp.hlsl.meta new file mode 100644 index 00000000..1ceb1850 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyColorTemp.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 01837ee01fce64c8db5624c139e32ac5 +timeCreated: 1517506872 +licenseType: Pro +ShaderImporter: + externalObjects: {} + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCommon.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCommon.hlsl new file mode 100644 index 00000000..c42aa84b --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCommon.hlsl @@ -0,0 +1,158 @@ +#ifndef __BEAUTIFY_COMMON_INCLUDE +#define __BEAUTIFY_COMMON_INCLUDE + +// Set to 1 to support orthographic mode +#define BEAUTIFY_ORTHO 0 + +// Set to 1 to enable Sobel outline +#define BEAUTIFY_OUTLINE_SOBEL 0 + +// Set to 1 to enable alternate chromatic aberration method +#define BEAUTIFY_CABERRATION_ALT 0 + +// Set to 1 to use legacy eye adaptation mode +#define BEAUTIFY_EA_LEGACY_MODE 0 + +TEXTURE2D(_BlueNoise); +float4 _BlueNoise_TexelSize; + +TEXTURE2D_X_FLOAT(_CameraDepthTexture); +SAMPLER(sampler_CameraDepthTexture); + +float HighPrecisionSampleSceneDepth(float2 uvStereo) +{ + return SAMPLE_TEXTURE2D_X(_CameraDepthTexture, sampler_CameraDepthTexture, uvStereo).r; +} + + +#if BEAUTIFY_ORTHO + #if UNITY_REVERSED_Z + #define BEAUTIFY_GET_DEPTH_01(x) (1.0-x) + #define BEAUTIFY_GET_DEPTH_EYE(x) ((1.0-x) * _ProjectionParams.z) + + #define BEAUTIFY_GET_SCENE_DEPTH_01(x) (1.0 - HighPrecisionSampleSceneDepth(x)) + #define BEAUTIFY_GET_SCENE_DEPTH_EYE(x) ((1.0 - HighPrecisionSampleSceneDepth(x)) * _ProjectionParams.z) + + #define BEAUTIFY_GET_CUSTOM_DEPTH_01(s, x) (1.0 - SAMPLE_TEXTURE2D_X(s, sampler_PointClamp, x).r) + #else + #define BEAUTIFY_GET_DEPTH_01(x) (x) + #define BEAUTIFY_GET_DEPTH_EYE(x) (x * _ProjectionParams.z) + + #define BEAUTIFY_GET_SCENE_DEPTH_01(x) HighPrecisionSampleSceneDepth(x) + #define BEAUTIFY_GET_SCENE_DEPTH_EYE(x) (HighPrecisionSampleSceneDepth(x) * _ProjectionParams.z) + + #define BEAUTIFY_GET_CUSTOM_DEPTH_01(s, x) SAMPLE_TEXTURE2D_X(s, sampler_PointClamp, x).r + #endif +#else + #define BEAUTIFY_GET_DEPTH_01(x) Linear01Depth(x, _ZBufferParams) + #define BEAUTIFY_GET_DEPTH_EYE(x) LinearEyeDepth(x, _ZBufferParams) + + #define BEAUTIFY_GET_SCENE_DEPTH_01(x) Linear01Depth(HighPrecisionSampleSceneDepth(x), _ZBufferParams) + #define BEAUTIFY_GET_SCENE_DEPTH_EYE(x) LinearEyeDepth(HighPrecisionSampleSceneDepth(x), _ZBufferParams) + + #define BEAUTIFY_GET_CUSTOM_DEPTH_01(s, x) Linear01Depth(SAMPLE_TEXTURE2D_X(s, sampler_PointClamp, x).r, _ZBufferParams) +#endif + + +// Base for COC - required for Android +#define COC_BASE 128 + + +// Optimization for SSPR +#define uvN uv1 +#define uvE uv2 +#define uvW uv3 +#define uvS uv4 + + +#if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED) || defined(SINGLE_PASS_STEREO) + #define BEAUTIFY_VERTEX_CROSS_UV_DATA + #define BEAUTIFY_VERTEX_OUTPUT_CROSS_UV(o) + #define BEAUTIFY_VERTEX_OUTPUT_GAUSSIAN_UV(o) + + #define BEAUTIFY_FRAG_SETUP_CROSS_UV(i) float3 uvInc = float3(_MainTex_TexelSize.x, _MainTex_TexelSize.y, 0); float2 uvN = i.uv + uvInc.zy; float2 uvE = i.uv + uvInc.xz; float2 uvW = i.uv - uvInc.xz; float2 uvS = i.uv - uvInc.zy; + + #if defined(BEAUTIFY_BLUR_HORIZ) + #define BEAUTIFY_FRAG_SETUP_GAUSSIAN_UV(i) float2 inc = float2(_MainTex_TexelSize.x * 1.3846153846 * _BlurScale, 0); float2 uv1 = i.uv - inc; float2 uv2 = i.uv + inc; float2 inc2 = float2(_MainTex_TexelSize.x * 3.2307692308 * _BlurScale, 0); float2 uv3 = i.uv - inc2; float2 uv4 = i.uv + inc2; + #else + #define BEAUTIFY_FRAG_SETUP_GAUSSIAN_UV(i) float2 inc = float2(0, _MainTex_TexelSize.y * 1.3846153846 * _BlurScale); float2 uv1 = i.uv - inc; float2 uv2 = i.uv + inc; float2 inc2 = float2(0, _MainTex_TexelSize.y * 3.2307692308 * _BlurScale); float2 uv3 = i.uv - inc2; float2 uv4 = i.uv + inc2; + #endif + +#else + #define BEAUTIFY_VERTEX_CROSS_UV_DATA float2 uvN : TEXCOORD1; float2 uvW: TEXCOORD2; float2 uvE: TEXCOORD3; float2 uvS: TEXCOORD4; + + #define BEAUTIFY_VERTEX_OUTPUT_CROSS_UV(o) float3 uvInc = float3(_MainTex_TexelSize.x, _MainTex_TexelSize.y, 0); o.uvN = o.uv + uvInc.zy; o.uvE = o.uv + uvInc.xz; o.uvW = o.uv - uvInc.xz; o.uvS = o.uv - uvInc.zy; + #define BEAUTIFY_FRAG_SETUP_CROSS_UV(i) float2 uv1 = i.uv1; float2 uv2 = i.uv2; float2 uv3 = i.uv3; float2 uv4 = i.uv4; + + #if defined(BEAUTIFY_BLUR_HORIZ) + #define BEAUTIFY_VERTEX_OUTPUT_GAUSSIAN_UV(o) float2 inc = float2(_MainTex_TexelSize.x * 1.3846153846 * _BlurScale, 0); o.uv1 = o.uv - inc; o.uv2 = o.uv + inc; float2 inc2 = float2(_MainTex_TexelSize.x * 3.2307692308 * _BlurScale, 0); o.uv3 = o.uv - inc2; o.uv4 = o.uv + inc2; + #else + #define BEAUTIFY_VERTEX_OUTPUT_GAUSSIAN_UV(o) float2 inc = float2(0, _MainTex_TexelSize.y * 1.3846153846 * _BlurScale); o.uv1 = o.uv - inc; o.uv2 = o.uv + inc; float2 inc2 = float2(0, _MainTex_TexelSize.y * 3.2307692308 * _BlurScale); o.uv3 = o.uv - inc2; o.uv4 = o.uv + inc2; + #endif + #define BEAUTIFY_FRAG_SETUP_GAUSSIAN_UV(i) float2 uv1 = i.uv1; float2 uv2 = i.uv2; float2 uv3 = i.uv3; float2 uv4 = i.uv4; + +#endif + + +#if BEAUTIFY_TURBO + #define GAMMA_TO_LINEAR(x) FastSRGBToLinear(x) + #define LINEAR_TO_GAMMA(x) FastLinearToSRGB(x) +#else + #define GAMMA_TO_LINEAR(x) SRGBToLinear(x) + #define LINEAR_TO_GAMMA(x) LinearToSRGB(x) +#endif + + +// Common functions + +float _FlipY; + +struct AttributesSimple +{ + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID +}; + + +struct VaryingsSimple +{ + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_OUTPUT_STEREO +}; + +VaryingsSimple VertOS(AttributesSimple input) { + VaryingsSimple output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + output.positionCS = input.positionOS; + output.positionCS.y *= _ProjectionParams.x * _FlipY; + output.uv = input.uv; + return output; +} + + +inline float getLuma(float3 rgb) { + //const float3 lum = float3(0.2627, 0.6780, 0.0593); // Rec.2020 (HDR/wide gamut) + //const float3 lum = float3(0.2126, 0.7152, 0.0722); // Rec709 (sRGB/HD) + const float3 lum = float3(0.299, 0.587, 0.114); // Rec601 (SD/broadcast) + return dot(rgb, lum); +} + + +inline float3 getNormal(float depth, float depth1, float depth2, float2 offset1, float2 offset2) { + float3 p1 = float3(offset1, depth1 - depth); + float3 p2 = float3(offset2, depth2 - depth); + float3 normal = cross(p1, p2); + return normalize(normal); +} + +inline float getSaturation(float3 rgb) { + float maxVal = max(max(rgb.r, rgb.g), rgb.b); + float minVal = min(min(rgb.r, rgb.g), rgb.b); + float delta = maxVal - minVal; + return delta / max(maxVal, 0.0001); +} + +#endif // __BEAUTIFY_COMMON_INCLUDE \ No newline at end of file diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCommon.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCommon.hlsl.meta new file mode 100644 index 00000000..3b11c0b3 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCommon.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 911431f45704646a990da305cf54bd45 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCore.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCore.hlsl new file mode 100644 index 00000000..2c591304 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCore.hlsl @@ -0,0 +1,590 @@ +#ifndef BEAUTIFY_CORE_FX +#define BEAUTIFY_CORE_FX + +#pragma warning (disable : 3571) + + TEXTURE2D_X(_MainTex); + SAMPLER(sampler_MainTex); + float4 _MainTex_TexelSize; + + #include "BeautifyACESFitted.hlsl" + #include "BeautifyAGX.hlsl" + #include "BeautifyColorTemp.hlsl" + #include "BeautifyDistortion.hlsl" + #include "BeautifyCommon.hlsl" + #include "BeautifyPPSFilmGrain.hlsl" + + // Copyright 2020-2021 Ramiro Oliva (Kronnect) - All Rights Reserved. + float4 _CompareParams; + TEXTURE2D_X(_CompareTex); + TEXTURE2D_X(_BloomTex); + TEXTURE2D_X(_ScreenLum); + TEXTURE2D(_OverlayTex); + TEXTURE2D(_LUTTex); + TEXTURE3D(_LUT3DTex); + TEXTURE2D_X(_EAHist); + TEXTURE2D_X(_EALumSrc); + TEXTURE2D_X(_BlurTex); + TEXTURE2D(_BlurMask); + float4 _BlurData; + float4 _BlurData2; + + #define BLUR_CENTER _BlurData.xy + #define BLUR_WIDTH _BlurData.z + #define BLUR_FALLOFF _BlurData.w + #define BLUR_STYLE (int)_BlurData2.x + #define BLUR_SHOW_MASK _BlurData2.y + + TEXTURE2D_X(_MiniViewTex); + float4 _MiniViewRect; + float4 _MiniViewBlend; + + float4 _Params; + float4 _Sharpen; + float4 _Bloom; + float4 _Dirt; // x = brightness based, y = intensity, z = threshold, w = bloom contribution + float4 _FXColor; + float4 _ColorBoost; + float4 _TintColor; + float4 _Purkinje; + float4 _EyeAdaptation; + float4 _EyeAdaptation2; // x: center weight, y: min camera distance, z: middle gray, w: unused + float4 _BokehData; + float4 _BokehData2; + float3 _BokehData3; + + float4 _Outline; + #define OUTLINE_EDGE_THRESHOLD _Outline.a + + float4 _OutlineData; + #define OUTLINE_INTENSITY_MULTIPLIER _OutlineData.x + #define OUTLINE_DISTANCE_FADE _OutlineData.y + #define OUTLINE_MIN_DEPTH_THRESHOLD _OutlineData.z + #define OUTLINE_MIN_SATURATION_THRESHOLD _OutlineData.w + + float3 _ColorTemp; + float4 _NightVision; + float2 _NightVisionDepth; + float4 _LUTTex_TexelSize; + float2 _LUT3DParams; + + #if BEAUTIFY_VIGNETTING || BEAUTIFY_VIGNET_MASK + float4 _Vignetting; + float4 _VignettingData; + float _VignettingData2; + #define VIGNETTE_ASPECT_RATIO_Y _VignettingData.z + #define VIGNETTE_CENTER _VignettingData.xy + #define VIGNETTE_OUTER_RING _VignettingData.w + #define VIGNETTE_FADE_AND_BLINK _Purkinje.z + #define VIGNETTE_INNER_RING _Purkinje.w + #define VIGNETTE_ASPECT_RATIO_X _VignettingData2 + TEXTURE2D_X(_VignettingMask); + #endif + + #if BEAUTIFY_FRAME + TEXTURE2D_X(_FrameMask); + float4 _Frame; + float4 _FrameData; + #endif + + #if BEAUTIFY_DOF_TRANSPARENT || BEAUTIFY_DEPTH_OF_FIELD + TEXTURE2D_X(_DoFTex); + float4 _DoFTex_TexelSize; + #endif + #if BEAUTIFY_DOF_TRANSPARENT + TEXTURE2D_X(_DoFTransparentDepth); + //TEXTURE2D_X(_DofExclusionTexture; + #endif + + #if BEAUTIFY_EDGE_AA + #include "BeautifyAA.hlsl" + #endif + + #if BEAUTIFY_EXCLUSION_MASK_SHARPEN + TEXTURE2D_X(_SharpenExclusionMask); + #endif + + + struct VaryingsBeautify { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + BEAUTIFY_VERTEX_CROSS_UV_DATA + UNITY_VERTEX_OUTPUT_STEREO + }; + + + VaryingsBeautify VertBeautify(AttributesSimple input) { + VaryingsBeautify output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + output.positionCS = input.positionOS; + output.positionCS.y *= _ProjectionParams.x * _FlipY; + output.uv = input.uv.xy; + BEAUTIFY_VERTEX_OUTPUT_CROSS_UV(output) + return output; + } + + + float getRandom(float2 uv) { + return frac(sin(_Time.y + dot(uv, float2(12.9898, 78.233)))* 43758.5453); + } + + + float getCoc(VaryingsBeautify i) { + #if BEAUTIFY_DOF_TRANSPARENT + float depthTex = BEAUTIFY_GET_CUSTOM_DEPTH_01(_DoFTransparentDepth, i.uv); + //float exclusionDepth = DecodeFloatRGBA(SAMPLE_TEXTURE2D_LOD(_DofExclusionTexture, sampler_DoFExclusionTexture, i.uv, 0)); + float depth = BEAUTIFY_GET_SCENE_DEPTH_01(i.uv); + depth = min(depth, depthTex); + //if (exclusionDepth < depth) return 0; + depth *= _ProjectionParams.z; + #else + float depth = BEAUTIFY_GET_SCENE_DEPTH_EYE(i.uv); + #endif + float xd = abs(depth - _BokehData.x) - _BokehData2.x * (depth < _BokehData.x); + return min(_BokehData3.z, 0.5 * _BokehData.y * xd/depth); // radius of CoC + } + + float3 tmoFilmicACES(float3 x) { + const float A = 2.51; + const float B = 0.03; + const float C = 2.43; + const float D = 0.59; + const float E = 0.14; + return (x * (A * x + B) ) / (x * (C * x + D) + E); + } + + void beautifyPass(VaryingsBeautify i, inout float3 rgbM) { + + #if BEAUTIFY_ACES_TONEMAP || BEAUTIFY_AGX_TONEMAP || BEAUTIFY_ACES_FITTED_TONEMAP + rgbM = clamp(rgbM, 0, _FXColor.z); + #endif + + float2 uv = i.uv; + BEAUTIFY_FRAG_SETUP_CROSS_UV(i) + + float depthS = BEAUTIFY_GET_SCENE_DEPTH_01(uvS); + float depthW = BEAUTIFY_GET_SCENE_DEPTH_01(uvW); + float depthE = BEAUTIFY_GET_SCENE_DEPTH_01(uvE); + float depthN = BEAUTIFY_GET_SCENE_DEPTH_01(uvN); + + // neighbour depth analysis + float maxDepth = max(depthN, depthS); + maxDepth = max(maxDepth, depthW); + maxDepth = max(maxDepth, depthE); + float minDepth = min(depthN, depthS); + minDepth = min(minDepth, depthW); + minDepth = min(minDepth, depthE); + float dDepth = maxDepth - minDepth; + + // luma analysis + float3 rgbS = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uvS).rgb; + float3 rgbW = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uvW).rgb; + float3 rgbE = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uvE).rgb; + float3 rgbN = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uvN).rgb; + + float lumaN = getLuma(rgbN); + float lumaE = getLuma(rgbE); + float lumaW = getLuma(rgbW); + float lumaS = getLuma(rgbS); + + float maxLuma = max(lumaN,lumaS); + maxLuma = max(maxLuma, lumaW); +#if !BEAUTIFY_TURBO + maxLuma = max(maxLuma, lumaE); +#endif + float minLuma = min(lumaN,lumaS); + minLuma = min(minLuma, lumaW); +#if !BEAUTIFY_TURBO + minLuma = min(minLuma, lumaE); +#endif + minLuma -= 0.000001; + +#if BEAUTIFY_EDGE_AA + if (dDepth > ANTIALIAS_THRESHOLD) { + rgbM = ApplyEdgeAA(uv, rgbM, dDepth, depthN, lumaN, lumaS, lumaW, lumaE, minLuma, maxLuma, _MainTex_TexelSize.xy); + } +#endif + + float lumaM = getLuma(rgbM); + + // daltonize + #if BEAUTIFY_COLOR_TWEAKS + float3 rgb0 = 1.0.xxx - saturate(rgbM.rgb); + rgbM.r *= 1.0 + rgbM.r * rgb0.g * rgb0.b * _Params.y; + rgbM.g *= 1.0 + rgbM.g * rgb0.r * rgb0.b * _Params.y; + rgbM.b *= 1.0 + rgbM.b * rgb0.r * rgb0.g * _Params.y; + rgbM *= lumaM / (getLuma(rgbM) + 0.0001); + #endif + + // sharpen +#if BEAUTIFY_TURBO + const float lumaDepth = 1.0; +#else + float lumaDepth = saturate( _Sharpen.y / max(dDepth, 0.000001)); +#endif + + float lumaPower = 2.0 * lumaM - minLuma - maxLuma; + float lumaAtten = saturate(_Sharpen.w / (maxLuma - minLuma)); +#if BEAUTIFY_TURBO + const float depthClamp = 1.0; +#else + float depthClamp = abs(depthW - _Params.z) < _Params.w; +#endif + +#if BEAUTIFY_SHARPEN || BEAUTIFY_EXCLUSION_MASK_SHARPEN + float sharpenAmount = clamp(lumaPower * lumaAtten * lumaDepth * _Sharpen.x, -_Sharpen.z, _Sharpen.z) * depthClamp; + #if BEAUTIFY_EXCLUSION_MASK_SHARPEN + float3 sharpenMask = SAMPLE_TEXTURE2D_X(_SharpenExclusionMask, sampler_LinearClamp, i.uv).rgb; + if (any(sharpenMask != 0)) sharpenAmount = 0; + #endif + rgbM *= 1.0 + sharpenAmount; +#endif + + #if BEAUTIFY_DEPTH_OF_FIELD || BEAUTIFY_DOF_TRANSPARENT + float4 dofPix = SAMPLE_TEXTURE2D_X(_DoFTex, sampler_LinearClamp, i.uv); + #if UNITY_COLORSPACE_GAMMA + dofPix.rgb = LINEAR_TO_GAMMA(dofPix.rgb); + #endif + if (_DoFTex_TexelSize.z < _MainTex_TexelSize.z) { + float CoC = getCoc(i) / COC_BASE; + dofPix.a = lerp(CoC, dofPix.a, _DoFTex_TexelSize.z / _MainTex_TexelSize.z); + } + rgbM = lerp(rgbM, dofPix.rgb, saturate(dofPix.a * COC_BASE)); + #endif + + #if BEAUTIFY_NIGHT_VISION || (BEAUTIFY_OUTLINE && !BEAUTIFY_OUTLINE_SOBEL) + float3 uvNormalDisp = float3(_MainTex_TexelSize.x, _MainTex_TexelSize.y, 0); + float depth = BEAUTIFY_GET_SCENE_DEPTH_01(i.uv); + float3 normalNW = getNormal(depth, depthN, depthW, uvNormalDisp.zy, float2(-uvNormalDisp.x, -uvNormalDisp.z)); + #endif + + #if BEAUTIFY_OUTLINE + #if !BEAUTIFY_OUTLINE_SOBEL + float3 normalSE = getNormal(depth, depthS, depthE, -uvNormalDisp.zy, uvNormalDisp.xz); + float dnorm = dot(normalNW, normalSE); + float satN = getSaturation(rgbN); + float satS = getSaturation(rgbS); + float satW = getSaturation(rgbW); + float satE = getSaturation(rgbE); + float maxSat = max( max(satN, satS), max(satW, satE) ); + float minSat = min( min(satN, satS), min(satW, satE) ); + float dSat = maxSat - minSat; + rgbM = lerp(rgbM, _Outline.rgb, (float)(dnorm < OUTLINE_EDGE_THRESHOLD && dDepth > OUTLINE_MIN_DEPTH_THRESHOLD && dSat > OUTLINE_MIN_SATURATION_THRESHOLD)); + #else + float3 uvInc = float3(_MainTex_TexelSize.x, _MainTex_TexelSize.y, 0); + float3 rgbSW = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv - uvInc.xy).rgb; // was tex2Dlod + float3 rgbNE = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv + uvInc.xy).rgb; + float3 rgbSE = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv + float2( uvInc.x, -uvInc.y)).rgb; + float3 rgbNW = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv + float2(-uvInc.x, uvInc.y)).rgb; + float3 gx = rgbSW * -1.0; + gx += rgbSE * 1.0; + gx += rgbW * -2.0; + gx += rgbE * 2.0; + gx += rgbNW * -1.0; + gx += rgbNE * 1.0; + float3 gy = rgbSW * -1.0; + gy += rgbS * -2.0; + gy += rgbSE * -1.0; + gy += rgbNW * 1.0; + gy += rgbN * 2.0; + gy += rgbNE * 1.0; + float olColor = (length(gx * gx + gy * gy) - _Outline.a) > 0.0; + rgbM = lerp(rgbM, _Outline.rgb, olColor); + #endif + #endif + + #if UNITY_COLORSPACE_GAMMA && (BEAUTIFY_BLOOM || BEAUTIFY_NIGHT_VISION || BEAUTIFY_THERMAL_VISION || BEAUTIFY_DIRT || BEAUTIFY_EYE_ADAPTATION || BEAUTIFY_PURKINJE || BEAUTIFY_ACES_TONEMAP || BEAUTIFY_AGX_TONEMAP || BEAUTIFY_ACES_FITTED_TONEMAP) + rgbM = GAMMA_TO_LINEAR(rgbM); + #endif + + #if BEAUTIFY_BLOOM + rgbM += SAMPLE_TEXTURE2D_X(_BloomTex, sampler_LinearClamp, i.uv).rgb * _Bloom.xxx; + #endif + + #if BEAUTIFY_DIRT + float3 scrLum = SAMPLE_TEXTURE2D_X(_ScreenLum, sampler_LinearClamp, i.uv).rgb; + #if BEAUTIFY_BLOOM + scrLum *= _Dirt.www; + #endif + + #if defined(UNITY_SINGLE_PASS_STEREO) + float2 dirtUV = float2(uv.x * 2.0, uv.y); // TODO: ?? should ignore Single Pass + #else + float2 dirtUV = uv; + #endif + float4 dirt = SAMPLE_TEXTURE2D(_OverlayTex, sampler_LinearRepeat, dirtUV); + rgbM += saturate(0.5.xxx - _Dirt.zzz + scrLum) * dirt.rgb * _Dirt.y; + #endif + + #if BEAUTIFY_NIGHT_VISION + rgbM *= saturate( (_NightVisionDepth.x - BEAUTIFY_GET_SCENE_DEPTH_EYE(uv)) * _NightVisionDepth.y ); + lumaM = getLuma(rgbM); // updates luma + float nvbase = saturate(normalNW.z - 0.8); // minimum ambient self radiance (useful for pitch black) + nvbase += lumaM; // adds current lighting + nvbase *= nvbase * (0.5 + nvbase); // increase contrast + rgbM = nvbase * _NightVision.rgb; + rgbM *= frac(floor(uv.y * _MainTex_TexelSize.w)*0.25)>0.4; // scan lines + rgbM *= 1.0 + getRandom(uv) * 0.3 - 0.15; // noise + #endif + + #if BEAUTIFY_THERMAL_VISION + lumaM = getLuma(rgbM); // updates luma + float3 tv0 = lerp(float3(0.0,0.0,1.0), float3(1.0,1.0,0.0), lumaM * 2.0); + float3 tv1 = lerp(float3(1.0,1.0,0.0), float3(1.0,0.0,0.0), lumaM * 2.0 - 1.0); + rgbM = lerp(tv0, tv1, (float)(lumaM >= 0.5)); + rgbM *= 0.2 + frac(floor(uv.y * _MainTex_TexelSize.w)*0.25)>_NightVision.a; // scan lines + rgbM *= 1.0 + getRandom(uv) * 0.2 - 0.1; // noise + #endif + + #if BEAUTIFY_EYE_ADAPTATION || BEAUTIFY_PURKINJE + float4 avgLum = SAMPLE_TEXTURE2D_X(_EAHist, sampler_LinearClamp, 0.5.xx); + #endif + + #if BEAUTIFY_EYE_ADAPTATION + float eaFactor; + #if BEAUTIFY_EA_LEGACY_MODE + float srcLum = SAMPLE_TEXTURE2D_X(_EALumSrc, sampler_LinearClamp, 0.5.xx).r; + float eaLuma = getLuma(rgbM); + float pixLum = max(0, log(1.0 + eaLuma)); + static const float epsilon = 1e-4; + float avgLumSafe = max(avgLum.r, epsilon); + eaFactor = pow(pixLum / avgLumSafe, abs(srcLum / avgLumSafe - 1.0)); + #else + float histLum = exp(avgLum.r) - 1.0 + 0.001; + float middleGray = _EyeAdaptation2.z; + eaFactor = middleGray / histLum; + #endif + eaFactor = clamp(eaFactor, _EyeAdaptation.x, _EyeAdaptation.y); + rgbM *= eaFactor; + #endif + + #if BEAUTIFY_AGX_TONEMAP + rgbM *= _FXColor.r; + rgbM = AGXFitted(rgbM); // already applies gamma correction + rgbM *= _FXColor.g; + rgbM = saturate(rgbM); + #else + #if BEAUTIFY_ACES_FITTED_TONEMAP + rgbM *= _FXColor.r; + rgbM = ACESFitted(rgbM); + rgbM *= _FXColor.g; + #endif + #if BEAUTIFY_ACES_TONEMAP + rgbM *= _FXColor.r; + rgbM = tmoFilmicACES(rgbM); + rgbM *= _FXColor.g; + #endif + #if UNITY_COLORSPACE_GAMMA && (BEAUTIFY_BLOOM || BEAUTIFY_NIGHT_VISION || BEAUTIFY_THERMAL_VISION || BEAUTIFY_DIRT || BEAUTIFY_EYE_ADAPTATION || BEAUTIFY_PURKINJE || BEAUTIFY_ACES_FITTED_TONEMAP || BEAUTIFY_ACES_TONEMAP) + rgbM = LINEAR_TO_GAMMA(rgbM); + #endif + #endif + + #if BEAUTIFY_LUT || BEAUTIFY_3DLUT + #if !UNITY_COLORSPACE_GAMMA + rgbM = LINEAR_TO_GAMMA(rgbM); + #endif + #if BEAUTIFY_3DLUT + float3 xyz = rgbM * _LUT3DParams.y + _LUT3DParams.x; + float3 lut = SAMPLE_TEXTURE3D(_LUT3DTex, sampler_LinearClamp, xyz).rgb; + #else + float3 lutST = float3(_LUTTex_TexelSize.x, _LUTTex_TexelSize.y, _LUTTex_TexelSize.w - 1); + float3 lookUp = saturate(rgbM) * lutST.zzz; + lookUp.xy = lutST.xy * (lookUp.xy + 0.5); + float slice = floor(lookUp.z); + lookUp.x += slice * lutST.y; + float2 lookUpNextSlice = float2(lookUp.x + lutST.y, lookUp.y); + float3 lut = lerp(SAMPLE_TEXTURE2D(_LUTTex, sampler_LinearClamp, lookUp.xy).rgb, SAMPLE_TEXTURE2D(_LUTTex, sampler_LinearClamp, lookUpNextSlice).rgb, lookUp.z - slice); + #endif + rgbM = lerp(rgbM, lut, _FXColor.a); + + #if !UNITY_COLORSPACE_GAMMA + rgbM = GAMMA_TO_LINEAR(rgbM); + #endif + #endif + + + // sepia + #if BEAUTIFY_COLOR_TWEAKS + float3 sepia = float3( + dot(rgbM, float3(0.393, 0.769, 0.189)), + dot(rgbM, float3(0.349, 0.686, 0.168)), + dot(rgbM, float3(0.272, 0.534, 0.131)) + ); + rgbM = lerp(rgbM, sepia, _Params.x); + #endif + + // saturate + float maxComponent = max(rgbM.r, max(rgbM.g, rgbM.b)); + float minComponent = min(rgbM.r, min(rgbM.g, rgbM.b)); + float sat = saturate(maxComponent - minComponent); + rgbM *= 1.0 + _ColorBoost.z * (1.0 - sat) * (rgbM - getLuma(rgbM)); + rgbM = lerp(rgbM, rgbM * _TintColor.rgb, _TintColor.a); + rgbM = (rgbM - 0.5.xxx) * _ColorBoost.y + 0.5.xxx; + rgbM *= _ColorBoost.x; + + #if BEAUTIFY_COLOR_TWEAKS + lumaM = getLuma(rgbM); + float3 kelvin = KelvinToRGB(_ColorTemp.x); + rgbM = lerp(rgbM, rgbM * kelvin, _ColorTemp.y); + //rgbM *= getLuma(rgbM) / lumaM; // energy preservation (optional) + #endif + + #if BEAUTIFY_PURKINJE + lumaM = getLuma(rgbM); + float3 shifted = saturate(float3(lumaM / (1.0 + _Purkinje.x * 1.14), lumaM, lumaM * (1.0 + _Purkinje.x * 2.99))); + rgbM = lerp(shifted, rgbM, saturate(exp(avgLum.g) - _Purkinje.y)); + #endif + + // Film Grain + #if BEAUTIFY_FILM_GRAIN + ApplyFilmGrain(rgbM, lumaM, uv); + #endif + +#if BEAUTIFY_VIGNETTING + float2 vd = float2((uv.x - VIGNETTE_CENTER.x) * VIGNETTE_ASPECT_RATIO_X, (uv.y - VIGNETTE_CENTER.y) * VIGNETTE_ASPECT_RATIO_Y); + float3 vcolor = lerp(_Vignetting.rgb, rgbM, saturate( saturate((dot(vd, vd) - VIGNETTE_OUTER_RING) / (VIGNETTE_INNER_RING - VIGNETTE_OUTER_RING) ) - VIGNETTE_FADE_AND_BLINK)) ; + rgbM = lerp(rgbM, vcolor, _Vignetting.a); +#elif BEAUTIFY_VIGNET_MASK + float2 vd = float2((uv.x - VIGNETTE_CENTER.x) * VIGNETTE_ASPECT_RATIO_X, (uv.y - VIGNETTE_CENTER.y) * VIGNETTE_ASPECT_RATIO_Y); + float vmask = SAMPLE_TEXTURE2D_X(_VignettingMask, sampler_LinearClamp, uv).a; + rgbM = lerp(rgbM, lumaM * _Vignetting.rgb, saturate(VIGNETTE_FADE_AND_BLINK + vmask * _Vignetting.a * saturate(VIGNETTE_OUTER_RING * 4.0 * dot(vd, vd)))); +#endif + +#if BEAUTIFY_FRAME + float aspectRatio = _MainTex_TexelSize.z / _MainTex_TexelSize.w; + float2 distToEdge = min(i.uv.xy, 1.0 - i.uv.xy); + distToEdge.x *= aspectRatio; + float thickness = _FrameData.x; + float frameIntensity = saturate( (thickness - min(distToEdge.x, distToEdge.y)) * _FrameData.y ); + + float2 bands = saturate( (abs(i.uv.xy - 0.5) - _FrameData.xz) * _FrameData.yw); + float bandsIntensity = max(bands.x, bands.y); + + frameIntensity = _FrameData.w > 0 ? bandsIntensity : frameIntensity; + + float4 frameMask = SAMPLE_TEXTURE2D_X(_FrameMask, sampler_LinearClamp, uv); + rgbM = lerp(rgbM, _Frame.rgb * frameMask.rgb, frameMask.a * _Frame.a * frameIntensity); +#endif + +#if BEAUTIFY_DITHER + #if BEAUTIFY_TURBO + float3 dither = dot(float2(171.0, 231.0), i.uv * _MainTex_TexelSize.zw).xxx; + dither = frac(dither / float3(103.0, 71.0, 97.0)) - 0.5.xxx; + rgbM += dither * _ColorBoost.w; + #else + float2 noiseUV = i.uv * _BlueNoise_TexelSize.xy * _MainTex_TexelSize.zw; + float3 blueNoise = SAMPLE_TEXTURE2D(_BlueNoise, sampler_PointRepeat, noiseUV).rgb; + rgbM += (blueNoise - 0.5.xxx) * _ColorBoost.w * saturate(1.0 - lumaM); + #endif + rgbM = max(0.0.xxx, rgbM); +#endif + + } + + float4 FragBeautify (VaryingsBeautify i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + #if BEAUTIFY_THERMAL_VISION + i.uv.x += _NightVision.z * sin(_Time.z + i.uv.y * 20.0) / (1.0 + 10.0 * dot(i.uv - 0.5.xx, i.uv.xy - 0.5.xx)); // wave animation + #endif + + #if BEAUTIFY_CABERRATION + float4 pixel = GetDistortedColor(i.uv); + #else + float4 pixel = SAMPLE_TEXTURE2D_X(_MainTex, sampler_MainTex, i.uv); + #endif + + beautifyPass(i, pixel.rgb); + + return pixel; + } + + + float4 FragCompare (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + // separator line + antialias + float2 dd = i.uv; + if (_CompareParams.z < -15) { + dd.x -= (_CompareParams.z - -20); + _CompareParams.z = -10; + } else { + dd.x -= 0.5; + } + dd.y -= 0.5; + + float co = dot(_CompareParams.xy, dd); + float dist = distance( _CompareParams.xy * co, dd ); + float4 aa = saturate( (_CompareParams.w - dist) / abs(_MainTex_TexelSize.y) ); + + float sameSide = (_CompareParams.z > -5); + float2 pixelUV = lerp(i.uv, float2(i.uv.x + _CompareParams.z, i.uv.y), sameSide); + float2 pixelNiceUV = lerp(i.uv, float2(i.uv.x - 0.5 + _CompareParams.z, i.uv.y), sameSide); + float4 pixel = SAMPLE_TEXTURE2D_X(_MainTex, sampler_MainTex, pixelUV); + float4 pixelNice = SAMPLE_TEXTURE2D_X(_CompareTex, sampler_MainTex, pixelNiceUV); + + // are we on the beautified side? + float2 cp = float2(_CompareParams.y, -_CompareParams.x); + float t = dot(dd, cp) > 0; + pixel = lerp(pixel, pixelNice, t); + return pixel + aa; + } + + + half4 FragCopy (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + float2 uv = UnityStereoTransformScreenSpaceTex(i.uv); + #if defined(USE_BILINEAR) + return clamp(SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv), 0, 1e6); + #else + return SAMPLE_TEXTURE2D_X(_MainTex, sampler_PointClamp, uv); + #endif + } + + + half4 FragCopyWithMask (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + float2 uv = UnityStereoTransformScreenSpaceTex(i.uv); + + half maskAlpha; + int style = BLUR_STYLE; + if (style == 0) { + maskAlpha = SAMPLE_TEXTURE2D_LOD(_BlurMask, sampler_LinearClamp, uv, 0).a; + } else if (style == 1) { // Tilt Shift + float dist = abs(uv.y - BLUR_CENTER.y); + float width = BLUR_WIDTH * 0.5; + maskAlpha = smoothstep(width, width + max(BLUR_FALLOFF, 0.0001), dist); + } else { // Radial Blur + float aspect = _MainTex_TexelSize.z * _MainTex_TexelSize.y; + float2 dist2 = uv - BLUR_CENTER; + dist2.x *= aspect; + float dist = length(dist2); + maskAlpha = smoothstep(BLUR_WIDTH, BLUR_WIDTH + max(BLUR_FALLOFF, 0.0001), dist); + } + + if (BLUR_SHOW_MASK > 0) { + return half4(maskAlpha, maskAlpha, maskAlpha, 1); + } + + half4 srcPixel = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv); + half4 blurPixel = SAMPLE_TEXTURE2D_X(_BlurTex, sampler_LinearClamp, uv); + return lerp(srcPixel, blurPixel, maskAlpha); + } + + half4 FragCopyWithMiniView (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + float2 uv = UnityStereoTransformScreenSpaceTex(i.uv); + float2 uvOrig = (uv - _MiniViewRect.xy) / _MiniViewRect.zw; + half4 source = SAMPLE_TEXTURE2D_X_LOD(_MiniViewTex, sampler_LinearClamp, uvOrig, 0); + half4 final = SAMPLE_TEXTURE2D_X_LOD(_MainTex, sampler_LinearClamp, uv, 0); + if (any(floor(uvOrig) != 0)) source = final; + float2 frameIntensity = saturate( (abs(uvOrig - 0.5) - _MiniViewBlend.xz) * _MiniViewBlend.yw); + float frameBlend = max(frameIntensity.x, frameIntensity.y); + return lerp(source, final, frameBlend); + } + + +#endif // BEAUTIFY_CORE_FX \ No newline at end of file diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCore.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCore.hlsl.meta new file mode 100644 index 00000000..de89c0d3 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCore.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 850a3a451a0484244acec510bfdf6867 +timeCreated: 1517506872 +licenseType: Pro +ShaderImporter: + externalObjects: {} + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCore.shader b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCore.shader new file mode 100644 index 00000000..9eb8cdde --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCore.shader @@ -0,0 +1,487 @@ +Shader "Hidden/Kronnect/Beautify" { +Properties { + _FlareTex("Flare Texture", 2D) = "white" {} + _OverlayTex("Lens Dirt Texture", 2D) = "black" {} + _Color("", Color) = (1,1,1) + _BlueNoise("Blue Noise", 2D) = "black" {} + _BokehData2("", Vector) = (1,1,1,1) + _BokehData3("", Vector) = (1,1,1000,1) + _BlurMask("Blur Mask", 2D) = "white" {} + _FlipY("Flip Y", Float) = 1 +} + +Subshader { + + Tags { "RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" } + LOD 100 + ZWrite Off ZTest Always Blend Off Cull Off + + HLSLINCLUDE + #pragma target 3.0 + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Shaders/PostProcessing/Common.hlsl" + ENDHLSL + + Pass { // 0 + Name "Raw Copy (Point Filtering)" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragCopy + #include "BeautifyCore.hlsl" + ENDHLSL + } + + Pass { // 1 + Name "Compare View" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragCompare + #include "BeautifyCore.hlsl" + ENDHLSL + } + + Pass { // 2 + Name "Main Beautify Pass (core)" + HLSLPROGRAM + #pragma vertex VertBeautify + #pragma fragment FragBeautify + #pragma multi_compile_local_fragment __ BEAUTIFY_ACES_TONEMAP BEAUTIFY_ACES_FITTED_TONEMAP BEAUTIFY_AGX_TONEMAP + #pragma multi_compile_local_fragment __ BEAUTIFY_LUT BEAUTIFY_3DLUT BEAUTIFY_NIGHT_VISION BEAUTIFY_THERMAL_VISION + #pragma multi_compile_local_fragment __ BEAUTIFY_BLOOM + #pragma multi_compile_local_fragment __ BEAUTIFY_DIRT + #pragma multi_compile_local_fragment __ BEAUTIFY_DEPTH_OF_FIELD BEAUTIFY_DOF_TRANSPARENT BEAUTIFY_CABERRATION + #pragma multi_compile_local_fragment __ BEAUTIFY_PURKINJE + #pragma multi_compile_local_fragment __ BEAUTIFY_VIGNETTING BEAUTIFY_VIGNET_MASK + #pragma multi_compile_local_fragment __ BEAUTIFY_EYE_ADAPTATION + #pragma multi_compile_local_fragment __ BEAUTIFY_COLOR_TWEAKS + #pragma multi_compile_local_fragment __ BEAUTIFY_TURBO + #pragma multi_compile_local_fragment __ BEAUTIFY_DITHER BEAUTIFY_FILM_GRAIN + #pragma multi_compile_local_fragment __ BEAUTIFY_SHARPEN BEAUTIFY_EXCLUSION_MASK_SHARPEN + #pragma multi_compile_local_fragment __ BEAUTIFY_FRAME + #pragma multi_compile_local_fragment __ BEAUTIFY_EDGE_AA BEAUTIFY_OUTLINE + #include "BeautifyCore.hlsl" + ENDHLSL + } + + Pass { // 3 + Name "Extract Luminance" + HLSLPROGRAM + #pragma vertex VertLum + #pragma fragment FragLum + #pragma multi_compile_local_fragment __ BEAUTIFY_TURBO + #pragma multi_compile_local_fragment __ BEAUTIFY_BLOOM_USE_DEPTH + #pragma multi_compile_local_fragment __ BEAUTIFY_BLOOM_USE_LAYER BEAUTIFY_BLOOM_USE_LAYER_INCLUSION + #pragma multi_compile_local_fragment __ BEAUTIFY_BLOOM_PROP_THRESHOLDING + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 4 + Name "Debug bloom" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragDebugBloom + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 5 + Name "Blur horizontally" + HLSLPROGRAM + #pragma vertex VertBlur + #pragma fragment FragBlur + #define BEAUTIFY_BLUR_HORIZ + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 6 + Name "Blur vertically" + HLSLPROGRAM + #pragma vertex VertBlur + #pragma fragment FragBlur + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 7 + Name "Bloom compose" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragBloomCompose + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 8 + Name "Resample" + HLSLPROGRAM + #pragma vertex VertCross + #pragma fragment FragResample + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 9 + Name "Combine resample" + HLSLPROGRAM + #pragma vertex VertCross + #pragma fragment FragResample + #define COMBINE_BLOOM + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 10 + Name "Bloom extract luminance with antiflicker" + HLSLPROGRAM + #pragma vertex VertCrossLum + #pragma fragment FragLumAntiflicker + #pragma multi_compile_local_fragment __ BEAUTIFY_TURBO + #pragma multi_compile_local_fragment __ BEAUTIFY_BLOOM_USE_DEPTH + #pragma multi_compile_local_fragment __ BEAUTIFY_BLOOM_USE_LAYER BEAUTIFY_BLOOM_USE_LAYER_INCLUSION + #pragma multi_compile_local_fragment __ BEAUTIFY_BLOOM_PROP_THRESHOLDING + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 11 + Name "Resample Anamorphic Flares" + HLSLPROGRAM + #pragma vertex VertCross + #pragma fragment FragResampleAF + #define COMBINE_BLOOM + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 12 + Name "Combine AF" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragCombine + #define COMBINE_BLOOM + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 13 + Name "Compute Screen Lum" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragScreenLum + #pragma multi_compile_local_fragment __ BEAUTIFY_EA_USE_DEPTH + #pragma multi_compile_local_fragment __ BEAUTIFY_EA_USE_MASK + #pragma multi_compile_local_fragment __ BEAUTIFY_TURBO + #include "BeautifyPPSEA.hlsl" + ENDHLSL + } + + Pass { // 14 + Name "Reduce Screen Lum" + HLSLPROGRAM + #pragma vertex VertCross + #pragma fragment FragReduceScreenLum + #pragma multi_compile_local_fragment __ BEAUTIFY_EA_USE_DEPTH + #pragma multi_compile_local_fragment __ BEAUTIFY_EA_USE_MASK + #include "BeautifyPPSEA.hlsl" + ENDHLSL + } + + Pass { // 15 + Name "Blend Screen Lum" + Blend SrcAlpha OneMinusSrcAlpha + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragBlendScreenLum + #include "BeautifyPPSEA.hlsl" + ENDHLSL + } + + Pass { // 16 + Name "Simple Blend" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragBlend + #include "BeautifyPPSEA.hlsl" + ENDHLSL + } + + Pass { // 17 + Name "AF Lum" + HLSLPROGRAM + #pragma vertex VertLum + #pragma fragment FragLum + #pragma multi_compile_local_fragment __ BEAUTIFY_TURBO + #pragma multi_compile_local_fragment __ BEAUTIFY_ANAMORPHIC_FLARES_USE_DEPTH + #pragma multi_compile_local_fragment __ BEAUTIFY_ANAMORPHIC_FLARES_USE_LAYER BEAUTIFY_ANAMORPHIC_FLARES_USE_LAYER_INCLUSION + #pragma multi_compile_local_fragment __ BEAUTIFY_ANAMORPHIC_PROP_THRESHOLDING + #define USE_AF_THRESHOLD + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 18 + Name "AF Lum AntiFlicker" + HLSLPROGRAM + #pragma vertex VertCrossLum + #pragma fragment FragLumAntiflicker + #pragma multi_compile_local_fragment __ BEAUTIFY_TURBO + #pragma multi_compile_local_fragment __ BEAUTIFY_ANAMORPHIC_FLARES_USE_DEPTH + #pragma multi_compile_local_fragment __ BEAUTIFY_ANAMORPHIC_FLARES_USE_LAYER BEAUTIFY_ANAMORPHIC_FLARES_USE_LAYER_INCLUSION + #pragma multi_compile_local_fragment __ BEAUTIFY_ANAMORPHIC_PROP_THRESHOLDING + #define USE_AF_THRESHOLD + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 19 + Name "Sun Flares" + HLSLPROGRAM + #pragma vertex VertSF + #pragma fragment FragSF + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_local_fragment __ BEAUTIFY_SF_USE_GHOSTS + #pragma multi_compile_local_fragment __ BEAUTIFY_SF_OCCLUSION_SIMPLE BEAUTIFY_SF_OCCLUSION_SMOOTH + #include "BeautifyPPSSF.hlsl" + ENDHLSL + } + + Pass { // 20 + Name "Sun Flares Additive" + HLSLPROGRAM + #pragma vertex VertSF + #pragma fragment FragSFAdditive + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_local_fragment __ BEAUTIFY_SF_USE_GHOSTS + #pragma multi_compile_local_fragment __ BEAUTIFY_SF_OCCLUSION_SIMPLE BEAUTIFY_SF_OCCLUSION_SMOOTH + #include "BeautifyPPSSF.hlsl" + ENDHLSL + } + + Pass { // 21 + Name "DoF CoC" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragCoC + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_local_fragment __ BEAUTIFY_DOF_TRANSPARENT + #pragma multi_compile_local_fragment __ BEAUTIFY_EDGE_AA_DOF + #include "BeautifyPPSDoF.hlsl" + ENDHLSL + } + + Pass { // 22 + Name "DoF CoC Debug" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragCoCDebug + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_local_fragment __ BEAUTIFY_DOF_TRANSPARENT + #include "BeautifyPPSDoF.hlsl" + ENDHLSL + } + + Pass { // 23 + Name "DoF Blur" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragBlur + #pragma fragmentoption ARB_precision_hint_fastest + #include "BeautifyPPSDoF.hlsl" + ENDHLSL + } + + Pass { // 24 + Name "DoF Blur wo/Bokeh" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragBlurNoBokeh + #pragma fragmentoption ARB_precision_hint_fastest + #include "BeautifyPPSDoF.hlsl" + ENDHLSL + } + + Pass { // 25 + Name "DoF Blur Horizontally" + HLSLPROGRAM + #pragma vertex VertBlur + #pragma fragment FragBlurCoC + #pragma fragmentoption ARB_precision_hint_fastest + #define BEAUTIFY_BLUR_HORIZ + #include "BeautifyPPSDoF.hlsl" + ENDHLSL + } + + Pass { // 26 + Name "DoF Blur Vertically" + HLSLPROGRAM + #pragma vertex VertBlur + #pragma fragment FragBlurCoC + #pragma fragmentoption ARB_precision_hint_fastest + #include "BeautifyPPSDoF.hlsl" + ENDHLSL + } + + Pass { // 27 + Name "Raw Copy (Bilinear Filtering)" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragCopy + #define USE_BILINEAR + #include "BeautifyCore.hlsl" + ENDHLSL + } + + Pass { // 28 + Name "Bloom Exclusion Layer Debug" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragDebugBloomExclusionLayer + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 29 + Name "DoF Debug Transparent" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragDoFDebugTransparent + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_local_fragment __ BEAUTIFY_DOF_TRANSPARENT + #include "BeautifyPPSDoF.hlsl" + ENDHLSL + } + + Pass { // 30 + Name "Chromatic Aberration Custom Pass" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment fragChromaticAberration + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_local_fragment __ BEAUTIFY_TURBO + #define BEAUTIFY_CABERRATION 1 + #include "BeautifyCAberration.hlsl" + ENDHLSL + } + + Pass { // 31 + Name "Outline Detection Pass" + HLSLPROGRAM + #pragma vertex VertOutline + #pragma fragment fragOutline + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_local_fragment _ BEAUTIFY_DEPTH_FADE + #pragma multi_compile_local_fragment _ BEAUTIFY_OUTLINE_CUSTOM_DEPTH BEAUTIFY_OUTLINE_OBJECT_ID + #pragma multi_compile_local_fragment _ BEAUTIFY_OUTLINE_MIN_SEPARATION + #pragma multi_compile_local_fragment _ BEAUTIFY_OUTLINE_OUTER_ONLY + #include "BeautifyPPSOutline.hlsl" + ENDHLSL + } + + Pass { // 32 + Name "Outline Blur Horizontally (depth aware)" + HLSLPROGRAM + #pragma vertex VertBlur + #pragma fragment FragBlur + #pragma fragmentoption ARB_precision_hint_fastest + #define BEAUTIFY_BLUR_HORIZ + #include "BeautifyPPSOutline.hlsl" + ENDHLSL + } + + Pass { // 33 + Name "Outline Blur Vertically (depth aware)" + HLSLPROGRAM + #pragma vertex VertBlur + #pragma fragment FragBlur + #pragma fragmentoption ARB_precision_hint_fastest + #include "BeautifyPPSOutline.hlsl" + ENDHLSL + } + + Pass { // 34 + Name "Outline Blend Pass" + Blend SrcAlpha OneMinusSrcAlpha + HLSLPROGRAM + #pragma vertex VertOutline + #pragma fragment FragCopy + #pragma fragmentoption ARB_precision_hint_fastest + #include "BeautifyPPSOutline.hlsl" + ENDHLSL + } + + Pass { // 35 + Name "Mask Blur" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragCopyWithMask + #include "BeautifyCore.hlsl" + ENDHLSL + } + + + Pass { // 36 + Name "DoF Threshold for bokeh" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragThreshold + #include "BeautifyPPSDoF.hlsl" + ENDHLSL + } + + Pass { // 37 + Name "DoF Additive" + Blend One One + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragCopyBokeh + #include "BeautifyPPSDoF.hlsl" + ENDHLSL + } + + Pass { // 38 + Name "DoF Blur bokeh" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragBlurSeparateBokeh + #include "BeautifyPPSDoF.hlsl" + ENDHLSL + } + + Pass { // 39 + Name "Anamorphic Flares Exclusion Layer Debug" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragDebugAnamorphicFlaresExclusionLayer + #include "BeautifyPPSLum.hlsl" + ENDHLSL + } + + Pass { // 40 + Name "Copy with MiniView" + HLSLPROGRAM + #pragma vertex VertOS + #pragma fragment FragCopyWithMiniView + #include "BeautifyCore.hlsl" + ENDHLSL + } + + Pass { // 41 + Name "Sun Flares Occlusion Test" + Blend SrcAlpha OneMinusSrcAlpha + HLSLPROGRAM + #pragma vertex VertSF + #pragma fragment FragSFOcclusion + #pragma multi_compile_local_fragment _ BEAUTIFY_SF_OCCLUSION_INIT + #include "BeautifyPPSSF.hlsl" + ENDHLSL + } +} +FallBack Off +} diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCore.shader.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCore.shader.meta new file mode 100644 index 00000000..e50db252 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyCore.shader.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 55d70ca4ea7504a38b66170bbe587b2f +ShaderImporter: + externalObjects: {} + defaultTextures: + - _MainTex: {instanceID: 0} + - _FlareTex: {fileID: 2800000, guid: 93092410bbc6f4ccba773578db5832d9, type: 3} + - _OverlayTex: {fileID: 2800000, guid: 0bd567658bec947d2b4d2877ccb0faa7, type: 3} + - _BlueNoise: {fileID: 2800000, guid: e6a467a4c71a24898ac842ed6f9a1d52, type: 3} + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyDistortion.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyDistortion.hlsl new file mode 100644 index 00000000..861f8496 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyDistortion.hlsl @@ -0,0 +1,70 @@ +#ifndef BEAUTIFY_DISTORTION +#define BEAUTIFY_DISTORTION + +#if BEAUTIFY_CABERRATION + +float3 _ChromaticAberrationData; +#define CHROMATIC_ABERRATION_INTENSITY _ChromaticAberrationData.x +#define CHROMATIC_ABERRATION_SMOOTHING _ChromaticAberrationData.y +#define CHROMATIC_ABERRATION_SHIFT _ChromaticAberrationData.z +#define CHROMATIC_ABERRATION_MAX_SAMPLES 32 + +#if BEAUTIFY_TURBO + +float4 GetDistortedColor(float2 uv) { + + float2 coords = 2.0 * uv - 1.0; + float dst = dot(coords, coords); + float2 delta = coords * (dst * CHROMATIC_ABERRATION_INTENSITY); + float r = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv).r; + float g = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv - delta).g; + float b = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv - delta * 2.0).b; + return float4(r, g, b, 1.0); +} + +#else + +float4 GetDistortedColor(float2 uv) { + + float2 coords = 2.0 * uv - 1.0; + float dst = dot(coords, coords); + float2 delta = coords * (dst * CHROMATIC_ABERRATION_INTENSITY); + float4 abColor = float4(0,0,0,1.0); + +#if BEAUTIFY_CABERRATION_ALT + int samples = clamp( (int)(dst * CHROMATIC_ABERRATION_SMOOTHING) + 1, 1, CHROMATIC_ABERRATION_MAX_SAMPLES); + UNITY_UNROLL + for (int k=0;k _BokehData3.y) return 0; + float xd = abs(depth - _BokehData.x) - _BokehData2.x * (depth < _BokehData.x); + return min(_BokehData3.z, 0.5 * _BokehData.y * xd / depth); + } + + float getCocFromUV(float2 uv) { + #if BEAUTIFY_DOF_TRANSPARENT + float depthTex = BEAUTIFY_GET_CUSTOM_DEPTH_01(_DoFTransparentDepth, uv); + float depth = BEAUTIFY_GET_SCENE_DEPTH_01(uv); + depth = min(depth, depthTex); + depth *= _ProjectionParams.z; + #else + float depth = BEAUTIFY_GET_SCENE_DEPTH_EYE(uv); + #endif + return getCocFromDepth(depth); + } + + float getCoc(VaryingsSimple i) { + return getCocFromUV(i.uv); + } + + float4 FragCoC (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + float3 pixelRGB = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv).rgb; + float coc = getCoc(i) / COC_BASE; + + #if BEAUTIFY_EDGE_AA_DOF + float2 uv = i.uv; + float2 texelSize = _MainTex_TexelSize.xy; + float2 uvN = uv + float2(0, texelSize.y); + float2 uvS = uv - float2(0, texelSize.y); + float2 uvW = uv - float2(texelSize.x, 0); + float2 uvE = uv + float2(texelSize.x, 0); + + float depthN = BEAUTIFY_GET_SCENE_DEPTH_01(uvN); + float depthS = BEAUTIFY_GET_SCENE_DEPTH_01(uvS); + float depthW = BEAUTIFY_GET_SCENE_DEPTH_01(uvW); + float depthE = BEAUTIFY_GET_SCENE_DEPTH_01(uvE); + float depthCenter = BEAUTIFY_GET_SCENE_DEPTH_01(uv); + float dDepth = abs(depthN - depthS) + abs(depthW - depthE); + + if (dDepth > ANTIALIAS_THRESHOLD) { + float3 rgbN = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uvN).rgb; + float3 rgbS = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uvS).rgb; + float3 rgbW = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uvW).rgb; + float3 rgbE = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uvE).rgb; + + float lumaN = getLuma(rgbN); + float lumaS = getLuma(rgbS); + float lumaW = getLuma(rgbW); + float lumaE = getLuma(rgbE); + float maxLuma = max(max(lumaN, lumaS), max(lumaW, lumaE)); + float minLuma = min(min(lumaN, lumaS), min(lumaW, lumaE)); + + pixelRGB = ApplyEdgeAA(uv, pixelRGB, dDepth, depthCenter, lumaN, lumaS, lumaW, lumaE, minLuma, maxLuma, texelSize); + + float farClip = _ProjectionParams.z; + float cocN = getCocFromDepth(depthN * farClip) / COC_BASE; + float cocS = getCocFromDepth(depthS * farClip) / COC_BASE; + float cocW = getCocFromDepth(depthW * farClip) / COC_BASE; + float cocE = getCocFromDepth(depthE * farClip) / COC_BASE; + float maxNeighborCoC = max(max(cocN, cocS), max(cocW, cocE)); + coc = lerp(coc, maxNeighborCoC, 0.5); + } + #endif + + pixelRGB = clamp(pixelRGB, 0.0.xxx, _BokehData3.xxx); + #if UNITY_COLORSPACE_GAMMA + pixelRGB = GAMMA_TO_LINEAR(pixelRGB); + #endif + return float4(pixelRGB, coc); + } + + float4 FragCoCDebug (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + float4 pixel = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv); + float CoC = min(getCoc(i) / 16.0, 1.0); + return float4(CoC.xxx, 1.0); + } + + float4 FragDoFDebugTransparent (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + float depthTex = BEAUTIFY_GET_CUSTOM_DEPTH_01(_DoFTransparentDepth, i.uv); + return float4(depthTex.xxx, 1.0); + } + + float4 FragBlur (VaryingsSimple i): SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + float4 sum = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv ); + float samples = ceil(sum.a * COC_BASE); + + float4 dir = float4(_BokehData.zw * _MainTex_TexelSize.xy, 0, 0); + dir *= max(1.0, samples / _BokehData2.y); +#if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED) || defined(SINGLE_PASS_STEREO) + dir.x *= 2.0; +#endif + + float jitter = dot(float2(2.4084507, 3.2535211), i.uv * _MainTex_TexelSize.zw); + float2 disp0 = dir.xy * (frac(jitter) + 0.5); + float4 disp1 = float4(i.uv + disp0, 0, 0); + float4 disp2 = float4(i.uv - disp0, 0, 0); + float w = 1.0; + + const int sampleCount = (int)min(_BokehData2.y, samples); + UNITY_UNROLL + for (int k=1;k<16;k++) { + if (k 0) { + weightedSum /= weightSum; + } + c1.r = weightedSum; + c1.g = maxLum; + c1.b = weightSum * 0.25; + #endif + + return c1; + } + + float4 FragBlendScreenLum (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + float2 uv = UnityStereoTransformScreenSpaceTex(float2(0.5, 0.5)); + + float4 c = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv); + float4 p = SAMPLE_TEXTURE2D_X(_EAHist, sampler_LinearClamp, uv); + float speed = c.r < p.r ? _EyeAdaptation.z: _EyeAdaptation.w; + c.a = speed * unity_DeltaTime.x; + return c; + } + + float4 FragBlend (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + float4 c = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, 0.5.xx); + c.a = 1.0; + return c; + } + +#endif \ No newline at end of file diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSEA.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSEA.hlsl.meta new file mode 100644 index 00000000..e5c9f151 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSEA.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 136698a3df19b478e98ecc73a7f68a1b +timeCreated: 1518001072 +licenseType: Pro +ShaderImporter: + externalObjects: {} + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSFilmGrain.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSFilmGrain.hlsl new file mode 100644 index 00000000..d3444b2c --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSFilmGrain.hlsl @@ -0,0 +1,106 @@ +#ifndef BEAUTIFY_PPS_FILM_GRAIN +#define BEAUTIFY_PPS_FILM_GRAIN + +float4 _FilmGrainData; // x: intensity, y: luma attenuation, z: resolution, w: unused +float4 _FilmArtifactsData; // x: dirt spots amount, y: dirt spots intensity, z: scratches amount, w: scratches intensity + +#define FILM_GRAIN_INTENSITY _FilmGrainData.x +#define FILM_GRAIN_LUMA_ATTENUATION _FilmGrainData.y +#define FILM_GRAIN_RESOLUTION _FilmGrainData.z + +#define DIRT_SPOTS_AMOUNT _FilmArtifactsData.x +#define DIRT_SPOTS_INTENSITY _FilmArtifactsData.y +#define SCRATCHES_AMOUNT _FilmArtifactsData.z +#define SCRATCHES_INTENSITY _FilmArtifactsData.w + +float3 r3(float2 uv) { + static const float2 magic1 = float2(321.8942, 1225.6548); + static const float magic2 = 4251.4865; + float d1 = dot(uv, magic1); + float d2 = dot(uv + 0.1, magic1); + float d3 = dot(uv + 0.2, magic1); + return frac(sin(float3(d1, d2, d3)) * magic2 + _Time.y); +} + +inline float r1(float x) { + static const float magic = 4251.4865; + return frac(sin(x * 321.8942) * magic + _Time.y); +} + + +// Generate film artifacts like dirt spots and scratches +float getFilmArtifacts(float2 uv) { + float artifacts = 0.0; + + // Dirt spots - small circular spots that appear randomly + UNITY_BRANCH + if (DIRT_SPOTS_AMOUNT > 0) { + float2 dirtUV = uv * 20.0; + float2 dirtCell = floor(dirtUV); + float2 dirtFrac = dirtUV - dirtCell; + float3 dirtRandom = r3(dirtCell + floor(_Time.y * 0.5)); + if (dirtRandom.x > DIRT_SPOTS_AMOUNT) { + float2 dirtOffset = dirtFrac - 0.5; + float dirtDistanceSqr = dot(dirtOffset, dirtOffset); + float dirtSize = dirtRandom.y * 0.3 + 0.1; + float dirtSpot = 1.0 - smoothstep(0.0, dirtSize * dirtSize, dirtDistanceSqr); + artifacts += dirtSpot * (dirtRandom.z - 0.5) * DIRT_SPOTS_INTENSITY; + } + } + + // Vertical scratches - appear occasionally and persist for a few frames + UNITY_BRANCH + if (SCRATCHES_AMOUNT > 0) { + float scratchTime = floor(dot(_Time.xyzw, 1.0)); + float scratchRandom = r1(scratchTime); + if (scratchRandom > SCRATCHES_AMOUNT) { + float scratchX = r1(scratchTime + 0.1); + float scratchWidth = 0.001 + r1(scratchTime + 0.2) * 0.003; + float scratchDistance = abs(uv.x - scratchX); + float scratch = 1.0 - smoothstep(0.0, scratchWidth, scratchDistance); + artifacts += scratch * SCRATCHES_INTENSITY; + } + } + + return artifacts; +} + +void ApplyFilmGrain(inout float3 rgb, float luma, float2 uv) { + + float2 noiseSize = _MainTex_TexelSize.zw * FILM_GRAIN_RESOLUTION; + float2 scaledUV = uv * noiseSize; + float2 cell = floor(scaledUV); + + #if BEAUTIFY_TURBO + static const float c0 = 1.0f; + static const float c1 = -1.828427f; + static const float c2 = 0.828427f; + float luminanceFactor = c0 + luma * (c1 + luma * c2); + float3 grain = r3(cell / noiseSize); + float artifacts = 0.0; + #else + float luminanceFactor = 1.0 - sqrt(luma); + // Bilinear interpolation + float2 fracUV = scaledUV - cell; + float2 invNoiseSize = rcp(noiseSize); + float3 rand00 = r3(cell * invNoiseSize); + float3 rand10 = r3((cell + float2(1, 0)) * invNoiseSize); + float3 rand01 = r3((cell + float2(0, 1)) * invNoiseSize); + float3 rand11 = r3((cell + float2(1, 1)) * invNoiseSize); + float3 randX0 = lerp(rand00, rand10, fracUV.x); + float3 randX1 = lerp(rand01, rand11, fracUV.x); + float3 grain = lerp(randX0, randX1, fracUV.y); + float artifacts = getFilmArtifacts(uv); + #endif + + static const float3 channelSensibility = float3(1, 0.95, 1.05); + grain = (grain - 0.5) * channelSensibility; + + float grainAmount = lerp(1.0, luminanceFactor, FILM_GRAIN_LUMA_ATTENUATION); + + rgb *= 1.0 + grain * grainAmount * FILM_GRAIN_INTENSITY + artifacts; + + rgb = saturate(rgb); +} + +#endif // BEAUTIFY_PPS_FILM_GRAIN \ No newline at end of file diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSFilmGrain.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSFilmGrain.hlsl.meta new file mode 100644 index 00000000..7085f2ab --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSFilmGrain.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a2f62a5fa4eb746948cde9ffbfa3fa3f +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSLum.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSLum.hlsl new file mode 100644 index 00000000..8c25b44c --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSLum.hlsl @@ -0,0 +1,411 @@ +#ifndef BEAUTIFY_PPSLUM_FX +#define BEAUTIFY_PPSLUM_FX + + // Copyright 2020-2021 Kronnect - All Rights Reserved. + #include "BeautifyCommon.hlsl" + + TEXTURE2D_X(_MainTex); + TEXTURE2D_X(_BloomTex); + float4 _BloomTex_TexelSize; + TEXTURE2D_X(_CombineTex); + TEXTURE2D_X(_BloomTex1); + TEXTURE2D_X(_BloomTex2); + TEXTURE2D_X(_BloomTex3); + TEXTURE2D_X(_BloomTex4); + float4 _MainTex_TexelSize; + float4 _MainTex_ST; + float4 _Bloom; + float4 _BloomWeights; + float4 _BloomWeights2; + float4 _BloomTint; + float3 _BloomTint0, _BloomTint1, _BloomTint2, _BloomTint3, _BloomTint4, _BloomTint5; + float _BloomSpread; + float4 _AFTint; + float _BlurScale; + float4 _AFData; + + #if defined(USE_AF_THRESHOLD) + #define MAX_BRIGHTNESS _AFData.w + #else + #define MAX_BRIGHTNESS _BloomWeights2.z + + #endif + #if BEAUTIFY_BLOOM_USE_DEPTH || BEAUTIFY_ANAMORPHIC_FLARES_USE_DEPTH + float _BloomDepthThreshold; + float _BloomNearThreshold; + float _AFDepthThreshold; + float _AFNearThreshold; + #endif + + TEXTURE2D_X(_BloomSourceDepth); + TEXTURE2D_X(_AFSourceDepth); + + struct VaryingsCross { + float4 positionCS : SV_POSITION; + float2 uv: TEXCOORD0; + BEAUTIFY_VERTEX_CROSS_UV_DATA + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct VaryingsLum { + float4 positionCS : SV_POSITION; + float2 uv: TEXCOORD0; + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct VaryingsCrossLum { + float4 positionCS : SV_POSITION; + float2 uv: TEXCOORD0; + BEAUTIFY_VERTEX_CROSS_UV_DATA + UNITY_VERTEX_OUTPUT_STEREO + }; + + + VaryingsLum VertLum(AttributesSimple input) { + + VaryingsLum output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + output.positionCS = input.positionOS; + output.positionCS.y *= _ProjectionParams.x * _FlipY; + output.uv = input.uv; + + return output; + } + + half Brightness(half3 c) { + return max(c.r, max(c.g, c.b)); + } + + half Included(half4 c) { + #if BEAUTIFY_BLOOM_USE_LAYER_INCLUSION || BEAUTIFY_ANAMORPHIC_FLARES_USE_LAYER_INCLUSION + return Brightness(c.rgb) >= 0.01; + #else + return Brightness(c.rgb) < 0.01; + #endif + } + + half3 ColorAboveThreshold(half3 c, half brightness) { + #if defined(USE_AF_THRESHOLD) + half threshold = _AFData.y; + #else + half threshold = _Bloom.w; + #endif + + #if BEAUTIFY_ANAMORPHIC_PROP_THRESHOLDING || BEAUTIFY_BLOOM_PROP_THRESHOLDING + half cs = clamp(brightness - 0.5 * threshold, 0.0, threshold); + cs = 0.5 * cs * cs / (threshold + 0.0001); + c *= max(brightness - threshold, cs) / max(brightness, 0.0001); + #else + c = max(c - threshold, 0); + #endif + + return c; + } + + half4 FragLum (VaryingsLum i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + half4 c = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv); + c = clamp(c, 0.0.xxxx, MAX_BRIGHTNESS.xxxx); + + #if UNITY_COLORSPACE_GAMMA + c.rgb = GAMMA_TO_LINEAR(c.rgb); + #endif + + #if BEAUTIFY_BLOOM_USE_DEPTH || BEAUTIFY_ANAMORPHIC_FLARES_USE_DEPTH + float depth01 = BEAUTIFY_GET_SCENE_DEPTH_01(i.uv); + #endif + + #if BEAUTIFY_BLOOM_USE_DEPTH + c.rgb *= max(0, 1.0 - depth01 * _BloomDepthThreshold); + c.rgb *= min(1.0, depth01 / _BloomNearThreshold); + #endif + + #if BEAUTIFY_ANAMORPHIC_FLARES_USE_DEPTH + c.rgb *= max(0, 1.0 - depth01 * _AFDepthThreshold); + c.rgb *= min(1.0, depth01 / _AFNearThreshold); + #endif + + #if BEAUTIFY_BLOOM_USE_LAYER || BEAUTIFY_BLOOM_USE_LAYER_INCLUSION + half included = Included(SAMPLE_TEXTURE2D_X(_BloomSourceDepth, sampler_LinearClamp, i.uv)); + c.rgb *= included; + #endif + + #if BEAUTIFY_ANAMORPHIC_FLARES_USE_LAYER || BEAUTIFY_ANAMORPHIC_FLARES_USE_LAYER_INCLUSION + half included = Included(SAMPLE_TEXTURE2D_X(_AFSourceDepth, sampler_LinearClamp, i.uv)); + c.rgb *= included; + #endif + + c.a = Brightness(c.rgb); + #if !defined(USE_AF_THRESHOLD) + c.rgb = lerp(c.rgb, c.a * _BloomTint.rgb, _BloomTint.a); + #endif + c.rgb = ColorAboveThreshold(c.rgb, c.a); + return c; + } + + VaryingsCross VertCross(AttributesSimple v) { + VaryingsCross o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.positionCS = v.positionOS; + o.positionCS.y *= _ProjectionParams.x * _FlipY; + o.uv = v.uv; + BEAUTIFY_VERTEX_OUTPUT_CROSS_UV(o) + + return o; + } + + VaryingsCrossLum VertCrossLum(AttributesSimple v) { + VaryingsCrossLum o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.positionCS = v.positionOS; + o.positionCS.y *= _ProjectionParams.x * _FlipY; + o.uv = v.uv; + BEAUTIFY_VERTEX_OUTPUT_CROSS_UV(o) + + return o; + } + + half4 FragLumAntiflicker(VaryingsCrossLum i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + BEAUTIFY_FRAG_SETUP_CROSS_UV(i) + + half4 c1 = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv1); + half4 c2 = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv2); + half4 c3 = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv3); + half4 c4 = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv4); + + c1 = clamp(c1, 0.0.xxxx, MAX_BRIGHTNESS.xxxx); + c2 = clamp(c2, 0.0.xxxx, MAX_BRIGHTNESS.xxxx); + c3 = clamp(c3, 0.0.xxxx, MAX_BRIGHTNESS.xxxx); + c4 = clamp(c4, 0.0.xxxx, MAX_BRIGHTNESS.xxxx); + + #if BEAUTIFY_BLOOM_USE_DEPTH || BEAUTIFY_ANAMORPHIC_FLARES_USE_DEPTH + float depth01 = BEAUTIFY_GET_SCENE_DEPTH_01(i.uv); + #endif + + #if BEAUTIFY_BLOOM_USE_DEPTH + float depthAtten = max(0, 1.0 - depth01 * _BloomDepthThreshold); + c1.rgb *= depthAtten; + c2.rgb *= depthAtten; + c3.rgb *= depthAtten; + c4.rgb *= depthAtten; + float nearAtten = min(1.0, depth01 / _BloomNearThreshold); + c1.rgb *= nearAtten; + c2.rgb *= nearAtten; + c3.rgb *= nearAtten; + c4.rgb *= nearAtten; + #endif + + #if BEAUTIFY_ANAMORPHIC_FLARES_USE_DEPTH + float depthAtten = max(0, 1.0 - depth01 * _AFDepthThreshold); + c1.rgb *= depthAtten; + c2.rgb *= depthAtten; + c3.rgb *= depthAtten; + c4.rgb *= depthAtten; + float nearAtten = min(1.0, depth01 / _AFNearThreshold); + c1.rgb *= nearAtten; + c2.rgb *= nearAtten; + c3.rgb *= nearAtten; + c4.rgb *= nearAtten; + #endif + + #if BEAUTIFY_BLOOM_USE_LAYER || BEAUTIFY_BLOOM_USE_LAYER_INCLUSION + half included = Included(SAMPLE_TEXTURE2D_X(_BloomSourceDepth, sampler_LinearClamp, i.uv)); + c1.rgb *= included; + c2.rgb *= included; + c3.rgb *= included; + c4.rgb *= included; + #endif + + #if BEAUTIFY_ANAMORPHIC_FLARES_USE_LAYER || BEAUTIFY_ANAMORPHIC_FLARES_USE_LAYER_INCLUSION + half included = Included(SAMPLE_TEXTURE2D_X(_AFSourceDepth, sampler_LinearClamp, i.uv)); + c1.rgb *= included; + c2.rgb *= included; + c3.rgb *= included; + c4.rgb *= included; + #endif + + c1.a = Brightness(c1.rgb); + c2.a = Brightness(c2.rgb); + c3.a = Brightness(c3.rgb); + c4.a = Brightness(c4.rgb); + + half w1 = 1.0 / (c1.a + 1.0); + half w2 = 1.0 / (c2.a + 1.0); + half w3 = 1.0 / (c3.a + 1.0); + half w4 = 1.0 / (c4.a + 1.0); + + half dd = 1.0 / (w1 + w2 + w3 + w4); + c1 = (c1 * w1 + c2 * w2 + c3 * w3 + c4 * w4) * dd; + + #if UNITY_COLORSPACE_GAMMA + c1.rgb = GAMMA_TO_LINEAR(c1.rgb); + #endif + + #if !defined(USE_AF_THRESHOLD) + c1.rgb = lerp(c1.rgb, c1.a * _BloomTint.rgb, _BloomTint.a); + #endif + c1.rgb = ColorAboveThreshold(c1.rgb, c1.a); + + return c1; + } + + float4 FragBloomCompose (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + float4 b0 = SAMPLE_TEXTURE2D_X( _BloomTex , sampler_LinearClamp, i.uv ); + float4 b1 = SAMPLE_TEXTURE2D_X( _BloomTex1 , sampler_LinearClamp, i.uv ); + float4 b2 = SAMPLE_TEXTURE2D_X( _BloomTex2 , sampler_LinearClamp, i.uv ); + float4 b3 = SAMPLE_TEXTURE2D_X( _BloomTex3 , sampler_LinearClamp, i.uv ); + float4 b4 = SAMPLE_TEXTURE2D_X( _BloomTex4 , sampler_LinearClamp, i.uv ); + float4 b5 = SAMPLE_TEXTURE2D_X( _MainTex , sampler_LinearClamp, i.uv ); + b0.rgb *= _BloomTint0; + b1.rgb *= _BloomTint1; + b2.rgb *= _BloomTint2; + b3.rgb *= _BloomTint3; + b4.rgb *= _BloomTint4; + b5.rgb *= _BloomTint5; + float4 pixel = b0 * _BloomWeights.x + b1 * _BloomWeights.y + b2 * _BloomWeights.z + b3 * _BloomWeights.w + b4 * _BloomWeights2.x + b5 * _BloomWeights2.y; + //pixel.rgb = lerp(pixel.rgb, Brightness(pixel.rgb) * _BloomTint.rgb, _BloomTint.a); + return pixel; + } + + inline float4 Lerp3(float4 a, float4 b, float4 c, float t) { + if (t <= 0.5) { + return lerp(a, b, t * 2.0); + } else { + return lerp(b, c, t * 2.0 - 1.0); + } + } + + float4 FragResample(VaryingsCross i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + BEAUTIFY_FRAG_SETUP_CROSS_UV(i) + + float4 c1 = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv1); + float4 c2 = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv2); + float4 c3 = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv3); + float4 c4 = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv4); + + float w1 = 1.0 / (c1.a + 1.0); + float w2 = 1.0 / (c2.a + 1.0); + float w3 = 1.0 / (c3.a + 1.0); + float w4 = 1.0 / (c4.a + 1.0); + + float dd = 1.0 / (w1 + w2 + w3 + w4); + float4 v = (c1 * w1 + c2 * w2 + c3 * w3 + c4 * w4) * dd; + #if defined(COMBINE_BLOOM) + float4 o = SAMPLE_TEXTURE2D_X(_BloomTex, sampler_LinearClamp, i.uv); + v = Lerp3(o, o+v, v, _BloomSpread); + #endif + return v; + } + + float4 FragResampleAF(VaryingsCross i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + BEAUTIFY_FRAG_SETUP_CROSS_UV(i) + + float4 c1 = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv1); + float4 c2 = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv2); + float4 c3 = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv3); + float4 c4 = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv4); + + float w1 = 1.0 / (c1.a + 1.0); + float w2 = 1.0 / (c2.a + 1.0); + float w3 = 1.0 / (c3.a + 1.0); + float w4 = 1.0 / (c4.a + 1.0); + + float dd = 1.0 / (w1 + w2 + w3 + w4); + float4 v = (c1 * w1 + c2 * w2 + c3 * w3 + c4 * w4) * dd; + v.rgb = lerp(v.rgb, Brightness(c1.rgb) * _AFTint.rgb, _AFTint.a); + v.rgb *= _AFData.xxx; + + #if defined(COMBINE_BLOOM) + float4 o = SAMPLE_TEXTURE2D_X(_BloomTex, sampler_LinearClamp, i.uv); + v += o; + #endif + + return v; + } + + + float4 FragCombine(VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + float4 c1 = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv); + float4 c2 = SAMPLE_TEXTURE2D_X(_CombineTex, sampler_LinearClamp, i.uv); + return c1 + c2; + } + + + float4 FragDebugBloom (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + return SAMPLE_TEXTURE2D_X(_BloomTex, sampler_LinearClamp, i.uv) * _Bloom.xxxx; + } + + + float4 FragDebugBloomExclusionLayer (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + float depth = BEAUTIFY_GET_CUSTOM_DEPTH_01(_BloomSourceDepth, i.uv); + return float4(depth.xxx, 1.0); + } + + float4 FragDebugAnamorphicFlaresExclusionLayer (VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + float depth = BEAUTIFY_GET_CUSTOM_DEPTH_01(_AFSourceDepth, i.uv); + return float4(depth.xxx, 1.0); + } + + float4 FragResampleFastAF(VaryingsSimple i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + float4 c = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv); + c.rgb = lerp(c.rgb, Brightness(c.rgb) * _AFTint.rgb, _AFTint.a); + c.rgb *= _AFData.xxx; + return c; + } + + VaryingsCross VertBlur(AttributesSimple v) { + VaryingsCross o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.positionCS = v.positionOS; + o.positionCS.y *= _ProjectionParams.x * _FlipY; + o.uv = v.uv; + BEAUTIFY_VERTEX_OUTPUT_GAUSSIAN_UV(o) + + return o; + } + + float4 FragBlur (VaryingsCross i): SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + BEAUTIFY_FRAG_SETUP_GAUSSIAN_UV(i) + + float4 pixel = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv) * 0.2270270270 + + (SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv1) + SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv2)) * 0.3162162162 + + (SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv3) + SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv4)) * 0.0702702703; + return pixel; + } + +#endif \ No newline at end of file diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSLum.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSLum.hlsl.meta new file mode 100644 index 00000000..7ca7d8a5 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSLum.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 5dc8cdd18d3c6470e91404ae4fab3163 +timeCreated: 1518001072 +licenseType: Pro +ShaderImporter: + externalObjects: {} + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSOutline.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSOutline.hlsl new file mode 100644 index 00000000..453c4de7 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSOutline.hlsl @@ -0,0 +1,205 @@ +#ifndef BEAUTIFY_PPSOUTLINE +#define BEAUTIFY_PPSOUTLINE + // Copyright 2016-2021 Ramiro Oliva (Kronnect) - All Rights Reserved. + + #include "BeautifyCommon.hlsl" + + TEXTURE2D_X(_MainTex); + float4 _MainTex_TexelSize; + float4 _MainTex_ST; + + TEXTURE2D_X_FLOAT(_OutlineDepth); + TEXTURE2D_X_FLOAT(_OutlineObjectId); + + float4 _Outline; + #define OUTLINE_EDGE_THRESHOLD _Outline.a + + float4 _OutlineData; + #define OUTLINE_INTENSITY_MULTIPLIER _OutlineData.x + #define OUTLINE_DISTANCE_FADE _OutlineData.y + #define OUTLINE_MIN_DEPTH_THRESHOLD _OutlineData.z + #define OUTLINE_MIN_SATURATION_THRESHOLD _OutlineData.w + + half _BlurScale; + #define OUTLINE_MIN_SEPARATION _OutlineData.z + + struct VaryingsOutline { + float4 positionCS : SV_POSITION; + float2 uv: TEXCOORD0; + UNITY_VERTEX_OUTPUT_STEREO + }; + + struct VaryingsCross { + float4 positionCS : SV_POSITION; + float2 uv: TEXCOORD0; + BEAUTIFY_VERTEX_CROSS_UV_DATA + UNITY_VERTEX_OUTPUT_STEREO + }; + + + VaryingsOutline VertOutline(AttributesSimple input) { + VaryingsOutline output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + output.positionCS = input.positionOS; + output.positionCS.y *= _ProjectionParams.x * _FlipY; + output.uv = input.uv; + return output; + } + + float OutlinePass(VaryingsOutline i) { + + float3 uvInc = float3(_MainTex_TexelSize.x, _MainTex_TexelSize.y, 0); + + #if BEAUTIFY_DEPTH_FADE || !BEAUTIFY_OUTLINE_SOBEL + #if BEAUTIFY_OUTLINE_CUSTOM_DEPTH || BEAUTIFY_OUTLINE_OBJECT_ID + float depth = BEAUTIFY_GET_CUSTOM_DEPTH_01(_OutlineDepth, i.uv); + float sceneDepth = BEAUTIFY_GET_SCENE_DEPTH_01(i.uv); + if (sceneDepth < depth * 0.999) return 0; + #else + float depth = BEAUTIFY_GET_SCENE_DEPTH_01(i.uv); + if (depth >= 1.0) return 0; + #endif + #endif + + float outline = 0; + + #if BEAUTIFY_OUTLINE_OBJECT_ID && !BEAUTIFY_OUTLINE_SOBEL + float objS = SAMPLE_TEXTURE2D_X(_OutlineObjectId, sampler_PointClamp, i.uv - uvInc.zy).x; + float objN = SAMPLE_TEXTURE2D_X(_OutlineObjectId, sampler_PointClamp, i.uv + uvInc.zy).x; + float objW = SAMPLE_TEXTURE2D_X(_OutlineObjectId, sampler_PointClamp, i.uv - uvInc.xz).x; + float objE = SAMPLE_TEXTURE2D_X(_OutlineObjectId, sampler_PointClamp, i.uv + uvInc.xz).x; + float maxObj = max( max(objS, objN), max(objW, objE) ); + float minObj = min( min(objS, objN), min(objW, objE) ); + float objDiff = maxObj - minObj; + outline = objDiff > 0.01; + + #if BEAUTIFY_OUTLINE_OUTER_ONLY + float depthN = BEAUTIFY_GET_CUSTOM_DEPTH_01(_OutlineDepth, i.uv + uvInc.zy); + float depthS = BEAUTIFY_GET_CUSTOM_DEPTH_01(_OutlineDepth, i.uv - uvInc.zy); + float depthW = BEAUTIFY_GET_CUSTOM_DEPTH_01(_OutlineDepth, i.uv - uvInc.xz); + float depthE = BEAUTIFY_GET_CUSTOM_DEPTH_01(_OutlineDepth, i.uv + uvInc.xz); + + float objM = SAMPLE_TEXTURE2D_X(_OutlineObjectId, sampler_PointClamp, i.uv).x; + if ( (depth < depthN && abs(objN - objM) > 0.01) || + (depth < depthS && abs(objS - objM) > 0.01) || + (depth < depthW && abs(objW - objM) > 0.01) || + (depth < depthE && abs(objE - objM) > 0.01)) + outline = 0; + #endif + + // check object is big enough + #if BEAUTIFY_OUTLINE_MIN_SEPARATION + uvInc *= OUTLINE_MIN_SEPARATION; + float objS2 = SAMPLE_TEXTURE2D_X(_OutlineObjectId, sampler_PointClamp, i.uv - uvInc.zy).x; + float objN2 = SAMPLE_TEXTURE2D_X(_OutlineObjectId, sampler_PointClamp, i.uv + uvInc.zy).x; + if (abs(objN2 - objN) > 0.01 && abs(objS2 - objS) > 0.01) outline *= 0.25 / OUTLINE_INTENSITY_MULTIPLIER; + float objW2 = SAMPLE_TEXTURE2D_X(_OutlineObjectId, sampler_PointClamp, i.uv - uvInc.xz).x; + float objE2 = SAMPLE_TEXTURE2D_X(_OutlineObjectId, sampler_PointClamp, i.uv + uvInc.xz).x; + if (abs(objE2 - objE) > 0.01 && abs(objW2 - objW) > 0.01) outline *= 0.25 / OUTLINE_INTENSITY_MULTIPLIER; + #endif + + #else + float3 rgbS = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv - uvInc.zy).rgb; + float3 rgbN = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv + uvInc.zy).rgb; + float3 rgbW = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv - uvInc.xz).rgb; + float3 rgbE = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv + uvInc.xz).rgb; + + #if BEAUTIFY_OUTLINE_CUSTOM_DEPTH || !BEAUTIFY_OUTLINE_SOBEL + #if BEAUTIFY_OUTLINE_CUSTOM_DEPTH + float depthS = BEAUTIFY_GET_CUSTOM_DEPTH_01(_OutlineDepth, i.uv - uvInc.zy); + float depthW = BEAUTIFY_GET_CUSTOM_DEPTH_01(_OutlineDepth, i.uv - uvInc.xz); + float depthE = BEAUTIFY_GET_CUSTOM_DEPTH_01(_OutlineDepth, i.uv + uvInc.xz); + float depthN = BEAUTIFY_GET_CUSTOM_DEPTH_01(_OutlineDepth, i.uv + uvInc.zy); + #else + float depthS = BEAUTIFY_GET_SCENE_DEPTH_01(i.uv - uvInc.zy); + float depthW = BEAUTIFY_GET_SCENE_DEPTH_01(i.uv - uvInc.xz); + float depthE = BEAUTIFY_GET_SCENE_DEPTH_01(i.uv + uvInc.xz); + float depthN = BEAUTIFY_GET_SCENE_DEPTH_01(i.uv + uvInc.zy); + #endif + float maxDepth = max(depth, max(max(depthS, depthN), max(depthW, depthE))); + float minDepth = min(depth, min(min(depthS, depthN), min(depthW, depthE))); + float depthDiff = maxDepth - minDepth; + float3 normalNW = getNormal(depth, depthN, depthW, uvInc.zy, float2(-uvInc.x, -uvInc.z)); + float3 normalSE = getNormal(depth, depthS, depthE, -uvInc.zy, uvInc.xz); + float dnorm = dot(normalNW, normalSE); + float satN = getSaturation(rgbN); + float satS = getSaturation(rgbS); + float satW = getSaturation(rgbW); + float satE = getSaturation(rgbE); + float maxSat = max( max(satN, satS), max(satW, satE) ); + float minSat = min( min(satN, satS), min(satW, satE) ); + float dSat = maxSat - minSat; + outline = dSat > OUTLINE_MIN_SATURATION_THRESHOLD && dnorm < OUTLINE_EDGE_THRESHOLD && depthDiff > OUTLINE_MIN_DEPTH_THRESHOLD; + #else + float3 rgbSW = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv - uvInc.xy).rgb; + float3 rgbNE = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv + uvInc.xy).rgb; + float3 rgbSE = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv + float2( uvInc.x, -uvInc.y)).rgb; + float3 rgbNW = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv + float2(-uvInc.x, uvInc.y)).rgb; + float3 gx = rgbSW * -1.0; + gx += rgbSE * 1.0; + gx += rgbW * -2.0; + gx += rgbE * 2.0; + gx += rgbNW * -1.0; + gx += rgbNE * 1.0; + float3 gy = rgbSW * -1.0; + gy += rgbS * -2.0; + gy += rgbSE * -1.0; + gy += rgbNW * 1.0; + gy += rgbN * 2.0; + gy += rgbNE * 1.0; + outline = (length(gx * gx + gy * gy) - _Outline.a) > 0.0; + #endif + #endif + + #if BEAUTIFY_DEPTH_FADE + float factor = max(0, (OUTLINE_DISTANCE_FADE - depth) / OUTLINE_DISTANCE_FADE); + outline *= factor; + #endif + + return outline; + } + + float4 fragOutline (VaryingsOutline i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + float outline = OutlinePass(i); + return outline; + } + + + VaryingsCross VertBlur(AttributesSimple v) { + VaryingsCross o; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + + o.positionCS = v.positionOS; + o.positionCS.y *= _ProjectionParams.x * _FlipY; + o.uv = v.uv; + BEAUTIFY_VERTEX_OUTPUT_GAUSSIAN_UV(o) + + return o; + } + + half4 FragBlur (VaryingsCross i): SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + BEAUTIFY_FRAG_SETUP_GAUSSIAN_UV(i) + + half4 pixel = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv) * 0.2270270270 + + (SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv1) + SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv2)) * 0.3162162162 + + (SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv3) + SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uv4)) * 0.0702702703; + return pixel; + } + + half4 FragCopy (VaryingsSimple i): SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + half outline = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv).r; + half4 color = half4(_Outline.rgb, _Outline.a * outline); + color *= OUTLINE_INTENSITY_MULTIPLIER; + color.a = saturate(color.a); + return color; + } + +#endif \ No newline at end of file diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSOutline.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSOutline.hlsl.meta new file mode 100644 index 00000000..926e9f61 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSOutline.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c704640fa1801475a870ff4fc5e06b86 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSSF.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSSF.hlsl new file mode 100644 index 00000000..f8cac6f7 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSSF.hlsl @@ -0,0 +1,196 @@ +#ifndef BEAUTIFY_PPSSF_FX +#define BEAUTIFY_PPSSF_FX + + // Copyright 2020-2021 Kronnect - All Rights Reserved. + #include "BeautifyCommon.hlsl" + + TEXTURE2D_X(_MainTex); + TEXTURE2D(_FlareTex); + TEXTURE2D(_OcclusionTex); + + float4 _MainTex_ST; + float4 _MainTex_TexelSize; + float4 _SunPos; + float3 _SunDir; + float4 _SunData; // x = sunIntensity, y = disk size, z = ray difraction, w = ray difraction amount + float4 _SunCoronaRays1; // x = length, y = streaks, z = spread, w = angle offset + float4 _SunCoronaRays2; // x = length, y = streaks, z = spread, w = angle offset + float4 _SunGhosts1; // x = reserved, y = size, 2 = pos offset, 3 = brightness + float4 _SunGhosts2; // x = reserved, y = size, 2 = pos offset, 3 = brightness + float4 _SunGhosts3; // x = reserved, y = size, 2 = pos offset, 3 = brightness + float4 _SunGhosts4; // x = reserved, y = size, 2 = pos offset, 3 = brightness + float3 _SunHalo; // x = offset, y = amplitude, z = intensity + float4 _SunTint; + float _SunFlaresAspectRatio; + float _SunOcclusionThreshold; + #define SUN_TINT_COLOR _SunTint.rgb + #define OCCLUSION_SPEED _SunTint.a + #define OCCLUSION_THRESHOLD _SunOcclusionThreshold + + struct VaryingsSF { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + float2 sunPos : TEXCOORD1; + UNITY_VERTEX_OUTPUT_STEREO + }; + + VaryingsSF VertSF(AttributesSimple input) { + VaryingsSF output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + output.positionCS = input.positionOS; + output.positionCS.y *= _ProjectionParams.x * _FlipY; + output.uv = input.uv.xy; + + float4 clipPos = TransformWorldToHClip(_WorldSpaceCameraPos.xyz - _SunDir.xyz * 1000.0); + float2 sunPos = float2(clipPos.x, clipPos.y * _ProjectionParams.x) * 0.5 / clipPos.w + 0.5; + output.sunPos = sunPos; + + return output; + } + + void rotate(inout float2 uv, float ang) { + float2 sico; + sincos(ang, sico.x, sico.y); + float2 cosi = float2(sico.y, -sico.x); + uv = float2(dot(cosi, uv), dot(sico, uv)); + } + + float3 sunflare(VaryingsSF input) { + + // general params + float2 uv = input.uv; + float2 sunPos = input.sunPos; + + #if BEAUTIFY_SF_OCCLUSION_SIMPLE + float depth = BEAUTIFY_GET_SCENE_DEPTH_01(sunPos); + if (depth < 1.0) return 0; + const float occlusion = 1.0; + #elif BEAUTIFY_SF_OCCLUSION_SMOOTH + float occlusion = SAMPLE_TEXTURE2D(_OcclusionTex, sampler_LinearRepeat, float2(0,0)).r; + if (occlusion <= 0.02) return 0.0.xxx; + #else + const float occlusion = 1.0; + #endif + + float2 grd = uv - sunPos; + float aspectRatio = _SunFlaresAspectRatio; + grd.y *= aspectRatio; + float len = length(grd); + + // sun disk + float s0 = pow( 1.0 + saturate(_SunData.y - len), 75) - 1.0; + + // corona rays + float gang = _SunPos.w; //atan2(0.5 - sunPos.y, sunPos.x - 0.5); + float ang = atan2(grd.y, grd.x) + gang; + float ray1 = _SunCoronaRays1.z + abs(_SunCoronaRays1.x * cos(_SunCoronaRays1.w + ang * _SunCoronaRays1.y)); // design + ray1 *= pow( 1.0 + len, 1.0/_SunCoronaRays1.x); + s0 += 1.0 / ray1; + + float ray2 = _SunCoronaRays2.z + abs(_SunCoronaRays2.x * sin(_SunCoronaRays2.w + ang * _SunCoronaRays2.y)); // design + ray2 *= pow( 1.0 + len, 1.0/_SunCoronaRays2.x); + s0 += 1.0 / ray2; + + s0 *= _SunData.x; + + float3 flare = s0.xxx; + + #if BEAUTIFY_SF_USE_GHOSTS // defined(UNITY_SINGLE_PASS_STEREO) && !defined(UNITY_STEREO_INSTANCING_ENABLED) && !defined(UNITY_STEREO_MULTIVIEW_ENABLED) + // ghosts circular (not compatible with XR due to how projection works) + + float2 ghost1Pos = 1.0 - sunPos; + grd = uv - ghost1Pos + (ghost1Pos - 0.5) * _SunGhosts1.z; + grd.y *= aspectRatio; + + float g0 = saturate(_SunGhosts1.y / length(grd)); + g0 = pow(g0, 12); + flare += g0 * _SunGhosts1.w / len; + + float2 ghost2Pos = 1.0 - sunPos; + grd = uv - ghost2Pos + (ghost2Pos - 0.5) * _SunGhosts2.z; + grd.y *= aspectRatio; + g0 = saturate(_SunGhosts2.y / length(grd)); + g0 = pow(g0, 12); + flare += g0 * _SunGhosts2.w / len; + + float2 ghost3Pos = 1.0 - sunPos; + grd = uv - ghost3Pos + (ghost3Pos - 0.5) * _SunGhosts3.z; + grd.y *= aspectRatio; + g0 = saturate(_SunGhosts3.y / length(grd)); + g0 = pow(g0, 12); + flare += g0 * _SunGhosts3.w / len; + + float2 ghost4Pos = 1.0 - sunPos; + grd = uv - ghost4Pos + (ghost4Pos - 0.5) * _SunGhosts4.z; + grd.y *= aspectRatio; + g0 = saturate(_SunGhosts4.y / length(grd)); + g0 = pow(g0, 12); + flare += g0 * _SunGhosts4.w / len; + + #endif + + // light rays + float2 uv2 = uv - sunPos; + float clen = length(uv2); + rotate(uv2, gang); + uv2.x *= aspectRatio; + uv2.x *= 0.1; + uv2 /= len; + float lr = saturate(SAMPLE_TEXTURE2D(_FlareTex, sampler_LinearRepeat, uv2 + _SunPos.zz).r - _SunData.w); + float3 rays = lr * sin(float3(len, len + 0.1, len + 0.2) * 3.1415927); + float atten = pow(1.0 + clen, 13.0); + rays *= _SunData.z / atten; + flare += rays; + + // halo + float hlen = clamp( (len - _SunHalo.x) * _SunHalo.y, 0, 3.1415927); + float3 halo = pow(sin(float3(hlen, hlen + 0.1, hlen + 0.2)), 12.0.xxx); + halo *= _SunHalo.z / atten; + flare += halo; + + return max(0, flare * SUN_TINT_COLOR * occlusion); + } + + float4 FragSF (VaryingsSF i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + //i.uv = UnityStereoTransformScreenSpaceTex(i.uv); + + return float4(sunflare(i), 1.0); + } + + float4 FragSFAdditive (VaryingsSF i) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); + float2 stereoUV = UnityStereoTransformScreenSpaceTex(i.uv); + + float4 p = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, stereoUV); + return p + float4(sunflare(i), 1.0); + } + + float GetDepth(float2 sunPos, float2 offset) { + float2 pos = saturate(sunPos + offset * _MainTex_TexelSize.xy); + return BEAUTIFY_GET_SCENE_DEPTH_01(pos); + } + + float OcclusionTest(float2 sunPos) { + + float depth1 = GetDepth(sunPos, float2(-1, -1)); + float depth2 = GetDepth(sunPos, float2( 1, 1)); + float depth3 = GetDepth(sunPos, float2( 3, 3)); + float depth4 = GetDepth(sunPos, float2(-3, -3)); + float occlusion = (depth1 + depth2 + depth3 + depth4) * 0.25; + occlusion *= step(OCCLUSION_THRESHOLD, occlusion); + return occlusion; + } + + float4 FragSFOcclusion (VaryingsSF input) : SV_Target { + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + float occlusion = OcclusionTest(input.sunPos); + #if BEAUTIFY_SF_OCCLUSION_INIT + return float4(occlusion, occlusion, occlusion, 1.0); + #else + return float4(occlusion, occlusion, occlusion, unity_DeltaTime.x * OCCLUSION_SPEED); + #endif + } + +#endif \ No newline at end of file diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSSF.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSSF.hlsl.meta new file mode 100644 index 00000000..fee16985 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/BeautifyPPSSF.hlsl.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: d16ac644481a94c35a79383d0def48aa +timeCreated: 1518007506 +licenseType: Pro +ShaderImporter: + externalObjects: {} + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnly.shader b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnly.shader new file mode 100644 index 00000000..0450f92f --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnly.shader @@ -0,0 +1,81 @@ +Shader "Hidden/Beautify2/DepthOnly" +{ + Properties + { + [MainTexture] _BaseMap ("Texture", 2D) = "white" {} + [MainColor] _BaseColor("Color", Color) = (1, 1, 1, 1) + _Cutoff("AlphaCutout", Range(0.0, 1.0)) = 0.5 + } + SubShader + { + ColorMask 0 + ZWrite On + Cull [_Cull] + + Pass + { + Name "Beautify DepthOnly Pass" + HLSLPROGRAM + #pragma target 4.5 + #pragma vertex UnlitPassVertex + #pragma fragment UnlitPassFragment + #pragma multi_compile_local _ DEPTH_PREPASS_ALPHA_TEST + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_BaseMap); + SAMPLER(sampler_BaseMap); + + #if DEPTH_PREPASS_ALPHA_TEST + CBUFFER_START(UnityPerMaterial) + half _Cutoff; + float4 _BaseMap_ST; + CBUFFER_END + + #ifdef UNITY_DOTS_INSTANCING_ENABLED + UNITY_DOTS_INSTANCING_START(MaterialPropertyMetadata) + UNITY_DOTS_INSTANCED_PROP(float, _Cutoff) + UNITY_DOTS_INSTANCED_PROP(float4, _BaseMap_ST) + UNITY_DOTS_INSTANCING_END(MaterialPropertyMetadata) + #define _Cutoff UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(float, _Cutoff) + #define _BaseMap_ST UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(float4, _BaseMap_ST) + #endif + #endif + + #include "DepthOnly_Include.hlsl" + + ENDHLSL + } + + + Pass + { + Name "Beautify DepthOnly Pass" // for older GPUs with no DOTs instancing + HLSLPROGRAM + #pragma target 2.0 + #pragma vertex UnlitPassVertex + #pragma fragment UnlitPassFragment + #pragma multi_compile_local _ DEPTH_PREPASS_ALPHA_TEST + #pragma multi_compile_instancing + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_BaseMap); + SAMPLER(sampler_BaseMap); + + #if DEPTH_PREPASS_ALPHA_TEST + CBUFFER_START(UnityPerMaterial) + half _Cutoff; + float4 _BaseMap_ST; + CBUFFER_END + #endif + + #include "DepthOnly_Include.hlsl" + + ENDHLSL + } + + } +} diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnly.shader.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnly.shader.meta new file mode 100644 index 00000000..a87f22e7 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnly.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 13944f5ed1ab543b29d359ce4fedcb7c +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyAlphaTest.shader b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyAlphaTest.shader new file mode 100644 index 00000000..8ab01285 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyAlphaTest.shader @@ -0,0 +1,74 @@ +Shader "Hidden/Beautify2/DepthOnlyAlphaTest" +{ + Properties + { + [MainTexture] _BaseMap ("Texture", 2D) = "white" {} + [MainColor] _BaseColor("Color", Color) = (1, 1, 1, 1) + _Cutoff("AlphaCutout", Range(0.0, 1.0)) = 0.5 + } + SubShader + { + ColorMask 0 + ZWrite On + Cull Back + + Pass + { + Name "Beautify DepthOnly Alpha Test Pass" + HLSLPROGRAM + #pragma target 4.5 + #pragma vertex UnlitPassVertex + #pragma fragment UnlitPassFragment + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + half _OutlineCutOff; + + TEXTURE2D(_BaseMap); + SAMPLER(sampler_BaseMap); + + CBUFFER_START(UnityPerMaterial) + float4 _BaseMap_ST; + CBUFFER_END + + #ifdef UNITY_DOTS_INSTANCING_ENABLED + UNITY_DOTS_INSTANCING_START(MaterialPropertyMetadata) + UNITY_DOTS_INSTANCED_PROP(float4, _BaseMap_ST) + UNITY_DOTS_INSTANCING_END(MaterialPropertyMetadata) + #define _BaseMap_ST UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(float4, _BaseMap_ST) + #endif + + #include "DepthOnlyAlphaTest_Include.hlsl" + + ENDHLSL + } + + + Pass + { + Name "Beautify DepthOnly Alpha Test Pass" // for older GPUs with no DOTs instancing + HLSLPROGRAM + #pragma target 2.0 + #pragma vertex UnlitPassVertex + #pragma fragment UnlitPassFragment + #pragma multi_compile_instancing + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + half _OutlineCutOff; + + TEXTURE2D(_BaseMap); + SAMPLER(sampler_BaseMap); + + CBUFFER_START(UnityPerMaterial) + float4 _BaseMap_ST; + CBUFFER_END + + #include "DepthOnlyAlphaTest_Include.hlsl" + + ENDHLSL + } + } +} diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyAlphaTest.shader.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyAlphaTest.shader.meta new file mode 100644 index 00000000..17db9a15 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyAlphaTest.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: d04252e5ea700488f9d1adcccbda3af3 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyAlphaTest_Include.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyAlphaTest_Include.hlsl new file mode 100644 index 00000000..d368dcee --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyAlphaTest_Include.hlsl @@ -0,0 +1,45 @@ +struct Attributes +{ + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID +}; + +struct Varyings +{ + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO +}; + +Varyings UnlitPassVertex(Attributes input) +{ + Varyings output = (Varyings)0; + + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); + + output.positionCS = vertexInput.positionCS; + output.uv = TRANSFORM_TEX(input.uv, _BaseMap); + + return output; +} + +void UnlitPassFragment( + Varyings input + , out half4 outColor : SV_Target0 +) +{ + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + half4 color = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, input.uv); + clip(color.a - _OutlineCutOff); + + outColor = 0; + +} diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyAlphaTest_Include.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyAlphaTest_Include.hlsl.meta new file mode 100644 index 00000000..bce26fe1 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyAlphaTest_Include.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 727d7e57de2fc475b9665ec321327224 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectId.shader b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectId.shader new file mode 100644 index 00000000..38bbcc78 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectId.shader @@ -0,0 +1,79 @@ +Shader "Hidden/Beautify2/DepthOnlyWithObjectId" +{ + Properties + { + [MainTexture] _BaseMap ("Texture", 2D) = "white" {} + [MainColor] _BaseColor("Color", Color) = (1, 1, 1, 1) + _Cutoff("AlphaCutout", Range(0.0, 1.0)) = 0.5 + } + SubShader + { + ZWrite On + Cull [_Cull] + + Pass + { + Name "Beautify DepthOnly With ObjectId Pass" + HLSLPROGRAM + #pragma target 4.5 + #pragma vertex UnlitPassVertex + #pragma fragment UnlitPassFragment + #pragma multi_compile_local _ DEPTH_PREPASS_ALPHA_TEST + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_BaseMap); + SAMPLER(sampler_BaseMap); + + #if DEPTH_PREPASS_ALPHA_TEST + CBUFFER_START(UnityPerMaterial) + half _Cutoff; + float4 _BaseMap_ST; + CBUFFER_END + + #ifdef UNITY_DOTS_INSTANCING_ENABLED + UNITY_DOTS_INSTANCING_START(MaterialPropertyMetadata) + UNITY_DOTS_INSTANCED_PROP(float, _Cutoff) + UNITY_DOTS_INSTANCED_PROP(float4, _BaseMap_ST) + UNITY_DOTS_INSTANCING_END(MaterialPropertyMetadata) + #define _Cutoff UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(float, _Cutoff) + #define _BaseMap_ST UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(float4, _BaseMap_ST) + #endif + + #endif + + #include "DepthOnlyWithObjectId_Include.hlsl" + + ENDHLSL + } + + Pass + { + Name "Beautify DepthOnly With ObjectId Pass" + HLSLPROGRAM + #pragma target 2.0 + #pragma vertex UnlitPassVertex + #pragma fragment UnlitPassFragment + #pragma multi_compile_local _ DEPTH_PREPASS_ALPHA_TEST + #pragma multi_compile_instancing + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + TEXTURE2D(_BaseMap); + SAMPLER(sampler_BaseMap); + + #if DEPTH_PREPASS_ALPHA_TEST + CBUFFER_START(UnityPerMaterial) + half _Cutoff; + float4 _BaseMap_ST; + CBUFFER_END + #endif + + #include "DepthOnlyWithObjectId_Include.hlsl" + + ENDHLSL + } + } +} diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectId.shader.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectId.shader.meta new file mode 100644 index 00000000..bb9d605b --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectId.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 9d0c093c7389d4312af43ddc63c2fa3f +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectIdAlphaTest.shader b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectIdAlphaTest.shader new file mode 100644 index 00000000..5ef51bfb --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectIdAlphaTest.shader @@ -0,0 +1,71 @@ +Shader "Hidden/Beautify2/DepthOnlyWithObjectIdAlphaTest" +{ + Properties + { + [MainTexture] _BaseMap ("Texture", 2D) = "white" {} + [MainColor] _BaseColor("Color", Color) = (1, 1, 1, 1) + } + SubShader + { + ZWrite On + Cull Back + + Pass + { + Name "Beautify DepthOnly With ObjectId Alpha Test Pass" + HLSLPROGRAM + #pragma target 4.5 + #pragma vertex UnlitPassVertex + #pragma fragment UnlitPassFragment + #pragma multi_compile _ DOTS_INSTANCING_ON + #pragma multi_compile_instancing + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + half _OutlineCutOff; + + TEXTURE2D(_BaseMap); + SAMPLER(sampler_BaseMap); + + CBUFFER_START(UnityPerMaterial) + float4 _BaseMap_ST; + CBUFFER_END + + #ifdef UNITY_DOTS_INSTANCING_ENABLED + UNITY_DOTS_INSTANCING_START(MaterialPropertyMetadata) + UNITY_DOTS_INSTANCED_PROP(float4, _BaseMap_ST) + UNITY_DOTS_INSTANCING_END(MaterialPropertyMetadata) + #define _BaseMap_ST UNITY_ACCESS_DOTS_INSTANCED_PROP_WITH_DEFAULT(float4, _BaseMap_ST) + #endif + + #include "DepthOnlyWithObjectIdAlphaTest_Include.hlsl" + + ENDHLSL + } + + Pass + { + Name "Beautify DepthOnly With ObjectId Alpha Test Pass" // for older GPUs with no DOTs instancing + HLSLPROGRAM + #pragma target 2.0 + #pragma vertex UnlitPassVertex + #pragma fragment UnlitPassFragment + #pragma multi_compile_instancing + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + + half _OutlineCutOff; + + TEXTURE2D(_BaseMap); + SAMPLER(sampler_BaseMap); + + CBUFFER_START(UnityPerMaterial) + float4 _BaseMap_ST; + CBUFFER_END + + #include "DepthOnlyWithObjectIdAlphaTest_Include.hlsl" + + ENDHLSL + } + } +} diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectIdAlphaTest.shader.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectIdAlphaTest.shader.meta new file mode 100644 index 00000000..18a52c85 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectIdAlphaTest.shader.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1801c4e234eee4d99a8226b9cab3c01b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + preprocessorOverride: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectIdAlphaTest_Include.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectIdAlphaTest_Include.hlsl new file mode 100644 index 00000000..858d9a5a --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectIdAlphaTest_Include.hlsl @@ -0,0 +1,53 @@ + +struct Attributes +{ + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID +}; + +struct Varyings +{ + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + float objectId : TEXCOORD1; + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO +}; + +Varyings UnlitPassVertex(Attributes input) +{ + Varyings output = (Varyings)0; + + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); + + output.positionCS = vertexInput.positionCS; + output.uv = TRANSFORM_TEX(input.uv, _BaseMap); + + VertexPositionInputs vertexInput0 = GetVertexPositionInputs(float3(1,1,1)); + + float3 posWS0 = TransformObjectToWorld(float3(0,0,0)); + float objectId = dot(vertexInput0.positionWS, 1); + output.objectId = objectId; + + return output; +} + +void UnlitPassFragment( + Varyings input + , out half4 outColor : SV_Target0 +) +{ + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + half4 color = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, input.uv); + clip(color.a - _OutlineCutOff); + + outColor = input.objectId; +} diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectIdAlphaTest_Include.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectIdAlphaTest_Include.hlsl.meta new file mode 100644 index 00000000..0f6e1f03 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectIdAlphaTest_Include.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 437cd803475ec42389edc2d7ba7b85e1 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectId_Include.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectId_Include.hlsl new file mode 100644 index 00000000..31115d87 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectId_Include.hlsl @@ -0,0 +1,61 @@ + +struct Attributes +{ + float4 positionOS : POSITION; + #if DEPTH_PREPASS_ALPHA_TEST + float2 uv : TEXCOORD0; + #endif + UNITY_VERTEX_INPUT_INSTANCE_ID +}; + +struct Varyings +{ + float4 positionCS : SV_POSITION; + + #if DEPTH_PREPASS_ALPHA_TEST + float2 uv : TEXCOORD0; + #endif + + float objectId : TEXCOORD1; + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO +}; + +Varyings UnlitPassVertex(Attributes input) +{ + Varyings output = (Varyings)0; + + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); + + output.positionCS = vertexInput.positionCS; + #if DEPTH_PREPASS_ALPHA_TEST + output.uv = TRANSFORM_TEX(input.uv, _BaseMap); + #endif + + VertexPositionInputs vertexInput0 = GetVertexPositionInputs(float3(1,1,1)); + float objectId = dot(vertexInput0.positionWS, 1); + output.objectId = objectId; + + return output; +} + +void UnlitPassFragment( + Varyings input + , out half4 outColor : SV_Target0 +) +{ + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + #if DEPTH_PREPASS_ALPHA_TEST + half4 color = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, input.uv); + clip(color.a - _Cutoff); + #endif + + outColor = input.objectId; +} diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectId_Include.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectId_Include.hlsl.meta new file mode 100644 index 00000000..2f285311 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnlyWithObjectId_Include.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 348330f64a84643f889321b73f3bb033 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnly_Include.hlsl b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnly_Include.hlsl new file mode 100644 index 00000000..53bb55db --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnly_Include.hlsl @@ -0,0 +1,58 @@ + +struct Attributes +{ + float4 positionOS : POSITION; + #if DEPTH_PREPASS_ALPHA_TEST + float2 uv : TEXCOORD0; + #endif + UNITY_VERTEX_INPUT_INSTANCE_ID +}; + +struct Varyings +{ + float4 positionCS : SV_POSITION; + + #if DEPTH_PREPASS_ALPHA_TEST + float2 uv : TEXCOORD0; + #endif + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO +}; + +Varyings UnlitPassVertex(Attributes input) +{ + Varyings output = (Varyings)0; + + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz); + + output.positionCS = vertexInput.positionCS; + #if DEPTH_PREPASS_ALPHA_TEST + output.uv = TRANSFORM_TEX(input.uv, _BaseMap); + #endif + + return output; +} + +void UnlitPassFragment( + Varyings input + , out half4 outColor : SV_Target0 +) +{ + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + #if DEPTH_PREPASS_ALPHA_TEST + half4 color = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, input.uv); + clip(color.a - _Cutoff); + #endif + + outColor = 0; + +} + + \ No newline at end of file diff --git a/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnly_Include.hlsl.meta b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnly_Include.hlsl.meta new file mode 100644 index 00000000..22545d60 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Shaders/DepthOnly_Include.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 92428f66f0cce4f1e8d7d818ace6bd0a +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Textures.meta b/Imports/Beautify/URP/Runtime/Resources/Textures.meta new file mode 100644 index 00000000..9833c9e6 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Textures.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 104bea161954b4873b346db4701a45a2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Textures/blueNoise.png b/Imports/Beautify/URP/Runtime/Resources/Textures/blueNoise.png new file mode 100644 index 00000000..79067588 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Textures/blueNoise.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efc2ec76689cc5c879cfed35c541120f30039eacc799a37edb5e419355e0bc60 +size 4196 diff --git a/Imports/Beautify/URP/Runtime/Resources/Textures/blueNoise.png.meta b/Imports/Beautify/URP/Runtime/Resources/Textures/blueNoise.png.meta new file mode 100644 index 00000000..cf421cef --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Textures/blueNoise.png.meta @@ -0,0 +1,147 @@ +fileFormatVersion: 2 +guid: e6a467a4c71a24898ac842ed6f9a1d52 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + 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: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + 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: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Textures/flareNoise.png b/Imports/Beautify/URP/Runtime/Resources/Textures/flareNoise.png new file mode 100644 index 00000000..f327c4da --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Textures/flareNoise.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60e8071f02eccf80da3dc0a44c303d7e0bb567bdadd388190f276265bc7f4aa3 +size 47083 diff --git a/Imports/Beautify/URP/Runtime/Resources/Textures/flareNoise.png.meta b/Imports/Beautify/URP/Runtime/Resources/Textures/flareNoise.png.meta new file mode 100644 index 00000000..42d72927 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Textures/flareNoise.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 93092410bbc6f4ccba773578db5832d9 +timeCreated: 1488661131 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/URP/Runtime/Resources/Textures/lensDirt.png b/Imports/Beautify/URP/Runtime/Resources/Textures/lensDirt.png new file mode 100644 index 00000000..f56cce02 --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Textures/lensDirt.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63fb35c8c904efd605a748c842ff9d9016329fc7e7710257ae292dcbc9b5693c +size 473839 diff --git a/Imports/Beautify/URP/Runtime/Resources/Textures/lensDirt.png.meta b/Imports/Beautify/URP/Runtime/Resources/Textures/lensDirt.png.meta new file mode 100644 index 00000000..af5ddb3d --- /dev/null +++ b/Imports/Beautify/URP/Runtime/Resources/Textures/lensDirt.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 0bd567658bec947d2b4d2877ccb0faa7 +timeCreated: 1532083478 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + 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} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Imports/Beautify/_README FIRST!.txt b/Imports/Beautify/_README FIRST!.txt new file mode 100644 index 00000000..9615f604 --- /dev/null +++ b/Imports/Beautify/_README FIRST!.txt @@ -0,0 +1,18 @@ +Welcome! +This asset contains 2 versions of Beautify. Please use the appropriate package according to the rendering pipeline of your project: + +** Builtin Pipeline version ** + Import package from /BuiltIn folder and add Beautify script to your camera. That's all! + IMPORTANT: always read documentation for detailed instructions. + +** Universal Rendering Pipeline (URP) version ** + Import package from /URP folder and follow the instructions in the Documentation folder. + Here's a video tutorial for setup: https://youtu.be/6fpeiysj6KM + + +Questions / Suggestions / Support +--------------------------------- +* Support: https://kronnect.com +* Twitter: @Kronnect +* Email (non support): contact@kronnect.com + diff --git a/Imports/Beautify/_README FIRST!.txt.meta b/Imports/Beautify/_README FIRST!.txt.meta new file mode 100644 index 00000000..b0549e23 --- /dev/null +++ b/Imports/Beautify/_README FIRST!.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 74262f015013d482bbf4b0ee2b6aad41 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Sources/Shaders/Beautify.cginc b/Sources/Shaders/Beautify.cginc deleted file mode 100644 index c1c0eb10..00000000 --- a/Sources/Shaders/Beautify.cginc +++ /dev/null @@ -1,491 +0,0 @@ - // Copyright 2016-2020 Ramiro Oliva (Kronnect) - All Rights Reserved. - - #include "UnityCG.cginc" - #include "BeautifyAdvancedParams.cginc" - #include "BeautifyOrtho.cginc" - #if defined(BEAUTIFY_ACES_FITTED) - #include "BeautifyACESFitted.cginc" - #define tmoFilmicACES ACESFitted - #endif - - UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex); - UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); - uniform sampler2D _OverlayTex; - UNITY_DECLARE_SCREENSPACE_TEXTURE(_ScreenLum); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_BloomTex); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_EALumSrc); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_EAHist); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_CompareTex); - uniform sampler2D _LUTTex; - - uniform float4 _MainTex_TexelSize; - uniform float4 _MainTex_ST; - uniform float4 _BloomTex_TexelSize; - uniform float4 _ColorBoost; // x = Brightness, y = Contrast, z = Saturate, w = Daltonize; - uniform float4 _Sharpen; - uniform float4 _Dither; - uniform float4 _FXColor; - uniform float4 _TintColor; - uniform float4 _Outline; - uniform float4 _Dirt; // x = brightness based, y = intensity, z = threshold, w = bloom contribution - uniform float4 _Bloom; - uniform float4 _CompareParams; - uniform float _SharpenDepthFallOff; - - #if BEAUTIFY_VIGNETTING || BEAUTIFY_VIGNETTING_MASK - uniform float4 _Vignetting; - uniform float _VignettingAspectRatio; - uniform sampler2D _VignettingMask; - #endif - - #if BEAUTIFY_FRAME || BEAUTIFY_FRAME_MASK - uniform float4 _Frame; - uniform sampler2D _FrameMask; - #endif - - uniform float4 _BokehData; - uniform float4 _BokehData2; - uniform float4 _EyeAdaptation; - uniform float3 _Purkinje; - - #if BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT || BEAUTIFY_DEPTH_OF_FIELD - UNITY_DECLARE_SCREENSPACE_TEXTURE(_DoFTex); - uniform float4 _DoFTex_TexelSize; - #endif - #if BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT - uniform sampler2D _DepthTexture; - uniform sampler2D _DofExclusionTexture; - #endif - - #if defined(BEAUTIFY_EDGE_AA) - uniform float2 _AntialiasData; - #endif - - struct appdata { - float4 vertex : POSITION; - float2 texcoord : TEXCOORD0; - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - struct v2f { - float4 pos : SV_POSITION; - float2 uv: TEXCOORD0; - float4 depthUV : TEXCOORD1; - #if BEAUTIFY_DIRT || BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT || BEAUTIFY_VIGNETTING || BEAUTIFY_VIGNETTING_MASK || BEAUTIFY_FRAME || BEAUTIFY_FRAME_MASK - float2 uvNonStereo: TEXCOORD2; - #endif - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - struct v2fCompare { - float4 pos : SV_POSITION; - float2 uv: TEXCOORD0; - float2 uvNonStereo: TEXCOORD1; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - struct v2fCross { - float4 pos : SV_POSITION; - float2 uv: TEXCOORD0; - float2 uv1: TEXCOORD1; - float2 uv2: TEXCOORD2; - float2 uv3: TEXCOORD3; - float2 uv4: TEXCOORD4; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - v2fCompare vertCompare(appdata v) { - v2fCompare o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - o.uvNonStereo = v.texcoord; - return o; - } - - - v2fCross vertCross(appdata v) { - v2fCross o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - float3 offsets = _MainTex_TexelSize.xyx * half3(1.75,1.75,0); - #if UNITY_SINGLE_PASS_STEREO - offsets.x *= 2.0; - #endif - o.uv1 = UnityStereoScreenSpaceUVAdjust(v.texcoord - offsets.zy, _MainTex_ST); - o.uv2 = UnityStereoScreenSpaceUVAdjust(v.texcoord - offsets.xz, _MainTex_ST); - o.uv3 = UnityStereoScreenSpaceUVAdjust(v.texcoord + offsets.xz, _MainTex_ST); - o.uv4 = UnityStereoScreenSpaceUVAdjust(v.texcoord + offsets.zy, _MainTex_ST); - return o; - } - - v2f vert(appdata v) { - v2f o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - o.depthUV = float4(o.uv, 0, 0); - #if BEAUTIFY_DIRT || BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT || BEAUTIFY_VIGNETTING || BEAUTIFY_VIGNETTING_MASK || BEAUTIFY_FRAME || BEAUTIFY_FRAME_MASK - o.uvNonStereo = v.texcoord; - #endif - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) { - // Depth texture is inverted WRT the main texture - o.depthUV.y = 1.0 - o.depthUV.y; - #if BEAUTIFY_DIRT || BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT || BEAUTIFY_VIGNETTING || BEAUTIFY_VIGNETTING_MASK || BEAUTIFY_FRAME || BEAUTIFY_FRAME_MASK - o.uvNonStereo.y = 1.0 - o.uvNonStereo.y; - #endif - } - #endif - return o; - } - - inline float getLuma(float3 rgb) { - const float3 lum = float3(0.299, 0.587, 0.114); - return dot(rgb, lum); - } - - float3 getNormal(float depth, float depth1, float depth2, float2 offset1, float2 offset2) { - float3 p1 = float3(offset1, depth1 - depth); - float3 p2 = float3(offset2, depth2 - depth); - float3 normal = cross(p1, p2); - return normalize(normal); - } - - float getRandom(float2 uv) { - return frac(sin(_Time.y + dot(uv, float2(12.9898, 78.233)))* 43758.5453); - } - - - - float getCoc(v2f i) { - #if BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT - float depthTex = DecodeFloatRGBA(tex2Dlod(_DepthTexture, float4(i.uvNonStereo, 0, 0))); - float exclusionDepth = DecodeFloatRGBA(tex2Dlod(_DofExclusionTexture, float4(i.uvNonStereo, 0, 0))); - //float depth = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(SAMPLE_RAW_DEPTH_TEXTURE_LOD(_CameraDepthTexture, i.depthUV))); - float depth = Linear01Depth(BEAUTIFY_DEPTH_LOD(_CameraDepthTexture, i.depthUV)); - depth = min(depth, depthTex); - if (exclusionDepth < depth) return 0; - depth *= _ProjectionParams.z; - #else - //float depth = BEAUTIFY_GET_DEPTH_EYE(UNITY_SAMPLE_DEPTH(SAMPLE_RAW_DEPTH_TEXTURE_LOD(_CameraDepthTexture, i.depthUV))); - float depth = LinearEyeDepth(BEAUTIFY_DEPTH_LOD(_CameraDepthTexture, i.depthUV)); - #endif - float xd = abs(depth - _BokehData.x) - _BokehData2.x * (depth < _BokehData.x); - return 0.5 * _BokehData.y * xd/depth; // radius of CoC - } - - #if !defined(BEAUTIFY_ACES_FITTED) - inline float3 tmoFilmicACES(float3 x) { - const float A = 2.51; - const float B = 0.03; - const float C = 2.43; - const float D = 0.59; - const float E = 0.14; - return (x * (A * x + B) ) / (x * (C * x + D) + E); - } - #endif - - void beautifyPass(v2f i, inout float3 rgbM) { - - float3 uvInc = float3(_MainTex_TexelSize.x, _MainTex_TexelSize.y, 0); - float depthS = Linear01Depth(BEAUTIFY_DEPTH_LOD(_CameraDepthTexture, i.depthUV - uvInc.zyzz)); - float depthW = Linear01Depth(BEAUTIFY_DEPTH_LOD(_CameraDepthTexture, i.depthUV - uvInc.xzzz)); - float depthE = Linear01Depth(BEAUTIFY_DEPTH_LOD(_CameraDepthTexture, i.depthUV + uvInc.xzzz)); - float depthN = Linear01Depth(BEAUTIFY_DEPTH_LOD(_CameraDepthTexture, i.depthUV + uvInc.zyzz)); - float lumaM = getLuma(rgbM); - - #if !BEAUTIFY_NIGHT_VISION && !BEAUTIFY_THERMAL_VISION - #if !defined(BEAUTIFY_DITHER_FINAL) && defined(BEAUTIFY_ENABLE_DITHER) - float3 dither = dot(float2(171.0, 231.0), i.uv * _ScreenParams.xy).xxx; - dither = frac(dither / float3(103.0, 71.0, 97.0)) - 0.5.xxx; - rgbM *= 1.0 + step(_Dither.y, depthW) * _Dither.x * dither; - #endif - - #if BEAUTIFY_DALTONIZE - float3 rgb0 = 1.0.xxx - saturate(rgbM.rgb); - rgbM.r *= 1.0 + rgbM.r * rgb0.g * rgb0.b * _ColorBoost.w; - rgbM.g *= 1.0 + rgbM.g * rgb0.r * rgb0.b * _ColorBoost.w; - rgbM.b *= 1.0 + rgbM.b * rgb0.r * rgb0.g * _ColorBoost.w; - rgbM *= lumaM / (getLuma(rgbM) + 0.0001); - #endif - - float maxDepth = max(depthN, depthS); - maxDepth = max(maxDepth, depthW); - maxDepth = max(maxDepth, depthE); - float minDepth = min(depthN, depthS); - minDepth = min(minDepth, depthW); - minDepth = min(minDepth, depthE); - float dDepth = maxDepth - minDepth + 0.00001; - - float lumaDepth = saturate(_Sharpen.y / dDepth); - float3 rgbS = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv - uvInc.zy).rgb; - float3 rgbW = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv - uvInc.xz).rgb; - float3 rgbE = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv + uvInc.xz).rgb; - float3 rgbN = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv + uvInc.zy).rgb; - - float lumaN = getLuma(rgbN); - float lumaE = getLuma(rgbE); - float lumaW = getLuma(rgbW); - float lumaS = getLuma(rgbS); - - float maxLuma = max(lumaN,lumaS); - maxLuma = max(maxLuma, lumaW); - maxLuma = max(maxLuma, lumaE); - float minLuma = min(lumaN,lumaS); - minLuma = min(minLuma, lumaW); - minLuma = min(minLuma, lumaE) - 0.000001; - float lumaPower = 2.0 * lumaM - minLuma - maxLuma; - float lumaAtten = saturate(_Sharpen.w / (maxLuma - minLuma)); - - #if defined(BEAUTIFY_EDGE_AA) - if (dDepth > _AntialiasData.y) { - float2 n = float2(lumaS - lumaN, lumaW - lumaE); - n *= _MainTex_TexelSize.xy * _AntialiasData.x; - float3 rgbA = 0.5 * (UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv + n * (1.0 / 3.0 - 0.5)).rgb + UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv + n * (2.0 / 3.0 - 0.5)).rgb); - float3 rgbB = rgbA * 0.5 + 0.25 * (UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv + n * (0.0 / 3.0 - 0.5)).rgb + UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv + n * (3.0 / 3.0 - 0.5)).rgb); - float lumaB = getLuma(rgbB); - if (lumaB < minLuma || lumaB > maxLuma) rgbM = rgbA; else rgbM = rgbB; - } - #endif - - #if defined(BEAUTIFY_DEPTH_BASED_SHARPEN) - float depthDist = _Dither.w / abs(depthW - _Dither.z); - float depthClamp = depthDist > 1.0; - depthClamp = max(depthClamp, saturate(_SharpenDepthFallOff * depthDist)); - #else - float depthClamp = 1.0; - #endif - - #if defined(BEAUTIFY_ENABLE_CORE_EFFECT) - rgbM *= 1.0 + clamp(lumaPower * lumaAtten * lumaDepth * _Sharpen.x, -_Sharpen.z, _Sharpen.z) * depthClamp; - #endif - - #if BEAUTIFY_DEPTH_OF_FIELD || BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT - float4 dofPix = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_DoFTex, i.uv); - #if UNITY_COLORSPACE_GAMMA - dofPix.rgb = LinearToGammaSpace(dofPix.rgb); - #endif - if (_DoFTex_TexelSize.z < _MainTex_TexelSize.z) { - float CoC = getCoc(i); - dofPix.a = lerp(CoC, dofPix.a, _DoFTex_TexelSize.z / _MainTex_TexelSize.z); - } - rgbM = lerp(rgbM, dofPix.rgb, saturate(dofPix.a)); - #endif - - #endif // night & thermal vision exclusion - - #if BEAUTIFY_NIGHT_VISION - //float depth = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(SAMPLE_RAW_DEPTH_TEXTURE_LOD(_CameraDepthTexture, i.depthUV))); - float depth = Linear01Depth(BEAUTIFY_DEPTH_LOD(_CameraDepthTexture, i.depthUV)); -// float3 normalNW = getNormal(depth, depthN, depthW, uvInc.zy, -uvInc.xz); // According to Unity QA this causes issues in Mali G71 GPU due to a hardware problem - float3 normalNW = getNormal(depth, depthN, depthW, uvInc.zy, float2(-uvInc.x, -uvInc.z)); - #endif - - #if BEAUTIFY_OUTLINE - #if !defined(BEAUTIFY_OUTLINE_SOBEL) - #if !BEAUTIFY_NIGHT_VISION - //float depth = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(SAMPLE_RAW_DEPTH_TEXTURE_LOD(_CameraDepthTexture, i.depthUV))); - float depth = Linear01Depth(BEAUTIFY_DEPTH_LOD(_CameraDepthTexture, i.depthUV)); - // float3 normalNW = getNormal(depth, depthN, depthW, uvInc.zy, -uvInc.xz); // According to Unity QA this causes issues in Mali G71 GPU due to a hardware problem - float3 normalNW = getNormal(depth, depthN, depthW, uvInc.zy, float2(-uvInc.x, -uvInc.z)); - #endif - float3 normalSE = getNormal(depth, depthS, depthE, -uvInc.zy, uvInc.xz); - float dnorm = dot(normalNW, normalSE); - rgbM = lerp(rgbM, _Outline.rgb, (float)(dnorm < _Outline.a)); - #else - float4 uv4 = float4(i.uv, 0, 0); - #if BEAUTIFY_NIGHT_VISION || BEAUTIFY_THERMAL_VISION - float3 rgbS = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 - uvInc.zyzz).rgb; - float3 rgbN = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 + uvInc.zyzz).rgb; - float3 rgbW = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 - uvInc.xzzz).rgb; - float3 rgbE = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 + uvInc.xzzz).rgb; - #endif - float3 rgbSW = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 - uvInc.xyzz).rgb; // was tex2Dlod - float3 rgbNE = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 + uvInc.xyzz).rgb; - float3 rgbSE = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 + float4( uvInc.x, -uvInc.y, 0, 0)).rgb; - float3 rgbNW = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 + float4(-uvInc.x, uvInc.y, 0, 0)).rgb; - float3 gx = rgbSW * -1.0; - gx += rgbSE * 1.0; - gx += rgbW * -2.0; - gx += rgbE * 2.0; - gx += rgbNW * -1.0; - gx += rgbNE * 1.0; - float3 gy = rgbSW * -1.0; - gy += rgbS * -2.0; - gy += rgbSE * -1.0; - gy += rgbNW * 1.0; - gy += rgbN * 2.0; - gy += rgbNE * 1.0; - float olColor = (length(gx * gx + gy * gy) - _Outline.a) > 0.0; - rgbM = lerp(rgbM, _Outline.rgb, olColor); - #endif - #endif - - #if UNITY_COLORSPACE_GAMMA - rgbM = GammaToLinearSpace(rgbM); - #endif - - #if BEAUTIFY_BLOOM - rgbM += UNITY_SAMPLE_SCREENSPACE_TEXTURE(_BloomTex, i.uv).rgb * _Bloom.xxx; - #endif - - #if BEAUTIFY_DIRT - float3 scrLum = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_ScreenLum, i.uv).rgb; - #if BEAUTIFY_BLOOM - scrLum *= _Dirt.www; - #endif - float4 dirt = tex2D(_OverlayTex, i.uvNonStereo); - rgbM += saturate(0.5.xxx - _Dirt.zzz + scrLum) * dirt.rgb * _Dirt.y; - #endif - - #if BEAUTIFY_NIGHT_VISION - lumaM = getLuma(rgbM); // updates luma - float nvbase = saturate(normalNW.z - 0.8); // minimum ambient self radiance (useful for pitch black) - nvbase += lumaM; // adds current lighting - nvbase *= nvbase * (0.5 + nvbase); // increase contrast - rgbM = nvbase * _FXColor.rgb; - rgbM *= frac(floor(i.uv.y*_ScreenParams.y)*0.25)>0.4; // scan lines - rgbM *= 1.0 + getRandom(i.uv) * 0.3 - 0.15; // noise - #endif - - #if BEAUTIFY_THERMAL_VISION - lumaM = getLuma(rgbM); // updates luma - float3 tv0 = lerp(float3(0.0,0.0,1.0), float3(1.0,1.0,0.0), lumaM * 2.0); - float3 tv1 = lerp(float3(1.0,1.0,0.0), float3(1.0,0.0,0.0), lumaM * 2.0 - 1.0); - rgbM = lerp(tv0, tv1, (float)(lumaM >= 0.5)); - rgbM *= 0.2 + frac(floor(i.uv.y*_ScreenParams.y)*0.25)>0.4; // scan lines - rgbM *= 1.0 + getRandom(i.uv) * 0.2 - 0.1; // noise - #endif - - #if BEAUTIFY_EYE_ADAPTATION || BEAUTIFY_PURKINJE - float4 avgLum = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_EAHist, 0.5.xx); - #endif - - #if BEAUTIFY_EYE_ADAPTATION - float srcLum = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_EALumSrc, 0.5.xx).r; - float diff = srcLum / (avgLum.r + 0.0001); - #if defined(BEAUTIFY_EYE_ADAPTATION_DYNAMIC_RANGE) - float pixLum = log(1.0 + getLuma(rgbM)); - diff = pow(pixLum / (avgLum.r + 0.0001), abs(diff-1.0)); - #endif - diff = clamp(diff, _EyeAdaptation.x, _EyeAdaptation.y); - rgbM = rgbM * diff; - #endif - - #if BEAUTIFY_TONEMAP_ACES - rgbM *= _ColorBoost.x; - rgbM = tmoFilmicACES(rgbM); - #endif - - #if UNITY_COLORSPACE_GAMMA - rgbM = LinearToGammaSpace(rgbM); - #endif - - #if defined(BEAUTIFY_USE_PROCEDURAL_SEPIA) - float3 sepia = float3( - dot(rgbM, float3(0.393, 0.769, 0.189)), - dot(rgbM, float3(0.349, 0.686, 0.168)), - dot(rgbM, float3(0.272, 0.534, 0.131)) - ); - rgbM = lerp(rgbM, sepia, _FXColor.a); - #elif BEAUTIFY_LUT - #if !UNITY_COLORSPACE_GAMMA - rgbM = LinearToGammaSpace(rgbM); - #endif - const float3 lutST = float3(1.0/1024, 1.0/32, 32-1); - float3 lookUp = saturate(rgbM) * lutST.zzz; - lookUp.xy = lutST.xy * (lookUp.xy + 0.5); - float slice = floor(lookUp.z); - lookUp.x += slice * lutST.y; - float2 lookUpNextSlice = float2(lookUp.x + lutST.y, lookUp.y); - float3 lut = lerp(tex2D(_LUTTex, lookUp.xy).rgb, tex2D(_LUTTex, lookUpNextSlice).rgb, lookUp.z - slice); - rgbM = lerp(rgbM, lut, _FXColor.a); - - #if !UNITY_COLORSPACE_GAMMA - rgbM = GammaToLinearSpace(rgbM); - #endif - - #endif - -#if defined(BEAUTIFY_ENABLE_COLOR_TWEAKS) - float maxComponent = max(rgbM.r, max(rgbM.g, rgbM.b)); - float minComponent = min(rgbM.r, min(rgbM.g, rgbM.b)); - float sat = saturate(maxComponent - minComponent); - rgbM *= 1.0 + _ColorBoost.z * (1.0 - sat) * (rgbM - getLuma(rgbM)); - rgbM = lerp(rgbM, rgbM * _TintColor.rgb, _TintColor.a); - rgbM = (rgbM - 0.5.xxx) * _ColorBoost.y + 0.5.xxx; - - #if !BEAUTIFY_TONEMAP_ACES - rgbM *= _ColorBoost.x; - #endif -#endif - - #if BEAUTIFY_PURKINJE - lumaM = getLuma(rgbM); - float3 shifted = saturate(float3(lumaM / (1.0 + _Purkinje.x * 1.14), lumaM, lumaM * (1.0 + _Purkinje.x * 2.99))); - rgbM = lerp(shifted, rgbM, saturate(exp(avgLum.g) - _Purkinje.y)); - #endif - -#if BEAUTIFY_VIGNETTING - float2 vd = float2(i.uvNonStereo.x - 0.5, (i.uvNonStereo.y - 0.5) * _VignettingAspectRatio); - rgbM = lerp(rgbM, lumaM * _Vignetting.rgb, saturate(_Purkinje.z + _Vignetting.a * dot(vd, vd))); -#elif BEAUTIFY_VIGNETTING_MASK - float2 vd = float2(i.uvNonStereo.x - 0.5, (i.uvNonStereo.y - 0.5) * _VignettingAspectRatio); - float vmask = tex2D(_VignettingMask, i.uvNonStereo).a; - rgbM = lerp(rgbM, lumaM * _Vignetting.rgb, saturate(_Purkinje.z + vmask * _Vignetting.a * dot(vd, vd))); -#endif - - #if BEAUTIFY_FRAME - rgbM = lerp(rgbM, _Frame.rgb, saturate( (max(abs(i.uvNonStereo.x - 0.5), abs(i.uvNonStereo.y - 0.5)) - _Frame.a) * 50.0)); - #elif BEAUTIFY_FRAME_MASK - float4 frameMask = tex2D(_FrameMask, i.uvNonStereo); - float3 frameColor = lerp(_Frame.rgb, frameMask.rgb * _Frame.rgb, frameMask.a); - rgbM = lerp(rgbM, frameColor, saturate( (max(abs(i.uvNonStereo.x - 0.5), abs(i.uvNonStereo.y - 0.5)) - _Frame.a) * 50.0)); - #endif - - #if !BEAUTIFY_NIGHT_VISION && !BEAUTIFY_THERMAL_VISION && defined(BEAUTIFY_DITHER_FINAL) && defined(BEAUTIFY_ENABLE_DITHER) - float3 dither = dot(float2(171.0, 231.0), i.uv * _ScreenParams.xy).xxx; - dither = frac(dither / float3(103.0, 71.0, 97.0)) - 0.5.xxx; - rgbM *= 1.0 + step(_Dither.y, depthW) * _Dither.x * dither; - #endif - } - - float4 fragBeautify (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - #if BEAUTIFY_THERMAL_VISION - i.uv.x += 0.0009 * sin(_Time.z + i.uv.y * 20.0) / (1.0 + 10.0 * dot(i.uv - 0.5.xx, i.uv.xy - 0.5.xx)); // wave animation - #endif - float4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - beautifyPass(i, pixel.rgb); - return pixel; - } - - float4 fragCompare (v2fCompare i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - // separator line + antialias - float2 dd = i.uvNonStereo - 0.5.xx; - float co = dot(_CompareParams.xy, dd); - float dist = distance( _CompareParams.xy * co, dd ); - float4 aa = saturate( (_CompareParams.w - dist) / abs(_MainTex_TexelSize.y) ); - - float4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - float4 pixelNice = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CompareTex, i.uv); - - // are we on the beautified side? - float t = dot(dd, _CompareParams.yz) > 0; - pixel = lerp(pixel, pixelNice, t); - return pixel + aa; - } diff --git a/Sources/Shaders/Beautify.shader b/Sources/Shaders/Beautify.shader deleted file mode 100644 index 477649aa..00000000 --- a/Sources/Shaders/Beautify.shader +++ /dev/null @@ -1,417 +0,0 @@ -Shader "Beautify/Beautify" { - Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _OverlayTex ("Overlay (RGB)", 2D) = "black" {} - //_DoFTex("DoF (RGBA)", 2D) = "black" {} - _DoFTex("DoF (RGBA)", any) = "black" {} - _Sharpen ("Sharpen Data", Vector) = (2.5, 0.035, 0.5) - _SharpenDepthFallOff("Sharpen Depth FallOff", Float) = 0 - _ColorBoost ("Color Boost Data", Vector) = (1.1, 1.1, 0.08, 0) - _Dither ("Dither Data", Vector) = (5, 0, 0, 1.0) - _FXColor ("FXColor Color", Color) = (1,1,1,0) - _TintColor ("Tint Color Color", Color) = (1,1,1,0) - _Vignetting ("Vignetting", Color) = (0.3,0.3,0.3,0.05) - _VignettingAspectRatio ("Vignetting Aspect Ratio", Float) = 1.0 - _VignettingMask ("Mask Texture (A)", 2D) = "white" {} - _Frame("Frame Data", Vector) = (50,50,50,0) - _FrameMask ("Mask Texture (A)", 2D) = "white" {} - _Outline("Outline", Color) = (0,0,0,0.8) - _Dirt("Dirt Data", Vector) = (0.5,0.5,0.5,0.5) - _Bloom("Bloom Data", Vector) = (0.5,0,0) - _BloomTex("BloomTex (RGBA)", any) = "black" {} - //_BloomTex("BloomTex (RGBA)", 2D) = "black" {} - _BloomWeights("Bloom Weights", Vector) = (0.35,0.55,0.7,0.8) - _BloomWeights2("Bloom Weights 2", Vector) = (0.35,0.55,0.7,0.8) - _ScreenLum("Luminance Tex (RGBA)", any) = "black" {} - //_ScreenLum("Luminance Tex (RGBA)", 2D) = "black" {} - _CompareParams("Compare Params", Vector) = (0.785398175, 0.001, 0, 0) - _AFTint ("Anamorphic Flares Tint", Color) = (1,1,1,0.5) - _BokehData("Bokeh Data", Vector) = (10,1,0,1) - _DepthTexture("Depth (RGBA)", 2D) = "black" {} - _DofExclusionTexture("DoF Exclusion (R)", 2D) = "white" {} - _BokehData2("Bokeh Data 2", Vector) = (1000.0, 4, 0, 0) - _BokehData3("Bokeh Data 3", Vector) = (1000.0, 100000.0, 0) - _EyeAdaptation("Eye Adaptation Data", Vector) = (0.1, 2, 0.7, 1) - _Purkinje ("Purkinje Data", Vector) = (1.0, 0.15, 0) - _BloomDepthTreshold("Bloom Depth Threshold", Float) = 1.0 - _FlareTex("Sun Flare texture", 2D) = "black" {} - _SunPos("SF Screen Position", Vector) = (0.5, 0.5, 0, 0) - _SunPosRightEye("SF Screen Position Right Eye", Vector) = (0.5, 0.5, 0, 0) - _SunData("SunFlares Sun Data", Vector) = (0.1, 0.05, 3.5, 0.13) - _SunCoronaRays1("SunFlares Corona Rays 1 Data", Vector) = (0.02, 12, 0.001, 0) - _SunCoronaRays2("SunFlares Corona Rays 2 Data", Vector) = (0.05, 12, 0.1, 0) - _SunGhosts1("SunFlares Ghosts 1 Data", Vector) = (0, 0.03, 0.6, 0.06) - _SunGhosts2("SunFlares Ghosts 2 Data", Vector) = (0, 0.1, 0.2, 0.03) - _SunGhosts3("SunFlares Ghosts 3 Data", Vector) = (0, 0.25, 0.4, 0.025) - _SunGhosts4("SunFlares Ghosts 4 Data", Vector) = (0, 0.5, 0.3, 0.04) - _SunTint("Sun Flare Tint Color", Color) = (1,1,1) - _SunHalo("SunFlares Halo Data", Vector) = (0.22, 15.1415, 1.0) - _CompareTex ("Compare Image (RGB)", any) = "black" {} -// _CompareTex ("Compare Image (RGB)", 2D) = "black" {} - _BlurScale ("Blur Scale", Float) = 1.0 - _LUTTex ("Lut Texture (RGB)", 2D) = "white" {} - _AntialiasData("Antialias Data", Vector) = (5, 0.001, 0) - } - -Subshader { - - Pass { // 0 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertCompare - #pragma fragment fragCompare - #pragma target 3.0 - #include "Beautify.cginc" - ENDCG - } - - Pass { // 1 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragBeautify - #pragma target 3.0 -// Edited by Shader Control: #pragma multi_compile __ BEAUTIFY_DALTONIZE BEAUTIFY_LUT BEAUTIFY_NIGHT_VISION BEAUTIFY_THERMAL_VISION -#pragma multi_compile __ BEAUTIFY_LUT -// Edited by Shader Control: #pragma multi_compile __ BEAUTIFY_DEPTH_OF_FIELD BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT -#pragma multi_compile __ BEAUTIFY_DEPTH_OF_FIELD -// Disabled by Shader Control: #pragma multi_compile __ BEAUTIFY_OUTLINE -// Disabled by Shader Control: #pragma multi_compile __ BEAUTIFY_DIRT -#pragma multi_compile __ BEAUTIFY_BLOOM -#pragma multi_compile __ BEAUTIFY_EYE_ADAPTATION -#pragma multi_compile __ BEAUTIFY_TONEMAP_ACES -// Disabled by Shader Control: #pragma multi_compile __ BEAUTIFY_PURKINJE -// Edited by Shader Control: #pragma multi_compile __ BEAUTIFY_VIGNETTING BEAUTIFY_VIGNETTING_MASK -#pragma multi_compile __ BEAUTIFY_VIGNETTING -// Disabled by Shader Control: #pragma multi_compile __ BEAUTIFY_FRAME BEAUTIFY_FRAME_MASK -#pragma multi_compile __ UNITY_COLORSPACE_GAMMA - - - #include "Beautify.cginc" - ENDCG - } - - Pass { // 2 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertLum - #pragma fragment fragLum - #pragma fragmentoption ARB_precision_hint_fastest -#pragma multi_compile __ BEAUTIFY_BLOOM_USE_DEPTH -#pragma multi_compile __ BEAUTIFY_BLOOM_USE_LAYER -#pragma multi_compile __ UNITY_COLORSPACE_GAMMA - #include "BeautifyLum.cginc" - ENDCG - } - - - Pass { // 3 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragDebugBloom - #pragma fragmentoption ARB_precision_hint_fastest - #include "BeautifyLum.cginc" - ENDCG - } - - Pass { // 4 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertBlurH - #pragma fragment fragBlur - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyLum.cginc" - ENDCG - } - - - Pass { // 5 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertBlurV - #pragma fragment fragBlur - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyLum.cginc" - ENDCG - } - - - Pass { // 6 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragBloomCompose - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyLum.cginc" - ENDCG - } - - Pass { // 7 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertCross - #pragma fragment fragResample - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyLum.cginc" - ENDCG - } - - Pass { // 8 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - Blend One One - - CGPROGRAM - #pragma vertex vertCross - #pragma fragment fragResample - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyLum.cginc" - ENDCG - } - - - Pass { // 9 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertCrossLum - #pragma fragment fragLumAntiflicker - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 -#pragma multi_compile __ BEAUTIFY_BLOOM_USE_DEPTH -#pragma multi_compile __ BEAUTIFY_BLOOM_USE_LAYER -#pragma multi_compile __ UNITY_COLORSPACE_GAMMA - #include "BeautifyLum.cginc" - ENDCG - } - - Pass { // 10 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - Blend One One - - CGPROGRAM - #pragma vertex vertCross - #pragma fragment fragResampleAF - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyLum.cginc" - ENDCG - } - - Pass { // 11 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - Blend One One - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragCopy - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyLum.cginc" - ENDCG - } - - Pass { // 12 DoF CoC - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragCoC - #pragma target 3.0 - #pragma fragmentoption ARB_precision_hint_fastest -// Disabled by Shader Control: #pragma multi_compile __ BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT -#pragma multi_compile __ UNITY_COLORSPACE_GAMMA - #include "BeautifyDoF.cginc" - ENDCG - } - - Pass { // 13 DoF CoC Debug - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragCoCDebug - #pragma target 3.0 - #pragma fragmentoption ARB_precision_hint_fastest -// Disabled by Shader Control: #pragma multi_compile __ BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT - #include "BeautifyDoF.cginc" - ENDCG - } - - Pass { // 14 DoF Blur - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragBlur - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyDoF.cginc" - ENDCG - } - - Pass { // 15 Compute Screen Lum - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragScreenLum - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 -#pragma multi_compile __ UNITY_COLORSPACE_GAMMA - #include "BeautifyEA.cginc" - ENDCG - } - - Pass { // 16 Reduce Screen Lum - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertCross - #pragma fragment fragReduceScreenLum - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyEA.cginc" - ENDCG - } - - Pass { // 17 Blend Screen Lum - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - Blend SrcAlpha OneMinusSrcAlpha - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragBlendScreenLum - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyEA.cginc" - ENDCG - } - - Pass { // 18 Simple Blend - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } -// Blend SrcAlpha OneMinusSrcAlpha - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragBlend - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyEA.cginc" - ENDCG - } - - Pass { // 19 DoF Blur wo/Bokeh - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragBlurNoBokeh - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyDoF.cginc" - ENDCG - } - - Pass { // 20 Sun Flares - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragSF - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifySF.cginc" - ENDCG - } - - Pass { // 21 Sun Flares Additive - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragSFAdditive - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifySF.cginc" - ENDCG - } - - Pass { // 22 Raw copy used in single blits with Single Pass Instanced - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragCopy - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyLum.cginc" - ENDCG - } - - -Pass { // 23 DoF Blur CoC - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertBlurH - #pragma fragment fragBlurCoC - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyDoF.cginc" - ENDCG - } - -Pass { // 24 DoF Blur CoC - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertBlurV - #pragma fragment fragBlurCoC - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyDoF.cginc" - ENDCG - } - - } -FallBack Off -} diff --git a/Sources/Shaders/BeautifyAdvancedParams.cginc b/Sources/Shaders/BeautifyAdvancedParams.cginc deleted file mode 100644 index b64655df..00000000 --- a/Sources/Shaders/BeautifyAdvancedParams.cginc +++ /dev/null @@ -1,42 +0,0 @@ -// Advanced customization parameters -// To prevent overusing multi_compile keywords, these options are exposed here as they're one-time toggles (meaning you won't be toggling them at runtime) -// Note that changes to this file will be lost when you update Beautify! Remember to revert this file to your preferences after updating. - -// Uncomment this one to support Orthographic Camera -//#define BEAUTIFY_ORTHO - -// Comment out this one to disable sharpen -#define BEAUTIFY_ENABLE_CORE_EFFECT - -// Comment out this one to apply sharpen regardless of depth -#define BEAUTIFY_DEPTH_BASED_SHARPEN - -// Comment out this one to disable brightness, contrast and vibrance effects -#define BEAUTIFY_ENABLE_COLOR_TWEAKS - -// Comment out this one to disable dithering. Can improve performance on old mobile devices. -#define BEAUTIFY_ENABLE_DITHER - -// Dither is applied at the end of stack. Comment out this line to apply dither at the start. -#define BEAUTIFY_DITHER_FINAL - -// Comment out this line to simplify eye adaptation to brightness increase/reduction (old method) -#define BEAUTIFY_EYE_ADAPTATION_DYNAMIC_RANGE - -// Uncomment this to enable occlusion on objects that do not have colliders -#define BEAUTIFY_SUN_FLARES_OCCLUSION_DEPTH - -// Uncomment this line to use an alternate ACES tonemap operator -//#define BEAUTIFY_ACES_FITTED - -// Uncomment this line to use a color-based edge detection algorithm instead of a depth based method. Useful for 2D projects. -//#define BEAUTIFY_OUTLINE_SOBEL - -// Uncomment this line to use a formula instead of Look-Up texture to produce Sepia effect -//#define BEAUTIFY_USE_PROCEDURAL_SEPIA - -// Uncomment this line to improve LUT transform in Best Performance mode -//#define BEAUTIFY_BETTER_FASTER_LUT - -// Uncomment this line to enable AntiAliasing -#define BEAUTIFY_EDGE_AA diff --git a/Sources/Shaders/BeautifyBasic.cginc b/Sources/Shaders/BeautifyBasic.cginc deleted file mode 100644 index 56cf1b74..00000000 --- a/Sources/Shaders/BeautifyBasic.cginc +++ /dev/null @@ -1,118 +0,0 @@ - // Copyright 2016-2019 Kronnect - All Rights Reserved. - - #include "UnityCG.cginc" - - UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_CompareTex); - - uniform float4 _MainTex_TexelSize; - uniform float4 _MainTex_ST; - uniform fixed4 _ColorBoost; // x = Brightness, y = Contrast, z = Saturate, w = Daltonize; - uniform fixed4 _Sharpen; - uniform float4 _CompareParams; - - struct appdata { - float4 vertex : POSITION; - float2 texcoord : TEXCOORD0; - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - struct v2f { - float4 pos : SV_POSITION; - float2 uv: TEXCOORD0; - float2 uvN: TEXCOORD1; - float2 uvS: TEXCOORD2; - float2 uvW: TEXCOORD3; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - struct v2fCompare { - float4 pos : SV_POSITION; - float2 uv: TEXCOORD0; - float2 uvNonStereo: TEXCOORD1; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - v2fCompare vertCompare(appdata v) { - v2fCompare o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - o.uvNonStereo = v.texcoord; - return o; - } - - v2f vert(appdata v) { - v2f o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - - float3 uvInc = float3(_MainTex_TexelSize.x, _MainTex_TexelSize.y, 0); - o.uvN = o.uv + uvInc.zy; - o.uvS = o.uv - uvInc.zy; - o.uvW = o.uv - uvInc.xz; - return o; - } - - inline fixed getLuma(fixed3 rgb) { - const fixed3 lum = fixed3(0.299, 0.587, 0.114); - return dot(rgb, lum); - } - - void beautifyPassFast(v2f i, inout fixed3 rgbM) { - fixed3 rgbN = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uvN).rgb; - fixed3 rgbS = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uvS).rgb; - fixed3 rgbW = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uvW).rgb; - fixed lumaM = getLuma(rgbM); - fixed lumaN = getLuma(rgbN); - fixed lumaW = getLuma(rgbW); - fixed lumaS = getLuma(rgbS); - fixed maxLuma = max(lumaN,lumaS); - maxLuma = max(maxLuma, lumaW); - fixed minLuma = min(lumaN,lumaS); - minLuma = min(minLuma, lumaW) - 0.000001; - fixed lumaPower = 2 * lumaM - minLuma - maxLuma; - fixed lumaAtten = saturate(_Sharpen.w / (maxLuma - minLuma)); - rgbM *= 1.0 + clamp(lumaPower * lumaAtten * _Sharpen.x, -_Sharpen.z, _Sharpen.z); - fixed3 maxComponent = max(rgbM.r, max(rgbM.g, rgbM.b)); - fixed3 minComponent = min(rgbM.r, min(rgbM.g, rgbM.b)); - fixed sat = saturate(maxComponent - minComponent); - rgbM *= 1.0 + _ColorBoost.z * (1.0 - sat) * (rgbM - getLuma(rgbM)); - rgbM = (rgbM - 0.5.xxx) * _ColorBoost.y + 0.5.xxx; - rgbM *= _ColorBoost.x; - } - - fixed4 fragBeautifyFast (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - fixed4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - beautifyPassFast(i, pixel.rgb); - return pixel; - } - - fixed4 fragCompareFast (v2fCompare i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - - // separator line + antialias - float2 dd = i.uvNonStereo - 0.5.xx; - float co = dot(_CompareParams.xy, dd); - float dist = distance( _CompareParams.xy * co, dd ); - float4 aa = saturate( (_CompareParams.w - dist) / abs(_MainTex_TexelSize.y) ); - - fixed4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - fixed4 pixelNice = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CompareTex, i.uv); - - // are we on the beautified side? - fixed t = dot(dd, _CompareParams.yz) > 0; - pixel = lerp(pixel, pixelNice, t); - return pixel + aa; - - } diff --git a/Sources/Shaders/BeautifyBasic.cginc.meta b/Sources/Shaders/BeautifyBasic.cginc.meta deleted file mode 100644 index 8b4fed94..00000000 --- a/Sources/Shaders/BeautifyBasic.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 0bc032bf4e7db40538b1f62e5ed2f7a4 -timeCreated: 1488292291 -licenseType: Free -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Sources/Shaders/BeautifyBasic.shader b/Sources/Shaders/BeautifyBasic.shader deleted file mode 100644 index 9b239ac8..00000000 --- a/Sources/Shaders/BeautifyBasic.shader +++ /dev/null @@ -1,38 +0,0 @@ -Shader "Beautify/BeautifyBasic" { - Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _Sharpen ("Sharpen Data", Vector) = (2.5, 0.035, 0.5) - _ColorBoost ("Color Boost Data", Vector) = (1.1, 1.1, 0.08, 0) - _CompareTex ("Compare Image (RGB)", 2D) = "black" {} - } - -Subshader { - - Pass { // 0 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertCompare - #pragma fragment fragCompareFast - #pragma fragmentoption ARB_precision_hint_fastest - #include "BeautifyBasic.cginc" - ENDCG - } - - Pass { // 1 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragBeautifyFast - #pragma fragmentoption ARB_precision_hint_fastest - #pragma multi_compile __ UNITY_COLORSPACE_GAMMA - #include "BeautifyBasic.cginc" - ENDCG - } - -} -FallBack Off -} diff --git a/Sources/Shaders/BeautifyBasic.shader.meta b/Sources/Shaders/BeautifyBasic.shader.meta deleted file mode 100644 index 8a5b2970..00000000 --- a/Sources/Shaders/BeautifyBasic.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 3f400c48e7682407493d7fa6766cf631 -timeCreated: 1465126706 -licenseType: Store -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Sources/Shaders/BeautifyDoF.cginc b/Sources/Shaders/BeautifyDoF.cginc deleted file mode 100644 index c2f1ca2c..00000000 --- a/Sources/Shaders/BeautifyDoF.cginc +++ /dev/null @@ -1,292 +0,0 @@ - // Copyright 2016-2019 Kronnect - All Rights Reserved. - - #include "UnityCG.cginc" - #include "BeautifyAdvancedParams.cginc" - #include "BeautifyOrtho.cginc" - - UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); - uniform sampler2D _DepthTexture; - uniform sampler2D _DofExclusionTexture; - UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex); - uniform float4 _MainTex_TexelSize; - uniform float4 _MainTex_ST; - uniform float4 _BokehData; - uniform float4 _BokehData2; - uniform float3 _BokehData3; - uniform float _BlurScale; - - struct appdata { - float4 vertex : POSITION; - float2 texcoord : TEXCOORD0; - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - struct v2f { - float4 pos : SV_POSITION; - float2 uv: TEXCOORD0; - float2 depthUV : TEXCOORD1; - float2 uvNonStereo: TEXCOORD2; - float2 uvNonStereoInv: TEXCOORD3; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - - struct v2fCross { - float4 pos : SV_POSITION; - float2 uv: TEXCOORD0; - float2 uv1: TEXCOORD1; - float2 uv2: TEXCOORD2; - float2 uv3: TEXCOORD3; - float2 uv4: TEXCOORD4; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - v2f vert(appdata v) { - v2f o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - o.uvNonStereo = v.texcoord; - o.uvNonStereoInv = v.texcoord; - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - o.depthUV = o.uv; - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) { - o.uv.y = 1.0 - o.uv.y; - o.uvNonStereoInv.y = 1.0 - o.uvNonStereoInv.y; - } - #endif - return o; - } - - float getCoc(v2f i) { - #if BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT - float depthTex = DecodeFloatRGBA(tex2Dlod(_DepthTexture, float4(i.uvNonStereo, 0, 0))); - float exclusionDepth = DecodeFloatRGBA(tex2Dlod(_DofExclusionTexture, float4(i.uvNonStereo, 0, 0))); - //float depth = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.depthUV))); - float depth = Linear01Depth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.depthUV)); - depth = min(depth, depthTex); - if (exclusionDepth < depth) return 0; - depth *= _ProjectionParams.z; - #else - //float depth = BEAUTIFY_GET_DEPTH_EYE(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.depthUV))); - float depth = LinearEyeDepth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.depthUV)); - #endif - if (depth>_BokehData3.y) return 0; - float xd = abs(depth - _BokehData.x) - _BokehData2.x * (depth < _BokehData.x); - return 0.5 * _BokehData.y * xd/depth; // radius of CoC - } - - float4 fragCoC (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - float4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - pixel = clamp(pixel, 0.0.xxxx, _BokehData3.xxxx); - #if UNITY_COLORSPACE_GAMMA - pixel.rgb = GammaToLinearSpace(pixel.rgb); - #endif - return float4(pixel.rgb, getCoc(i)); - } - - float4 fragCoCDebug (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - float4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - pixel = clamp(pixel, 0.0.xxxx, _BokehData3.xxxx); - float CoC = getCoc(i); - pixel.a = min(CoC, pixel.a); - return pixel.aaaa; - } - - float4 fragBlur (v2f i): SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - - float4 sum = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv ); - float samples = ceil(sum.a); - float4 dir = float4(_BokehData.zw * _MainTex_TexelSize.xy, 0, 0); - #if UNITY_SINGLE_PASS_STEREO - dir.x *= 2.0; - #endif - dir *= max(1.0, samples / _BokehData2.y); - float jitter = dot(float2(2.4084507, 3.2535211), i.uv * _MainTex_TexelSize.zw); - float2 disp0 = dir.xy * (frac(jitter) + 0.5); - float4 disp1 = float4(i.uvNonStereoInv + disp0, 0, 0); - float4 disp2 = float4(i.uvNonStereoInv - disp0, 0, 0); - float w = 1.0; - - const int sampleCount = (int)min(_BokehData2.y, samples); - UNITY_UNROLL - for (int k=1;k<16;k++) { - if (k k; - float bt1 = saturate(pixel1.a - k); - pixel1.rgb += _BokehData2.www * max(pixel1.rgb - _BokehData2.zzz, 0.0.xxx); - sum += pixel1 * bt1; - w += bt1; - disp1 += dir; - #if UNITY_SINGLE_PASS_STEREO - disp2.xy = saturate(disp2.xy); - float4 pixel2 = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, float4(UnityStereoScreenSpaceUVAdjust(disp2.xy, _MainTex_ST), 0, 0)); - #else - float4 pixel2 = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, disp2); - #endif -// float bt2 = pixel2.a > k; - float bt2 = saturate(pixel2.a - k); - pixel2.rgb += _BokehData2.www * max(pixel2.rgb - _BokehData2.zzz, 0.0.xxx); - sum += pixel2 * bt2; - w += bt2; - disp2 -= dir; - } - } - return sum / w; - } - - float4 fragBlurNoBokeh (v2f i): SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - - float4 sum = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv ); - float samples = ceil(sum.a); - float4 dir = float4(_BokehData.zw * _MainTex_TexelSize.xy, 0, 0); - #if UNITY_SINGLE_PASS_STEREO - dir.x *= 0.5; - #endif - dir *= max(1.0, samples / _BokehData2.y); - float jitter = dot(float2(2.4084507, 3.2535211), i.uv * _MainTex_TexelSize.zw); - float2 disp0 = dir.xy * (frac(jitter) + 0.5); - float4 disp1 = float4(i.uvNonStereoInv + disp0, 0, 0); - float4 disp2 = float4(i.uvNonStereoInv - disp0, 0, 0); - float w = 1.0; - - const int sampleCount = (int)min(_BokehData2.y, samples); - UNITY_UNROLL - for (int k=1;k<16;k++) { - if (k k; - float bt1 = saturate(pixel1.a - k); - sum += bt1 * pixel1; - w += bt1; - disp1 += dir; - #if UNITY_SINGLE_PASS_STEREO - float4 pixel2 = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, float4(UnityStereoScreenSpaceUVAdjust(disp2.xy, _MainTex_ST), 0, 0)); - #else - float4 pixel2 = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, disp2); - #endif -// float bt2 = pixel2.a > k; - float bt2 = saturate(pixel2.a - k); - sum += bt2 * pixel2; - w += bt2; - disp2 -= dir; - } - } - return sum / w; - } - - - - v2fCross vertBlurH(appdata v) { - v2fCross o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) { - o.uv.y = 1.0 - o.uv.y; - } - #endif - float2 inc = float2(_MainTex_TexelSize.x * 1.3846153846 * _BlurScale, 0); - -#if UNITY_SINGLE_PASS_STEREO - inc.x *= 2.0; -#endif - o.uv1 = UnityStereoScreenSpaceUVAdjust(v.texcoord - inc, _MainTex_ST); - o.uv2 = UnityStereoScreenSpaceUVAdjust(v.texcoord + inc, _MainTex_ST); - - float2 inc2 = float2(_MainTex_TexelSize.x * 3.2307692308 * _BlurScale, 0); - -#if UNITY_SINGLE_PASS_STEREO - inc2.x *= 2.0; -#endif - o.uv3 = UnityStereoScreenSpaceUVAdjust(v.texcoord - inc2, _MainTex_ST); - o.uv4 = UnityStereoScreenSpaceUVAdjust(v.texcoord + inc2, _MainTex_ST); - return o; - } - - - v2fCross vertBlurV(appdata v) { - v2fCross o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) { - o.uv.y = 1.0 - o.uv.y; - } - #endif - float2 inc = float2(0, _MainTex_TexelSize.y * 1.3846153846 * _BlurScale); - o.uv1 = UnityStereoScreenSpaceUVAdjust(v.texcoord - inc, _MainTex_ST); - o.uv2 = UnityStereoScreenSpaceUVAdjust(v.texcoord + inc, _MainTex_ST); - - float2 inc2 = float2(0, _MainTex_TexelSize.y * 3.2307692308 * _BlurScale); - o.uv3 = UnityStereoScreenSpaceUVAdjust(v.texcoord - inc2, _MainTex_ST); - o.uv4 = UnityStereoScreenSpaceUVAdjust(v.texcoord + inc2, _MainTex_ST); - return o; - } - - - float4 fragBlurCoC (v2fCross i): SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - //float depth = LinearEyeDepth(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.uv))); - //float depth1 = LinearEyeDepth(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.uv1))); - //float depth2 = LinearEyeDepth(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.uv2))); - //float depth3 = LinearEyeDepth(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.uv3))); - //float depth4 = LinearEyeDepth(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.uv4))); - float depth = LinearEyeDepth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.uv)); - float depth1 = LinearEyeDepth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.uv1)); - float depth2 = LinearEyeDepth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.uv2)); - float depth3 = LinearEyeDepth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.uv3)); - float depth4 = LinearEyeDepth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.uv4)); - - const float f = 10; - float w1 = saturate((depth - depth1)/f) * 0.3162162162; - float w2 = saturate((depth - depth2)/f) * 0.3162162162; - float w3 = saturate((depth - depth3)/f) * 0.0702702703; - float w4 = saturate((depth - depth4)/f) * 0.0702702703; - - float coc1 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1).a; - float coc2 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2).a; - float coc3 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3).a; - float coc4 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4).a; - - float w0 = 0.2270270270; - - half4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - - float coc = (pixel.a * w0 + coc1 * w1 + coc2 * w2 + coc3 * w3 + coc4 * w4) / (w0 + w1 + w2 + w3 + w4); - pixel.a = coc; - return pixel; - } - - - diff --git a/Sources/Shaders/BeautifyDoF.cginc.meta b/Sources/Shaders/BeautifyDoF.cginc.meta deleted file mode 100644 index cf7d5544..00000000 --- a/Sources/Shaders/BeautifyDoF.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 7e05eb685611f4798a1257f353e5f366 -timeCreated: 1476036848 -licenseType: Free -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Sources/Shaders/BeautifyEA.cginc b/Sources/Shaders/BeautifyEA.cginc deleted file mode 100644 index 9d3b43fd..00000000 --- a/Sources/Shaders/BeautifyEA.cginc +++ /dev/null @@ -1,104 +0,0 @@ - - #include "UnityCG.cginc" - - UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_EALumSrc); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_EAHist); - - uniform half4 _MainTex_TexelSize; - uniform half4 _MainTex_ST; - uniform half4 _EyeAdaptation; - - - struct appdata { - float4 vertex : POSITION; - half2 texcoord : TEXCOORD0; - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - struct v2f { - float4 pos : SV_POSITION; - half2 uv: TEXCOORD0; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - struct v2fCross { - float4 pos : SV_POSITION; - half2 uv1: TEXCOORD0; - half2 uv2: TEXCOORD1; - half2 uv3: TEXCOORD2; - half2 uv4: TEXCOORD3; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - v2f vert(appdata v) { - v2f o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - return o; - } - - v2fCross vertCross(appdata v) { - v2fCross o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - half3 offsets = _MainTex_TexelSize.xyy * half3(0.5, 0.5, 0); - #if UNITY_SINGLE_PASS_STEREO - offsets.xz *= 2.0; - #endif - o.uv1 = UnityStereoScreenSpaceUVAdjust(v.texcoord - offsets.xz, _MainTex_ST); - o.uv2 = UnityStereoScreenSpaceUVAdjust(v.texcoord - offsets.zy, _MainTex_ST); - o.uv3 = UnityStereoScreenSpaceUVAdjust(v.texcoord + offsets.xz, _MainTex_ST); - o.uv4 = UnityStereoScreenSpaceUVAdjust(v.texcoord + offsets.zy, _MainTex_ST); - return o; - } - - inline half getLuma(half3 rgb) { - const half3 lum = half3(0.299, 0.587, 0.114); - return dot(rgb, lum); - } - - half4 fragScreenLum (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - half4 c = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - #if UNITY_COLORSPACE_GAMMA - c.rgb = GammaToLinearSpace(c.rgb); - #endif - c.r = log(1.0 + getLuma(c.rgb)); - return c.rrrr; - } - - half4 fragReduceScreenLum (v2fCross i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - half4 c1 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1); - half4 c2 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2); - half4 c3 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3); - half4 c4 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4); - c1.g = max( c1.g, max( c2.g, max( c3.g, c4.g ))); - c1.r = (c1.r + c2.r + c3.r + c4.r) * 0.25; - return c1; - } - - half4 fragBlendScreenLum (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - half4 c = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, 0.5.xx); - half4 p = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_EAHist , 0.5.xx); - float speed = c.r < p.r ? _EyeAdaptation.z: _EyeAdaptation.w; - c.a = speed * unity_DeltaTime.x; - return c; - } - - half4 fragBlend (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - half4 c = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, 0.5.xx); - c.a = 1.0; - return c; - } - diff --git a/Sources/Shaders/BeautifyEA.cginc.meta b/Sources/Shaders/BeautifyEA.cginc.meta deleted file mode 100644 index 26a0b4ba..00000000 --- a/Sources/Shaders/BeautifyEA.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 871f58622181443c6abbcf766217c40d -timeCreated: 1478037772 -licenseType: Free -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Sources/Shaders/BeautifyLum.cginc b/Sources/Shaders/BeautifyLum.cginc deleted file mode 100644 index ce94ab71..00000000 --- a/Sources/Shaders/BeautifyLum.cginc +++ /dev/null @@ -1,462 +0,0 @@ - // Copyright 2016-2019 Kronnect - All Rights Reserved. - - #include "UnityCG.cginc" - #include "BeautifyAdvancedParams.cginc" - #include "BeautifyOrtho.cginc" - - UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_BloomTex); - half4 _BloomTex_TexelSize; - UNITY_DECLARE_SCREENSPACE_TEXTURE(_BloomTex1); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_BloomTex2); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_BloomTex3); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_BloomTex4); - half4 _MainTex_TexelSize; - half4 _MainTex_ST; - half4 _Bloom; - half4 _BloomWeights; - half4 _BloomWeights2; - half4 _AFTint; - half _BlurScale; - - #if BEAUTIFY_BLOOM_USE_DEPTH || BEAUTIFY_BLOOM_USE_LAYER - UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); - uniform half _BloomDepthTreshold; - #endif - - #if BEAUTIFY_BLOOM_USE_LAYER - uniform sampler2D _BloomSourceTex; - uniform sampler2D_float _BloomSourceDepth; - uniform sampler2D _BloomSourceTexRightEye; - uniform sampler2D_float _BloomSourceDepthRightEye; - uniform half _BloomLayerZBias; - #endif - - - struct appdata { - float4 vertex : POSITION; - half2 texcoord : TEXCOORD0; - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - struct v2f { - float4 pos : SV_POSITION; - half2 uv: TEXCOORD0; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - struct v2fCross { - float4 pos : SV_POSITION; - half2 uv: TEXCOORD0; - half2 uv1: TEXCOORD1; - half2 uv2: TEXCOORD2; - half2 uv3: TEXCOORD3; - half2 uv4: TEXCOORD4; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - struct v2fLum { - float4 pos : SV_POSITION; - half2 uv: TEXCOORD0; - #if BEAUTIFY_BLOOM_USE_DEPTH || BEAUTIFY_BLOOM_USE_LAYER - half2 depthUV: TEXCOORD1; - #endif - #if BEAUTIFY_BLOOM_USE_LAYER && UNITY_SINGLE_PASS_STEREO - half2 depthUVNonStereo: TEXCOORD2; - #endif - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - struct v2fCrossLum { - float4 pos : SV_POSITION; - half2 uv: TEXCOORD0; - half2 uv1: TEXCOORD1; - half2 uv2: TEXCOORD2; - half2 uv3: TEXCOORD3; - half2 uv4: TEXCOORD4; - #if BEAUTIFY_BLOOM_USE_DEPTH || BEAUTIFY_BLOOM_USE_LAYER - half2 depthUV: TEXCOORD5; - #endif - #if BEAUTIFY_BLOOM_USE_LAYER && UNITY_SINGLE_PASS_STEREO - half2 depthUVNonStereo: TEXCOORD6; - #endif - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - v2f vert(appdata v) { - v2f o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) { - // Depth texture is inverted WRT the main texture - o.uv.y = 1.0 - o.uv.y; - } - #endif - return o; - } - - v2fLum vertLum(appdata v) { - v2fLum o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - - #if BEAUTIFY_BLOOM_USE_LAYER && UNITY_SINGLE_PASS_STEREO - o.uv = v.texcoord; - o.depthUVNonStereo = v.texcoord; - o.depthUV = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - #else - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - #if BEAUTIFY_BLOOM_USE_DEPTH || BEAUTIFY_BLOOM_USE_LAYER - o.depthUV = o.uv; - #endif - #endif - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) { - // Depth texture is inverted WRT the main texture - o.uv.y = 1.0 - o.uv.y; - } - #endif - return o; - } - - inline half Brightness(half3 c) { - return max(c.r, max(c.g, c.b)); - } - - half4 fragLum (v2fLum i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - #if BEAUTIFY_BLOOM_USE_LAYER - half4 c; - if (unity_StereoEyeIndex == 0) { - c = tex2D(_BloomSourceTex, i.uv); - } else { - c = tex2D(_BloomSourceTexRightEye, i.uv); - } - #else - half4 c = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - #endif - c = clamp(c, 0.0.xxxx, _BloomWeights2.zzzz); - #if UNITY_COLORSPACE_GAMMA - c.rgb = GammaToLinearSpace(c.rgb); - #endif - #if BEAUTIFY_BLOOM_USE_DEPTH || BEAUTIFY_BLOOM_USE_LAYER - //half depth01 = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.depthUV))); - half depth01 = Linear01Depth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.depthUV)); - #endif - #if BEAUTIFY_BLOOM_USE_DEPTH - c.rgb *= (1.0 - depth01 * _BloomDepthTreshold); - #endif - #if BEAUTIFY_BLOOM_USE_LAYER - half depth02; - #if UNITY_SINGLE_PASS_STEREO - if (unity_StereoEyeIndex == 0) { - depth02 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_BloomSourceDepth, i.depthUVNonStereo))); - } else { - depth02 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_BloomSourceDepthRightEye, i.depthUVNonStereo))); - } - #else - if (unity_StereoEyeIndex == 0) { - depth02 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_BloomSourceDepth, i.depthUV))); - } else { - depth02 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_BloomSourceDepthRightEye, i.depthUV))); - } - #endif - half isTransparent = (depth02 >= 1) && any(c.rgb>0); - half nonEclipsed = isTransparent || (depth01 > depth02 - _BloomLayerZBias); - c.rgb *= nonEclipsed; - #endif - c.a = Brightness(c.rgb); - c.rgb = max(c.rgb - _Bloom.www, 0); - return c; - } - - v2fCross vertCross(appdata v) { - v2fCross o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) { - // Texture is inverted WRT the main texture - v.texcoord.y = 1.0 - v.texcoord.y; - } - #endif - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - half3 offsets = _MainTex_TexelSize.xyx * half3(1,1,-1); - #if UNITY_SINGLE_PASS_STEREO - offsets.xz *= 2.0; - #endif - o.uv1 = UnityStereoScreenSpaceUVAdjust(v.texcoord - offsets.xy, _MainTex_ST); - o.uv2 = UnityStereoScreenSpaceUVAdjust(v.texcoord - offsets.zy, _MainTex_ST); - o.uv3 = UnityStereoScreenSpaceUVAdjust(v.texcoord + offsets.zy, _MainTex_ST); - o.uv4 = UnityStereoScreenSpaceUVAdjust(v.texcoord + offsets.xy, _MainTex_ST); - return o; - } - - v2fCrossLum vertCrossLum(appdata v) { - v2fCrossLum o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - #if BEAUTIFY_BLOOM_USE_LAYER && UNITY_SINGLE_PASS_STEREO - o.depthUVNonStereo = v.texcoord; - o.depthUV = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) { - // Texture is inverted WRT the main texture - v.texcoord.y = 1.0 - v.texcoord.y; - } - #endif - o.uv = v.texcoord; - half3 offsets = _MainTex_TexelSize.xyx * half3(1, 1, -1); - o.uv1 = v.texcoord - offsets.xy; - o.uv2 = v.texcoord - offsets.zy; - o.uv3 = v.texcoord + offsets.zy; - o.uv4 = v.texcoord + offsets.xy; - #else - #if BEAUTIFY_BLOOM_USE_DEPTH || BEAUTIFY_BLOOM_USE_LAYER - o.depthUV = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - #endif - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) { - // Texture is inverted WRT the main texture - v.texcoord.y = 1.0 - v.texcoord.y; - } - #endif - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - half3 offsets = _MainTex_TexelSize.xyx * half3(1, 1, -1); - #if UNITY_SINGLE_PASS_STEREO - offsets.xz *= 2.0; - #endif - o.uv1 = UnityStereoScreenSpaceUVAdjust(v.texcoord - offsets.xy, _MainTex_ST); - o.uv2 = UnityStereoScreenSpaceUVAdjust(v.texcoord - offsets.zy, _MainTex_ST); - o.uv3 = UnityStereoScreenSpaceUVAdjust(v.texcoord + offsets.zy, _MainTex_ST); - o.uv4 = UnityStereoScreenSpaceUVAdjust(v.texcoord + offsets.xy, _MainTex_ST); - #endif - return o; - - } - - half4 fragLumAntiflicker(v2fCrossLum i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - #if BEAUTIFY_BLOOM_USE_LAYER - half4 c1, c2, c3, c4; - if (unity_StereoEyeIndex == 0) { - c1 = tex2D(_BloomSourceTex, i.uv1); - c2 = tex2D(_BloomSourceTex, i.uv2); - c3 = tex2D(_BloomSourceTex, i.uv3); - c4 = tex2D(_BloomSourceTex, i.uv4); - } else { - c1 = tex2D(_BloomSourceTexRightEye, i.uv1); - c2 = tex2D(_BloomSourceTexRightEye, i.uv2); - c3 = tex2D(_BloomSourceTexRightEye, i.uv3); - c4 = tex2D(_BloomSourceTexRightEye, i.uv4); - } - #else - half4 c1 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1); - half4 c2 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2); - half4 c3 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3); - half4 c4 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4); - #endif - - c1 = clamp(c1, 0.0.xxxx, _BloomWeights2.zzzz); - c2 = clamp(c2, 0.0.xxxx, _BloomWeights2.zzzz); - c3 = clamp(c3, 0.0.xxxx, _BloomWeights2.zzzz); - c4 = clamp(c4, 0.0.xxxx, _BloomWeights2.zzzz); - - #if BEAUTIFY_BLOOM_USE_DEPTH || BEAUTIFY_BLOOM_USE_LAYER - //half depth01 = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.depthUV))); - half depth01 = Linear01Depth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.depthUV)); - half depthAtten = 1.0 - depth01 * _BloomDepthTreshold; - #endif - #if BEAUTIFY_BLOOM_USE_DEPTH - c1.rgb *= depthAtten; - c2.rgb *= depthAtten; - c3.rgb *= depthAtten; - c4.rgb *= depthAtten; - #endif - - #if BEAUTIFY_BLOOM_USE_LAYER - #if UNITY_SINGLE_PASS_STEREO - //half depth02 = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(tex2D(_BloomSourceDepth, i.depthUVNonStereo))); - half depth02 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_BloomSourceDepth, i.depthUVNonStereo))); - #else - //half depth02 = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(tex2D(_BloomSourceDepth, i.depthUV))); - half depth02 = Linear01Depth(UNITY_SAMPLE_DEPTH(tex2D(_BloomSourceDepth, i.depthUV))); - #endif - half isTransparent = (depth02 >= 1) && any(c1.rgb>0); - half nonEclipsed = isTransparent || (depth01 > depth02 - _BloomLayerZBias ); - c1.rgb *= nonEclipsed; - c2.rgb *= nonEclipsed; - c3.rgb *= nonEclipsed; - c4.rgb *= nonEclipsed; - #endif - - c1.a = Brightness(c1.rgb); - c2.a = Brightness(c2.rgb); - c3.a = Brightness(c3.rgb); - c4.a = Brightness(c4.rgb); - - half w1 = 1.0 / (c1.a + 1.0); - half w2 = 1.0 / (c2.a + 1.0); - half w3 = 1.0 / (c3.a + 1.0); - half w4 = 1.0 / (c4.a + 1.0); - - half dd = 1.0 / (w1 + w2 + w3 + w4); - c1 = (c1 * w1 + c2 * w2 + c3 * w3 + c4 * w4) * dd; - - #if UNITY_COLORSPACE_GAMMA - c1.rgb = GammaToLinearSpace(c1.rgb); - #endif - - c1.rgb = max(c1.rgb - _Bloom.www, 0); - return c1; - } - - - half4 fragBloomCompose (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - half4 b0 = UNITY_SAMPLE_SCREENSPACE_TEXTURE( _BloomTex , i.uv ); - half4 b1 = UNITY_SAMPLE_SCREENSPACE_TEXTURE( _BloomTex1 , i.uv ); - half4 b2 = UNITY_SAMPLE_SCREENSPACE_TEXTURE( _BloomTex2 , i.uv ); - half4 b3 = UNITY_SAMPLE_SCREENSPACE_TEXTURE( _BloomTex3 , i.uv ); - half4 b4 = UNITY_SAMPLE_SCREENSPACE_TEXTURE( _BloomTex4 , i.uv ); - half4 b5 = UNITY_SAMPLE_SCREENSPACE_TEXTURE( _MainTex , i.uv ); - half4 pixel = b0 * _BloomWeights.x + b1 * _BloomWeights.y + b2 * _BloomWeights.z + b3 * _BloomWeights.w + b4 * _BloomWeights2.x + b5 * _BloomWeights2.y; - return pixel; - } - - - half4 fragResample(v2fCross i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - half4 c1 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1); - half4 c2 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2); - half4 c3 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3); - half4 c4 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4); - - half w1 = 1.0 / (c1.a + 1.0); - half w2 = 1.0 / (c2.a + 1.0); - half w3 = 1.0 / (c3.a + 1.0); - half w4 = 1.0 / (c4.a + 1.0); - - half dd = 1.0 / (w1 + w2 + w3 + w4); - return (c1 * w1 + c2 * w2 + c3 * w3 + c4 * w4) * dd; - } - - - half4 fragResampleAF(v2fCross i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - half4 c1 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1); - half4 c2 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2); - half4 c3 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3); - half4 c4 = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4); - - half w1 = 1.0 / (c1.a + 1.0); - half w2 = 1.0 / (c2.a + 1.0); - half w3 = 1.0 / (c3.a + 1.0); - half w4 = 1.0 / (c4.a + 1.0); - - half dd = 1.0 / (w1 + w2 + w3 + w4); - c1 = (c1 * w1 + c2 * w2 + c3 * w3 + c4 * w4) * dd; - c1.rgb = lerp(c1.rgb, Brightness(c1.rgb) * _AFTint.rgb, _AFTint.a); - c1.rgb *= _Bloom.xxx; - return c1; - } - - half4 fragCopy(v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - return UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - } - - half4 fragDebugBloom (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - return UNITY_SAMPLE_SCREENSPACE_TEXTURE(_BloomTex, i.uv) * _Bloom.xxxx; - } - - half4 fragResampleFastAF(v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - half4 c = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - c.rgb = lerp(c.rgb, Brightness(c.rgb) * _AFTint.rgb, _AFTint.a); - c.rgb *= _Bloom.xxx; - return c; - } - - v2fCross vertBlurH(appdata v) { - v2fCross o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) { - // Texture is inverted WRT the main texture - v.texcoord.y = 1.0 - v.texcoord.y; - } - #endif - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - half2 inc = half2(_MainTex_TexelSize.x * 1.3846153846 * _BlurScale, 0); -#if UNITY_SINGLE_PASS_STEREO - inc.x *= 2.0; -#endif - o.uv1 = UnityStereoScreenSpaceUVAdjust(v.texcoord - inc, _MainTex_ST); - o.uv2 = UnityStereoScreenSpaceUVAdjust(v.texcoord + inc, _MainTex_ST); - half2 inc2 = half2(_MainTex_TexelSize.x * 3.2307692308 * _BlurScale, 0); -#if UNITY_SINGLE_PASS_STEREO - inc2.x *= 2.0; -#endif - o.uv3 = UnityStereoScreenSpaceUVAdjust(v.texcoord - inc2, _MainTex_ST); - o.uv4 = UnityStereoScreenSpaceUVAdjust(v.texcoord + inc2, _MainTex_ST); - return o; - } - - v2fCross vertBlurV(appdata v) { - v2fCross o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) { - // Texture is inverted WRT the main texture - v.texcoord.y = 1.0 - v.texcoord.y; - } - #endif - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - half2 inc = half2(0, _MainTex_TexelSize.y * 1.3846153846 * _BlurScale); - o.uv1 = UnityStereoScreenSpaceUVAdjust(v.texcoord - inc, _MainTex_ST); - o.uv2 = UnityStereoScreenSpaceUVAdjust(v.texcoord + inc, _MainTex_ST); - half2 inc2 = half2(0, _MainTex_TexelSize.y * 3.2307692308 * _BlurScale); - o.uv3 = UnityStereoScreenSpaceUVAdjust(v.texcoord - inc2, _MainTex_ST); - o.uv4 = UnityStereoScreenSpaceUVAdjust(v.texcoord + inc2, _MainTex_ST); - return o; - } - - half4 fragBlur (v2fCross i): SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - half4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv) * 0.2270270270 - + (UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv1) + UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv2)) * 0.3162162162 - + (UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv3) + UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv4)) * 0.0702702703; - return pixel; - } diff --git a/Sources/Shaders/BeautifyLum.cginc.meta b/Sources/Shaders/BeautifyLum.cginc.meta deleted file mode 100644 index 0a0ce13a..00000000 --- a/Sources/Shaders/BeautifyLum.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 6708800698de942e2a85c62acbfa8693 -timeCreated: 1466064953 -licenseType: Store -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Sources/Shaders/BeautifyMobile.cginc b/Sources/Shaders/BeautifyMobile.cginc deleted file mode 100644 index cbd37106..00000000 --- a/Sources/Shaders/BeautifyMobile.cginc +++ /dev/null @@ -1,426 +0,0 @@ - // Copyright 2016-2019 Ramiro Oliva (Kronnect) - All Rights Reserved. - - #include "UnityCG.cginc" - #include "BeautifyAdvancedParams.cginc" - #include "BeautifyOrtho.cginc" - - UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex); - UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); - uniform sampler2D _OverlayTex; - UNITY_DECLARE_SCREENSPACE_TEXTURE(_ScreenLum); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_BloomTex); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_EALumSrc); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_EAHist); - UNITY_DECLARE_SCREENSPACE_TEXTURE(_CompareTex); - uniform sampler2D _LUTTex; - - uniform float4 _MainTex_TexelSize; - uniform float4 _MainTex_ST; - uniform float4 _ColorBoost; // x = Brightness, y = Contrast, z = Saturate, w = Daltonize; - uniform float4 _Sharpen; - uniform float4 _Dither; - uniform float4 _FXColor; - uniform float4 _TintColor; - uniform float4 _Outline; - uniform float4 _Dirt; - uniform float3 _Bloom; - uniform float4 _CompareParams; - uniform float4 _BokehData; - uniform float4 _BokehData2; - uniform float4 _EyeAdaptation; - uniform float3 _Purkinje; - - #if BEAUTIFY_VIGNETTING || BEAUTIFY_VIGNETTING_MASK - uniform float4 _Vignetting; - uniform float _VignettingAspectRatio; - uniform sampler2D _VignettingMask; - #endif - - #if BEAUTIFY_FRAME || BEAUTIFY_FRAME_MASK - uniform float4 _Frame; - uniform sampler2D _FrameMask; - #endif - - #if BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT || BEAUTIFY_DEPTH_OF_FIELD - UNITY_DECLARE_SCREENSPACE_TEXTURE(_DoFTex); - uniform float4 _DoFTex_TexelSize; - #endif - #if BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT - uniform sampler2D _DepthTexture; - uniform sampler2D _DofExclusionTexture; - #endif - - - struct appdata { - float4 vertex : POSITION; - float2 texcoord : TEXCOORD0; - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - struct v2f { - float4 pos : SV_POSITION; - float2 uv: TEXCOORD0; - float2 depthUV : TEXCOORD1; - float2 uvN: TEXCOORD2; - float2 uvS: TEXCOORD3; - float2 uvW: TEXCOORD4; - #if BEAUTIFY_DIRT || BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT || BEAUTIFY_VIGNETTING || BEAUTIFY_VIGNETTING_MASK || BEAUTIFY_FRAME || BEAUTIFY_FRAME_MASK - float2 uvNonStereo: TEXCOORD5; - #endif - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - struct v2fCompare { - float4 pos : SV_POSITION; - float2 uv: TEXCOORD0; - float2 uvNonStereo: TEXCOORD1; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - v2fCompare vertCompare(appdata v) { - v2fCompare o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - o.uvNonStereo = v.texcoord; - return o; - } - - v2f vert(appdata v) { - v2f o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - o.depthUV = o.uv; - - float3 uvInc = float3(_MainTex_TexelSize.x, _MainTex_TexelSize.y, 0); - o.uvN = o.uv + uvInc.zy; - o.uvS = o.uv - uvInc.zy; - o.uvW = o.uv - uvInc.xz; - - #if BEAUTIFY_DIRT || BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT || BEAUTIFY_VIGNETTING || BEAUTIFY_VIGNETTING_MASK || BEAUTIFY_FRAME || BEAUTIFY_FRAME_MASK - o.uvNonStereo = v.texcoord; - #endif - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) { - // Depth texture is inverted WRT the main texture - o.depthUV.y = 1.0 - o.depthUV.y; - #if BEAUTIFY_DIRT || BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT || BEAUTIFY_VIGNETTING || BEAUTIFY_VIGNETTING_MASK || BEAUTIFY_FRAME || BEAUTIFY_FRAME_MASK - o.uvNonStereo.y = 1.0 - o.uvNonStereo.y; - #endif - } - #endif - return o; - } - - inline float getLuma(float3 rgb) { - const float3 lum = float3(0.299, 0.587, 0.114); - return dot(rgb, lum); - } - - float3 getNormal(float depth, float depth1, float depth2, float2 offset1, float2 offset2) { - float3 p1 = float3(offset1, depth1 - depth); - float3 p2 = float3(offset2, depth2 - depth); - float3 normal = cross(p1, p2); - return normalize(normal); - } - - float getRandomFast(float2 uv) { - float2 p = uv + _Time.yy; - p -= floor(p * 0.01408450704) * 71.0; - p += float2( 26.0, 161.0 ); - p *= p; - return frac(p.x * p.y * 0.001051374728); - } - - - float getCoc(v2f i) { - #if BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT - float depthTex = DecodeFloatRGBA(tex2Dlod(_DepthTexture, float4(i.uvNonStereo, 0, 0))); - float exclusionDepth = DecodeFloatRGBA(tex2Dlod(_DofExclusionTexture, float4(i.uvNonStereo, 0, 0))); - //float depth = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(SAMPLE_RAW_DEPTH_TEXTURE_LOD(_CameraDepthTexture, float4(i.depthUV, 0, 0)))); - float depth = Linear01Depth(BEAUTIFY_DEPTH_LOD(_CameraDepthTexture, float4(i.depthUV, 0, 0))); - depth = min(depth, depthTex); - if (exclusionDepth < depth) return 0; - depth *= _ProjectionParams.z; - #else - //float depth = BEAUTIFY_GET_DEPTH_EYE(UNITY_SAMPLE_DEPTH(SAMPLE_RAW_DEPTH_TEXTURE_LOD(_CameraDepthTexture, float4(i.depthUV, 0, 0)))); - float depth = LinearEyeDepth(BEAUTIFY_DEPTH_LOD(_CameraDepthTexture, float4(i.depthUV, 0, 0))); - #endif - float xd = abs(depth - _BokehData.x) - _BokehData2.x * (depth < _BokehData.x); - return 0.5 * _BokehData.y * xd/depth; // radius of CoC - } - - - void beautifyPassFast(v2f i, inout float3 rgbM) { - - float3 uvInc = float3(_MainTex_TexelSize.x, _MainTex_TexelSize.y, 0); - - #if BEAUTIFY_NIGHT_VISION || BEAUTIFY_OUTLINE - //float depthN = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.depthUV + uvInc.zy))); - float depthN = Linear01Depth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.depthUV + uvInc.zy)); - #endif - //float depthW = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.depthUV - uvInc.xz))); - float depthW = Linear01Depth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.depthUV - uvInc.xz)); - float lumaM = getLuma(rgbM); - - #if !BEAUTIFY_NIGHT_VISION && !BEAUTIFY_THERMAL_VISION - #if !defined(BEAUTIFY_DITHER_FINAL) && defined(BEAUTIFY_ENABLE_DITHER) - float3 dither = dot(float2(171.0, 231.0), i.uv * _ScreenParams.xy).xxx; - dither = frac(dither / float3(103.0, 71.0, 97.0)) - 0.5.xxx; - rgbM *= 1.0 + step(_Dither.y, depthW) * _Dither.x * dither; - #endif - - #if BEAUTIFY_DALTONIZE - float3 rgb0 = 1.0.xxx - saturate(rgbM.rgb); - rgbM.r *= 1.0 + rgbM.r * rgb0.g * rgb0.b * _ColorBoost.w; - rgbM.g *= 1.0 + rgbM.g * rgb0.r * rgb0.b * _ColorBoost.w; - rgbM.b *= 1.0 + rgbM.b * rgb0.r * rgb0.g * _ColorBoost.w; - rgbM *= lumaM / (getLuma(rgbM) + 0.0001); - #endif - - #if defined(BEAUTIFY_DEPTH_BASED_SHARPEN) - float depthClamp = abs(depthW - _Dither.z) < _Dither.w; - #else - float depthClamp = 1.0; - #endif - - float3 rgbN = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uvN).rgb; - float3 rgbS = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uvS).rgb; - float3 rgbW = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uvW).rgb; - - float lumaN = getLuma(rgbN); - float lumaW = getLuma(rgbW); - float lumaS = getLuma(rgbS); - float maxLuma = max(lumaN,lumaS); - maxLuma = max(maxLuma, lumaW); - float minLuma = min(lumaN,lumaS); - minLuma = min(minLuma, lumaW) - 0.000001; - float lumaPower = 2 * lumaM - minLuma - maxLuma; - float lumaAtten = saturate(_Sharpen.w / (maxLuma - minLuma)); - #if defined(BEAUTIFY_ENABLE_CORE_EFFECT) - rgbM *= 1.0 + clamp(lumaPower * lumaAtten * _Sharpen.x, -_Sharpen.z, _Sharpen.z) * depthClamp; - #endif - - #if BEAUTIFY_DEPTH_OF_FIELD || BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT - float4 dofPix = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_DoFTex, i.uv); - #if UNITY_COLORSPACE_GAMMA - dofPix.rgb = LinearToGammaSpace(dofPix.rgb); - #endif - if (_DoFTex_TexelSize.z < _MainTex_TexelSize.z) { - float CoC = getCoc(i); - dofPix.a = lerp(CoC, dofPix.a, _DoFTex_TexelSize.z / _MainTex_TexelSize.z); - } - rgbM = lerp(rgbM, dofPix.rgb, saturate(dofPix.a)); - #endif - - #endif // night & thermal vision exclusion - - #if BEAUTIFY_NIGHT_VISION - float depth = Linear01Depth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.depthUV)); // was tex2D -// float3 normalNW = getNormal(depth, depthN, depthW, uvInc.zy, -uvInc.xz); // According to Unity QA this causes issues in Mali G71 GPU due to a hardware problem - float3 normalNW = getNormal(depth, depthN, depthW, uvInc.zy, float2(-uvInc.x, -uvInc.z)); - #endif - - #if BEAUTIFY_OUTLINE - #if !defined(BEAUTIFY_OUTLINE_SOBEL) - #if !BEAUTIFY_NIGHT_VISION - //float depth = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.depthUV))); - float depth = Linear01Depth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.depthUV)); - // float3 normalNW = getNormal(depth, depthN, depthW, uvInc.zy, -uvInc.xz); // According to Unity QA this causes issues in Mali G71 GPU due to a hardware problem - float3 normalNW = getNormal(depth, depthN, depthW, uvInc.zy, float2(-uvInc.x, -uvInc.z)); - #endif - //float depthE = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.depthUV + uvInc.xz))); - //float depthS = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, i.depthUV - uvInc.zy))); - float depthE = Linear01Depth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.depthUV + uvInc.xz)); - float depthS = Linear01Depth(BEAUTIFY_DEPTH(_CameraDepthTexture, i.depthUV - uvInc.zy)); - float3 normalSE = getNormal(depth, depthS, depthE, -uvInc.zy, uvInc.xz); - float dnorm = dot(normalNW, normalSE); - rgbM = lerp(rgbM, _Outline.rgb, dnorm < _Outline.a); - #else - float4 uv4 = float4(i.uv, 0, 0); - #if BEAUTIFY_NIGHT_VISION || BEAUTIFY_THERMAL_VISION - float3 rgbS = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 - uvInc.zyzz).rgb; - float3 rgbN = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 + uvInc.zyzz).rgb; - float3 rgbW = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 - uvInc.xzzz).rgb; - #endif - float3 rgbSW = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 - uvInc.xyzz).rgb; - float3 rgbNE = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 + uvInc.xyzz).rgb; - float3 rgbSE = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 + float4( uvInc.x, -uvInc.y, 0, 0)).rgb; - float3 rgbNW = SAMPLE_RAW_DEPTH_TEXTURE_LOD(_MainTex, uv4 + float4(-uvInc.x, uvInc.y, 0, 0)).rgb; - float3 gx = rgbSW * -1.0; - gx += rgbSE * 3.0; - gx += rgbW * -2.0; - gx += rgbNW * -1.0; - gx += rgbN * 1.0; - float3 gy = rgbSW * -1.0; - gy += rgbS * -2.0; - gy += rgbSE * -1.0; - gy += rgbNW * 1.0; - gy += rgbN * 3.0; - float olColor = (length(gx * gx + gy * gy) - _Outline.a) > 0.0; - rgbM = lerp(rgbM, _Outline.rgb, olColor); - #endif - #endif - - #if BEAUTIFY_BLOOM || BEAUTIFY_DIRT - #if UNITY_COLORSPACE_GAMMA - rgbM = GammaToLinearSpace(rgbM); - #endif - #endif - - #if BEAUTIFY_BLOOM - rgbM += UNITY_SAMPLE_SCREENSPACE_TEXTURE(_BloomTex, i.uv).rgb * _Bloom.xxx; - #endif - - #if BEAUTIFY_DIRT - float3 scrLum = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_ScreenLum, i.uv).rgb; - #if BEAUTIFY_BLOOM - scrLum *= _Dirt.www; - #endif - float4 dirt = tex2D(_OverlayTex, i.uvNonStereo); - rgbM += saturate(0.5.xxx - _Dirt.zzz + scrLum) * dirt.rgb * _Dirt.y; - #endif - - #if BEAUTIFY_EYE_ADAPTATION || BEAUTIFY_PURKINJE - float4 avgLum = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_EAHist, 0.5.xx); - #endif - - #if BEAUTIFY_EYE_ADAPTATION - float srcLum = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_EALumSrc, 0.5.xx).r; - float diff = srcLum / (avgLum.r + 0.0001); - diff = clamp(diff, _EyeAdaptation.x, _EyeAdaptation.y); - rgbM = rgbM * diff; - #endif - - #if BEAUTIFY_BLOOM || BEAUTIFY_DIRT - #if UNITY_COLORSPACE_GAMMA - rgbM = LinearToGammaSpace(rgbM); - #endif - #endif - - #if BEAUTIFY_NIGHT_VISION - lumaM = getLuma(rgbM); // updates luma - float nvbase = saturate(normalNW.z - 0.8); // minimum ambient self radiance (useful for pitch black) - nvbase += lumaM; // adds current lighting - nvbase *= nvbase * (0.5 + nvbase); // increase contrast - rgbM = nvbase * _FXColor.rgb; - float2 uvs = floor(i.uv.xy * _ScreenParams.xy); - rgbM *= frac(uvs.y*0.25)>0.4; // scan lines - rgbM *= 1.0 + getRandomFast(uvs) * 0.3 - 0.15; // noise - #endif - - #if BEAUTIFY_THERMAL_VISION - lumaM = getLuma(rgbM); // updates luma - float3 tv0 = lerp(float3(0.0,0.0,1.0), float3(1.0,1.0,0.0), lumaM * 2.0); - float3 tv1 = lerp(float3(1.0,1.0,0.0), float3(1.0,0.0,0.0), lumaM * 2.0 - 1.0); - rgbM = lerp(tv0, tv1, lumaM >= 0.5); - float2 uvs = floor(i.uv.xy * _ScreenParams.xy); - rgbM *= 0.2 + frac(uvs.y*0.25)>0.4; // scan lines - rgbM *= 1.0 + getRandomFast(uvs) * 0.2 - 0.1; // noise - #endif - - - #if defined(BEAUTIFY_USE_PROCEDURAL_SEPIA) - float3 sepia = float3( - dot(rgbM, float3(0.393, 0.769, 0.189)), - dot(rgbM, float3(0.349, 0.686, 0.168)), - dot(rgbM, float3(0.272, 0.534, 0.131)) - ); - rgbM = lerp(rgbM, sepia, _FXColor.a); - #elif BEAUTIFY_LUT - #if !UNITY_COLORSPACE_GAMMA - rgbM = LinearToGammaSpace(rgbM); - #endif - const float3 lutST = float3(1.0/1024, 1.0/32, 32-1); - float3 lookUp = saturate(rgbM) * lutST.zzz; - lookUp.xy = lutST.xy * (lookUp.xy + 0.5); - float slice = floor(lookUp.z); - lookUp.x += slice * lutST.y; - #if defined(BEAUTIFY_BETTER_FASTER_LUT) - float2 lookUpNextSlice = float2(lookUp.x + lutST.y, lookUp.y); - float3 lut = lerp(tex2D(_LUTTex, lookUp.xy).rgb, tex2D(_LUTTex, lookUpNextSlice).rgb, lookUp.z - slice); - #else - float3 lut = tex2D(_LUTTex, lookUp.xy).rgb; - #endif - rgbM = lerp(rgbM, lut, _FXColor.a); - #if !UNITY_COLORSPACE_GAMMA - rgbM = GammaToLinearSpace(rgbM); - #endif - #endif - - #if defined(BEAUTIFY_ENABLE_COLOR_TWEAKS) - float maxComponent = max(rgbM.r, max(rgbM.g, rgbM.b)); - float minComponent = min(rgbM.r, min(rgbM.g, rgbM.b)); - float sat = saturate(maxComponent - minComponent); - rgbM *= 1.0 + _ColorBoost.z * (1.0 - sat) * (rgbM - getLuma(rgbM)); - rgbM = lerp(rgbM, rgbM * _TintColor.rgb, _TintColor.a); - rgbM = (rgbM - 0.5.xxx) * _ColorBoost.y + 0.5.xxx; - rgbM *= _ColorBoost.x; - #endif - - - #if BEAUTIFY_PURKINJE - lumaM = getLuma(rgbM); - float3 shifted = saturate(float3(lumaM / (1.0 + _Purkinje.x * 1.14), lumaM, lumaM * (1.0 + _Purkinje.x * 2.99))); - rgbM = lerp(shifted, rgbM, saturate(exp(avgLum.g) - _Purkinje.y)); - #endif - - #if BEAUTIFY_VIGNETTING - float2 vd = float2(i.uvNonStereo.x - 0.5, (i.uvNonStereo.y - 0.5) * _VignettingAspectRatio); - rgbM = lerp(rgbM, lumaM * _Vignetting.rgb, saturate(_Purkinje.z + _Vignetting.a * dot(vd,vd))); - #elif BEAUTIFY_VIGNETTING_MASK - float2 vd = float2(i.uvNonStereo.x - 0.5, (i.uvNonStereo.y - 0.5) * _VignettingAspectRatio); - float vmask = tex2D(_VignettingMask, i.uvNonStereo).a; - rgbM = lerp(rgbM, lumaM * _Vignetting.rgb, saturate(_Purkinje.z + vmask * _Vignetting.a * dot(vd, vd))); - #endif - - - #if BEAUTIFY_FRAME - rgbM = lerp(rgbM, _Frame.rgb, saturate( (max(abs(i.uvNonStereo.x - 0.5), abs(i.uvNonStereo.y - 0.5)) - _Frame.a) * 50.0)); - #elif BEAUTIFY_FRAME_MASK - float4 frameMask = tex2D(_FrameMask, i.uvNonStereo); - float3 frameColor = lerp(_Frame.rgb, frameMask.rgb * _Frame.rgb, frameMask.a); - rgbM = lerp(rgbM, frameColor, saturate( (max(abs(i.uvNonStereo.x - 0.5), abs(i.uvNonStereo.y - 0.5)) - _Frame.a) * 50.0)); - #endif - - #if !BEAUTIFY_NIGHT_VISION && !BEAUTIFY_THERMAL_VISION && defined(BEAUTIFY_DITHER_FINAL) && defined(BEAUTIFY_ENABLE_DITHER) - float3 dither = dot(float2(171.0, 231.0), i.uv * _ScreenParams.xy).xxx; - dither = frac(dither / float3(103.0, 71.0, 97.0)) - 0.5.xxx; - rgbM *= 1.0 + step(_Dither.y, depthW) * _Dither.x * dither; - #endif - } - - float4 fragBeautifyFast (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - float4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - beautifyPassFast(i, pixel.rgb); - return pixel; - } - - - float4 fragCompareFast (v2fCompare i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - - // separator line + antialias - float2 dd = i.uvNonStereo - 0.5.xx; - float co = dot(_CompareParams.xy, dd); - float dist = distance( _CompareParams.xy * co, dd ); - float4 aa = saturate( (_CompareParams.w - dist) / abs(_MainTex_TexelSize.y) ); - - float4 pixel = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - float4 pixelNice = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CompareTex, i.uv); - - // are we on the beautified side? - float t = dot(dd, _CompareParams.yz) > 0; - pixel = lerp(pixel, pixelNice, t); - return pixel + aa; - } diff --git a/Sources/Shaders/BeautifyMobile.cginc.meta b/Sources/Shaders/BeautifyMobile.cginc.meta deleted file mode 100644 index d52fcbfd..00000000 --- a/Sources/Shaders/BeautifyMobile.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 1d84252c1f1ab4413b72b835c3c271f4 -timeCreated: 1465123627 -licenseType: Store -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Sources/Shaders/BeautifyMobile.shader b/Sources/Shaders/BeautifyMobile.shader deleted file mode 100644 index 435d017e..00000000 --- a/Sources/Shaders/BeautifyMobile.shader +++ /dev/null @@ -1,328 +0,0 @@ -Shader "Beautify/BeautifyMobile" { - Properties { - _MainTex ("Base (RGB)", 2D) = "white" {} - _OverlayTex ("Overlay (RGB)", 2D) = "black" {} - _DoFTex("DoF (RGBA)", any) = "black" {} - //_DoFTex("DoF (RGBA)", 2D) = "black" {} - _Sharpen ("Sharpen Data", Vector) = (2.5, 0.035, 0.5) - _ColorBoost ("Color Boost Data", Vector) = (1.1, 1.1, 0.08, 0) - _Dither ("Dither Data", Vector) = (5, 0, 0, 1.0) - _FXColor ("FXColor Color", Color) = (1,1,1,0) - _TintColor ("Tint Color Color", Color) = (1,1,1,0) - _Vignetting ("Vignetting", Color) = (0.3,0.3,0.3,0.05) - _VignettingAspectRatio ("Vignetting Aspect Ratio", Float) = 1.0 - _VignettingMask ("Mask Texture (A)", 2D) = "white" {} - _Frame("Frame Data", Vector) = (50,50,50,0) - _FrameMask ("Mask Texture (A)", 2D) = "white" {} - _Outline("Outline", Color) = (0,0,0,0.8) - _Dirt("Dirt Data", Vector) = (0.5,0.5,0.5,0.5) - _Bloom("Bloom Data", Vector) = (0.5,0,0) - //_BloomTex("BloomTex (RGBA)", any) = "black" {} - _BloomTex("BloomTex (RGBA)", any) = "black" {} - _BloomWeights("Bloom Weights", Vector) = (0.35,0.55,0.7,0.8) - _BloomWeights2("Bloom Weights 2", Vector) = (0.35,0.55,0.7,0.8) - //_ScreenLum("Luminance Tex (RGBA)", 2D) = "black" {} - _ScreenLum("Luminance Tex (RGBA)", any) = "black" {} - _CompareParams("Compare Params", Vector) = (0.785398175, 0.001, 0, 0) - _AFTint ("Anamorphic Flares Tint", Color) = (1,1,1,0.5) - _BokehData("Bokeh Data", Vector) = (10,1,0,1) - _DepthTexture("Depth (RGBA)", 2D) = "black" {} - _DofExclusionTexture("DoF Exclusion (R)", 2D) = "white" {} - _BokehData2("Bokeh Data 2", Vector) = (1000.0, 4, 0, 0) - _BokehData3("Bokeh Data 3", Vector) = (1000.0, 100000.0, 0) - _EyeAdaptation("Eye Adaptation Data", Vector) = (0.1, 2, 0.7, 1) - _Purkinje ("Purkinje Data", Vector) = (1.0, 0.15, 0) - _BloomDepthTreshold("Bloom Depth Threshold", Float) = 1.0 - _SunPos("SunFlares Sun Screen Position", Vector) = (0.5, 0.5, 0, 0) - _SunPosRightEye("SF Screen Position Right Eye", Vector) = (0.5, 0.5, 0, 0) - _SunData("SunFlares Sun Data", Vector) = (0.1, 0.05, 3.5, 0.13) - _SunCoronaRays1("SunFlares Corona Rays 1 Data", Vector) = (0.02, 12, 0.001, 0) - _SunCoronaRays2("SunFlares Corona Rays 2 Data", Vector) = (0.05, 12, 0.1, 0) - _SunGhosts1("SunFlares Ghosts 1 Data", Vector) = (0, 0.03, 0.6, 0.06) - _SunGhosts2("SunFlares Ghosts 2 Data", Vector) = (0, 0.1, 0.2, 0.03) - _SunHalo("SunFlares Halo Data", Vector) = (0.22, 15.1415, 1.0) - _SunTint("Sun Flare Tint Color", Color) = (1,1,1) -// _CompareTex ("Compare Image (RGB)", 2D) = "black" {} - _CompareTex ("Compare Image (RGB)", any) = "black" {} - _BlurScale ("Blur Scale", Float) = 1.0 - _LUTTex ("Lut Texture (RGB)", 2D) = "white" {} - } - -Subshader { - - Pass { // 0 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertCompare - #pragma fragment fragCompareFast - #pragma target 3.0 - #pragma fragmentoption ARB_precision_hint_fastest - #include "BeautifyMobile.cginc" - ENDCG - } - - Pass { // 1 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragBeautifyFast - #pragma target 3.0 - #pragma fragmentoption ARB_precision_hint_fastest -// Edited by Shader Control: #pragma multi_compile __ BEAUTIFY_DALTONIZE BEAUTIFY_LUT BEAUTIFY_NIGHT_VISION BEAUTIFY_THERMAL_VISION -#pragma multi_compile __ BEAUTIFY_LUT -// Edited by Shader Control: #pragma multi_compile __ BEAUTIFY_DEPTH_OF_FIELD BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT -#pragma multi_compile __ BEAUTIFY_DEPTH_OF_FIELD -// Disabled by Shader Control: #pragma multi_compile __ BEAUTIFY_OUTLINE -// Disabled by Shader Control: #pragma multi_compile __ BEAUTIFY_DIRT -#pragma multi_compile __ BEAUTIFY_BLOOM -#pragma multi_compile __ BEAUTIFY_EYE_ADAPTATION -// Disabled by Shader Control: #pragma multi_compile __ BEAUTIFY_PURKINJE -// Edited by Shader Control: #pragma multi_compile __ BEAUTIFY_VIGNETTING BEAUTIFY_VIGNETTING_MASK -#pragma multi_compile __ BEAUTIFY_VIGNETTING -// Disabled by Shader Control: #pragma multi_compile __ BEAUTIFY_FRAME BEAUTIFY_FRAME_MASK -#pragma multi_compile __ UNITY_COLORSPACE_GAMMA - #include "BeautifyMobile.cginc" - ENDCG - } - - Pass { // 2 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertLum - #pragma fragment fragLum - #pragma fragmentoption ARB_precision_hint_fastest -#pragma multi_compile __ BEAUTIFY_BLOOM_USE_DEPTH -#pragma multi_compile __ BEAUTIFY_BLOOM_USE_LAYER -#pragma multi_compile __ UNITY_COLORSPACE_GAMMA - #include "BeautifyLum.cginc" - ENDCG - } - - Pass { // 3 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragDebugBloom - #pragma fragmentoption ARB_precision_hint_fastest - #include "BeautifyLum.cginc" - ENDCG - } - - - Pass { // 4 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertBlurH - #pragma fragment fragBlur - #pragma target 3.0 - #pragma fragmentoption ARB_precision_hint_fastest - #include "BeautifyLum.cginc" - ENDCG - } - - - Pass { // 5 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertBlurV - #pragma fragment fragBlur - #pragma target 3.0 - #pragma fragmentoption ARB_precision_hint_fastest - #include "BeautifyLum.cginc" - ENDCG - } - - - Pass { // 6 DoF CoC - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragCoC - #pragma target 3.0 - #pragma fragmentoption ARB_precision_hint_fastest -// Disabled by Shader Control: #pragma multi_compile __ BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT -#pragma multi_compile __ UNITY_COLORSPACE_GAMMA - #include "BeautifyDoF.cginc" - ENDCG - } - - Pass { // 7 DoF CoC Debug - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragCoCDebug - #pragma target 3.0 - #pragma fragmentoption ARB_precision_hint_fastest -// Disabled by Shader Control: #pragma multi_compile __ BEAUTIFY_DEPTH_OF_FIELD_TRANSPARENT - #include "BeautifyDoF.cginc" - ENDCG - } - - Pass { // 8 DoF Blur - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragBlur - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyDoF.cginc" - ENDCG - } - - Pass { // 9 Compute Screen Lum - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragScreenLum - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 -#pragma multi_compile __ UNITY_COLORSPACE_GAMMA - #include "BeautifyEA.cginc" - ENDCG - } - - Pass { // 10 Reduce Screen Lum - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vertCross - #pragma fragment fragReduceScreenLum - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyEA.cginc" - ENDCG - } - - Pass { // 11 Blend Screen Lum - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - Blend SrcAlpha OneMinusSrcAlpha - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragBlendScreenLum - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyEA.cginc" - ENDCG - } - - - Pass { // 12 Simple copy - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } -// Blend SrcAlpha OneMinusSrcAlpha - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragBlend - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyEA.cginc" - ENDCG - } - - Pass { // 13 Bloom premul compose - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - Blend One One - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragCopy - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyLum.cginc" - ENDCG - } - - Pass { // 14 - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - Blend One One - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragResampleFastAF - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyLum.cginc" - ENDCG - } - - Pass { // 15 DoF Blur wo/Bokeh - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragBlurNoBokeh - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyDoF.cginc" - ENDCG - } - - Pass { // 16 Sun Flares - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragSFFast - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifySF.cginc" - ENDCG - } - - Pass { // 17 Sun Flares Additive - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragSFFastAdditive - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifySF.cginc" - ENDCG - } - - Pass { // 18 Raw copy used in single blits with Single Pass Instanced - ZTest Always Cull Off ZWrite Off - Fog { Mode Off } - - CGPROGRAM - #pragma vertex vert - #pragma fragment fragCopy - #pragma fragmentoption ARB_precision_hint_fastest - #pragma target 3.0 - #include "BeautifyLum.cginc" - ENDCG - } - -} -FallBack Off -} diff --git a/Sources/Shaders/BeautifyMobile.shader.meta b/Sources/Shaders/BeautifyMobile.shader.meta deleted file mode 100644 index 6e3c1627..00000000 --- a/Sources/Shaders/BeautifyMobile.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 7f163b29981e24a17b9cc00713070e43 -timeCreated: 1465126706 -licenseType: Store -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Sources/Shaders/BeautifyOrtho.cginc b/Sources/Shaders/BeautifyOrtho.cginc deleted file mode 100644 index 88ff4df0..00000000 --- a/Sources/Shaders/BeautifyOrtho.cginc +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __BEAUTIFY_ORTHO -#define __BEAUTIFY_ORTHO - -// Fix for Oculus GO & Stereo Rendering -#if SHADER_API_MOBILE && (defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED)) - //#define BEAUTIFY_GET_DEPTH_01(x) saturate(Linear01Depth(x)) - //#define BEAUTIFY_GET_DEPTH_EYE(x) clamp(LinearEyeDepth(x), 0, _ProjectionParams.z) - - #define BEAUTIFY_DEPTH_LOD(tex,uv) UNITY_SAMPLE_TEX2DARRAY_LOD(tex, float3((uv).xy, 0), (uv).w).r - #define BEAUTIFY_DEPTH(tex,uv) UNITY_SAMPLE_TEX2DARRAY(tex, float3((uv).x, (uv).y, 0)).r -#else - #define BEAUTIFY_DEPTH_LOD(tex,uv) SAMPLE_DEPTH_TEXTURE_LOD(tex, uv) - #define BEAUTIFY_DEPTH(tex,uv) SAMPLE_DEPTH_TEXTURE(tex, uv) - - //#define BEAUTIFY_GET_DEPTH_01(x) Linear01Depth(x) - //#define BEAUTIFY_GET_DEPTH_EYE(x) LinearEyeDepth(x) -#endif - -#if defined(BEAUTIFY_ORTHO) - #if UNITY_REVERSED_Z - #define Linear01Depth(x) (1.0-(x)) - #define LinearEyeDepth(x) ((1.0-(x)) * _ProjectionParams.z) - #else - #define Linear01Depth(x) (x) - #define LinearEyeDepth(x) ((x) * _ProjectionParams.z) - #endif -#endif - -#endif // __BEAUTIFY_ORTHO \ No newline at end of file diff --git a/Sources/Shaders/BeautifyOrtho.cginc.meta b/Sources/Shaders/BeautifyOrtho.cginc.meta deleted file mode 100644 index fdd6f6af..00000000 --- a/Sources/Shaders/BeautifyOrtho.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 5ad73c29f6c734ba5a0916b50c13b146 -timeCreated: 1488661131 -licenseType: Free -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Sources/Shaders/BeautifySF.cginc b/Sources/Shaders/BeautifySF.cginc deleted file mode 100644 index 268a159d..00000000 --- a/Sources/Shaders/BeautifySF.cginc +++ /dev/null @@ -1,235 +0,0 @@ - #include "UnityCG.cginc" - #include "BeautifyAdvancedParams.cginc" - #include "BeautifyOrtho.cginc" - - UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex); - - #if defined(BEAUTIFY_SUN_FLARES_OCCLUSION_DEPTH) - UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture); - #endif - - uniform sampler2D _FlareTex; - uniform float4 _MainTex_ST; - uniform float4 _MainTex_TexelSize; - uniform float4 _SunPos; - uniform float4 _SunData; // x = sunIntensity, y = disk size, z = ray difraction, w = ray difraction amount - uniform float4 _SunCoronaRays1; // x = length, y = streaks, z = spread, w = angle offset - uniform float4 _SunCoronaRays2; // x = length, y = streaks, z = spread, w = angle offset - uniform float4 _SunGhosts1; // x = reserved, y = size, 2 = pos offset, 3 = brightness - uniform float4 _SunGhosts2; // x = reserved, y = size, 2 = pos offset, 3 = brightness - uniform float4 _SunGhosts3; // x = reserved, y = size, 2 = pos offset, 3 = brightness - uniform float4 _SunGhosts4; // x = reserved, y = size, 2 = pos offset, 3 = brightness - uniform float3 _SunHalo; // x = offset, y = amplitude, z = intensity - uniform float3 _SunTint; - uniform float3 _SunPosRightEye; - - struct appdata { - float4 vertex : POSITION; - float2 texcoord : TEXCOORD0; - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - struct v2f { - float4 pos : SV_POSITION; - float2 uv: TEXCOORD0; - float2 uvNonStereo: TEXCOORD1; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - v2f vert(appdata v) { - v2f o; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - o.pos = UnityObjectToClipPos(v.vertex); - o.uvNonStereo = v.texcoord; - o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); - return o; - } - - void rotate(inout float2 uv, float ang) { - float2 sico; - sincos(ang, sico.x, sico.y); - float2 cosi = float2(sico.y, -sico.x); - uv = float2(dot(cosi, uv), dot(sico, uv)); - } - - float3 sunflare(float2 uv) { - - // general params - float2 sunPos = unity_StereoEyeIndex == 0 ? _SunPos.xy : _SunPosRightEye.xy; - - #if defined(BEAUTIFY_SUN_FLARES_OCCLUSION_DEPTH) - float4 depthSunPos = float4(sunPos, 0, 0); - #if UNITY_UV_STARTS_AT_TOP - if (_MainTex_TexelSize.y < 0) { - // Depth texture is inverted WRT the main texture - depthSunPos.y = 1.0 - depthSunPos.y; - } - #endif - //float depth = BEAUTIFY_GET_DEPTH_01(UNITY_SAMPLE_DEPTH(SAMPLE_RAW_DEPTH_TEXTURE_LOD(_CameraDepthTexture, depthSunPos))); - float depth = Linear01Depth(BEAUTIFY_DEPTH_LOD(_CameraDepthTexture, depthSunPos)); - if (depth<1) return 0; - #endif - - float2 grd = uv - sunPos; - float aspectRatio = _ScreenParams.y / _ScreenParams.x; - grd.y *= aspectRatio; - float len = length(grd); - - // sun disk - float s0 = pow( 1.0 + saturate(_SunData.y - len), 75) - 1.0; - - // corona rays - float gang = _SunPos.w; //atan2(0.5 - sunPos.y, sunPos.x - 0.5); - float ang = atan2(grd.y, grd.x) + gang; - float ray1 = _SunCoronaRays1.z + abs(_SunCoronaRays1.x * cos(_SunCoronaRays1.w + ang * _SunCoronaRays1.y)); // design - ray1 *= pow( 1.0 + len, 1.0/_SunCoronaRays1.x); - s0 += 1.0 / ray1; - - float ray2 = _SunCoronaRays2.z + abs(_SunCoronaRays2.x * sin(_SunCoronaRays2.w + ang * _SunCoronaRays2.y)); // design - ray2 *= pow( 1.0 + len, 1.0/_SunCoronaRays2.x); - s0 += 1.0 / ray2; - - s0 *= _SunData.x; - - // ghosts hexagonal -// float gang = atan2( (sunPos.y * _ScreenParams.y / _ScreenParams.x) - 0.5, sunPos.x - 0.5); // this angle should be passed by uniform -// grd = uv - ghost1Pos + (ghost1Pos - 0.5) * ghost1PosOffset; -// grd.y *= _ScreenParams.y / _ScreenParams.x; -// rotate(grd, gang); -// grd *= ghost1Size; -// s0 += tex2D(_FlareTex, grd + 0.5.xx).r * ghost1Brighness; -// -// grd = uv - ghost2Pos + (ghost2Pos - 0.5) * ghost2PosOffset; -// grd.y *= _ScreenParams.y / _ScreenParams.x; -// rotate(grd, gang); -// grd *= ghost2Size; -// s0 += tex2D(_FlareTex, grd + 0.5.xx).r * ghost2Brighness; - - float3 flare = s0.xxx; - - // ghosts circular - float2 ghost1Pos = 1.0 - sunPos; - grd = uv - ghost1Pos + (ghost1Pos - 0.5) * _SunGhosts1.z; - grd.y *= aspectRatio; - float g0 = saturate(_SunGhosts1.y / length(grd)); - g0 = pow(g0, 12); - flare += g0 * _SunGhosts1.w / len; - - float2 ghost2Pos = 1.0 - sunPos; - grd = uv - ghost2Pos + (ghost2Pos - 0.5) * _SunGhosts2.z; - grd.y *= aspectRatio; - g0 = saturate(_SunGhosts2.y / length(grd)); - g0 = pow(g0, 12); - flare += g0 * _SunGhosts2.w / len; - - float2 ghost3Pos = 1.0 - sunPos; - grd = uv - ghost3Pos + (ghost3Pos - 0.5) * _SunGhosts3.z; - grd.y *= aspectRatio; - g0 = saturate(_SunGhosts3.y / length(grd)); - g0 = pow(g0, 12); - flare += g0 * _SunGhosts3.w / len; - - float2 ghost4Pos = 1.0 - sunPos; - grd = uv - ghost4Pos + (ghost4Pos - 0.5) * _SunGhosts4.z; - grd.y *= aspectRatio; - g0 = saturate(_SunGhosts4.y / length(grd)); - g0 = pow(g0, 12); - flare += g0 * _SunGhosts4.w / len; - - // light rays - float2 uv2 = uv - sunPos; - float clen = length(uv2); - rotate(uv2, gang); - uv2.x *= aspectRatio; - uv2.x *= 0.1; - uv2 /= len; - float lr = saturate(tex2D(_FlareTex, uv2 + _SunPos.zz).r - _SunData.w); - float3 rays = lr * sin(float3(len, len + 0.1, len + 0.2) * 3.1415927); - float atten = pow(1.0 + clen, 13.0); - rays *= _SunData.z / atten; - flare += rays; - - // halo - float hlen = clamp( (len - _SunHalo.x) * _SunHalo.y, 0, 3.1415927); - float3 halo = pow(sin(float3(hlen, hlen + 0.1, hlen + 0.2)), 12.0.xxx); - halo *= _SunHalo.z / atten; - flare += halo; - - return flare * _SunTint; - } - - float3 sunflareFast(float2 uv) { - - // general params - float2 sunPos = unity_StereoEyeIndex == 0 ? _SunPos.xy : _SunPosRightEye.xy; - - float2 grd = uv - sunPos; - float aspectRatio = _ScreenParams.y / _ScreenParams.x; - grd.y *= aspectRatio; - float len = length(grd); - - // corona rays - float ang = atan2(grd.y, grd.x); - float ray1 = _SunCoronaRays1.z + abs(_SunCoronaRays1.x * cos(_SunCoronaRays1.w + ang * _SunCoronaRays1.y)); // design - ray1 *= pow( 1.0 + len, 1.0/_SunCoronaRays1.x); - float s0 = 1.0 / ray1; - - s0 *= _SunData.x; - - float3 flare = s0.xxx; - - // ghosts circular - float2 ghost1Pos = 1.0 - sunPos; - grd = uv - ghost1Pos + (ghost1Pos - 0.5) * _SunGhosts1.z; - grd.y *= aspectRatio; - float g0 = saturate(_SunGhosts1.y / length(grd)); - g0 = pow(g0, 12); - flare += g0 * _SunGhosts1.w / len; - - float2 ghost2Pos = 1.0 - sunPos; - grd = uv - ghost2Pos + (ghost2Pos - 0.5) * _SunGhosts2.z; - grd.y *= aspectRatio; - g0 = saturate(_SunGhosts2.y / length(grd)); - g0 = pow(g0, 12); - flare += g0 * _SunGhosts2.w / len; - - // halo - float hlen = clamp( (len - _SunHalo.x) * _SunHalo.y, 0, 3.1415927); - float3 halo = pow(sin(float3(hlen, hlen + 0.1, hlen + 0.2)), 12.0.xxx); - float clen = length(uv - 0.5.xx); - float atten = pow(1.0 + clen, 13.0); - halo *= _SunHalo.z / atten; - flare += halo; - - return flare * _SunTint; - } - - - float4 fragSF (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - return float4(sunflare(i.uvNonStereo), 1.0); - } - - float4 fragSFAdditive (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - float4 p = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - return p + float4(sunflare(i.uvNonStereo), 1.0); - } - - float4 fragSFFast (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - return float4(sunflareFast(i.uvNonStereo), 1.0); - } - - float4 fragSFFastAdditive (v2f i) : SV_Target { - UNITY_SETUP_INSTANCE_ID(i); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); - float4 p = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex, i.uv); - return p + float4(sunflareFast(i.uvNonStereo), 1.0); - } diff --git a/Sources/Shaders/BeautifySF.cginc.meta b/Sources/Shaders/BeautifySF.cginc.meta deleted file mode 100644 index c2d040ff..00000000 --- a/Sources/Shaders/BeautifySF.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 4dd4f0cb023a74ec0afce3ad10c6a013 -timeCreated: 1488661131 -licenseType: Free -ShaderImporter: - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: