Chore: Unity 6.3 업그레이드 및 외부 에셋 업데이트

- Unity 6.2 → 6.3 업그레이드
- Beautify URP 에셋 업데이트
- Stylized Water 3 에셋 제거
- PIDI Planar Reflections shadergraph 업데이트
- 각종 메타파일 및 에셋 파일 Unity 6.3 호환 업데이트
- lilToon, AmplifyShaderEditor 등 외부 에셋 설정 변경

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
user 2026-01-08 00:27:54 +09:00
parent 6fc83a6f3c
commit 6393b12072
906 changed files with 2820 additions and 55893 deletions

BIN
.vscode/settings.json (Stored with Git LFS) vendored

Binary file not shown.

BIN
Assets/External/Beautify/URP/Beautify_URP.unitypackage (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: b5a026086e55c4223bca096f44d38711
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 233073
packageName: Beautify 3 - Advanced Post Processing
packageVersion: 27.0
assetPath: Assets/External/Beautify/URP/Beautify_URP.unitypackage
uploadId: 838036

View File

@ -20,8 +20,7 @@ Material:
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@ -84,11 +83,8 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
@ -97,7 +93,6 @@ Material:
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
@ -112,7 +107,6 @@ Material:
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
@ -123,7 +117,6 @@ Material:
- _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: []
m_AllowLocking: 1
--- !u!114 &459922976277588049
MonoBehaviour:
m_ObjectHideFlags: 11
@ -136,4 +129,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
version: 7

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
@ -33,8 +33,7 @@ Material:
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@ -97,11 +96,8 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
@ -110,7 +106,6 @@ Material:
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
@ -125,7 +120,6 @@ Material:
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
@ -136,4 +130,3 @@ Material:
- _EmissionColor: {r: 0, g: 0, b: 11.211581, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
@ -27,14 +27,13 @@ Material:
m_ValidKeywords:
- _EMISSION
m_InvalidKeywords: []
m_LightmapFlags: 3
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@ -97,11 +96,8 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
@ -110,7 +106,6 @@ Material:
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
@ -125,7 +120,6 @@ Material:
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
@ -136,4 +130,3 @@ Material:
- _EmissionColor: {r: 11.211583, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@ -20,8 +20,7 @@ Material:
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@ -84,11 +83,8 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
@ -97,7 +93,6 @@ Material:
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
@ -112,7 +107,6 @@ Material:
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
@ -123,7 +117,6 @@ Material:
- _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: []
m_AllowLocking: 1
--- !u!114 &6085971584056948090
MonoBehaviour:
m_ObjectHideFlags: 11
@ -136,4 +129,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
version: 7

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
@ -33,8 +33,7 @@ Material:
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@ -97,11 +96,8 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
@ -110,7 +106,6 @@ Material:
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
@ -125,7 +120,6 @@ Material:
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
@ -136,4 +130,3 @@ Material:
- _EmissionColor: {r: 0, g: 1, b: 0, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
@ -32,8 +32,7 @@ Material:
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@ -96,11 +95,8 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
@ -109,7 +105,6 @@ Material:
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
@ -124,7 +119,6 @@ Material:
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
@ -135,4 +129,3 @@ Material:
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
@ -33,8 +33,7 @@ Material:
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@ -97,11 +96,8 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
@ -110,7 +106,6 @@ Material:
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
@ -125,15 +120,13 @@ Material:
- _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}
- _Color: {r: 1, g: 0.7843137, 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: []
m_AllowLocking: 1

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
@ -24,8 +24,7 @@ Material:
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _EMISSION
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 6
m_EnableInstancingVariants: 0
@ -33,8 +32,7 @@ Material:
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@ -97,11 +95,8 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
@ -110,7 +105,6 @@ Material:
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.2
@ -125,7 +119,6 @@ Material:
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
@ -136,4 +129,3 @@ Material:
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
@ -32,8 +32,7 @@ Material:
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@ -96,11 +95,8 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
@ -109,7 +105,6 @@ Material:
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.2
@ -124,7 +119,6 @@ Material:
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
@ -135,4 +129,3 @@ Material:
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@ -14,14 +14,13 @@ Material:
m_ValidKeywords:
- _EMISSION
m_InvalidKeywords: []
m_LightmapFlags: 3
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@ -84,11 +83,8 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
@ -97,7 +93,6 @@ Material:
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
@ -112,7 +107,6 @@ Material:
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
@ -123,7 +117,6 @@ Material:
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &5224656851961784243
MonoBehaviour:
m_ObjectHideFlags: 11
@ -136,4 +129,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
version: 7

View File

@ -20,8 +20,7 @@ Material:
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@ -84,11 +83,8 @@ Material:
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
@ -97,7 +93,6 @@ Material:
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
@ -112,7 +107,6 @@ Material:
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
@ -123,7 +117,6 @@ Material:
- _EmissionColor: {r: 1, g: 1, b: 0, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &170394318617756494
MonoBehaviour:
m_ObjectHideFlags: 11
@ -136,4 +129,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
version: 7

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,7 @@
using UnityEngine;
using UnityEngine.UI;
using Beautify.Universal;
using Input = Beautify.Demos.InputProxy;
namespace Beautify.Demos {
@ -87,7 +88,6 @@ namespace Beautify.Demos {
float intensity = BeautifySettings.settings.blurIntensity.value;
BeautifySettings.settings.blurIntensity.Override(intensity > 0 ? 0f: 1f);
}
}
void UpdateText() {

View File

@ -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
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e38d81bb9f53c40f7b0540cc8230de2d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,6 @@
using UnityEngine;
using Beautify.Universal;
using Input = Beautify.Demos.InputProxy;
namespace Beautify.Demos {

View File

@ -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
}

View File

@ -1,7 +1,6 @@
fileFormatVersion: 2
guid: e6f78aeba0793a949852face9715ac7b
folderAsset: yes
DefaultImporter:
guid: 46738d4e05ff8486984c82d3b38218aa
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:

View File

@ -22,6 +22,9 @@ namespace Beautify.Universal {
Texture2D headerTex;
bool pixelateExpanded;
// Cached BeautifySettings instances to avoid frequent FindObjectsOfType calls
BeautifySettings[] cachedBeautifySettingsInstances;
// settings group <setting, property reference>
class SectionContents {
public Dictionary<Beautify.SettingsGroup, List<MemberInfo>> groups = new Dictionary<Beautify.SettingsGroup, List<MemberInfo>>();
@ -31,11 +34,15 @@ namespace Beautify.Universal {
readonly Dictionary<Beautify.SectionGroup, SectionContents> sections = new Dictionary<Beautify.SectionGroup, SectionContents>();
readonly Dictionary<Beautify.SettingsGroup, List<MemberInfo>> groupedFields = new Dictionary<Beautify.SettingsGroup, List<MemberInfo>>();
readonly Dictionary<MemberInfo, SerializedDataParameter> unpackedFields = new Dictionary<MemberInfo, SerializedDataParameter>();
readonly Dictionary<string, bool> sectionFoldStates = new Dictionary<string, bool>();
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<Texture2D>("beautifyHeader");
@ -47,6 +54,13 @@ namespace Beautify.Universal {
propertyFetcher = new PropertyFetcher<Beautify>(serializedObject);
// Cache BeautifySettings instances on enable
#if UNITY_2023_1_OR_NEWER
cachedBeautifySettingsInstances = UnityEngine.Object.FindObjectsByType<BeautifySettings>(FindObjectsInactive.Include, FindObjectsSortMode.None);
#else
cachedBeautifySettingsInstances = UnityEngine.Object.FindObjectsOfType<BeautifySettings>(true);
#endif
// get volume fx settings
var settings = beautify.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)
.Where(t => t.FieldType.IsSubclassOf(typeof(VolumeParameter)))
@ -87,6 +101,7 @@ namespace Beautify.Universal {
public override void OnDisable() {
EditorApplication.delayCall -= RepaintAllViews;
cachedBeautifySettingsInstances = null;
}
@ -162,6 +177,32 @@ namespace Beautify.Universal {
}
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;
@ -221,21 +262,40 @@ namespace Beautify.Universal {
}
// sections
bool firstSectionDrawn = false;
foreach (var section in sections) {
bool printSectionHeader = true;
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;
if (printSectionHeader) {
GUILayout.Space(6.0f);
Rect rect = GUILayoutUtility.GetRect(16f, 22f, sectionGroupStyle);
GUI.Box(rect, ObjectNames.NicifyVariableName(section.Key.GetType().Name), sectionGroupStyle);
printSectionHeader = false;
}
bool indent;
if (!IsVisible(parameter, field, out indent)) {
if (field.GetCustomAttribute<Beautify.ShowStrippedLabel>() != null) {
@ -258,6 +318,7 @@ namespace Beautify.Universal {
if (beautify.disabled.value) GUI.enabled = false;
}
EditorGUI.indentLevel--;
GUILayout.Space(6.0f);
// grouped properties
@ -271,13 +332,6 @@ namespace Beautify.Universal {
foreach (var field in group.Value) {
if (!unpackedFields.TryGetValue(field, out var parameter)) continue;
if (printSectionHeader) {
GUILayout.Space(6.0f);
Rect rect = GUILayoutUtility.GetRect(16f, 22f, sectionGroupStyle);
GUI.Box(rect, ObjectNames.NicifyVariableName(section.Key.GetType().Name), sectionGroupStyle);
printSectionHeader = false;
}
bool indent;
if (!IsVisible(parameter, field, out indent)) {
if (firstField) {
@ -303,6 +357,7 @@ namespace Beautify.Universal {
settingsGroup.IsExpanded = EditorGUILayout.Foldout(settingsGroup.IsExpanded, groupName, true, foldoutStyle);
if (!settingsGroup.IsExpanded)
break;
EditorGUI.indentLevel++;
}
DrawPropertyField(parameter, field, indent);
@ -327,36 +382,27 @@ namespace Beautify.Universal {
}
}
if (groupHasContent) {
EditorGUI.indentLevel--;
GUILayout.Space(6.0f);
}
}
// Add "Configure Build Settings" button after the first section is fully drawn
if (!firstSectionDrawn) {
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();
}
firstSectionDrawn = true;
}
}
}
EditorGUILayout.EndVertical();
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 (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 != prevBloomExclusionLayerMask || beautify.anamorphicFlaresExclusionLayerMask != prevAnamorphicFlaresExclusionLayerMask || beautify.outline.value) {
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;
}
}
@ -599,10 +645,21 @@ namespace Beautify.Universal {
sectionGroupStyle.fontStyle = FontStyle.Bold;
// foldout style
Color foldoutColor = EditorGUIUtility.isProSkin ? new Color(0.52f, 0.66f, 0.9f) : new Color(0.12f, 0.16f, 0.4f);
foldoutStyle = new GUIStyle(EditorStyles.foldout);
foldoutStyle.margin = new RectOffset(6, 0, 0, 0);
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))]

View File

@ -13,21 +13,9 @@ namespace Beautify.Universal {
SerializedProperty clearXRColorBuffer;
#endif
SerializedProperty cameraLayerMask;
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;
SerializedProperty stripSettings;
Editor internalStripSettingsEditor;
void OnEnable () {
renderPassEvent = serializedObject.FindProperty("renderPassEvent");
@ -36,37 +24,7 @@ namespace Beautify.Universal {
clearXRColorBuffer = serializedObject.FindProperty("clearXRColorBuffer");
#endif
cameraLayerMask = serializedObject.FindProperty("cameraLayerMask");
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");
stripSettings = serializedObject.FindProperty("stripSettings");
}
public override void OnInspectorGUI () {
@ -80,195 +38,39 @@ namespace Beautify.Universal {
#endif
EditorGUILayout.PropertyField(cameraLayerMask);
GUIStyle boxStyle = new GUIStyle("box");
boxStyle.padding = new RectOffset(10, 10, 10, 10);
boxStyle.margin = new RectOffset(10, 10, 10, 10);
BeautifyRendererFeature feature = (BeautifyRendererFeature)target;
if (stripSettings.objectReferenceValue == null) {
feature.UpdateInternalStripSettings();
}
BeautifyStripSettings currentSettings = feature.settings;
EditorGUILayout.BeginVertical(boxStyle);
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);
void DrawStripToggle (SerializedProperty property, string label) {
EditorGUILayout.BeginHorizontal();
property.boolValue = GUILayout.Toggle(property.boolValue, "", GUILayout.Width(20));
GUILayout.Label(label);
EditorGUILayout.EndHorizontal();
EditorGUILayout.BeginHorizontal();
EditorGUILayout.PropertyField(stripSettings);
if (GUILayout.Button("Create Config Asset", GUILayout.Width(150))) {
CreateConfigAsset(feature, currentSettings);
GUIUtility.ExitGUI();
return;
}
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")) {
if (currentSettings != null) {
Editor.CreateCachedEditor(currentSettings, typeof(BeautifyStripSettingsEditor), ref internalStripSettingsEditor);
#if UNITY_2023_1_OR_NEWER
var beautifyVolumes = FindObjectsByType<Beautify>(FindObjectsSortMode.None);
#else
var beautifyVolumes = FindObjectsOfType<Beautify>();
#endif
bool isFeatureUsed (System.Func<Beautify, bool> predicate) {
foreach (var volume in beautifyVolumes) {
if (predicate(volume)) {
return true;
}
}
return false;
EditorGUI.BeginChangeCheck();
internalStripSettingsEditor.OnInspectorGUI();
if (EditorGUI.EndChangeCheck()) {
if (stripSettings.objectReferenceValue == null) {
Undo.RecordObject(feature, "Change Strip Settings");
feature.SyncInternalToLegacy();
EditorUtility.SetDirty(feature);
}
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");
EditorGUILayout.EndVertical();
if (GUILayout.Button("Select Beautify Volume >")) {
#if UNITY_2023_1_OR_NEWER
@ -286,10 +88,24 @@ namespace Beautify.Universal {
}
}
if (serializedObject.ApplyModifiedProperties()) {
BeautifyRendererFeature feature = (BeautifyRendererFeature)target;
feature.SetStripShaderKeywords();
}
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<BeautifyStripSettings>();
// Copy values
EditorUtility.CopySerialized(source, newSettings);
AssetDatabase.CreateAsset(newSettings, path);
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
feature.stripSettings = newSettings;
EditorUtility.SetDirty(feature);
serializedObject.Update();
}
}
}
}

View File

@ -0,0 +1,133 @@
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 FollowTarget focus mode"));
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() {
#if UNITY_2023_1_OR_NEWER
var volumes = FindObjectsByType<UnityEngine.Rendering.Volume>(FindObjectsSortMode.None);
#else
var volumes = FindObjectsOfType<UnityEngine.Rendering.Volume>();
#endif
foreach (var volume in volumes) {
if (volume.sharedProfile != null && volume.sharedProfile.TryGet<Beautify>(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);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 481931e89af9a499a839a88210a6bd5b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,250 @@
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() {
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");
}
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")) {
#if UNITY_2023_1_OR_NEWER
var beautifyVolumes = FindObjectsByType<Beautify>(FindObjectsSortMode.None);
#else
var beautifyVolumes = FindObjectsOfType<Beautify>();
#endif
bool isFeatureUsed(System.Func<Beautify, bool> 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();
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6cbc8d2d8ee56446389e96b61118a5dc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -27,6 +27,7 @@ namespace Beautify.Universal {
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" },
@ -57,7 +58,7 @@ namespace Beautify.Universal {
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 2", url = "https://assetstore.unity.com/packages/tools/game-toolkits/voxel-play-2-201234" },
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" }
}

View File

@ -9,7 +9,7 @@ namespace Beautify.Universal {
public class CubeLUTImporter : EditorWindow {
[MenuItem("Window/Beautify/Import CUBE LUT")]
[MenuItem("Window/Kronnect/Beautify/Import CUBE LUT")]
public static void ShowBrowser() {
string path = EditorUtility.OpenFilePanel("Select .CUBE file", "", "cube");
if (string.IsNullOrEmpty(path)) return;

View File

@ -27,7 +27,7 @@ namespace Beautify.Universal {
FrameGroup[] groups;
[MenuItem("Window/Beautify/Frame Browser")]
[MenuItem("Window/Kronnect/Beautify/Frame Browser")]
public static void ShowBrowser() {
GetWindow<FrameBrowser>("Frame Browser");
}
@ -116,6 +116,8 @@ namespace Beautify.Universal {
} 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);

View File

@ -29,7 +29,7 @@ namespace Beautify.Universal {
LUTGroup[] groups;
[MenuItem("Window/Beautify/LUT Browser")]
[MenuItem("Window/Kronnect/Beautify/LUT Browser")]
public static void ShowBrowser() {
GetWindow<LUTBrowser>("LUT Browser");
}

BIN
Assets/External/Beautify/URP/README.txt (Stored with Git LFS) vendored

Binary file not shown.

View File

@ -69,7 +69,7 @@ namespace Beautify.Universal {
public class NightVision : SettingsGroup { }
public class ThermalVision : SettingsGroup { }
public class FilmGrainAndArtifacts : SettingsGroup { }
public class FinalBlur : SettingsGroup { }
public class CreativeBlur : SettingsGroup { }
public class Frame : SettingsGroup { }
@ -141,13 +141,15 @@ namespace Beautify.Universal {
public enum DoFFocusMode {
FixedDistance,
AutoFocus,
FollowTarget
FollowTarget,
FollowPosition
}
public enum DoFTargetFallback {
KeepCurrentFocalDistance,
SwitchToAutofocus,
FixedDistanceFocus
FixedDistanceFocus,
DisableEffect
}
public enum DoFBokehComposition {
@ -210,6 +212,12 @@ namespace Beautify.Universal {
Mask
}
public enum CreativeBlurStyle {
ScreenBlur = 0,
TiltShift = 1,
RadialBlur = 2
}
[Serializable]
public sealed class BeautifyCompareStyleParameter : VolumeParameter<CompareStyle> { }
@ -270,6 +278,9 @@ namespace Beautify.Universal {
[Serializable]
public sealed class BeautifyBloomLayersFilterMethodParameter : VolumeParameter<BloomLayersFilterMethod> { }
[Serializable]
public sealed class BeautifyCreativeBlurStyleParameter : VolumeParameter<CreativeBlurStyle> { }
#region General settings
@ -359,7 +370,7 @@ namespace Beautify.Universal {
[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("Edge Threshold"), Tooltip("Minimum difference in depth between neighbour pixels to determine if edge antialiasing should be applied.")]
[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.")]
@ -388,7 +399,7 @@ namespace Beautify.Universal {
public FloatParameter tonemapBrightnessPost = new FloatParameter(1f);
[TonemappingAndColorGrading]
public ClampedFloatParameter saturate = new ClampedFloatParameter(1f, -2f, 3f);
public ClampedFloatParameter saturate = new ClampedFloatParameter(0f, -2f, 3f);
[TonemappingAndColorGrading]
public ClampedFloatParameter brightness = new ClampedFloatParameter(1.0f, 0f, 2f);
@ -753,6 +764,10 @@ namespace Beautify.Universal {
[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));
@ -762,6 +777,13 @@ namespace Beautify.Universal {
[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);
@ -783,7 +805,7 @@ namespace Beautify.Universal {
[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, 1, 32);
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")]
@ -980,13 +1002,13 @@ namespace Beautify.Universal {
[ArtisticChoices, Outline, DisplayName("Outer Only"), DisplayConditionEnum("outlineTechnique", (int)OutlineTechnique.PerObjectId)]
public BoolParameter outlineOuterOnly = new BoolParameter(false);
[ArtisticChoices, Outline, DisplayName("Edge Threshold"), DisplayConditionEnum("outlineTechnique", (int)OutlineTechnique.Depth)]
[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("Depth Diff Threshold"), DisplayConditionEnum("outlineTechnique", (int)OutlineTechnique.Depth)]
[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("Saturation Diff Threshold"), DisplayConditionEnum("outlineTechnique", (int)OutlineTechnique.Depth)]
[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")]
@ -1133,26 +1155,50 @@ namespace Beautify.Universal {
#endregion
#region Final Blur
#region Creative Blur
[ArtisticChoices, FinalBlur, DisplayName("Intensity")]
[ArtisticChoices, CreativeBlur, DisplayName("Intensity")]
public ClampedFloatParameter blurIntensity = new ClampedFloatParameter(0f, 0f, 64f);
[ArtisticChoices, FinalBlur, DisplayName("Mask")]
[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, FinalBlur, DisplayName("Keep Source On Top")]
[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, FinalBlur, DisplayName("Rect"), DisplayConditionBool("blurKeepSourceOnTop")]
[ArtisticChoices, CreativeBlur, DisplayName("Rect"), DisplayConditionBool("blurKeepSourceOnTop")]
public Vector4Parameter blurSourceRect = new Vector4Parameter(new Vector4(0.1f, 0.1f, 0.8f, 0.8f));
[ArtisticChoices, FinalBlur, DisplayName("Edge Blending Width"), DisplayConditionBool("blurKeepSourceOnTop")]
[ArtisticChoices, CreativeBlur, DisplayName("Edge Blending Width"), DisplayConditionBool("blurKeepSourceOnTop")]
public ClampedFloatParameter blurSourceEdgeBlendWidth = new ClampedFloatParameter(0, 0, 1);
[ArtisticChoices, FinalBlur, DisplayName("Edge Blending Strength"), DisplayConditionBool("blurKeepSourceOnTop")]
[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;

View File

@ -0,0 +1,26 @@
using System.Collections.Generic;
using UnityEngine;
namespace Beautify.Universal {
[DisallowMultipleComponent]
[ExecuteAlways]
public sealed class BeautifyCutOutDoFRenderer : MonoBehaviour {
readonly List<Renderer> cachedRenderers = new List<Renderer>(32);
void OnEnable () {
gameObject.GetComponentsInChildren(true, cachedRenderers);
BeautifyRendererFeature.BeautifyDoFTransparentMaskPass.RegisterCutOutRenderers(cachedRenderers);
}
void OnDisable () {
BeautifyRendererFeature.BeautifyDoFTransparentMaskPass.UnregisterCutOutRenderers(cachedRenderers);
cachedRenderers.Clear();
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 72793f31a1e394078bf1d32d706da27b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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<Camera>();
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;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 21dc93e690eed47cdbc3a616c6aafe03
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -11,6 +11,7 @@ using UnityEngine.Rendering;
using UnityEngine.Rendering.RenderGraphModule;
#endif
using UnityEngine.Rendering.Universal;
using UnityEngine.SceneManagement;
using static Beautify.Universal.Beautify;
namespace Beautify.Universal {
@ -118,6 +119,8 @@ namespace Beautify.Universal {
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");
@ -185,6 +188,7 @@ namespace Beautify.Universal {
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";
@ -285,8 +289,10 @@ namespace Beautify.Universal {
public Vector4 sunLastScrPos;
public float sunLastRot;
public float sunFlareTime;
public float dofPrevDistance, dofLastAutofocusDistance;
public float dofPrevDistance = -1;
public float dofLastAutofocusDistance;
public Vector4 dofLastBokehData;
public float dofFadeIntensity = 1f;
}
readonly static Dictionary<Camera, PerCamData> perCamData = new Dictionary<Camera, PerCamData>();
@ -852,6 +858,7 @@ namespace Beautify.Universal {
cmd.DrawMesh(fullscreenMesh, matrix4x4identity, material, 0, passIndex);
} else
#endif
#if !UNITY_6000_3_OR_NEWER
{
#pragma warning disable 0618
RenderTargetIdentifier dest = renderer.GetCameraColorFrontBuffer(cmd);
@ -862,6 +869,7 @@ namespace Beautify.Universal {
cmd.DrawMesh(fullscreenMesh, matrix4x4identity, material, 0, passIndex);
renderer.SwapColorBuffer(cmd);
}
#endif
return;
}
#endif
@ -954,7 +962,21 @@ namespace Beautify.Universal {
BlurThis(cmd, rtBlurDesc, ShaderParams.blurRT, rtBlurDesc.width, rtBlurDesc.height, bMat, blurScale);
}
if (beautify.blurMask.value != null) {
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;
@ -1266,6 +1288,14 @@ namespace Beautify.Universal {
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;
@ -1446,6 +1476,8 @@ namespace Beautify.Universal {
public void UpdateMaterialProperties (Camera cam) {
if (bMat == null) return;
keywords.Clear();
// Compute motion sensibility
@ -1826,7 +1858,12 @@ namespace Beautify.Universal {
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));
keywords.Add(ShaderParams.SKW_EDGE_ANTIALIASING);
if (usesDepthOfField) {
keywords.Add(ShaderParams.SKW_EDGE_ANTIALIASING_DOF);
}
else {
keywords.Add(ShaderParams.SKW_EDGE_ANTIALIASING);
}
}
}
}
@ -1973,15 +2010,20 @@ namespace Beautify.Universal {
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 (sceneSettings.depthOfFieldTarget != null) {
Vector3 spos = cam.WorldToViewportPoint(sceneSettings.depthOfFieldTarget.position);
if (spos.z < 0 || spos.x < 0 || spos.x > 1 || spos.y < 0 || spos.y > 1) {
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);
@ -1990,14 +2032,69 @@ namespace Beautify.Universal {
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, sceneSettings.depthOfFieldTarget.position);
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;
@ -2006,7 +2103,17 @@ namespace Beautify.Universal {
if (sceneSettings.OnBeforeFocus != null) {
d = sceneSettings.OnBeforeFocus(d);
}
camData.dofPrevDistance = Mathf.Lerp(camData.dofPrevDistance, d, Application.isPlaying ? beautify.depthOfFieldFocusSpeed.value * Time.unscaledDeltaTime * 30f : 1f);
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;
@ -2035,6 +2142,8 @@ namespace Beautify.Universal {
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));
@ -2179,6 +2288,8 @@ namespace Beautify.Universal {
public TextureHandle depthTexture;
public RendererListHandle rendererListHandle;
public UniversalCameraData cameraData;
public int targetWidth;
public int targetHeight;
}
public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) {
@ -2193,6 +2304,9 @@ namespace Beautify.Universal {
UniversalCameraData cameraData = frameData.Get<UniversalCameraData>();
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);
@ -2207,6 +2321,8 @@ namespace Beautify.Universal {
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);
@ -2310,6 +2426,8 @@ namespace Beautify.Universal {
public TextureHandle depthTexture;
public RendererListHandle rendererListHandle;
public UniversalCameraData cameraData;
public int targetWidth;
public int targetHeight;
}
public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) {
@ -2324,6 +2442,9 @@ namespace Beautify.Universal {
UniversalCameraData cameraData = frameData.Get<UniversalCameraData>();
passData.depthTexture = resourceData.activeDepthTexture;
passData.cameraData = cameraData;
UnityEngine.Rendering.RenderGraphModule.TextureDesc activeColorDesc = renderGraph.GetTextureDesc(resourceData.activeColorTexture);
passData.targetWidth = activeColorDesc.width;
passData.targetHeight = activeColorDesc.height;
SortingCriteria sortingCriteria = SortingCriteria.None;
var drawingSettings = CreateDrawingSettings(m_ShaderTagIdList, renderingData, cameraData, lightData, sortingCriteria);
@ -2338,6 +2459,8 @@ namespace Beautify.Universal {
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);
@ -2442,6 +2565,8 @@ namespace Beautify.Universal {
public TextureHandle depthTexture;
public RendererListHandle rendererListHandle;
public UniversalCameraData cameraData;
public int targetWidth;
public int targetHeight;
}
public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) {
@ -2456,6 +2581,9 @@ namespace Beautify.Universal {
passData.depthTexture = resourceData.activeDepthTexture;
builder.UseTexture(resourceData.activeDepthTexture, AccessFlags.Read);
passData.cameraData = cameraData;
UnityEngine.Rendering.RenderGraphModule.TextureDesc activeColorDesc = renderGraph.GetTextureDesc(resourceData.activeColorTexture);
passData.targetWidth = activeColorDesc.width;
passData.targetHeight = activeColorDesc.height;
SortingCriteria sortingCriteria = SortingCriteria.None;
var drawingSettings = CreateDrawingSettings(m_ShaderTagIdList, renderingData, cameraData, lightData, sortingCriteria);
@ -2469,6 +2597,8 @@ namespace Beautify.Universal {
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);
@ -2490,10 +2620,13 @@ namespace Beautify.Universal {
}
class BeautifyDoFTransparentMaskPass : ScriptableRenderPass {
internal class BeautifyDoFTransparentMaskPass : ScriptableRenderPass {
static readonly List<ShaderTagId> m_ShaderTagIdList = new List<ShaderTagId>();
static readonly List<Renderer> cutOutRenderers = new List<Renderer>();
static readonly List<Renderer> userCutOutRenderers = new List<Renderer>();
static readonly List<GameObject> s_TempRootObjects = new List<GameObject>(64);
static readonly List<Renderer> s_TempRenderers = new List<Renderer>(1024);
const string dofTransparentDepthRT = "_DoFTransparentDepth";
static int dofTransparentDepthId = Shader.PropertyToID(dofTransparentDepthRT);
@ -2522,17 +2655,54 @@ namespace Beautify.Universal {
BeautifySettings._refreshAlphaClipRenderers = false;
cutOutRenderers.Clear();
currentAlphaCutoutLayerMask = BeautifySettings.dofAlphaTestLayerMask;
#if UNITY_2023_1_OR_NEWER
Renderer[] rr = FindObjectsByType<Renderer>(FindObjectsSortMode.None);
#else
Renderer[] rr = FindObjectsOfType<Renderer>();
#endif
int rrLength = rr.Length;
for (int r = 0; r < rrLength; r++) {
if (((1 << rr[r].gameObject.layer) & currentAlphaCutoutLayerMask) != 0) {
cutOutRenderers.Add(rr[r]);
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<Renderer> 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<Renderer> 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
@ -2633,6 +2803,8 @@ namespace Beautify.Universal {
class PassData {
public UniversalCameraData cameraData;
public RendererListHandle rendererListHandle;
public int targetWidth;
public int targetHeight;
}
public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) {
@ -2646,6 +2818,9 @@ namespace Beautify.Universal {
UniversalCameraData cameraData = frameData.Get<UniversalCameraData>();
UniversalLightData lightData = frameData.Get<UniversalLightData>();
passData.cameraData = cameraData;
TextureDesc activeColorDesc = renderGraph.GetTextureDesc(resourceData.activeColorTexture);
passData.targetWidth = activeColorDesc.width;
passData.targetHeight = activeColorDesc.height;
if (BeautifySettings.dofTransparentSupport) {
SortingCriteria sortingCriteria = cameraData.defaultOpaqueSortFlags;
@ -2679,7 +2854,7 @@ namespace Beautify.Universal {
if (BeautifySettings.dofAlphaTestSupport) {
if (BeautifySettings.dofAlphaTestLayerMask != 0) {
if (BeautifySettings.dofAlphaTestLayerMask != currentAlphaCutoutLayerMask) {
if (BeautifySettings.dofAlphaTestLayerMask != currentAlphaCutoutLayerMask || BeautifySettings._refreshAlphaClipRenderers) {
FindAlphaClippingRenderers();
}
if (depthOnlyMaterialCutOff == null) {
@ -2753,6 +2928,7 @@ namespace Beautify.Universal {
static Material depthOnlyMaterial, depthOnlyMaterialWithObjectId;
Shader depthOnlyShaderWithAlphaTest, depthOnlyShaderWithAlphaTestObjectId;
RTHandle outlineDepthHandle;
public BeautifyOutlineDepthPrepass () {
renderPassEvent = RenderPassEvent.AfterRenderingOpaques;
@ -2760,6 +2936,8 @@ namespace Beautify.Universal {
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
@ -2778,9 +2956,8 @@ namespace Beautify.Universal {
else {
cmd.SetGlobalTexture(outlineDepthRT, outlineDepthId);
}
#if UNITY_2023_2_OR_NEWER && !UNITY_6000_0_OR_NEWER
RTHandle outlineDepthHandle = RTHandles.Alloc(outlineDepthId);
ConfigureTarget(outlineDepthHandle);
#if UNITY_2022_2_OR_NEWER
ConfigureTarget(outlineDepthHandle);
#else
RenderTargetIdentifier rti = new RenderTargetIdentifier(outlineDepthId, 0, CubemapFace.Unknown, -1);
ConfigureTarget(rti);
@ -2863,6 +3040,8 @@ namespace Beautify.Universal {
class PassData {
public UniversalCameraData cameraData;
public RendererListHandle rendererListHandle;
public int targetWidth;
public int targetHeight;
}
public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer frameData) {
@ -2876,6 +3055,9 @@ namespace Beautify.Universal {
UniversalCameraData cameraData = frameData.Get<UniversalCameraData>();
UniversalLightData lightData = frameData.Get<UniversalLightData>();
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);
@ -2926,9 +3108,11 @@ namespace Beautify.Universal {
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;
depthDesc.msaaSamples = 1;
cmd.GetTemporaryRT(outlineDepthId, depthDesc, FilterMode.Point);
if (BeautifySettings.outlineUseObjectId) {
cmd.SetGlobalTexture(outlineObjectIdRT, outlineDepthId, RenderTextureSubElement.Color);
@ -2940,8 +3124,6 @@ namespace Beautify.Universal {
RenderTargetIdentifier rti = new RenderTargetIdentifier(outlineDepthId, 0, CubemapFace.Unknown, -1);
cmd.SetRenderTarget(rti, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store);
cmd.ClearRenderTarget(true, BeautifySettings.outlineUseObjectId, Color.black);
// Render transparent objects
cmd.DrawRendererList(passData.rendererListHandle);
});
}
@ -3007,6 +3189,8 @@ namespace Beautify.Universal {
[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;
@ -3145,6 +3329,9 @@ namespace Beautify.Universal {
}
#if UNITY_2022_1_OR_NEWER
#if UNITY_6000_2_OR_NEWER
[System.Obsolete]
#endif
public override void SetupRenderPasses(ScriptableRenderer renderer,
in RenderingData renderingData) {
@ -3221,15 +3408,105 @@ namespace Beautify.Universal {
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<BeautifyStripSettings>();
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;
System.Text.StringBuilder sb = new System.Text.StringBuilder();
if (stripBeautifyEdgeAA) {
sb.Append(ShaderParams.SKW_EDGE_ANTIALIASING);
BeautifyStripSettings settings;
if (stripSettings != null) {
settings = stripSettings;
} else {
if (m_InternalStripSettings == null) UpdateInternalStripSettings();
settings = m_InternalStripSettings;
}
if (stripBeautifyBloom) {
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);
@ -3244,24 +3521,25 @@ namespace Beautify.Universal {
sb.Append(ShaderParams.SKW_SUN_FLARES_OCCLUSION_SIMPLE);
sb.Append(ShaderParams.SKW_SUN_FLARES_OCCLUSION_SMOOTH);
}
if (stripBeautifyDoF) {
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 (stripBeautifyDoFTransparentSupport) {
else if (settings.stripBeautifyDoFTransparentSupport) {
sb.Append(ShaderParams.SKW_DEPTH_OF_FIELD_TRANSPARENT);
}
if (stripBeautifyLensDirt) {
if (settings.stripBeautifyLensDirt) {
sb.Append(ShaderParams.SKW_DIRT);
}
if (stripBeautifyLUT3D) {
if (settings.stripBeautifyLUT3D) {
sb.Append(ShaderParams.SKW_LUT3D);
}
if (stripBeautifyLUT) {
if (settings.stripBeautifyLUT) {
sb.Append(ShaderParams.SKW_LUT);
}
if (stripBeautifyOutline) {
if (settings.stripBeautifyOutline) {
sb.Append(ShaderParams.SKW_OUTLINE);
sb.Append(ShaderParams.SKW_OUTLINE_CUSTOM_DEPTH);
sb.Append(ShaderParams.SKW_OUTLINE_OBJECT_ID);
@ -3269,78 +3547,78 @@ namespace Beautify.Universal {
sb.Append(ShaderParams.SKW_OUTLINE_OUTER_ONLY);
sb.Append(ShaderParams.SKW_OUTLINE_DEPTH_FADE);
}
if (stripBeautifyNightVision) {
if (settings.stripBeautifyNightVision) {
sb.Append(ShaderParams.SKW_NIGHT_VISION);
}
if (stripBeautifyThermalVision) {
if (settings.stripBeautifyThermalVision) {
sb.Append(ShaderParams.SKW_THERMAL_VISION);
}
if (stripBeautifyColorTweaks) {
if (settings.stripBeautifyColorTweaks) {
sb.Append(ShaderParams.SKW_COLOR_TWEAKS);
}
if (stripBeautifyPurkinje) {
if (settings.stripBeautifyPurkinje) {
sb.Append(ShaderParams.SKW_PURKINJE);
}
if (stripBeautifyTonemappingACES) {
if (settings.stripBeautifyTonemappingACES) {
sb.Append(ShaderParams.SKW_TONEMAP_ACES);
}
if (stripBeautifyTonemappingACESFitted) {
if (settings.stripBeautifyTonemappingACESFitted) {
sb.Append(ShaderParams.SKW_TONEMAP_ACES_FITTED);
}
if (stripBeautifyTonemappingAGX) {
if (settings.stripBeautifyTonemappingAGX) {
sb.Append(ShaderParams.SKW_TONEMAP_AGX);
}
if (stripBeautifyDithering) {
if (settings.stripBeautifyDithering) {
sb.Append(ShaderParams.SKW_DITHER);
}
if (stripBeautifySharpen) {
if (settings.stripBeautifySharpen) {
sb.Append(ShaderParams.SKW_SHARPEN);
sb.Append(ShaderParams.SKW_SHARPEN_EXCLUSION_MASK);
}
else if (stripBeautifySharpenExclusionMask) {
else if (settings.stripBeautifySharpenExclusionMask) {
sb.Append(ShaderParams.SKW_SHARPEN_EXCLUSION_MASK);
}
if (stripBeautifyEyeAdaptation) {
if (settings.stripBeautifyEyeAdaptation) {
sb.Append(ShaderParams.SKW_EYE_ADAPTATION);
sb.Append(ShaderParams.SKW_EA_USE_DEPTH);
sb.Append(ShaderParams.SKW_EA_USE_MASK);
}
if (stripBeautifyChromaticAberration) {
if (settings.stripBeautifyChromaticAberration) {
sb.Append(ShaderParams.SKW_CHROMATIC_ABERRATION);
}
if (stripBeautifyVignetting) {
if (settings.stripBeautifyVignetting) {
sb.Append(ShaderParams.SKW_VIGNETTING);
sb.Append(ShaderParams.SKW_VIGNETTING_MASK);
}
else if (stripBeautifyVignettingMask) {
}
else if (settings.stripBeautifyVignettingMask) {
sb.Append(ShaderParams.SKW_VIGNETTING_MASK);
}
if (stripBeautifyFrame) {
if (settings.stripBeautifyFrame) {
sb.Append(ShaderParams.SKW_FRAME);
}
if (stripBeautifyFilmGrain) {
if (settings.stripBeautifyFilmGrain) {
sb.Append(ShaderParams.SKW_FILM_GRAIN);
}
if (stripUnityBloom) {
if (settings.stripUnityBloom) {
sb.Append("_BLOOM_LQ _BLOOM_HQ _BLOOM_LQ_DIRT _BLOOM_HQ_DIRT");
}
if (stripUnityChromaticAberration) {
if (settings.stripUnityChromaticAberration) {
sb.Append("_CHROMATIC_ABERRATION");
}
if (stripUnityDistortion) {
if (settings.stripUnityDistortion) {
sb.Append("_DISTORTION");
}
if (stripUnityFilmGrain) {
if (settings.stripUnityFilmGrain) {
sb.Append("_FILM_GRAIN");
}
if (stripUnityDithering) {
if (settings.stripUnityDithering) {
sb.Append("_DITHERING");
}
if (stripUnityTonemapping) {
if (settings.stripUnityTonemapping) {
sb.Append("_TONEMAP_ACES _TONEMAP_NEUTRAL");
}
if (stripUnityDebugVariants) {
if (settings.stripUnityDebugVariants) {
sb.Append("DEBUG_DISPLAY");
}
PlayerPrefs.SetString(PLAYER_PREF_KEYNAME, sb.ToString());
@ -3350,22 +3628,24 @@ namespace Beautify.Universal {
var asset = UniversalRenderPipeline.asset;
if (asset == null) return;
if (asset.scriptableRenderer is not UniversalRenderer renderer) return;
try {
if (asset.scriptableRenderer is not UniversalRenderer renderer) return;
var rendererFeaturesField = typeof(ScriptableRenderer)
.GetField("m_RendererFeatures", BindingFlags.NonPublic | BindingFlags.Instance);
var rendererFeaturesField = typeof(ScriptableRenderer)
.GetField("m_RendererFeatures", BindingFlags.NonPublic | BindingFlags.Instance);
if (rendererFeaturesField == null) return;
if (rendererFeaturesField == null) return;
if (rendererFeaturesField.GetValue(renderer) is not List<ScriptableRendererFeature> rendererFeatures) return;
if (rendererFeaturesField.GetValue(renderer) is not List<ScriptableRendererFeature> rendererFeatures) return;
foreach (var feature in rendererFeatures) {
if (feature is BeautifyRendererFeature beautifyFeature) {
beautifyFeature.SetStripShaderKeywords();
return;
foreach (var feature in rendererFeatures) {
if (feature is BeautifyRendererFeature beautifyFeature) {
beautifyFeature.SetStripShaderKeywords();
return;
}
}
}
catch { }
}
#endif

View File

@ -8,16 +8,25 @@ 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 {
[Header("Scene Settings")]
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;
@ -67,24 +76,17 @@ namespace Beautify.Universal {
/// <value>The instance.</value>
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<BeautifySettings>();
if (_instance == null) {
#if UNITY_2023_1_OR_NEWER
_instance = FindAnyObjectByType<BeautifySettings>();
#else
_instance = FindObjectOfType<BeautifySettings>();
#endif
if (_instance == null) {
// Check if there's a single volume component, then add BeautifySettings singleton to that gameobject
_beautifyVolume = FindBeautifyVolume();
if (_beautifyVolume == null) {
return null;
}
GameObject go = _beautifyVolume.gameObject;
_instance = go.GetComponent<BeautifySettings>();
if (_instance == null) {
_instance = go.AddComponent<BeautifySettings>();
}
}
_instance = go.AddComponent<BeautifySettings>();
}
return _instance;
}
@ -198,6 +200,9 @@ namespace Beautify.Universal {
}
void OnEnable() {
if (_instance == null) {
_instance = this;
}
#if UNITY_EDITOR
if (!Application.isPlaying) {
BeautifyRendererFeature.StripBeautifyFeatures();
@ -207,6 +212,9 @@ namespace Beautify.Universal {
}
private void OnDisable() {
if (_instance == this) {
_instance = null;
}
SceneManager.sceneLoaded -= SceneManager_sceneLoaded;
}

View File

@ -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;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7fe56ef6322124921a051ba92ac4fa44
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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

View File

@ -1,7 +1,6 @@
fileFormatVersion: 2
guid: 7e7bfc054e36c424b97776205fef2d54
folderAsset: yes
DefaultImporter:
guid: 76a62ec60ec8e4611859a7a93049e981
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:

View File

@ -152,8 +152,7 @@ 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;
if (maxVal == 0.0) return 0;
return delta / maxVal;
return delta / max(maxVal, 0.0001);
}
#endif // __BEAUTIFY_COMMON_INCLUDE

View File

@ -26,6 +26,14 @@
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;
@ -88,12 +96,8 @@
//TEXTURE2D_X(_DofExclusionTexture;
#endif
#if defined(BEAUTIFY_EDGE_AA)
float4 _AntialiasData;
#define ANTIALIAS_STRENGTH _AntialiasData.x
#define ANTIALIAS_THRESHOLD _AntialiasData.y
#define ANTIALIAS_DEPTH_ATTEN _AntialiasData.z
#define ANTIALIAS_CLAMP _AntialiasData.w
#if BEAUTIFY_EDGE_AA
#include "BeautifyAA.hlsl"
#endif
#if BEAUTIFY_EXCLUSION_MASK_SHARPEN
@ -171,7 +175,7 @@
float minDepth = min(depthN, depthS);
minDepth = min(minDepth, depthW);
minDepth = min(minDepth, depthE);
float dDepth = maxDepth - minDepth + 0.000001;
float dDepth = maxDepth - minDepth;
// luma analysis
float3 rgbS = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, uvS).rgb;
@ -194,24 +198,15 @@
#if !BEAUTIFY_TURBO
minLuma = min(minLuma, lumaE);
#endif
minLuma -= 0.000001;
minLuma -= 0.000001;
#if BEAUTIFY_EDGE_AA
if (dDepth > ANTIALIAS_THRESHOLD) {
float2 n = float2(lumaN - lumaS, lumaW - lumaE);
n *= ANTIALIAS_STRENGTH;
n = clamp(n, -ANTIALIAS_CLAMP, ANTIALIAS_CLAMP);
float antialiasDepthAtten = 1.0 - saturate(depthN * ANTIALIAS_DEPTH_ATTEN);
n *= _MainTex_TexelSize.xy * 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;
rgbM = rgbB;
}
if (dDepth > ANTIALIAS_THRESHOLD) {
rgbM = ApplyEdgeAA(uv, rgbM, dDepth, depthN, lumaN, lumaS, lumaW, lumaE, minLuma, maxLuma, _MainTex_TexelSize.xy);
}
#endif
float lumaM = getLuma(rgbM);
float lumaM = getLuma(rgbM);
// daltonize
#if BEAUTIFY_COLOR_TWEAKS
@ -226,7 +221,7 @@
#if BEAUTIFY_TURBO
const float lumaDepth = 1.0;
#else
float lumaDepth = saturate( _Sharpen.y / dDepth);
float lumaDepth = saturate( _Sharpen.y / max(dDepth, 0.000001));
#endif
float lumaPower = 2.0 * lumaM - minLuma - maxLuma;
@ -553,10 +548,30 @@
half4 FragCopyWithMask (VaryingsSimple i) : SV_Target {
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
float2 uv = UnityStereoTransformScreenSpaceTex(i.uv);
half4 mask = SAMPLE_TEXTURE2D(_BlurMask, sampler_LinearClamp, 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, mask.a);
return lerp(srcPixel, blurPixel, maskAlpha);
}
half4 FragCopyWithMiniView (VaryingsSimple i) : SV_Target {

View File

@ -271,6 +271,7 @@ Subshader {
#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
}

View File

@ -1,4 +1,4 @@
#ifndef BEAUTIFY_PPSDOF_FX
#ifndef BEAUTIFY_PPSDOF_FX
#define BEAUTIFY_PPSDOF_FX
// Copyright 2020-2021 Kronnect - All Rights Reserved.
@ -15,6 +15,10 @@
float3 _BokehData3;
float _BlurScale;
#if BEAUTIFY_EDGE_AA_DOF
#include "BeautifyAA.hlsl"
#endif
struct VaryingsDoFCross {
float4 positionCS : SV_POSITION;
float2 uv: TEXCOORD0;
@ -23,33 +27,80 @@
};
float getCoc(VaryingsSimple i) {
float getCocFromDepth(float depth) {
if (depth > _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, i.uv);
//float exclusionDepth = DecodeFloatRGBA(SAMPLE_TEXTURE2D_LOD(_DofExclusionTexture, sampler_PointClamp, i.uvNonStereo, 0));
float depth = BEAUTIFY_GET_SCENE_DEPTH_01(i.uv);
float depthTex = BEAUTIFY_GET_CUSTOM_DEPTH_01(_DoFTransparentDepth, uv);
float depth = BEAUTIFY_GET_SCENE_DEPTH_01(uv);
depth = min(depth, depthTex);
//if (exclusionDepth < depth) return 0;
depth *= _ProjectionParams.z;
#else
float depth = BEAUTIFY_GET_SCENE_DEPTH_EYE(i.uv);
float depth = BEAUTIFY_GET_SCENE_DEPTH_EYE(uv);
#endif
if (depth>_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); // radius of CoC
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);
float4 pixel = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv);
pixel = clamp(pixel, 0.0.xxxx, _BokehData3.xxxx);
#if UNITY_COLORSPACE_GAMMA
pixel.rgb = GAMMA_TO_LINEAR(pixel.rgb);
#endif
float3 pixelRGB = SAMPLE_TEXTURE2D_X(_MainTex, sampler_LinearClamp, i.uv).rgb;
float coc = getCoc(i) / COC_BASE;
return float4(pixel.rgb, coc);
#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 {

View File

@ -1,10 +1,5 @@
fileFormatVersion: 2
guid: 149180168381eb44d947d82ed4e54d91
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 242307
@ -13,3 +8,54 @@ AssetOrigin:
assetPath: Assets/External/MagicaCloth2/Example (Can be deleted)/UnityChan/UCL2.0/License
Logo/Others/svg/Dark_Silhouette.svg
uploadId: 756593
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12408, guid: 0000000000000000e000000000000000, type: 0}
svgType: 3
texturedSpriteMeshType: 0
svgPixelsPerUnit: 100
gradientResolution: 64
alignment: 0
customPivot: {x: 0, y: 0}
generatePhysicsShape: 0
viewportOptions: 0
preserveViewport: 0
advancedMode: 0
tessellationMode: 1
predefinedResolutionIndex: 1
targetResolution: 1080
resolutionMultiplier: 1
stepDistance: 10
samplingStepDistance: 100
maxCordDeviationEnabled: 0
maxCordDeviation: 1
maxTangentAngleEnabled: 0
maxTangentAngle: 5
keepTextureAspectRatio: 1
textureSize: 256
textureWidth: 256
textureHeight: 256
wrapMode: 0
filterMode: 1
sampleCount: 4
preserveSVGImageAspect: 0
useSVGPixelsPerUnit: 0
spriteData:
TessellationDetail: 0
SpriteName:
SpritePivot: {x: 0, y: 0}
SpriteAlignment: 0
SpriteBorder: {x: 0, y: 0, z: 0, w: 0}
SpriteRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
SpriteID:
PhysicsOutlines: []

View File

@ -1,10 +1,5 @@
fileFormatVersion: 2
guid: 62e7de5702ca2f34bbe1af809b3ba3c4
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 242307
@ -13,3 +8,54 @@ AssetOrigin:
assetPath: Assets/External/MagicaCloth2/Example (Can be deleted)/UnityChan/UCL2.0/License
Logo/Others/svg/Light_Frame.svg
uploadId: 756593
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12408, guid: 0000000000000000e000000000000000, type: 0}
svgType: 3
texturedSpriteMeshType: 0
svgPixelsPerUnit: 100
gradientResolution: 64
alignment: 0
customPivot: {x: 0, y: 0}
generatePhysicsShape: 0
viewportOptions: 0
preserveViewport: 0
advancedMode: 0
tessellationMode: 1
predefinedResolutionIndex: 1
targetResolution: 1080
resolutionMultiplier: 1
stepDistance: 10
samplingStepDistance: 100
maxCordDeviationEnabled: 0
maxCordDeviation: 1
maxTangentAngleEnabled: 0
maxTangentAngle: 5
keepTextureAspectRatio: 1
textureSize: 256
textureWidth: 256
textureHeight: 256
wrapMode: 0
filterMode: 1
sampleCount: 4
preserveSVGImageAspect: 0
useSVGPixelsPerUnit: 0
spriteData:
TessellationDetail: 0
SpriteName:
SpritePivot: {x: 0, y: 0}
SpriteAlignment: 0
SpriteBorder: {x: 0, y: 0, z: 0, w: 0}
SpriteRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
SpriteID:
PhysicsOutlines: []

View File

@ -1,10 +1,5 @@
fileFormatVersion: 2
guid: cfdb094a636fe3d4499b2563b44b02cb
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 242307
@ -13,3 +8,54 @@ AssetOrigin:
assetPath: Assets/External/MagicaCloth2/Example (Can be deleted)/UnityChan/UCL2.0/License
Logo/Others/svg/Light_Silhouette.svg
uploadId: 756593
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12408, guid: 0000000000000000e000000000000000, type: 0}
svgType: 3
texturedSpriteMeshType: 0
svgPixelsPerUnit: 100
gradientResolution: 64
alignment: 0
customPivot: {x: 0, y: 0}
generatePhysicsShape: 0
viewportOptions: 0
preserveViewport: 0
advancedMode: 0
tessellationMode: 1
predefinedResolutionIndex: 1
targetResolution: 1080
resolutionMultiplier: 1
stepDistance: 10
samplingStepDistance: 100
maxCordDeviationEnabled: 0
maxCordDeviation: 1
maxTangentAngleEnabled: 0
maxTangentAngle: 5
keepTextureAspectRatio: 1
textureSize: 256
textureWidth: 256
textureHeight: 256
wrapMode: 0
filterMode: 1
sampleCount: 4
preserveSVGImageAspect: 0
useSVGPixelsPerUnit: 0
spriteData:
TessellationDetail: 0
SpriteName:
SpritePivot: {x: 0, y: 0}
SpriteAlignment: 0
SpriteBorder: {x: 0, y: 0, z: 0, w: 0}
SpriteRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
SpriteID:
PhysicsOutlines: []

View File

@ -480,6 +480,7 @@
"m_OutputNode": {
"m_Id": ""
},
"m_SubDatas": [],
"m_ActiveTargets": [
{
"m_Id": "63e0cb8a991f42ca8ed47f2095ddc6ce"
@ -508,7 +509,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -518,6 +520,9 @@
"m_Guid": {
"m_GuidSerialized": "4c482745-e5d9-4a45-b27e-df59628382b7"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Broken Pattern",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
@ -531,12 +536,15 @@
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": {
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
"m_SerializedTexture": "",
"m_Guid": ""
},
"isMainTexture": false,
"useTilingAndOffset": false,
"useTexelSize": true,
"m_Modifiable": true,
"m_DefaultType": 2
}
@ -555,7 +563,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -618,7 +627,7 @@
"m_StageCapability": 3,
"m_BareResource": false,
"m_Texture": {
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
"m_SerializedTexture": "",
"m_Guid": ""
},
"m_DefaultType": 0
@ -638,7 +647,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -771,7 +781,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -806,7 +817,7 @@
"m_Group": {
"m_Id": "9bd49bd6aed7498793105dc8a255175c"
},
"m_Name": "ReflectionUVs",
"m_Name": "Reflection U Vs",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
@ -818,6 +829,9 @@
}
},
"m_Slots": [
{
"m_Id": "43b4675cfdc642fd9ecc864e63b10643"
},
{
"m_Id": "55232fdb11808e8a92cb8aeab811802e"
}
@ -831,8 +845,12 @@
"m_SerializableColors": []
},
"m_SerializedSubGraph": "{\n \"subGraph\": {\n \"fileID\": -5475051401550479605,\n \"guid\": \"a71bd3b2478457941b98aad7197cb70b\",\n \"type\": 3\n }\n}",
"m_PropertyGuids": [],
"m_PropertyIds": [],
"m_PropertyGuids": [
"68930b8a-1c2a-49c5-b537-26d0b3b8cf0d"
],
"m_PropertyIds": [
-54552410
],
"m_Dropdowns": [],
"m_DropdownSelectedEntries": []
}
@ -899,7 +917,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -936,7 +955,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1001,7 +1021,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -1066,7 +1087,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -1168,7 +1190,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -1296,6 +1319,22 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "43b4675cfdc642fd9ecc864e63b10643",
"m_Id": -54552410,
"m_DisplayName": "ForceFlipY",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "_ForceFlipY",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [],
"m_LiteralMode": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot",
@ -1323,7 +1362,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -1512,7 +1552,8 @@
"m_StageCapability": 2,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -1584,7 +1625,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1692,7 +1734,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1760,6 +1803,10 @@
"m_AlphaClip": true,
"m_CastShadows": true,
"m_ReceiveShadows": true,
"m_DisableTint": false,
"m_Sort3DAs2DCompatible": false,
"m_AdditionalMotionVectorMode": 0,
"m_AlembicMotionVectors": false,
"m_SupportsLODCrossFade": false,
"m_CustomEditorGUI": "",
"m_SupportVFX": false
@ -1893,6 +1940,9 @@
"m_Guid": {
"m_GuidSerialized": "4a9a2759-66e8-4573-b585-9fa893c0f3ea"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Broken Offset Y",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
@ -1906,12 +1956,25 @@
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": 0.0,
"m_FloatType": 1,
"m_LiteralFloatMode": false,
"m_RangeValues": {
"x": -1.0,
"y": 1.0
}
},
"m_SliderType": 0,
"m_SliderPower": 3.0,
"m_EnumType": 0,
"m_CSharpEnumString": "",
"m_EnumNames": [
"Default"
],
"m_EnumValues": [
0
]
}
{
@ -1928,7 +1991,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2061,7 +2125,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2162,7 +2227,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2220,7 +2286,7 @@
"m_Title": "Broken UVs",
"m_Position": {
"x": -2134.0,
"y": -310.0
"y": -311.0000305175781
}
}
@ -2231,6 +2297,9 @@
"m_Guid": {
"m_GuidSerialized": "b45f58b4-3810-4ee5-a24f-c96ff9d650a7"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Reflection Tint",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
@ -2244,6 +2313,8 @@
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": {
"r": 1.0,
"g": 1.0,
@ -2381,7 +2452,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2506,7 +2578,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2530,7 +2603,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2606,7 +2680,7 @@
"m_StageCapability": 3,
"m_BareResource": false,
"m_Texture": {
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
"m_SerializedTexture": "",
"m_Guid": ""
},
"m_DefaultType": 0
@ -2712,7 +2786,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2833,7 +2908,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2843,6 +2919,9 @@
"m_Guid": {
"m_GuidSerialized": "f410f5df-07f9-48aa-b971-575fc77ed596"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Reflection Tex",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
@ -2856,12 +2935,15 @@
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": {
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
"m_SerializedTexture": "",
"m_Guid": ""
},
"isMainTexture": false,
"useTilingAndOffset": false,
"useTexelSize": true,
"m_Modifiable": true,
"m_DefaultType": 1
}
@ -2971,7 +3053,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -3013,7 +3096,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -3030,7 +3114,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -3047,7 +3132,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -3064,7 +3150,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -3081,7 +3168,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -3141,7 +3229,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -3165,7 +3254,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -3225,7 +3315,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -3235,6 +3326,9 @@
"m_Guid": {
"m_GuidSerialized": "1639136d-dca0-4a89-8373-9e49df9b498b"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Broken Offset X",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
@ -3248,12 +3342,25 @@
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": 0.0,
"m_FloatType": 1,
"m_LiteralFloatMode": false,
"m_RangeValues": {
"x": -1.0,
"y": 1.0
}
},
"m_SliderType": 0,
"m_SliderPower": 3.0,
"m_EnumType": 0,
"m_CSharpEnumString": "",
"m_EnumNames": [
"Default"
],
"m_EnumValues": [
0
]
}
{
@ -3436,7 +3543,10 @@
{
"m_SGVersion": 2,
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget",
"m_ObjectId": "fc5c8a42d0784a4fa9d378062efb7700"
"m_ObjectId": "fc5c8a42d0784a4fa9d378062efb7700",
"m_KeepLightingVariants": false,
"m_DefaultDecalBlending": true,
"m_DefaultSSAO": true
}
{
@ -3451,7 +3561,8 @@
"m_StageCapability": 2,
"m_Value": 0.5,
"m_DefaultValue": 0.5,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -3475,6 +3586,7 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}

View File

@ -1,5 +1,5 @@
{
"m_SGVersion": 2,
"m_SGVersion": 3,
"m_Type": "UnityEditor.ShaderGraph.GraphData",
"m_ObjectId": "1ab6edf534d443489501aee1e900bfb0",
"m_Properties": [
@ -14,6 +14,12 @@
}
],
"m_Keywords": [],
"m_Dropdowns": [],
"m_CategoryData": [
{
"m_Id": "8afe6d31c8084f0b9990e7ebcb4c53e2"
}
],
"m_Nodes": [
{
"m_Id": "846dfa1fb11bd682ba90376e06a098a8"
@ -396,14 +402,16 @@
"serializedMesh": {
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
"m_Guid": ""
}
},
"preventRotation": false
},
"m_Path": "Planar Reflections 5/Universal RP/Unlit",
"m_ConcretePrecision": 0,
"m_GraphPrecision": 0,
"m_PreviewMode": 2,
"m_OutputNode": {
"m_Id": ""
},
"m_SubDatas": [],
"m_ActiveTargets": [
{
"m_Id": "87c35db4162d421bb4456ee99ab7c710"
@ -437,6 +445,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -453,7 +462,7 @@
"m_Group": {
"m_Id": ""
},
"m_Name": "ReflectionUVs",
"m_Name": "Reflection U Vs",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
@ -475,6 +484,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -485,7 +495,9 @@
],
"m_PropertyIds": [
1387872834
]
],
"m_Dropdowns": [],
"m_DropdownSelectedEntries": []
}
{
@ -528,6 +540,7 @@
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -546,7 +559,8 @@
"m_StageCapability": 2,
"m_Value": 0.5,
"m_DefaultValue": 0.5,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -570,7 +584,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -633,7 +648,7 @@
"m_StageCapability": 3,
"m_BareResource": false,
"m_Texture": {
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
"m_SerializedTexture": "",
"m_Guid": ""
},
"m_DefaultType": 0
@ -653,7 +668,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -687,6 +703,7 @@
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -714,7 +731,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -738,7 +756,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -753,7 +772,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -802,7 +822,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -859,6 +880,7 @@
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -952,7 +974,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -1014,6 +1037,7 @@
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1065,7 +1089,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1089,7 +1114,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1113,25 +1139,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
"m_ObjectId": "39e9a735fd074d6d8c9e3713495385e2",
"m_Name": "",
"m_ChildObjectList": [
{
"m_Id": "9f36176133568e81a3229cc5c1ccd719"
},
{
"m_Id": "8b1f5262c645618d8d8c7bd134cbccfc"
},
{
"m_Id": "c6a2ee160a25ea889971d5b4cb81fc29"
}
]
},
"m_LiteralMode": false
}
{
@ -1163,6 +1172,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1190,7 +1200,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1219,6 +1230,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1238,7 +1250,8 @@
"m_StageCapability": 2,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -1246,7 +1259,7 @@
"m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot",
"m_ObjectId": "43b7b306a676a4889322869745bf456e",
"m_Id": 0,
"m_DisplayName": "Reflection Tex",
"m_DisplayName": "Reflection Depth",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
@ -1266,7 +1279,8 @@
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -1343,6 +1357,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1419,7 +1434,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1472,6 +1488,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1505,6 +1522,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1533,7 +1551,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1557,7 +1576,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1574,7 +1594,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -1651,6 +1672,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1679,7 +1701,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1751,7 +1774,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1781,7 +1805,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -1810,6 +1835,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1823,14 +1849,44 @@
"m_SGVersion": 1,
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget",
"m_ObjectId": "87c35db4162d421bb4456ee99ab7c710",
"m_Datas": [],
"m_ActiveSubTarget": {
"m_Id": "d272929e859a4f909b8d9ee1562ea74e"
},
"m_AllowMaterialOverride": false,
"m_SurfaceType": 0,
"m_ZTestMode": 4,
"m_ZWriteControl": 0,
"m_AlphaMode": 0,
"m_TwoSided": false,
"m_RenderFace": 2,
"m_AlphaClip": true,
"m_CustomEditorGUI": ""
"m_CastShadows": true,
"m_ReceiveShadows": true,
"m_DisableTint": false,
"m_Sort3DAs2DCompatible": false,
"m_AdditionalMotionVectorMode": 0,
"m_AlembicMotionVectors": false,
"m_SupportsLODCrossFade": false,
"m_CustomEditorGUI": "",
"m_SupportVFX": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
"m_ObjectId": "8afe6d31c8084f0b9990e7ebcb4c53e2",
"m_Name": "",
"m_ChildObjectList": [
{
"m_Id": "9f36176133568e81a3229cc5c1ccd719"
},
{
"m_Id": "8b1f5262c645618d8d8c7bd134cbccfc"
},
{
"m_Id": "c6a2ee160a25ea889971d5b4cb81fc29"
}
]
}
{
@ -1840,20 +1896,31 @@
"m_Guid": {
"m_GuidSerialized": "71f0dc79-056a-43b8-8798-0c611519f4b7"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Reflection Tint",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "Color_3805D2EF",
"m_OverrideReferenceName": "_ReflectionTint",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": {
"r": 1.0,
"g": 1.0,
"b": 1.0,
"a": 0.0
},
"isMainColor": false,
"m_ColorMode": 0
}
@ -1869,7 +1936,8 @@
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -1893,7 +1961,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1922,6 +1991,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1952,7 +2022,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1962,18 +2033,31 @@
"m_Guid": {
"m_GuidSerialized": "f410f5df-07f9-48aa-b971-575fc77ed596"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Reflection Depth",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "Texture2D_8495CDAA",
"m_OverrideReferenceName": "_ReflectionDepth",
"m_GeneratePropertyBlock": false,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": {
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
"m_SerializedTexture": "",
"m_Guid": ""
},
"isMainTexture": false,
"useTilingAndOffset": false,
"useTexelSize": true,
"m_Modifiable": true,
"m_DefaultType": 1
}
@ -2013,6 +2097,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2081,7 +2166,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2131,6 +2217,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2203,7 +2290,8 @@
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -2255,12 +2343,15 @@
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_TextureType": 0,
"m_NormalMapSpace": 0
"m_NormalMapSpace": 0,
"m_EnableGlobalMipBias": true,
"m_MipSamplingMode": 0
}
{
@ -2299,6 +2390,7 @@
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2326,7 +2418,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2384,20 +2477,41 @@
"m_Guid": {
"m_GuidSerialized": "dc49db8d-bd07-4990-87b9-b0813566c502"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Depth Power",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "Vector1_E0A6FDD6",
"m_OverrideReferenceName": "_DepthPower",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": 0.0010000000474974514,
"m_FloatType": 1,
"m_LiteralFloatMode": false,
"m_RangeValues": {
"x": 0.0010000000474974514,
"y": 1.0
}
},
"m_SliderType": 0,
"m_SliderPower": 3.0,
"m_EnumType": 0,
"m_CSharpEnumString": "",
"m_EnumNames": [
"Default"
],
"m_EnumValues": [
0
]
}
{
@ -2456,6 +2570,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2488,6 +2603,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2507,7 +2623,8 @@
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -2524,13 +2641,17 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
"m_SGVersion": 2,
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget",
"m_ObjectId": "d272929e859a4f909b8d9ee1562ea74e"
"m_ObjectId": "d272929e859a4f909b8d9ee1562ea74e",
"m_KeepLightingVariants": false,
"m_DefaultDecalBlending": true,
"m_DefaultSSAO": true
}
{
@ -2570,7 +2691,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -2594,7 +2716,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2611,7 +2734,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2635,7 +2759,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2659,7 +2784,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2698,6 +2824,7 @@
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2718,7 +2845,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2750,6 +2878,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2840,6 +2969,7 @@
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2860,7 +2990,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2914,6 +3045,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2933,6 +3065,7 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}

View File

@ -1,5 +1,5 @@
{
"m_SGVersion": 2,
"m_SGVersion": 3,
"m_Type": "UnityEditor.ShaderGraph.GraphData",
"m_ObjectId": "f689320967c848fa9a350d9849346d96",
"m_Properties": [
@ -21,6 +21,12 @@
"m_Id": "0c2a674da9d34be1ad7687411707e924"
}
],
"m_Dropdowns": [],
"m_CategoryData": [
{
"m_Id": "bde74ca4d59942ec98dff5017989a5b3"
}
],
"m_Nodes": [
{
"m_Id": "2b70ddddd08d44c299168f582f31631b"
@ -419,14 +425,16 @@
"serializedMesh": {
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
"m_Guid": ""
}
},
"preventRotation": false
},
"m_Path": "Planar Reflections 5/Unlit",
"m_ConcretePrecision": 0,
"m_GraphPrecision": 0,
"m_PreviewMode": 2,
"m_OutputNode": {
"m_Id": ""
},
"m_SubDatas": [],
"m_ActiveTargets": [
{
"m_Id": "f681ec6544634bf4b3b3cdd14634dca7"
@ -446,7 +454,8 @@
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -461,7 +470,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -476,23 +486,33 @@
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
"m_SGVersion": 0,
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.ShaderKeyword",
"m_ObjectId": "0c2a674da9d34be1ad7687411707e924",
"m_Guid": {
"m_GuidSerialized": "fd32e5dc-fd9b-4ddd-950a-53c91ee49fba"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "UseDepth",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "BOOLEAN_0C2A674DA9D34BE1AD7687411707E924_ON",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_KeywordType": 0,
"m_KeywordDefinition": 0,
"m_KeywordScope": 0,
"m_KeywordStages": 63,
"m_Entries": [],
"m_Value": 0,
"m_IsEditable": true
@ -519,7 +539,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -566,7 +587,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": true
}
{
@ -606,7 +628,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -623,7 +646,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -681,20 +705,31 @@
"m_Guid": {
"m_GuidSerialized": "438dd698-2433-472b-9b66-80dba391332b"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Reflection Tint",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "_Reflection_Tint",
"m_OverrideReferenceName": "_ReflectionTint",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": {
"r": 1.0,
"g": 1.0,
"b": 1.0,
"a": 0.0
},
"isMainColor": false,
"m_ColorMode": 0
}
@ -736,7 +771,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -751,7 +787,8 @@
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -780,6 +817,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -909,6 +947,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -928,7 +967,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -957,6 +997,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -990,6 +1031,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1029,6 +1071,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1050,7 +1093,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -1099,7 +1143,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1116,7 +1161,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -1161,6 +1207,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1227,6 +1274,7 @@
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1259,6 +1307,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1278,31 +1327,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
"m_ObjectId": "53c4deb56f7e452cb8810399d0098f07",
"m_Name": "",
"m_ChildObjectList": [
{
"m_Id": "d3eae7dc639343839c628535bf18cd5c"
},
{
"m_Id": "1c27c621bc9f43c5b3bd1ef97d62ff02"
},
{
"m_Id": "2f66a4cdeac94d75874d10348c2f09cc"
},
{
"m_Id": "546a71206a6e4b4089ef8cb1216e20c7"
},
{
"m_Id": "7c406addb1504b989e9624ce27630bea"
}
]
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -1325,18 +1351,31 @@
"m_Guid": {
"m_GuidSerialized": "f430be7f-8595-4613-9877-b1100374107a"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Reflection Depth",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "_Reflection_Depth",
"m_OverrideReferenceName": "_ReflectionDepth",
"m_GeneratePropertyBlock": false,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": {
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
"m_SerializedTexture": "",
"m_Guid": ""
},
"isMainTexture": false,
"useTilingAndOffset": false,
"useTexelSize": true,
"m_Modifiable": true,
"m_DefaultType": 0
}
@ -1362,7 +1401,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1379,7 +1419,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -1408,6 +1449,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1483,6 +1525,7 @@
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1510,7 +1553,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1562,12 +1606,15 @@
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_TextureType": 0,
"m_NormalMapSpace": 0
"m_NormalMapSpace": 0,
"m_EnableGlobalMipBias": true,
"m_MipSamplingMode": 0
}
{
@ -1582,7 +1629,7 @@
"m_StageCapability": 3,
"m_BareResource": false,
"m_Texture": {
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
"m_SerializedTexture": "",
"m_Guid": ""
},
"m_DefaultType": 0
@ -1600,7 +1647,8 @@
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -1698,6 +1746,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1740,6 +1789,7 @@
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1753,20 +1803,41 @@
"m_Guid": {
"m_GuidSerialized": "d65f0ec3-c284-40ff-b1a5-4ca8e6d05cef"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "ForceFlipY",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "_ForceFlipY",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": 0.0,
"m_FloatType": 1,
"m_LiteralFloatMode": false,
"m_RangeValues": {
"x": 0.0,
"y": 1.0
}
},
"m_SliderType": 0,
"m_SliderPower": 3.0,
"m_EnumType": 0,
"m_CSharpEnumString": "",
"m_EnumNames": [
"Default"
],
"m_EnumValues": [
0
]
}
{
@ -1795,6 +1866,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1816,7 +1888,8 @@
"m_StageCapability": 2,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -1879,7 +1952,7 @@
"m_StageCapability": 3,
"m_BareResource": false,
"m_Texture": {
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
"m_SerializedTexture": "",
"m_Guid": ""
},
"m_DefaultType": 0
@ -1892,7 +1965,7 @@
"m_Group": {
"m_Id": ""
},
"m_Name": "ReflectionUVs",
"m_Name": "Reflection U Vs",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
@ -1914,6 +1987,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1924,7 +1998,9 @@
],
"m_PropertyIds": [
-54552410
]
],
"m_Dropdowns": [],
"m_DropdownSelectedEntries": []
}
{
@ -1953,6 +2029,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2084,12 +2161,15 @@
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_TextureType": 0,
"m_NormalMapSpace": 0
"m_NormalMapSpace": 0,
"m_EnableGlobalMipBias": true,
"m_MipSamplingMode": 0
}
{
@ -2106,7 +2186,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2178,7 +2259,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2193,7 +2275,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -2270,6 +2353,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2300,13 +2384,17 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
"m_SGVersion": 2,
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget",
"m_ObjectId": "aca02cae695b4793a2ea7a0bf948fa73"
"m_ObjectId": "aca02cae695b4793a2ea7a0bf948fa73",
"m_KeepLightingVariants": false,
"m_DefaultDecalBlending": true,
"m_DefaultSSAO": true
}
{
@ -2330,7 +2418,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2354,7 +2443,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2378,7 +2468,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2410,6 +2501,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2476,7 +2568,32 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
"m_ObjectId": "bde74ca4d59942ec98dff5017989a5b3",
"m_Name": "",
"m_ChildObjectList": [
{
"m_Id": "d3eae7dc639343839c628535bf18cd5c"
},
{
"m_Id": "1c27c621bc9f43c5b3bd1ef97d62ff02"
},
{
"m_Id": "546a71206a6e4b4089ef8cb1216e20c7"
},
{
"m_Id": "7c406addb1504b989e9624ce27630bea"
},
{
"m_Id": "0c2a674da9d34be1ad7687411707e924"
}
]
}
{
@ -2547,7 +2664,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2557,18 +2675,31 @@
"m_Guid": {
"m_GuidSerialized": "f0d8c4dd-e928-4aa7-b214-df9b6d694ac1"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Reflection Tex",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "_Reflection_Tex",
"m_OverrideReferenceName": "_ReflectionTex",
"m_GeneratePropertyBlock": false,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": {
"m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
"m_SerializedTexture": "",
"m_Guid": ""
},
"isMainTexture": false,
"useTilingAndOffset": false,
"useTexelSize": true,
"m_Modifiable": true,
"m_DefaultType": 0
}
@ -2598,7 +2729,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -2641,6 +2773,7 @@
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2661,7 +2794,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2685,7 +2819,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -2726,7 +2861,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2764,6 +2900,7 @@
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -2784,21 +2921,34 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget",
"m_ObjectId": "f681ec6544634bf4b3b3cdd14634dca7",
"m_Datas": [],
"m_ActiveSubTarget": {
"m_Id": "aca02cae695b4793a2ea7a0bf948fa73"
},
"m_AllowMaterialOverride": false,
"m_SurfaceType": 1,
"m_ZTestMode": 4,
"m_ZWriteControl": 0,
"m_AlphaMode": 0,
"m_TwoSided": false,
"m_RenderFace": 2,
"m_AlphaClip": false,
"m_CustomEditorGUI": ""
"m_CastShadows": true,
"m_ReceiveShadows": true,
"m_DisableTint": false,
"m_Sort3DAs2DCompatible": false,
"m_AdditionalMotionVectorMode": 0,
"m_AlembicMotionVectors": false,
"m_SupportsLODCrossFade": false,
"m_CustomEditorGUI": "",
"m_SupportVFX": false
}
{

View File

@ -484,7 +484,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -592,7 +593,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -616,7 +618,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -626,7 +629,7 @@
"m_Group": {
"m_Id": ""
},
"m_Name": "ReflectionUVs",
"m_Name": "Reflection U Vs",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
@ -751,7 +754,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -800,7 +804,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -810,6 +815,9 @@
"m_Guid": {
"m_GuidSerialized": "b5b70efb-94e3-4dd4-91e8-8d1f813cc61a"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Use Fog",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "Use Fog",
@ -840,7 +848,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -855,7 +864,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -938,7 +948,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -1021,6 +1032,7 @@
"m_CastShadows": true,
"m_ReceiveShadows": true,
"m_DisableTint": false,
"m_Sort3DAs2DCompatible": false,
"m_AdditionalMotionVectorMode": 0,
"m_AlembicMotionVectors": false,
"m_SupportsLODCrossFade": false,
@ -1175,7 +1187,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1190,7 +1203,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -1200,6 +1214,9 @@
"m_Guid": {
"m_GuidSerialized": "71f0dc79-056a-43b8-8798-0c611519f4b7"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Reflection Tint",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
@ -1213,6 +1230,8 @@
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": {
"r": 1.0,
"g": 1.0,
@ -1237,7 +1256,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -1252,13 +1272,17 @@
"m_StageCapability": 2,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
"m_SGVersion": 2,
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget",
"m_ObjectId": "5f2dbd5e87e6454897f23eea4ae20c9d"
"m_ObjectId": "5f2dbd5e87e6454897f23eea4ae20c9d",
"m_KeepLightingVariants": false,
"m_DefaultDecalBlending": true,
"m_DefaultSSAO": true
}
{
@ -1403,7 +1427,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -1440,7 +1465,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1536,7 +1562,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -1560,7 +1587,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1570,6 +1598,9 @@
"m_Guid": {
"m_GuidSerialized": "f410f5df-07f9-48aa-b971-575fc77ed596"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "Reflection Tex",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
@ -1583,12 +1614,15 @@
"overrideHLSLDeclaration": true,
"hlslDeclarationOverride": 2,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": {
"m_SerializedTexture": "",
"m_Guid": ""
},
"isMainTexture": false,
"useTilingAndOffset": false,
"useTexelSize": true,
"m_Modifiable": true,
"m_DefaultType": 1
}
@ -1600,6 +1634,9 @@
"m_Guid": {
"m_GuidSerialized": "9b2753ad-20f1-4958-9477-19d6a35447f1"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "ReflectionFog",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "ReflectionFog",
@ -1613,12 +1650,15 @@
"overrideHLSLDeclaration": true,
"hlslDeclarationOverride": 2,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": {
"m_SerializedTexture": "",
"m_Guid": ""
},
"isMainTexture": false,
"useTilingAndOffset": false,
"useTexelSize": true,
"m_Modifiable": true,
"m_DefaultType": 1
}
@ -1644,7 +1684,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1668,7 +1709,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{
@ -1713,7 +1755,8 @@
"m_StageCapability": 2,
"m_Value": 0.5,
"m_DefaultValue": 0.5,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -1841,6 +1884,9 @@
"m_Guid": {
"m_GuidSerialized": "4ad2d44c-7b43-4a4b-ab18-777f1a0316dc"
},
"promotedFromAssetID": "",
"promotedFromCategoryName": "",
"promotedOrdering": -1,
"m_Name": "ForceFlipY",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "ForceFlipY",
@ -1854,12 +1900,25 @@
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_PerRendererData": false,
"m_customAttributes": [],
"m_Value": 0.0,
"m_FloatType": 1,
"m_LiteralFloatMode": false,
"m_RangeValues": {
"x": 0.0,
"y": 1.0
}
},
"m_SliderType": 0,
"m_SliderPower": 3.0,
"m_EnumType": 0,
"m_CSharpEnumString": "",
"m_EnumNames": [
"Default"
],
"m_EnumValues": [
0
]
}
{
@ -1874,7 +1933,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -1937,7 +1997,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2075,7 +2136,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2167,7 +2229,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -2182,7 +2245,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -2199,7 +2263,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2264,7 +2329,8 @@
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
],
"m_LiteralMode": false
}
{
@ -2279,7 +2345,8 @@
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
"m_Labels": [],
"m_LiteralMode": false
}
{
@ -2303,7 +2370,8 @@
"y": 0.0,
"z": 0.0,
"w": 0.0
}
},
"m_LiteralMode": false
}
{

BIN
Assets/External/Stylized Water 3/CHANGELOG.md (Stored with Git LFS) vendored

Binary file not shown.

View File

@ -1,14 +0,0 @@
fileFormatVersion: 2
guid: 793931a466dcf8743a80dc24cd9f9a56
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/CHANGELOG.md
uploadId: 770287

View File

@ -1,6 +0,0 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
IDList=
URL=https://staggart.xyz/unity/stylized-water-3/sw3-docs/
HotKey=0

View File

@ -1,14 +0,0 @@
fileFormatVersion: 2
guid: 34cd7ff569c148941a18a2b494e0e596
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Documentation.url
uploadId: 770287

View File

@ -1,419 +0,0 @@
// Stylized Water 3 by Staggart Creations (http://staggart.xyz)
// COPYRIGHT PROTECTED UNDER THE UNITY ASSET STORE EULA (https://unity.com/legal/as-terms)
// • Copying or referencing source code for the production of new asset store, or public, content is strictly prohibited!
// • Uploading this file to a public repository will subject it to an automated DMCA takedown request.
#if !UNITY_6000_0_OR_NEWER
#error [Stylized Water 3] Imported in a version older than Unity 6, all present script and shader compile errors are valid and not something to simply be fixed. Upgrade the project to Unity 6 to resolve them.
#endif
using System;
using System.Collections.Generic;
using System.Net;
using UnityEditor;
using UnityEditor.PackageManager;
using UnityEditor.PackageManager.Requests;
using PackageInfo = UnityEditor.PackageManager.PackageInfo;
using UnityEngine;
using Object = UnityEngine.Object;
namespace StylizedWater3
{
public class AssetInfo
{
private const string THIS_FILE_GUID = "b15801d8ff7e9574288149dd4cebaa68";
public const string ASSET_NAME = "Stylized Water 3";
public const string ASSET_ID = "287769";
public const string ASSET_ABRV = "SW3";
public const string INSTALLED_VERSION = "3.2.1";
private static readonly Dictionary<string, int> REQUIRED_PATCH_VERSIONS = new Dictionary<string, int>()
{
{ "6000.0", 22 },
{ "6000.1", 3 }
};
public const string MIN_URP_VERSION = "17.0.3";
public const string DOC_URL = "https://staggart.xyz/unity/stylized-water-3/sw3-docs/";
public const string FORUM_URL = "https://discussions.unity.com/t/1542753";
public const string EMAIL_URL = "mailto:contact@staggart.xyz?subject=Stylized Water 3";
public const string DISCORD_INVITE_URL = "https://discord.gg/GNjEaJc8gw";
#if !URP //Enabled when com.unity.render-pipelines.universal is below MIN_URP_VERSION
[InitializeOnLoad]
sealed class PackageInstaller : Editor
{
[InitializeOnLoadMethod]
public static void Initialize()
{
GetLatestCompatibleURPVersion();
if (EditorUtility.DisplayDialog(ASSET_NAME + " v" + INSTALLED_VERSION, "This package requires the Universal Render Pipeline " + MIN_URP_VERSION + " or newer, would you like to install or update it now?", "OK", "Later"))
{
Debug.Log("Universal Render Pipeline <b>v" + lastestURPVersion + "</b> will start installing in a moment. Please refer to the URP documentation for set up instructions");
Debug.Log("After installing and setting up URP, you must Re-import the Shaders folder!");
InstallURP();
}
}
private static PackageInfo urpPackage;
private static string lastestURPVersion;
#if SWS_DEV
[MenuItem("SWS/Get latest URP version")]
#endif
private static void GetLatestCompatibleURPVersion()
{
if(urpPackage == null) urpPackage = GetURPPackage();
if(urpPackage == null) return;
lastestURPVersion = urpPackage.versions.latestCompatible;
#if SWS_DEV
Debug.Log("Latest compatible URP version: " + lastestURPVersion);
#endif
}
private static void InstallURP()
{
if(urpPackage == null) urpPackage = GetURPPackage();
if(urpPackage == null) return;
lastestURPVersion = urpPackage.versions.latestCompatible;
AddRequest addRequest = Client.Add(URP_PACKAGE_ID + "@" + lastestURPVersion);
//Update Core and Shader Graph packages as well, doesn't always happen automatically
for (int i = 0; i < urpPackage.dependencies.Length; i++)
{
#if SWS_DEV
Debug.Log("Updating URP dependency <i>" + urpPackage.dependencies[i].name + "</i> to " + urpPackage.dependencies[i].version);
#endif
addRequest = Client.Add(urpPackage.dependencies[i].name + "@" + urpPackage.dependencies[i].version);
}
//Wait until finished
while(!addRequest.IsCompleted || addRequest.Status == StatusCode.InProgress) { }
WaterShaderImporter.ReimportAll();
}
}
#endif
public const string URP_PACKAGE_ID = "com.unity.render-pipelines.universal";
public static PackageInfo GetURPPackage()
{
SearchRequest request = Client.Search(URP_PACKAGE_ID);
while (request.Status == StatusCode.InProgress) { /* Waiting... */ }
if (request.Status == StatusCode.Failure)
{
Debug.LogError("Failed to retrieve URP package from Package Manager...");
return null;
}
return request.Result[0];
}
//Sorry, as much as I hate to intrude on an entire project, this is the only way in Unity to track importing or updating an asset
public class ImportOrUpdateAsset : AssetPostprocessor
{
private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromPath)
{
for (int i = 0; i < importedAssets.Length; i++)
{
OnPreProcessAsset(importedAssets[i]);
}
for (int i = 0; i < deletedAssets.Length; i++)
{
OnPreProcessAsset(deletedAssets[i]);
}
}
private static void OnPreProcessAsset(string m_assetPath)
{
//Importing/updating the Stylized Water 3 asset
if (m_assetPath.EndsWith("Stylized Water 3/Editor/AssetInfo.cs") || m_assetPath.EndsWith("com.staggartcreations.stylizedwater3/Editor/AssetInfo.cs"))
{
Installer.Initialize();
Installer.OpenWindowIfNeeded();
}
//These files change every version, so will trigger when updating or importing the first time
if (m_assetPath.EndsWith("Extension.UnderwaterRendering.cs"))
{
OnImportExtension("Underwater Rendering");
}
if (m_assetPath.EndsWith("Extension.DynamicEffects.cs"))
{
OnImportExtension("Dynamic Effects");
}
}
private static void OnImportExtension(string name)
{
Debug.Log($"[Stylized Water 3] {name} extension installed/deleted or updated. Reimporting water shader(s) to toggle integration.");
//Re-import any .watershader3 files, since these depend on the installation state of extensions
WaterShaderImporter.ReimportAll();
}
}
public static bool MeetsMinimumVersion(string versionMinimum)
{
Version curVersion = new Version(INSTALLED_VERSION);
Version minVersion = new Version(versionMinimum);
return curVersion >= minVersion;
}
public static void OpenAssetStore(string url = null)
{
if (url == string.Empty) url = "https://assetstore.unity.com/packages/slug/" + ASSET_ID;
Application.OpenURL(url + "?aid=1011l7Uk8&pubref=sw3editor");
}
public static void OpenReviewsPage()
{
Application.OpenURL($"https://assetstore.unity.com/packages/slug/{ASSET_ID}?aid=1011l7Uk8&pubref=sw3editor#reviews");
}
public static void OpenInPackageManager()
{
Application.OpenURL("com.unity3d.kharma:content/" + ASSET_ID);
}
public static void OpenForumPage()
{
Application.OpenURL(FORUM_URL + "/page-999");
}
public static string GetRootFolder()
{
//Get script path
string scriptFilePath = AssetDatabase.GUIDToAssetPath(THIS_FILE_GUID);
//Truncate to get relative path
string rootFolder = scriptFilePath.Replace("Editor/AssetInfo.cs", string.Empty);
#if SWS_DEV
//Debug.Log("<b>Package root</b> " + rootFolder);
#endif
return rootFolder;
}
public static class VersionChecking
{
public static string MinRequiredUnityVersion = "undefined";
public enum UnityVersionType
{
Release,
Beta,
Alpha
}
public static UnityVersionType unityVersionType;
[InitializeOnLoadMethod]
static void Initialize()
{
if (CHECK_PERFORMED == false)
{
CheckForUpdate(false);
CHECK_PERFORMED = true;
}
}
private static bool CHECK_PERFORMED
{
get => SessionState.GetBool("SW3_VERSION_CHECK_PERFORMED", false);
set => SessionState.SetBool("SW3_VERSION_CHECK_PERFORMED", value);
}
public static string LATEST_VERSION
{
get => SessionState.GetString("SW3_LATEST_VERSION", INSTALLED_VERSION);
set => SessionState.SetString("SW3_LATEST_VERSION", value);
}
public static bool UPDATE_AVAILABLE => new Version(LATEST_VERSION) > new Version(INSTALLED_VERSION);
public static string GetUnityVersion()
{
string version = UnityEditorInternal.InternalEditorUtility.GetFullUnityVersion();
//Remove GUID in parenthesis
return version.Substring(0, version.LastIndexOf(" ("));
}
public static bool supportedMajorVersion = true;
public static bool supportedPatchVersion = true;
public static bool compatibleVersion = true;
private static void ParseUnityVersion(string versionString, out int major, out int minor, out int patch, out UnityVersionType type)
{
var match = System.Text.RegularExpressions.Regex.Match(versionString, @"^(\d+)\.(\d+)\.(\d+)");
if (match.Success)
{
major = int.Parse(match.Groups[1].Value);
minor = int.Parse(match.Groups[2].Value);
patch = int.Parse(match.Groups[3].Value);
if (versionString.Contains("b"))
{
type = UnityVersionType.Beta;
}
else if (versionString.Contains("a"))
{
type = UnityVersionType.Alpha;
}
else
{
type = UnityVersionType.Release;
}
}
else
{
throw new FormatException($"Invalid Unity version format: {versionString}.");
}
}
public static void CheckUnityVersion()
{
string unityVersion = GetUnityVersion();
#if !UNITY_6000_0_OR_NEWER
compatibleVersion = false;
#endif
#if !UNITY_6000_0_OR_NEWER || UNITY_7000_OR_NEWER
supportedMajorVersion = false;
#endif
ParseUnityVersion(unityVersion, out int major, out int minor, out int patch, out unityVersionType);
//Get the minimum required patch version for the current Unity version (eg. 6000.1)
if (REQUIRED_PATCH_VERSIONS.TryGetValue($"{major}.{minor}", out int minPatchVersion))
{
supportedPatchVersion = patch >= minPatchVersion;
}
else
{
//None found, current Unity version likely unknown
supportedPatchVersion = true;
}
MinRequiredUnityVersion = $"{major}.{minor}.{minPatchVersion}";
}
public static string apiResult;
private static bool showPopup;
public enum VersionStatus
{
UpToDate,
Outdated
}
public enum QueryStatus
{
Fetching,
Completed,
Failed
}
public static QueryStatus queryStatus = QueryStatus.Completed;
#if SWS_DEV
[MenuItem("SWS/Check for update")]
#endif
public static void GetLatestVersionPopup()
{
CheckForUpdate(true);
}
private static int VersionStringToInt(string input)
{
//Remove all non-alphanumeric characters from version
input = input.Replace(".", string.Empty);
input = input.Replace(" BETA", string.Empty);
return int.Parse(input, System.Globalization.NumberStyles.Any);
}
public static void CheckForUpdate(bool showPopup = false)
{
//Offline
if (Application.internetReachability == NetworkReachability.NotReachable)
{
LATEST_VERSION = INSTALLED_VERSION;
return;
}
VersionChecking.showPopup = showPopup;
queryStatus = QueryStatus.Fetching;
var url = $"https://api.assetstore.unity3d.com/package/latest-version/{ASSET_ID}";
using (System.Net.WebClient webClient = new System.Net.WebClient())
{
webClient.DownloadStringCompleted += OnRetrievedAPIContent;
webClient.DownloadStringAsync(new System.Uri(url), apiResult);
}
}
private class AssetStoreItem
{
public string name;
public string version;
}
private static void OnRetrievedAPIContent(object sender, DownloadStringCompletedEventArgs e)
{
if (e.Error == null && !e.Cancelled)
{
string result = e.Result;
AssetStoreItem asset = (AssetStoreItem)JsonUtility.FromJson(result, typeof(AssetStoreItem));
LATEST_VERSION = asset.version;
//LATEST_VERSION = "9.9.9";
#if SWS_DEV
Debug.Log("<b>Asset store API</b> Update available = " + UPDATE_AVAILABLE + " (Installed:" + INSTALLED_VERSION + ") (Remote:" + LATEST_VERSION + ")");
#endif
queryStatus = QueryStatus.Completed;
if (VersionChecking.showPopup)
{
if (UPDATE_AVAILABLE)
{
if (EditorUtility.DisplayDialog(ASSET_NAME + ", version " + INSTALLED_VERSION, "An updated version is available: " + LATEST_VERSION, "Open Package Manager", "Close"))
{
OpenInPackageManager();
}
}
else
{
if (EditorUtility.DisplayDialog(ASSET_NAME + ", version " + INSTALLED_VERSION, "Installed version is up-to-date!", "Close")) { }
}
}
}
else
{
Debug.LogWarning("[" + ASSET_NAME + "] Contacting update server failed: " + e.Error.Message);
queryStatus = QueryStatus.Failed;
}
}
}
}
}

View File

@ -1,18 +0,0 @@
fileFormatVersion: 2
guid: b15801d8ff7e9574288149dd4cebaa68
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/AssetInfo.cs
uploadId: 770287

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 6ed5097af7d138040808f978ab8fbaa8
timeCreated: 1701083972

View File

@ -1,137 +0,0 @@
// Stylized Water 3 by Staggart Creations (http://staggart.xyz)
// COPYRIGHT PROTECTED UNDER THE UNITY ASSET STORE EULA (https://unity.com/legal/as-terms)
// • Copying or referencing source code for the production of new asset store, or public, content is strictly prohibited!
// • Uploading this file to a public repository will subject it to an automated DMCA takedown request.
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine.UIElements;
using PrefabStageUtility = UnityEditor.SceneManagement.PrefabStageUtility;
namespace StylizedWater3
{
[CanEditMultipleObjects]
[CustomEditor(typeof(AlignToWater))]
public class AlignToWaterInspector : Editor
{
AlignToWater script;
SerializedProperty heightInterface;
SerializedProperty followTarget;
SerializedProperty surfaceSize;
SerializedProperty heightOffset;
SerializedProperty rollAmount;
SerializedProperty rotation;
SerializedProperty smoothing;
private bool isRiver;
private bool wavesEnabled;
private string proSkinPrefix => EditorGUIUtility.isProSkin ? "d_" : "";
private void OnEnable()
{
script = (AlignToWater)target;
heightInterface = serializedObject.FindProperty("heightInterface");
followTarget = serializedObject.FindProperty("followTarget");
surfaceSize = serializedObject.FindProperty("surfaceSize");
heightOffset = serializedObject.FindProperty("heightOffset");
rollAmount = serializedObject.FindProperty("rollAmount");
rotation = serializedObject.FindProperty("rotation");
smoothing = serializedObject.FindProperty("smoothing");
ValidateMaterial();
}
public override void OnInspectorGUI()
{
UI.DrawHeader();
using (new EditorGUILayout.HorizontalScope())
{
GUILayout.Space(EditorGUIUtility.labelWidth);
AlignToWater.EnableInEditor =
GUILayout.Toggle(AlignToWater.EnableInEditor, new GUIContent(" Run in edit-mode (global)", EditorGUIUtility.IconContent(
(AlignToWater.EnableInEditor ? "animationvisibilitytoggleon" : "animationvisibilitytoggleoff")).image), "Button");
}
EditorGUILayout.Space();
serializedObject.Update();
if (script.rigidbody)
{
EditorGUILayout.HelpBox("RigidBody attachment detected! A fair reminder that this is not a physics-compatible component." +
"\n\n" +
"Physics will be overriden and its position and rotation will be set directly." +
"\nVertical forces applied to it will cause visible jittering.", MessageType.Warning);
}
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(heightInterface);
//UI.DrawNotification(isRiver, "Material has river mode enabled, buoyancy only works for flat water bodies", MessageType.Error);
//UI.DrawNotification(!wavesEnabled && !isRiver, "Material used on the water object does not have waves enabled.", MessageType.Error);
/*
if (script.waterObject && script.waterObject.material)
{
UI.DrawNotification((script.waterObject.material.GetFloat("_WorldSpaceUV") == 0f), "Material must use world-projected UV", "Change", ()=> script.waterObject.material.SetFloat("_WorldSpaceUV", 1f), MessageType.Error);
}
*/
EditorGUILayout.Space();
EditorGUILayout.PropertyField(surfaceSize);
EditorGUILayout.Space();
EditorGUILayout.PropertyField(followTarget);
EditorGUILayout.PropertyField(heightOffset);
EditorGUILayout.PropertyField(rollAmount);
EditorGUILayout.Separator();
EditorGUILayout.PropertyField(rotation);
EditorGUILayout.PropertyField(smoothing);
UI.DrawNotification(smoothing.floatValue == 0f && script.rigidbody, "Smoothing is required to mitigate jittering of the RigidBody", MessageType.Warning);
if (EditorGUI.EndChangeCheck())
{
serializedObject.ApplyModifiedProperties();
ValidateMaterial();
}
UI.DrawFooter();
}
private void ValidateMaterial()
{
/*
if (script.waterObject && script.waterObject.material)
{
if (script.waterObject.material != script.waterObject.meshRenderer.sharedMaterial) script.waterObject.material = script.waterObject.meshRenderer.sharedMaterial;
wavesEnabled = WaveParameters.WavesEnabled(script.waterObject.material);
isRiver = script.waterObject.material.IsKeywordEnabled(ShaderParams.Keywords.River);
}
*/
}
}
}

View File

@ -1,18 +0,0 @@
fileFormatVersion: 2
guid: e47e6ece236452443bf1418a01d87491
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 148978298399363526, guid: 0000000000000000d000000000000000, type: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/Inspectors/AlignToWaterInspector.cs
uploadId: 770287

View File

@ -1,92 +0,0 @@
// Stylized Water 3 by Staggart Creations (http://staggart.xyz)
// COPYRIGHT PROTECTED UNDER THE UNITY ASSET STORE EULA (https://unity.com/legal/as-terms)
// • Copying or referencing source code for the production of new asset store, or public, content is strictly prohibited!
// • Uploading this file to a public repository will subject it to an automated DMCA takedown request.
using System;
using UnityEditor;
using UnityEngine;
namespace StylizedWater3
{
[CustomEditor(typeof(OceanFollowBehaviour))]
public class OceanFollowBehaviourInspector : Editor
{
private SerializedProperty material;
private SerializedProperty enableInEditMode;
private SerializedProperty followTarget;
private bool isvalidSetup;
private void OnEnable()
{
material = serializedObject.FindProperty("material");
enableInEditMode = serializedObject.FindProperty("enableInEditMode");
followTarget = serializedObject.FindProperty("followTarget");
isvalidSetup = ((OceanFollowBehaviour)target).InvalidSetup();
}
private bool materialChanged;
public override void OnInspectorGUI()
{
UI.DrawHeader();
serializedObject.Update();
UI.DrawNotification(isvalidSetup, "This component has an invalid set up, one or more references went missing." +
"\n\nThis component must not be added manually." +
"\n\nInstead go to GameObject->3D Object->Water->Ocean to create an ocean",
MessageType.Error);
EditorGUI.BeginChangeCheck();
using (new EditorGUILayout.HorizontalScope())
{
GUILayout.Space(EditorGUIUtility.labelWidth);
OceanFollowBehaviour.ShowWireFrame = GUILayout.Toggle(OceanFollowBehaviour.ShowWireFrame, new GUIContent(" Show Wireframe", EditorGUIUtility.IconContent((OceanFollowBehaviour.ShowWireFrame ? "animationvisibilitytoggleon" : "animationvisibilitytoggleoff")).image), "Button");
}
EditorGUILayout.Separator();
using (new EditorGUILayout.HorizontalScope())
{
materialChanged = false;
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(material);
if (EditorGUI.EndChangeCheck()) materialChanged = true;
EditorGUI.BeginDisabledGroup(material.objectReferenceValue == null);
if (GUILayout.Button("Edit", EditorStyles.miniButton, GUILayout.Width(50f)))
{
Selection.activeObject = material.objectReferenceValue;
//StylizedWaterEditor.PopUpMaterialEditor.Create(material.objectReferenceValue);
}
EditorGUI.EndDisabledGroup();
}
EditorGUILayout.Separator();
EditorGUILayout.PropertyField(enableInEditMode);
EditorGUILayout.PropertyField(followTarget);
if (followTarget.objectReferenceValue == null)
{
EditorGUILayout.HelpBox("None assigned. The actively rendering camera will be automatically followed", MessageType.Info);
}
if (EditorGUI.EndChangeCheck())
{
serializedObject.ApplyModifiedProperties();
if (materialChanged)
{
OceanFollowBehaviour component = (OceanFollowBehaviour)target;
component.ApplyMaterial();
}
}
UI.DrawFooter();
}
}
}

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: d01f8235914f45d2b896c0384d978acc
timeCreated: 1729594576
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/Inspectors/OceanFollowBehaviourInspector.cs
uploadId: 770287

View File

@ -1,361 +0,0 @@
// Stylized Water 3 by Staggart Creations (http://staggart.xyz)
// COPYRIGHT PROTECTED UNDER THE UNITY ASSET STORE EULA (https://unity.com/legal/as-terms)
// • Copying or referencing source code for the production of new asset store, or public, content is strictly prohibited!
// • Uploading this file to a public repository will subject it to an automated DMCA takedown request.
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.XR;
namespace StylizedWater3
{
[CustomEditor(typeof(PlanarReflectionRenderer))]
public class PlanarReflectionRendererInspector : Editor
{
private PlanarReflectionRenderer renderer;
//Rendering
private SerializedProperty rotatable;
private SerializedProperty cullingMask;
private SerializedProperty rendererIndex;
private SerializedProperty offset;
private SerializedProperty includeSkybox;
private SerializedProperty enableFog;
private SerializedProperty enableInSceneView;
//Quality
private SerializedProperty renderShadows;
private SerializedProperty renderScale;
private SerializedProperty maximumLODLevel;
private SerializedProperty waterObjects;
private SerializedProperty moveWithTransform;
private Bounds curBounds;
private bool waterLayerError;
private bool previewReflection
{
get => EditorPrefs.GetBool("SWS2_PREVIEW_REFLECTION_ENABLED", true);
set => EditorPrefs.SetBool("SWS2_PREVIEW_REFLECTION_ENABLED", value);
}
private RenderTexture previewTexture;
#if URP
private void OnEnable()
{
PipelineUtilities.RefreshRendererList();
renderer = (PlanarReflectionRenderer)target;
rotatable = serializedObject.FindProperty("rotatable");
cullingMask = serializedObject.FindProperty("cullingMask");
rendererIndex = serializedObject.FindProperty("rendererIndex");
offset = serializedObject.FindProperty("offset");
includeSkybox = serializedObject.FindProperty("includeSkybox");
enableFog = serializedObject.FindProperty("enableFog");
enableInSceneView = serializedObject.FindProperty("enableInSceneView");
renderShadows = serializedObject.FindProperty("renderShadows");
renderScale = serializedObject.FindProperty("renderScale");
maximumLODLevel = serializedObject.FindProperty("maximumLODLevel");
waterObjects = serializedObject.FindProperty("waterObjects");
moveWithTransform = serializedObject.FindProperty("moveWithTransform");
if (renderer.waterObjects.Count == 0 && WaterObject.Instances.Count == 1)
{
renderer.waterObjects.Add(WaterObject.Instances[0]);
renderer.RecalculateBounds();
renderer.EnableMaterialReflectionSampling();
EditorUtility.SetDirty(target);
serializedObject.ApplyModifiedPropertiesWithoutUndo();
}
ValidateWaterObjectLayer();
curBounds = renderer.CalculateBounds();
RenderPipelineManager.endCameraRendering += OnEndCameraRendering;
}
private Camera currentCamera;
private string currentCameraName;
private bool waterObjectsVisible;
private void OnEndCameraRendering(ScriptableRenderContext context, Camera camera)
{
if (!previewReflection) return;
if (renderer.InvalidContext(camera)) return;
currentCamera = camera;
waterObjectsVisible = renderer.WaterObjectsVisible(currentCamera);
previewTexture = renderer.TryGetReflectionTexture(currentCamera);
currentCameraName = currentCamera.name;
}
private void OnDisable()
{
RenderPipelineManager.endCameraRendering -= OnEndCameraRendering;
}
#endif
public override void OnInspectorGUI()
{
#if !URP
UI.DrawNotification("The Universal Render Pipeline package v" + AssetInfo.MIN_URP_VERSION + " or newer is not installed", MessageType.Error);
#else
UI.DrawHeader();
if (ShaderUtil.anythingCompiling)
{
EditorGUILayout.HelpBox("Rendering is temporarily paused, while the editor finishes compiling shaders", MessageType.Info);
}
using (new EditorGUILayout.HorizontalScope())
{
GUILayout.Space(EditorGUIUtility.labelWidth);
previewReflection =
GUILayout.Toggle(previewReflection, new GUIContent(" Preview reflection", EditorGUIUtility.IconContent(
(previewReflection ? "animationvisibilitytoggleon" : "animationvisibilitytoggleoff")).image), "Button");
}
using (new EditorGUILayout.HorizontalScope())
{
GUILayout.Space(EditorGUIUtility.labelWidth);
EditorGUILayout.LabelField("Status: " + (waterObjectsVisible && currentCamera ? $"Rendering (camera: {currentCamera.name})" : "Not rendering (water not in view for any camera)"), EditorStyles.miniLabel);
}
UI.DrawNotification(PipelineUtilities.VREnabled(), "Not supported with VR rendering", MessageType.Error);
UI.DrawNotification(PlanarReflectionRenderer.AllowReflections == false, "Reflections have been globally disabled by an external script", MessageType.Warning);
serializedObject.Update();
EditorGUI.BeginChangeCheck();
EditorGUILayout.LabelField("Rendering", EditorStyles.boldLabel);
EditorGUI.BeginChangeCheck();
UI.DrawRendererProperty(rendererIndex);
if (EditorGUI.EndChangeCheck())
{
renderer.SetRendererIndex(rendererIndex.intValue);
}
//Default renderer
if (rendererIndex.intValue == 0)
{
UI.DrawNotification("\n" +
"Using the default renderer for reflections is strongly discouraged." +
"\n\nMost (if not all) render features, such as third-party post processing effects, will also render for the reflection." +
"\n\nThis can lead to rendering artefacts and negatively impacts overall performance." +
"\n", MessageType.Warning);
//If there are no other renderers to assign, suggest to auto-create one
UI.DrawNotification(PipelineUtilities.rendererIndexList.Length <= 2, "It is highly recommend to create a separate empty renderer", "Create and assign", CreateRenderer, MessageType.None);
EditorGUILayout.Space();
}
EditorGUILayout.PropertyField(cullingMask);
EditorGUILayout.PropertyField(includeSkybox);
EditorGUILayout.PropertyField(enableFog);
if(enableFog.boolValue) EditorGUILayout.HelpBox("Unity's built-in fog does not support oblique projections. Expect incorrect fog shading on tall objects or large triangles", MessageType.Warning);
EditorGUILayout.PropertyField(enableInSceneView);
EditorGUILayout.Space();
EditorGUILayout.PropertyField(rotatable);
EditorGUILayout.PropertyField(offset);
EditorGUILayout.Space();
EditorGUILayout.LabelField("Quality", EditorStyles.boldLabel);
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(renderShadows);
if (EditorGUI.EndChangeCheck())
{
renderer.ToggleShadows(renderShadows.boolValue);
}
EditorGUILayout.PropertyField(renderScale);
EditorGUILayout.PropertyField(maximumLODLevel);
EditorGUILayout.Space();
EditorGUILayout.LabelField("Target water objects", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(moveWithTransform, new GUIContent("Move bounds with transform", moveWithTransform.tooltip));
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(waterObjects);
if (EditorGUI.EndChangeCheck())
{
curBounds = renderer.CalculateBounds();
}
if (EditorGUI.EndChangeCheck())
{
serializedObject.ApplyModifiedProperties();
}
using (new EditorGUILayout.HorizontalScope())
{
GUILayout.FlexibleSpace();
if(GUILayout.Button(new GUIContent("Auto-find", "Assigns all active water objects currently in the scene"), EditorStyles.miniButton))
{
renderer.waterObjects = new List<WaterObject>(WaterObject.Instances);
renderer.RecalculateBounds();
curBounds = renderer.bounds;
renderer.EnableMaterialReflectionSampling();
ValidateWaterObjectLayer();
EditorUtility.SetDirty(target);
}
if(GUILayout.Button("Clear", EditorStyles.miniButton))
{
renderer.ToggleMaterialReflectionSampling(false);
renderer.waterObjects.Clear();
renderer.RecalculateBounds();
EditorUtility.SetDirty(target);
}
}
if (renderer.waterObjects != null)
{
UI.DrawNotification(renderer.waterObjects.Count == 0, "Assign at least one Water Object", MessageType.Info);
if (renderer.waterObjects.Count > 0)
{
UI.DrawNotification(curBounds.size != renderer.bounds.size || (moveWithTransform.boolValue == false && curBounds.center != renderer.bounds.center), "Water objects have changed or moved, bounds needs to be recalculated", "Recalculate",() => RecalculateBounds(), MessageType.Error);
}
UI.DrawNotification(waterLayerError, "One or more Water Objects aren't on the \"Water\" layer.\n\nThis causes recursive reflections", "Fix", () => SetObjectsOnWaterLayer(), MessageType.Error);
}
#endif
UI.DrawFooter();
}
#if URP
private void CreateRenderer()
{
int index = -1;
string path = "";
PipelineUtilities.CreateAndAssignNewRenderer(out index, out path);
if (index >= 0)
{
rendererIndex.intValue = index;
serializedObject.ApplyModifiedProperties();
serializedObject.Update();
renderer.SetRendererIndex(rendererIndex.intValue);
if (path != string.Empty)
{
Debug.Log("New renderer created at path <i>" + path + "</i>");
}
}
}
public override bool HasPreviewGUI()
{
return previewReflection && previewTexture;
}
public override bool RequiresConstantRepaint()
{
return HasPreviewGUI();
}
public override GUIContent GetPreviewTitle()
{
return currentCamera ? new GUIContent(currentCameraName + " reflection") : new GUIContent("Reflection");
}
public override void OnPreviewSettings()
{
if (HasPreviewGUI() == false) return;
GUILayout.Label($"Resolution ({previewTexture.width}x{previewTexture.height})");
}
private bool drawAlpha;
public override void OnPreviewGUI(Rect r, GUIStyle background)
{
if (drawAlpha)
{
EditorGUI.DrawTextureAlpha(r, previewTexture, ScaleMode.ScaleToFit);
}
else
{
GUI.DrawTexture(r, previewTexture, ScaleMode.ScaleToFit, false);
}
Rect btnRect = r;
btnRect.x += 10f;
btnRect.y += 10f;
btnRect.width = 150f;
btnRect.height = 20f;
drawAlpha = GUI.Toggle(btnRect, drawAlpha, new GUIContent(" Alpha channel"));
}
private void ValidateWaterObjectLayer()
{
if (renderer.waterObjects == null) return;
waterLayerError = false;
int layerID = LayerMask.NameToLayer("Water");
foreach (WaterObject obj in renderer.waterObjects)
{
//Is not on "Water" layer?
if (obj.gameObject.layer != layerID)
{
waterLayerError = true;
return;
}
}
}
private void SetObjectsOnWaterLayer()
{
int layerID = LayerMask.NameToLayer("Water");
foreach (WaterObject obj in renderer.waterObjects)
{
//Is not on "Water" layer?
if (obj.gameObject.layer != layerID)
{
obj.gameObject.layer = layerID;
EditorUtility.SetDirty(obj);
}
}
waterLayerError = false;
}
#endif
private void RecalculateBounds()
{
#if URP
renderer.RecalculateBounds();
curBounds = renderer.bounds;
EditorUtility.SetDirty(target);
#endif
}
}
}

View File

@ -1,18 +0,0 @@
fileFormatVersion: 2
guid: ddec133f70260bb4aa7800414c2ba3c1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/Inspectors/PlanarReflectionRendererInspector.cs
uploadId: 770287

View File

@ -1,158 +0,0 @@
// Stylized Water 3 by Staggart Creations (http://staggart.xyz)
// COPYRIGHT PROTECTED UNDER THE UNITY ASSET STORE EULA (https://unity.com/legal/as-terms)
// • Copying or referencing source code for the production of new asset store, or public, content is strictly prohibited!
// • Uploading this file to a public repository will subject it to an automated DMCA takedown request.
#if URP
using System;
using UnityEditor;
using UnityEngine;
namespace StylizedWater3
{
[CustomEditor(typeof(StylizedWaterRenderFeature))]
public partial class RenderFeatureEditor : Editor
{
private StylizedWaterRenderFeature renderFeature;
private SerializedProperty screenSpaceReflectionSettings;
private SerializedProperty allowDirectionalCaustics;
private SerializedProperty heightPrePassSettings;
private SerializedProperty terrainHeightPrePassSettings;
private void OnEnable()
{
renderFeature = (StylizedWaterRenderFeature)target;
screenSpaceReflectionSettings = serializedObject.FindProperty("screenSpaceReflectionSettings");
allowDirectionalCaustics = serializedObject.FindProperty("allowDirectionalCaustics");
heightPrePassSettings = serializedObject.FindProperty("heightPrePassSettings");
#if SWS_DEV
terrainHeightPrePassSettings = serializedObject.FindProperty("terrainHeightPrePassSettings");
#endif
EnableFlowMapEditor();
DynamicEffectsOnEnable();
UnderwaterRenderingOnEnable();
}
public override void OnInspectorGUI()
{
using (new EditorGUILayout.HorizontalScope())
{
EditorGUILayout.LabelField($"Version {AssetInfo.INSTALLED_VERSION}", EditorStyles.miniLabel);
if (GUILayout.Button(new GUIContent(" Documentation", EditorGUIUtility.FindTexture("_Help"))))
{
Application.OpenURL(AssetInfo.DOC_URL);
}
if (GUILayout.Button(new GUIContent(" Debugger", EditorGUIUtility.IconContent("Profiler.Rendering").image, "Inspect the render buffer outputs")))
{
RenderTargetDebuggerWindow.Open();
}
}
EditorGUILayout.Space();
UI.DrawNotification(PipelineUtilities.RenderGraphEnabled() == false, "Render Graph is disabled, functionality on this render feature will not be functional", "Enable", () =>
{
UnityEngine.Rendering.Universal.RenderGraphSettings settings = UnityEngine.Rendering.GraphicsSettings.GetRenderPipelineSettings<UnityEngine.Rendering.Universal.RenderGraphSettings>();
settings.enableRenderCompatibilityMode = false;
}, MessageType.Error);
serializedObject.Update();
EditorGUI.BeginChangeCheck();
UI.DrawNotification(renderFeature.heightReadbackCS == null, "A compute shader is not assigned to the render feature. Do not add render features in Play mode!", "Attempt fix", () =>
{
renderFeature.VerifyReferences();
}, MessageType.Error);
EditorGUILayout.PropertyField(allowDirectionalCaustics);
EditorGUILayout.Space();
EditorGUILayout.PropertyField(screenSpaceReflectionSettings);
if (renderFeature.screenSpaceReflectionSettings.reflectEverything && screenSpaceReflectionSettings.isExpanded)
{
UI.DrawNotification("Enabling this option bypasses failed reflection ray filtering." +
"\n\nReflection artefacts are to be expected!", MessageType.Warning);
}
EditorGUILayout.Space();
EditorGUILayout.PropertyField(heightPrePassSettings);
if (heightPrePassSettings.isExpanded)
{
HeightPrePass.Settings settings = ((StylizedWaterRenderFeature)target).heightPrePassSettings;
string statsText = "";
statsText += $"Current resolution: {PlanarProjection.CalculateResolution(settings.range, settings.cellsPerUnit, 16, settings.maxResolution)}px\n";
using (new EditorGUILayout.HorizontalScope())
{
GUILayout.Space(EditorGUIUtility.labelWidth);
EditorGUILayout.HelpBox(statsText, MessageType.None);
}
EditorGUILayout.HelpBox("This will pre-render all the height (including any displacement effects) of all water objects (on the Watter layer!) into a buffer. Allowing other shaders to access this information." +
"\n\nSee the Height.hlsl shader library for the API, or use the \"Sample Water Height\" Sub-graph in Shader Graph." +
"\n\nThis is for advanced users, and Water Decals and the \"GPU Async Readback\" height readback API makes use of this", MessageType.Info);
if (HeightQuerySystem.RequiresHeightPrepass)
{
EditorGUILayout.HelpBox("Height Pre-pass is forcible enabled at the moment, because there are height queries being issued from script.", MessageType.Info);
}
}
EditorGUILayout.Space();
EditorGUILayout.LabelField("GPU Height Queries", EditorStyles.boldLabel);
HeightQuerySystem.DISABLE_IN_EDIT_MODE = EditorGUILayout.Toggle("Forced Disable In Edit-mode", HeightQuerySystem.DISABLE_IN_EDIT_MODE);
using (new EditorGUILayout.HorizontalScope())
{
EditorGUILayout.LabelField("");
if (GUILayout.Button(new GUIContent(" Inspect Queries", EditorGUIUtility.FindTexture("_Help"))))
{
HeightQuerySystemEditor.HeightQueryInspector.Open();
}
}
#if SWS_DEV
EditorGUILayout.Space();
EditorGUILayout.PropertyField(terrainHeightPrePassSettings);
#endif
EditorGUILayout.Space();
if (EditorGUI.EndChangeCheck())
{
serializedObject.ApplyModifiedProperties();
}
DrawFlowMapEditor();
DynamicEffectsOnInspectorGUI();
UnderwaterRenderingOnInspectorGUI();
UI.DrawFooter();
}
partial void EnableFlowMapEditor();
partial void DrawFlowMapEditor();
partial void DynamicEffectsOnEnable();
partial void DynamicEffectsOnInspectorGUI();
partial void UnderwaterRenderingOnEnable();
partial void UnderwaterRenderingOnInspectorGUI();
}
}
#endif

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 7b8b99303c66f4b4691ee9f596f1a3bf
timeCreated: 1701084026
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/Inspectors/RenderFeatureEditor.cs
uploadId: 770287

View File

@ -1,114 +0,0 @@
// Stylized Water 3 by Staggart Creations (http://staggart.xyz)
// COPYRIGHT PROTECTED UNDER THE UNITY ASSET STORE EULA (https://unity.com/legal/as-terms)
// • Copying or referencing source code for the production of new asset store, or public, content is strictly prohibited!
// • Uploading this file to a public repository will subject it to an automated DMCA takedown request.
using UnityEditor;
using UnityEngine;
namespace StylizedWater3
{
[CustomEditor(typeof(WaterGrid))]
public class CreateWaterGridInspector : Editor
{
private WaterGrid script;
private SerializedProperty material;
private SerializedProperty followSceneCamera;
private SerializedProperty autoAssignCamera;
private SerializedProperty followTarget;
private SerializedProperty scale;
private SerializedProperty vertexDistance;
private SerializedProperty rowsColumns;
private int vertexCount;
private void OnEnable()
{
script = (WaterGrid) target;
script.m_rowsColumns = script.rowsColumns;
material = serializedObject.FindProperty("material");
followSceneCamera = serializedObject.FindProperty("followSceneCamera");
autoAssignCamera = serializedObject.FindProperty("autoAssignCamera");
followTarget = serializedObject.FindProperty("followTarget");
scale = serializedObject.FindProperty("scale");
vertexDistance = serializedObject.FindProperty("vertexDistance");
rowsColumns = serializedObject.FindProperty("rowsColumns");
}
public override void OnInspectorGUI()
{
UI.DrawHeader();
using (new EditorGUILayout.HorizontalScope())
{
GUILayout.Space(EditorGUIUtility.labelWidth);
WaterGrid.DisplayGrid = GUILayout.Toggle(WaterGrid.DisplayGrid , new GUIContent(" Display Grid", EditorGUIUtility.IconContent((WaterGrid.DisplayGrid ? "animationvisibilitytoggleon" : "animationvisibilitytoggleoff")).image), "Button");
WaterGrid.DisplayWireframe = GUILayout.Toggle(WaterGrid.DisplayWireframe, new GUIContent(" Show Wireframe", EditorGUIUtility.IconContent((WaterGrid.DisplayWireframe ? "animationvisibilitytoggleon" : "animationvisibilitytoggleoff")).image), "Button");
}
serializedObject.Update();
EditorGUI.BeginChangeCheck();
EditorGUILayout.LabelField("Appearance", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(material);
if(material.objectReferenceValue == null) EditorGUILayout.HelpBox("A material must be assigned", MessageType.Error);
EditorGUILayout.Space();
EditorGUILayout.LabelField("Movement", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(followSceneCamera);
using (new EditorGUI.DisabledScope(autoAssignCamera.boolValue))
{
EditorGUILayout.PropertyField(followTarget);
}
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(autoAssignCamera);
EditorGUI.indentLevel--;
EditorGUILayout.Space();
EditorGUILayout.LabelField("Grid geometry", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(scale, GUILayout.MaxWidth(EditorGUIUtility.labelWidth + 95f));
using (new EditorGUILayout.HorizontalScope())
{
EditorGUILayout.PrefixLabel(rowsColumns.displayName);
using (new EditorGUI.DisabledScope(rowsColumns.intValue <= 0))
{
if (GUILayout.Button("-", EditorStyles.miniButtonLeft, GUILayout.Width(25f)))
{
rowsColumns.intValue--;
}
}
EditorGUILayout.PropertyField(rowsColumns, GUIContent.none, GUILayout.MaxWidth(40f));
if (GUILayout.Button("+", EditorStyles.miniButtonRight, GUILayout.Width(25f)))
{
rowsColumns.intValue++;
}
EditorGUILayout.LabelField($"= {rowsColumns.intValue * rowsColumns.intValue} tiles", EditorStyles.miniLabel);
}
EditorGUILayout.Space();
EditorGUILayout.PropertyField(vertexDistance, new GUIContent("Min. vertex distance", vertexDistance.tooltip));
vertexCount = Mathf.FloorToInt(((scale.floatValue / rowsColumns.intValue) / vertexDistance.floatValue) * ((scale.floatValue / rowsColumns.intValue) / vertexDistance.floatValue));
//EditorGUILayout.HelpBox($"Vertex count: {vertexCount}", MessageType.None);
if (EditorGUI.EndChangeCheck())
{
serializedObject.ApplyModifiedProperties();
//Executed here since objects can't be destroyed from OnValidate
script.Recreate();
}
UI.DrawFooter();
}
}
}

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: b340d2e902f13d1438eb157b2904daa3
timeCreated: 1680100927
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/Inspectors/WaterGridInspector.cs
uploadId: 770287

View File

@ -1,169 +0,0 @@
// Stylized Water 3 by Staggart Creations (http://staggart.xyz)
// COPYRIGHT PROTECTED UNDER THE UNITY ASSET STORE EULA (https://unity.com/legal/as-terms)
// • Copying or referencing source code for the production of new asset store, or public, content is strictly prohibited!
// • Uploading this file to a public repository will subject it to an automated DMCA takedown request.
using UnityEditor;
using UnityEditor.AssetImporters;
using UnityEngine;
namespace StylizedWater3
{
[CustomEditor(typeof(WaterMeshImporter))]
public class WaterMeshImporterInspector: ScriptedImporterEditor
{
private SerializedProperty waterMesh;
private SerializedProperty shape;
private SerializedProperty scale;
private SerializedProperty UVTiling;
private SerializedProperty vertexDistance;
private SerializedProperty noise;
private SerializedProperty boundsPadding;
private WaterMeshImporter importer;
private bool autoApplyChanges;
private bool previewInSceneView
{
get => EditorPrefs.GetBool("SWS2_PREVIEW_WATER_MESH_ENABLED", true);
set => EditorPrefs.SetBool("SWS2_PREVIEW_WATER_MESH_ENABLED", value);
}
public override void OnEnable()
{
base.OnEnable();
importer = (WaterMeshImporter)target;
waterMesh = serializedObject.FindProperty("waterMesh");
shape = waterMesh.FindPropertyRelative("shape");
scale = waterMesh.FindPropertyRelative("scale");
UVTiling = waterMesh.FindPropertyRelative("UVTiling");
vertexDistance = waterMesh.FindPropertyRelative("vertexDistance");
noise = waterMesh.FindPropertyRelative("noise");
boundsPadding = waterMesh.FindPropertyRelative("boundsPadding");
SceneView.duringSceneGui += OnSceneGUI;
}
public override void OnInspectorGUI()
{
UI.DrawHeader();
using (new EditorGUILayout.HorizontalScope())
{
GUILayout.Space(EditorGUIUtility.labelWidth);
previewInSceneView =
GUILayout.Toggle(previewInSceneView, new GUIContent(" Preview in scene view", EditorGUIUtility.IconContent(
(previewInSceneView ? "animationvisibilitytoggleon" : "animationvisibilitytoggleoff")).image), "Button");
}
if (previewInSceneView && WaterObject.Instances.Count > 0)
{
using (new EditorGUILayout.HorizontalScope())
{
GUILayout.Space(EditorGUIUtility.labelWidth);
EditorGUILayout.HelpBox($"Drawing on WaterObject instances in the scene ({WaterObject.Instances.Count})", MessageType.None);
}
}
EditorGUILayout.Space();
serializedObject.Update();
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(shape);
EditorGUILayout.Space();
EditorGUILayout.PropertyField(scale);
EditorGUILayout.PropertyField(vertexDistance);
int subdivisions = Mathf.FloorToInt(scale.floatValue / vertexDistance.floatValue);
int vertexCount = Mathf.FloorToInt(subdivisions * subdivisions);
using (new EditorGUILayout.HorizontalScope())
{
GUILayout.Space(EditorGUIUtility.labelWidth);
EditorGUILayout.HelpBox($"Vertex count: {vertexCount:N1}", MessageType.None);
}
EditorGUILayout.Space();
EditorGUILayout.PropertyField(UVTiling);
EditorGUILayout.PropertyField(noise);
EditorGUILayout.PropertyField(boundsPadding);
EditorGUILayout.Space();
autoApplyChanges = EditorGUILayout.Toggle("Auto-apply changes", autoApplyChanges);
if (EditorGUI.EndChangeCheck())
{
serializedObject.ApplyModifiedProperties();
if (autoApplyChanges && HasModified())
{
this.SaveChanges();
//importer = (WaterMeshImporter)target;
}
}
this.ApplyRevertGUI();
UI.DrawFooter();
}
private void OnDestroy()
{
SceneView.duringSceneGui -= OnSceneGUI;
}
private Material mat;
private void OnSceneGUI(SceneView obj)
{
if (!previewInSceneView)
{
GL.wireframe = false;
return;
}
if (!mat)
{
mat = new Material(Shader.Find("Unlit/Color"));
mat.color = new Color(0,0,0, 0.25f);
mat.mainTexture = Texture2D.whiteTexture;
}
mat.SetPass(0);
if (importer.waterMesh.mesh)
{
GL.wireframe = true;
if (WaterObject.Instances.Count > 0)
{
foreach (WaterObject waterObject in WaterObject.Instances)
{
Graphics.DrawMeshNow(importer.waterMesh.mesh, waterObject.transform.localToWorldMatrix);
}
}
else
{
if (SceneView.lastActiveSceneView)
{
//Position in view
Vector3 position = SceneView.lastActiveSceneView.camera.transform.position + (SceneView.lastActiveSceneView.camera.transform.forward * importer.waterMesh.scale * 0.5f);
Graphics.DrawMeshNow(importer.waterMesh.mesh, position, Quaternion.identity);
}
}
GL.wireframe = false;
}
}
}
}

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 97fbcf08a16d4498b8d18b0ce8df5fee
timeCreated: 1728821855
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/Inspectors/WaterMeshImporterInspector.cs
uploadId: 770287

View File

@ -1,149 +0,0 @@
// Stylized Water 3 by Staggart Creations (http://staggart.xyz)
// COPYRIGHT PROTECTED UNDER THE UNITY ASSET STORE EULA (https://unity.com/legal/as-terms)
// • Copying or referencing source code for the production of new asset store, or public, content is strictly prohibited!
// • Uploading this file to a public repository will subject it to an automated DMCA takedown request.
using System;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
#if URP
using UnityEngine.Rendering.Universal;
#endif
namespace StylizedWater3
{
[CustomEditor(typeof(WaterObject))]
[CanEditMultipleObjects]
public class WaterObjectInspector : Editor
{
private WaterObject component;
private SerializedProperty material;
private SerializedProperty meshFilter;
private SerializedProperty meshRenderer;
private bool depthTextureRequired;
private bool opaqueTextureRequired;
private bool showInstances
{
get => SessionState.GetBool("WATEROBJECT_SHOW_INSTANCES", false);
set => SessionState.SetBool("WATEROBJECT_SHOW_INSTANCES", value);
}
private Texture icon;
private void OnEnable()
{
component = (WaterObject)target;
icon = Resources.Load<Texture>("water-object-icon");
material = serializedObject.FindProperty("material");
meshFilter = serializedObject.FindProperty("meshFilter");
meshRenderer = serializedObject.FindProperty("meshRenderer");
CheckMaterial();
}
private void CheckMaterial()
{
#if URP
if (UniversalRenderPipeline.asset == null || component.material == null) return;
depthTextureRequired = UniversalRenderPipeline.asset.supportsCameraDepthTexture == false && component.material.GetFloat("_DisableDepthTexture") == 0f;
opaqueTextureRequired = UniversalRenderPipeline.asset.supportsCameraOpaqueTexture == false && component.material.GetFloat("_RefractionOn") == 1f;
#endif
}
public override void OnInspectorGUI()
{
#if URP
if (UniversalRenderPipeline.asset)
{
UI.DrawNotification(
depthTextureRequired,
"Depth texture is disabled, but is required for the water material",
"Enable",
() =>
{
StylizedWaterEditor.EnableDepthTexture();
CheckMaterial();
},
MessageType.Error);
UI.DrawNotification(
opaqueTextureRequired,
"Opaque texture is disabled, but is required for the water material",
"Enable",
() =>
{
StylizedWaterEditor.EnableOpaqueTexture();
CheckMaterial();
},
MessageType.Error);
}
#endif
EditorGUILayout.HelpBox("This component provides a means for other scripts to identify and find water bodies", MessageType.None);
UI.DrawNotification(component.gameObject.layer != LayerMask.NameToLayer("Water"), "Object is not on the \"Water\" layer. This means it won't work with height readback operations", "Fix", () =>
{
component.gameObject.layer = LayerMask.NameToLayer("Water");
}, MessageType.Warning);
EditorGUILayout.LabelField("References (Read only)", EditorStyles.boldLabel);
EditorGUI.BeginDisabledGroup(true);
{
EditorGUILayout.PropertyField(material);
EditorGUILayout.PropertyField(meshFilter);
EditorGUILayout.PropertyField(meshRenderer);
}
EditorGUI.EndDisabledGroup();
//In case the material was changed on the attached Mesh Renderer, reflect the change
foreach (Object currentTarget in targets)
{
WaterObject water = (WaterObject)currentTarget;
water.FetchWaterMaterial();
}
if (WaterObject.Instances.Count > 1)
{
EditorGUILayout.Space();
showInstances = EditorGUILayout.BeginFoldoutHeaderGroup(showInstances, $"Instances ({WaterObject.Instances.Count})");
if (showInstances)
{
this.Repaint();
using (new EditorGUILayout.VerticalScope(EditorStyles.textArea))
{
foreach (WaterObject obj in WaterObject.Instances)
{
var rect = EditorGUILayout.BeginHorizontal(EditorStyles.miniLabel);
if (rect.Contains(Event.current.mousePosition))
{
EditorGUIUtility.AddCursorRect(new Rect(Event.current.mousePosition.x, Event.current.mousePosition.y, 27, 27), MouseCursor.Link);
EditorGUI.DrawRect(rect, Color.gray * (EditorGUIUtility.isProSkin ? 0.66f : 0.20f));
}
if (GUILayout.Button(new GUIContent(" " + obj.name, icon), EditorStyles.miniLabel, GUILayout.Height(20f)))
{
EditorGUIUtility.PingObject(obj);
Selection.activeGameObject = obj.gameObject;
}
EditorGUILayout.EndHorizontal();
}
}
}
EditorGUILayout.EndFoldoutHeaderGroup();
}
}
}
}

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 9bef468d6b3e196468eb63fc634d8dca
timeCreated: 1685014300
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/Inspectors/WaterObjectInspector.cs
uploadId: 770287

View File

@ -1,381 +0,0 @@
// Stylized Water 3 by Staggart Creations (http://staggart.xyz)
// COPYRIGHT PROTECTED UNDER THE UNITY ASSET STORE EULA (https://unity.com/legal/as-terms)
// • Copying or referencing source code for the production of new asset store, or public, content is strictly prohibited!
// • Uploading this file to a public repository will subject it to an automated DMCA takedown request.
using System.IO;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
using UnityEditor.AssetImporters;
namespace StylizedWater3
{
[CustomEditor(typeof(WaterShaderImporter))]
[CanEditMultipleObjects]
public class WaterShaderImporterEditor : ScriptedImporterEditor
{
private WaterShaderImporter importer;
private SerializedProperty template;
private SerializedProperty settings;
private SerializedProperty shaderName;
private SerializedProperty hidden;
private SerializedProperty type;
private SerializedProperty autoIntegration;
private SerializedProperty fogIntegration;
private SerializedProperty lightCookies;
private SerializedProperty additionalLightCaustics;
private SerializedProperty additionalLightTranslucency;
private SerializedProperty singleCausticsLayers;
private SerializedProperty customIncludeDirectives;
private SerializedProperty additionalPasses;
private SerializedProperty configurationState;
private bool underwaterRenderingInstalled;
private bool dynamicEffectsInstalled;
private FogIntegration.Integration firstIntegration;
private bool curvedWorldInstalled;
private bool showDependencies;
private ShaderData shaderData;
public override void OnEnable()
{
base.OnEnable();
underwaterRenderingInstalled = StylizedWaterEditor.UnderwaterRenderingInstalled();
dynamicEffectsInstalled = StylizedWaterEditor.DynamicEffectsInstalled();
firstIntegration = FogIntegration.GetFirstInstalled();
curvedWorldInstalled = StylizedWaterEditor.CurvedWorldInstalled(out var _);
importer = (WaterShaderImporter)target;
template = serializedObject.FindProperty("template");
settings = serializedObject.FindProperty("settings");
//settings.isExpanded = true;
shaderName = settings.FindPropertyRelative("shaderName");
hidden = settings.FindPropertyRelative("hidden");
type = settings.FindPropertyRelative("type");
lightCookies = settings.FindPropertyRelative("lightCookies");
additionalLightCaustics = settings.FindPropertyRelative("additionalLightCaustics");
additionalLightTranslucency = settings.FindPropertyRelative("additionalLightTranslucency");
singleCausticsLayers = settings.FindPropertyRelative("singleCausticsLayer");
autoIntegration = settings.FindPropertyRelative("autoIntegration");
fogIntegration = settings.FindPropertyRelative("fogIntegration");
customIncludeDirectives = settings.FindPropertyRelative("customIncludeDirectives");
additionalPasses = settings.FindPropertyRelative("additionalPasses");
configurationState = serializedObject.FindProperty("configurationState");
Shader shader = importer.GetShader();
if (shader != null)
{
shaderData = ShaderUtil.GetShaderData(shader);
}
}
public override bool HasPreviewGUI()
{
//Hide the useless sphere preview :)
return false;
}
public override void OnInspectorGUI()
{
//base.OnInspectorGUI();
Color defaultColor = GUI.contentColor;
UI.DrawHeader();
Shader shader = AssetDatabase.LoadAssetAtPath<Shader>(importer.assetPath);
if (shader == null)
{
UI.DrawNotification("Shader failed to compile, try to manually recompile it now.", MessageType.Error);
}
UI.DrawNotification(EditorSettings.asyncShaderCompilation == false, "Asynchronous shader compilation is disabled in the Editor settings." +
"\n\n" +
"This will very likely cause the editor to crash when trying to compile this shader (D3D11 Swapchain error).", "Enable", () =>
{
EditorSettings.asyncShaderCompilation = true;
}, MessageType.Error);
if (GUILayout.Button(new GUIContent(" Recompile", EditorGUIUtility.IconContent("RotateTool").image), GUILayout.MinHeight(30f)))
{
importer.Reimport();
return;
}
GUILayout.Space(-2f);
using (new EditorGUILayout.HorizontalScope())
{
using (new EditorGUI.DisabledGroupScope(shader == null))
{
if (GUILayout.Button(new GUIContent(" Show Generated Code", EditorGUIUtility.IconContent("align_horizontally_left_active").image), EditorStyles.miniButtonLeft, GUILayout.Height(28f)))
{
GenericMenu menu = new GenericMenu();
menu.AddItem(new GUIContent("With tessellation"), false, () => OpenGeneratedCode(true));
menu.AddItem(new GUIContent("Without tessellation"), false, () => OpenGeneratedCode(false));
menu.ShowAsContext();
}
if (GUILayout.Button(new GUIContent("Clear cache", "Unity's shader compiler will cache the compiled shader, and internally use that." +
"\n\nThis may result in seemingly false-positive shader errors. Such as in the case of importing the shader, before the URP shader libraries are." +
"\n\nClearing the cache gives the compiler a kick, and makes the shader properly represent the current state of the project/dependencies."), EditorStyles.miniButtonRight, GUILayout.Height(28f)))
{
importer.ClearCache();
}
}
}
EditorGUILayout.Space();
serializedObject.Update();
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(template);
if (template.objectReferenceValue == null) EditorGUILayout.HelpBox("• Template is assumed to be in the contents of the file itself", MessageType.None);
//EditorGUILayout.LabelField(importer.GetTemplatePath(), EditorStyles.miniLabel);
EditorGUILayout.Space();
EditorGUILayout.LabelField("Settings", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(shaderName);
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(hidden);
EditorGUI.indentLevel--;
EditorGUILayout.PropertyField(type);
if (type.intValue == (int)WaterShaderImporter.WaterShaderSettings.ShaderType.WaterSurface)
{
EditorGUILayout.Space();
EditorGUILayout.LabelField("Integrations", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(autoIntegration, new GUIContent("Automatic detection", autoIntegration.tooltip));
if (autoIntegration.boolValue)
{
using (new EditorGUILayout.HorizontalScope())
{
EditorGUI.indentLevel++;
EditorGUILayout.LabelField("Fog post-processing", GUILayout.MaxWidth(EditorGUIUtility.labelWidth));
EditorGUI.indentLevel--;
using (new EditorGUILayout.HorizontalScope(EditorStyles.textField))
{
GUI.contentColor = Color.green;
EditorGUILayout.LabelField(firstIntegration.name);
GUI.contentColor = defaultColor;
}
}
if (curvedWorldInstalled)
{
using (new EditorGUILayout.HorizontalScope())
{
EditorGUI.indentLevel++;
EditorGUILayout.LabelField("Curved World 2020", GUILayout.MaxWidth(EditorGUIUtility.labelWidth));
EditorGUI.indentLevel--;
using (new EditorGUILayout.HorizontalScope(EditorStyles.textField))
{
GUI.contentColor = Color.green;
EditorGUILayout.LabelField("Installed");
GUI.contentColor = defaultColor;
}
}
}
}
else
{
EditorGUILayout.PropertyField(fogIntegration);
}
if (curvedWorldInstalled) EditorGUILayout.HelpBox("Curved World integration must be manually activated through minor code changes, see documentation.", MessageType.Info);
EditorGUILayout.Space();
EditorGUILayout.LabelField("Functionality support", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(lightCookies);
EditorGUILayout.PropertyField(additionalLightCaustics);
EditorGUILayout.PropertyField(additionalLightTranslucency);
EditorGUILayout.PropertyField(singleCausticsLayers);
}
EditorGUILayout.Space();
EditorGUILayout.LabelField("Extensions", EditorStyles.boldLabel);
using (new EditorGUILayout.HorizontalScope())
{
EditorGUILayout.LabelField("Underwater Rendering", GUILayout.MaxWidth(EditorGUIUtility.labelWidth));
using (new EditorGUILayout.HorizontalScope(EditorStyles.textField))
{
if (underwaterRenderingInstalled)
{
GUI.contentColor = Color.green;
EditorGUILayout.LabelField("Installed");
}
else
{
GUI.contentColor = new Color(1f, 0.65f, 0f);
EditorGUILayout.LabelField("(Not installed)");
}
GUI.contentColor = defaultColor;
}
}
using (new EditorGUILayout.HorizontalScope())
{
EditorGUILayout.LabelField("Dynamic Effects", GUILayout.MaxWidth(EditorGUIUtility.labelWidth));
using (new EditorGUILayout.HorizontalScope(EditorStyles.textField))
{
if (dynamicEffectsInstalled)
{
GUI.contentColor = Color.green;
EditorGUILayout.LabelField("Installed");
}
else
{
GUI.contentColor = new Color(1f, 0.65f, 0f);
EditorGUILayout.LabelField("(Not installed)");
}
GUI.contentColor = defaultColor;
}
}
EditorGUILayout.Space();
EditorGUILayout.PropertyField(customIncludeDirectives);
if (customIncludeDirectives.isExpanded)
{
EditorGUILayout.HelpBox("These are defined in a HLSLINCLUDE block and apply to all passes" +
"\nMay be used to insert custom code.", MessageType.Info);
}
EditorGUILayout.PropertyField(additionalPasses);
if (additionalPasses.isExpanded)
{
EditorGUILayout.LabelField("Compiled passes:", EditorStyles.miniBoldLabel);
if (shaderData != null)
{
ShaderData.Subshader subShader = shaderData.GetSubshader(0);
int passCount = subShader.PassCount;
for (int i = 0; i < passCount; i++)
{
EditorGUILayout.LabelField($"{i}: {subShader.GetPass(i).Name}", EditorStyles.miniLabel);
}
}
}
if (EditorGUI.EndChangeCheck())
{
//Force the parameter to a matching value.
//This way, if the "auto-integration" option is used, the .meta file will be changed when using the shader in a package, spanning different projects.
//When switching a different project, the file will be seen as changed and will be re-imported, in turn applying the project-specific integration.
if (autoIntegration.boolValue)
{
fogIntegration.intValue = (int)firstIntegration.asset;
}
serializedObject.ApplyModifiedProperties();
}
this.ApplyRevertGUI();
showDependencies = EditorGUILayout.BeginFoldoutHeaderGroup(showDependencies, $"Dependencies ({importer.dependencies.Count})");
if (showDependencies)
{
this.Repaint();
using (new EditorGUILayout.VerticalScope(EditorStyles.textArea))
{
foreach (string dependency in importer.dependencies)
{
var rect = EditorGUILayout.BeginHorizontal(EditorStyles.miniLabel);
if (rect.Contains(Event.current.mousePosition))
{
EditorGUIUtility.AddCursorRect(new Rect(Event.current.mousePosition.x, Event.current.mousePosition.y, 27, 27), MouseCursor.Link);
EditorGUI.DrawRect(rect, Color.gray * (EditorGUIUtility.isProSkin ? 0.66f : 0.20f));
}
if (GUILayout.Button(dependency == string.Empty ? new GUIContent(" (Missing)", EditorGUIUtility.IconContent("console.warnicon.sml").image) : new GUIContent(" " + dependency, EditorGUIUtility.IconContent("TextAsset Icon").image),
EditorStyles.miniLabel, GUILayout.Height(20f)))
{
if (dependency != string.Empty)
{
TextAsset file = AssetDatabase.LoadAssetAtPath<TextAsset>(dependency);
EditorGUIUtility.PingObject(file);
}
}
EditorGUILayout.EndHorizontal();
}
}
EditorGUILayout.HelpBox("Should any of these files be modified/moved/deleted, this shader will also re-import", MessageType.Info);
}
EditorGUILayout.EndFoldoutHeaderGroup();
//EditorGUILayout.PropertyField(configurationState);
UI.DrawFooter();
if (shader)
{
UI.DrawNotification(ShaderUtil.ShaderHasError(shader), "Errors may be false-positives due to caching", "Clear cache", () => importer.ClearCache(true), MessageType.Warning);
}
}
void OpenGeneratedCode(bool tessellation)
{
importer = (WaterShaderImporter)target;
string filePath = $"{Application.dataPath.Replace("Assets", string.Empty)}Temp/{importer.settings.shaderName}(Generated Code).shader";
string templatePath = importer.GetTemplatePath();
string[] lines = File.ReadAllLines(templatePath);
string code = TemplateParser.CreateShaderCode(importer.GetTemplatePath(), ref lines, importer, tessellation);
File.WriteAllText(filePath, code);
if (!File.Exists(filePath))
{
Debug.LogError(string.Format("Path {0} doesn't exists", filePath));
return;
}
string externalScriptEditor = ScriptEditorUtility.GetExternalScriptEditor();
if (externalScriptEditor != "internal")
{
InternalEditorUtility.OpenFileAtLineExternal(filePath, 0);
}
else
{
Application.OpenURL("file://" + filePath);
}
}
}
}

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: e59f1c83d0548634b871a63644021f94
timeCreated: 1691138447
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/Inspectors/WaterShaderImporterEditor.cs
uploadId: 770287

View File

@ -1,732 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEditor.PackageManager;
using UnityEditor.PackageManager.Requests;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using PackageInfo = UnityEditor.PackageManager.PackageInfo;
namespace StylizedWater3
{
//Verifies any and all project settings and states
public static class Installer
{
public class SetupItem
{
public MessageType state = MessageType.None;
public string name;
public string description;
public string actionName;
public Action action;
public SetupItem(string name)
{
this.name = name;
}
public SetupItem(string name, MessageType state)
{
this.name = name;
this.state = state;
}
public void ExecuteAction()
{
action.Invoke();
action = null;
if (state == MessageType.Error)
{
m_errorCount--;
}
else if (state == MessageType.Warning)
{
m_warningCount--;
}
state = MessageType.None;
Installer.Initialize();
}
}
public static List<SetupItem> SetupItems = new List<SetupItem>();
public static int ErrorCount
{
get => m_errorCount;
}
private static int m_errorCount;
public static int WarningCount
{
get => m_warningCount;
}
private static int m_warningCount;
public static bool HasError => ErrorCount > 0;
private static void AddItem(SetupItem item)
{
if (item.state == MessageType.Error) m_errorCount++;
else if (item.state == MessageType.Warning) m_warningCount++;
SetupItems.Add(item);
}
public static void Initialize()
{
SetupItems.Clear();
m_errorCount = 0;
m_warningCount = 0;
SetupItem unityVersion = new SetupItem(AssetInfo.VersionChecking.GetUnityVersion());
{
AssetInfo.VersionChecking.CheckUnityVersion();
unityVersion.state = MessageType.None;
unityVersion.description = $"Likely compatible and supported Unity version";
//Too old
if (AssetInfo.VersionChecking.compatibleVersion == false || AssetInfo.VersionChecking.supportedPatchVersion == false)
{
unityVersion.state = MessageType.Error;
unityVersion.description = $"This version of Unity is not compatible and is not subject to support. Update to at least <b>{AssetInfo.VersionChecking.MinRequiredUnityVersion}</b>. Errors and issues need to be resolved locally";
}
else
{
//Too broken
if (AssetInfo.VersionChecking.unityVersionType != AssetInfo.VersionChecking.UnityVersionType.Release)
{
unityVersion.state = MessageType.Warning;
unityVersion.description = "Alpha/preview versions of Unity are not supported. Shader/script errors or warnings may occur depending on which weekly-version you are using." +
"\n\n" +
"After the release version becomes available, compatibility will be verified and an update may follow with the necessary fixes/changes.";
}
//Too new
if (AssetInfo.VersionChecking.supportedMajorVersion == false)
{
unityVersion.state = MessageType.Warning;
unityVersion.description = $"This version of Unity is not supported. An upgrade version of this asset that does support this may be available. See the documentation for up-to-date information.";
}
}
}
AddItem(unityVersion);
AssetInfo.VersionChecking.CheckForUpdate();
SetupItem assetVersion = new SetupItem($"Asset version ({AssetInfo.INSTALLED_VERSION})");
{
//Testing
//AssetInfo.VersionChecking.compatibleVersion = false;
//AssetInfo.VersionChecking.alphaVersion = true;
//AssetInfo.VersionChecking.UPDATE_AVAILABLE = false;
if (AssetInfo.VersionChecking.UPDATE_AVAILABLE)
{
assetVersion.state = MessageType.Info;
assetVersion.description = $"An updated version is available (v{AssetInfo.VersionChecking.LATEST_VERSION})" +
"\n\n" +
"Asset can be updated through the Package Manager. Please update any extensions as well!";
assetVersion.actionName = "Open Package Manager";
assetVersion.action = AssetInfo.OpenInPackageManager;
}
else
{
assetVersion.state = MessageType.None;
assetVersion.description = "Installed version is the latest";
}
}
AddItem(assetVersion);
SetupItem graphicsAPI = new SetupItem($"Graphics API ({PlayerSettings.GetGraphicsAPIs(EditorUserBuildSettings.activeBuildTarget)[0].ToString()})");
{
graphicsAPI.state = MessageType.None;
graphicsAPI.description = $"Compatible";
}
AddItem(graphicsAPI);
SetupItem colorSpace = new SetupItem($"Color space ({PlayerSettings.colorSpace.ToString()})");
{
if (PlayerSettings.colorSpace == ColorSpace.Linear)
{
colorSpace.state = MessageType.None;
colorSpace.description = $"Linear";
}
else
{
colorSpace.state = MessageType.Warning;
colorSpace.description = $"All content is authored for the Linear color space, water colors will not look as advertised.";
}
}
AddItem(colorSpace);
/*
//Also counts non-script related errors!
SetupItem compileErrors = new SetupItem("Script compilation");
{
ConsoleWindowUtility.GetConsoleLogCounts(out var errors, out var _, out var _);
if (errors > 0)
{
compileErrors.state = MessageType.Error;
compileErrors.description = "Your project has one or more script compilation errors. These can prevent the water shader from working, or components from being available!";
}
else
{
compileErrors.state = MessageType.None;
compileErrors.description = "Project is free of script compilation errors";
}
AddItem(compileErrors);
}
*/
SetupItem shaderCompiler = new SetupItem("Shader Compiler");
{
Shader defaultShader = ShaderConfigurator.GetDefaultShader();
var shaderCompiled = defaultShader != null;
shaderCompiler.state = shaderCompiled ? MessageType.Error : MessageType.None;
//Shader object created
if (shaderCompiled)
{
shaderCompiler.state = MessageType.None;
shaderCompiler.description = "Shader compiled without any errors";
ShaderMessage[] shaderErrors = ShaderConfigurator.GetErrorMessages(defaultShader);
//Compiled with errors
if (shaderErrors != null && shaderErrors.Length > 0)
{
shaderCompiler.state = MessageType.Error;
shaderCompiler.description = "Water shader has one or more critical errors:\n";
for (int i = 0; i < shaderErrors.Length; i++)
{
shaderCompiler.description += "\n• " + $"{shaderErrors[i].message} (line:{shaderErrors[i].line})";
}
shaderCompiler.description += "\n\nThese messages may provide a clue as to what went wrong";
shaderCompiler.actionName = "Try recompiling";
shaderCompiler.action = () =>
{
string defaultShaderPath = AssetDatabase.GUIDToAssetPath(ShaderConfigurator.DEFAULT_SHADER_GUID);
AssetDatabase.ImportAsset(defaultShaderPath);
};
}
//Success
else
{
WaterShaderImporter importer = WaterShaderImporter.GetForShader(defaultShader);
bool requiresRecompile = importer.RequiresRecompilation(out var recompileMessage);
if (requiresRecompile)
{
shaderCompiler.state = MessageType.Warning;
shaderCompiler.description = "Water shader needs to be recompiled:" +
"\n" +
recompileMessage +
"\n";
shaderCompiler.actionName = "Recompile";
shaderCompiler.action = () =>
{
importer.Reimport();
};
}
//Shader is valid, but also check if any water meshes have a pink shader
{
Shader errorShader = Shader.Find("Hidden/InternalErrorShader");
List<Material> brokenWaterMaterials = new List<Material>();
foreach (WaterObject obj in WaterObject.Instances)
{
if(obj.material == null) continue;
if (obj.material.shader == null)
{
brokenWaterMaterials.Add(obj.material);
}
else if (obj.material.shader == errorShader)
{
brokenWaterMaterials.Add(obj.material);
}
}
//Remove duplicates
brokenWaterMaterials = brokenWaterMaterials.Distinct().ToList();
if (brokenWaterMaterials.Count > 0)
{
SetupItem waterObjectShaderError = new SetupItem("Water Objects with invalid material");
waterObjectShaderError.state = MessageType.Error;
waterObjectShaderError.description = "One or more water objects in the scene have an invalid material and likely render as pink:";
for (int i = 0; i < brokenWaterMaterials.Count; i++)
{
waterObjectShaderError.description += $"\n• {brokenWaterMaterials[i].name}";
}
waterObjectShaderError.description += "\n\nIt could be that the shader wasn't able to compile at some point and Unity assigned these materials the error-shader.";
waterObjectShaderError.actionName = "Fix";
waterObjectShaderError.action = () =>
{
for (int i = 0; i < brokenWaterMaterials.Count; i++)
{
brokenWaterMaterials[i].shader = defaultShader;
EditorUtility.SetDirty(brokenWaterMaterials[i]);
}
};
AddItem(waterObjectShaderError);
}
}
}
}
else
{
shaderCompiler.state = MessageType.Error;
shaderCompiler.description = "Shader failed to compile. Please ensure that there are no unresolved scripting compilation errors in the project." +
"\n\n" +
"After resolving them, re-import this asset";
}
AddItem(shaderCompiler);
}
SetupItem renderFeature = new SetupItem("Render Feature");
{
PipelineUtilities.RenderFeatureMissing<StylizedWaterRenderFeature>(out ScriptableRendererData[] renderers);
if (renderers.Length > 0)
{
renderFeature.state = MessageType.Error;
renderFeature.description = "The Stylized Water render feature hasn't been added to these renderers:";
for (int i = 0; i < renderers.Length; i++)
{
renderFeature.description += $"\n• {renderers[i].name}";
}
renderFeature.description += "\n\nThe following functionality will be unavailable if they are active:\n" +
"\n• Directional caustics" +
"\n• Screen-space Reflections" +
"\n• Water Decals" +
"\n• Height query system" +
"\n• Dynamic Effects (if installed)" +
"\n• Underwater Rendering (if installed)";
renderFeature.description += "\n\nFor some use cases this is intentional and this warning can be ignored";
renderFeature.actionName = "Add to renderers";
renderFeature.action = () =>
{
for (int i = 0; i < renderers.Length; i++)
{
PipelineUtilities.AddRenderFeature<StylizedWaterRenderFeature>(renderers[i]);
}
};
}
else
{
renderFeature.state = MessageType.None;
renderFeature.description = "Render feature has been set up on all renderers";
SetupItem renderGraph = new SetupItem("Render Graph", PipelineUtilities.RenderGraphEnabled() ? MessageType.None : MessageType.Error);
{
if (renderGraph.state == MessageType.Error)
{
renderGraph.description = "Disabled (Backwards Compatibility mode). The render feature (and its functionality) will be unavailable!";
renderGraph.actionName = "Enable";
renderGraph.action = () =>
{
RenderGraphSettings settings = GraphicsSettings.GetRenderPipelineSettings<RenderGraphSettings>();
settings.enableRenderCompatibilityMode = false;
};
}
else
{
renderGraph.state = MessageType.None;
renderGraph.description = "Render Graph is enabled";
}
AddItem(renderGraph);
}
SetupItem heightPrePass = new SetupItem("Height Pre-Pass");
{
StylizedWaterRenderFeature currentRenderFeature = StylizedWaterRenderFeature.GetDefault();
if (currentRenderFeature.heightPrePassSettings.enable)
{
heightPrePass.state = MessageType.None;
heightPrePass.description = "Enabled on the default renderer";
}
else
{
heightPrePass.state = MessageType.Warning;
heightPrePass.description = "Disabled on the default renderer. This makes the following functionality unavailable:" +
"\n • Water Decals" +
"\n • GPU-based height readback";
heightPrePass.actionName = "Enable";
heightPrePass.action = () =>
{
currentRenderFeature = StylizedWaterRenderFeature.GetDefault();
currentRenderFeature.heightPrePassSettings.enable = true;
EditorUtility.SetDirty(currentRenderFeature);
};
}
AddItem(heightPrePass);
}
}
AddItem(renderFeature);
}
SetupItem depthTexture = new SetupItem("Depth texture");
{
depthTexture.state = PipelineUtilities.IsDepthTextureOptionDisabledAnywhere(out var depthLessRenderers) ? MessageType.Warning : MessageType.None;
if (depthTexture.state == MessageType.Warning)
{
depthTexture.description = "Depth texture option is disabled these renderers:\n";
for (int i = 0; i < depthLessRenderers.Count; i++)
{
depthTexture.description += "• " + depthLessRenderers[i].name + "\n";
}
depthTexture.description += "\nThis will cause depth-based effects (when enabled) such as underwater fog, caustics or refraction not to render on certain quality levels or platforms. On Android the water will turn invisible!";
depthTexture.actionName = "Enable";
depthTexture.action = () =>
{
PipelineUtilities.SetDepthTextureOnAllAssets(true);
};
}
else
{
depthTexture.description = "Enabled on all renderers";
}
AddItem(depthTexture);
}
SetupItem opaqueTexture = new SetupItem("Refraction support");
{
opaqueTexture.state = PipelineUtilities.IsOpaqueTextureOptionDisabledAnywhere(out var opaqueLessRenderers) ? MessageType.Warning : MessageType.None;
if (opaqueTexture.state == MessageType.Warning)
{
opaqueTexture.description = "Opaque texture option is disabled these renderers:\n";
for (int i = 0; i < opaqueLessRenderers.Count; i++)
{
opaqueTexture.description += "• " + opaqueLessRenderers[i].name + "\n";
}
opaqueTexture.description += "\nThis will cause water materials with Refraction enabled to have a gray tint and not show any color of submerged geometry!";
opaqueTexture.actionName = "Enable";
opaqueTexture.action = () =>
{
PipelineUtilities.SetOpaqueTextureOnAllAssets(true);
};
}
else
{
opaqueTexture.description = "Opaque texture option is enabled on all renderers";
SetupItem opaqueDownsampled = new SetupItem("Opaque texture resolution");
{
opaqueDownsampled.state = PipelineUtilities.IsOpaqueDownSampled(out var downsampledRenderers) ? MessageType.Warning : MessageType.None;
if (opaqueDownsampled.state == MessageType.Warning)
{
opaqueDownsampled.description = "Opaque texture resolution is halved on these renderers:\n";
for (int i = 0; i < downsampledRenderers.Count; i++)
{
opaqueDownsampled.description += "• " + downsampledRenderers[i].name + "\n";
}
opaqueDownsampled.description += "\nThis will cause water materials with Refraction enabled to appear blurry!";
opaqueDownsampled.description += "\n\nUnderwater rendering will also appear blurred with visible outlines around geometry!";
opaqueDownsampled.actionName = "Switch to full resolution";
opaqueDownsampled.action = () =>
{
PipelineUtilities.DisableOpaqueDownsampling(downsampledRenderers);
};
}
else
{
opaqueDownsampled.description = "Opaque texture is rendering at full resolution";
}
AddItem(opaqueDownsampled);
}
}
AddItem(opaqueTexture);
}
SetupItem depthMode = new SetupItem("Depth mode");
{
bool hasIncorrectRenderers = PipelineUtilities.IsDepthAfterTransparents(out List<UniversalRendererData> renderers);
if (hasIncorrectRenderers)
{
depthMode.state = MessageType.Warning;
depthMode.description = "The depth texture is configured to render AFTER transparent materials on these renderers:";
for (int i = 0; i < renderers.Count; i++)
{
depthMode.description += $"\n• {renderers[i].name}";
}
depthMode.description += "\n\nThis can cause the water to appear semi-transparent, or the depth information to lag behind one frame.";
depthMode.actionName = "Set to render before";
depthMode.action = () =>
{
for (int i = 0; i < renderers.Count; i++)
{
renderers[i].copyDepthMode = CopyDepthMode.AfterOpaques;
EditorUtility.SetDirty(renderers[i]);
}
};
}
else
{
depthMode.state = MessageType.None;
depthMode.description = "The depth texture renders before transparent materials do.";
}
AddItem(depthMode);
}
if (StylizedWaterEditor.DynamicEffectsInstalled())
{
SetupItem splinesPackage = new SetupItem("Splines Package");
var splinesInstalled = true;
#if !SPLINES
splinesInstalled = false;
#endif
if (splinesInstalled)
{
splinesPackage.state = MessageType.None;
splinesPackage.description = "Installed";
}
else
{
splinesPackage.state = MessageType.Warning;
splinesPackage.description = "Splines package not installed. Some functionality won't be available.";
splinesPackage.actionName = "Install";
splinesPackage.action = () =>
{
InstallPackage("com.unity.splines");
};
}
AddItem(splinesPackage);
}
SetupItem reflectionProbes = new SetupItem("Reflection Probes");
{
if (QualitySettings.realtimeReflectionProbes)
{
reflectionProbes.state = MessageType.None;
reflectionProbes.description = "Realtime reflection probes are supported.";
}
else
{
reflectionProbes.state = MessageType.Warning;
reflectionProbes.description = "Realtime reflection probes are disabled in Quality Settings. Water reflections may appear black in demo scenes.";
reflectionProbes.actionName = "Enable";
reflectionProbes.action = () =>
{
QualitySettings.realtimeReflectionProbes = true;
};
}
AddItem(reflectionProbes);
}
SetupItem asyncShaderCompilation = new SetupItem("Asynchronous Shader Compilation");
{
if (EditorSettings.asyncShaderCompilation)
{
asyncShaderCompilation.state = MessageType.None;
asyncShaderCompilation.description = "Enabled in project settings";
}
else
{
asyncShaderCompilation.state = MessageType.Error;
asyncShaderCompilation.description = "Disabled in project settings. This will cause the editor to crash when attempting to compile the water shader";
asyncShaderCompilation.actionName = "Enable";
asyncShaderCompilation.action = () =>
{
EditorSettings.asyncShaderCompilation = true;
};
}
AddItem(asyncShaderCompilation);
}
if (WaterObject.Instances.Count > 0)
{
SetupItem waterLayer = new SetupItem("Objects on the \"Water\" layer");
{
int waterLayerIndex = LayerMask.NameToLayer("Water");
List<WaterObject> invalidObjects = new List<WaterObject>();
foreach (var obj in WaterObject.Instances)
{
if (obj.gameObject.layer != waterLayerIndex)
{
invalidObjects.Add(obj);
}
}
var invalidObjCount = invalidObjects.Count;
if (invalidObjCount > 0)
{
waterLayer.state = MessageType.Warning;
waterLayer.description = $"{invalidObjCount} water object(s) are not on the \"Water\" layer:";
foreach (var obj in invalidObjects)
{
waterLayer.description += $"\n• {obj.name}";
}
waterLayer.description += "\n\n This will result in them not being accessible for height queries";
waterLayer.actionName = "Fix";
waterLayer.action = () =>
{
foreach (var obj in invalidObjects)
{
obj.gameObject.layer = waterLayerIndex;
EditorUtility.SetDirty(obj);
}
};
}
else
{
waterLayer.state = MessageType.None;
waterLayer.description = "All water objects in the scene are on the Water layer";
}
AddItem(waterLayer);
}
}
if (SceneView.lastActiveSceneView)
{
SetupItem sceneViewAnimations = new SetupItem("Scene view animations");
if (SceneView.lastActiveSceneView.sceneViewState.alwaysRefreshEnabled == false)
{
sceneViewAnimations.state = MessageType.Warning;
sceneViewAnimations.description = "The \"Always Refresh\" option is disabled in the scene view. Water surface animations will appear to be jumpy";
sceneViewAnimations.actionName = "Enable";
sceneViewAnimations.action = () =>
{
SceneView.lastActiveSceneView.sceneViewState.alwaysRefresh = true;
};
AddItem(sceneViewAnimations);
}
}
/*
//Test formatting
SetupItem error = new SetupItem("Error");
{
error.state = MessageType.Error;
error.description = "An error has occured";
error.actionName = "Fix";
error.action = () =>
{
};
AddItem(error);
}
SetupItem warnings = new SetupItem("Warning");
{
warnings.state = MessageType.Warning;
warnings.description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.";
warnings.actionName = "Enable";
warnings.action = () =>
{
};
AddItem(warnings);
}
*/
//Sort to display errors first, then warnings.
SetupItems = SetupItems.OrderBy(o=> (o.state == MessageType.Info || o.state
== MessageType.None)).ToList();
}
public static void OpenWindowIfNeeded()
{
if (m_errorCount > 0 && Application.isBatchMode == false && BuildPipeline.isBuildingPlayer == false)
{
HelpWindow.ShowWindow(true);
}
}
public static void InstallPackage(string id)
{
SearchRequest request = Client.Search(id, false);
while (request.Status == StatusCode.InProgress)
{
/* Waiting... */
}
if (request.IsCompleted)
{
if (request.Result == null)
{
Debug.LogError($"Searching for package {id} failed");
return;
}
PackageInfo packageInfo = request.Result[0];
string packageName = packageInfo.name;
//Installed in project?
bool installed = packageInfo.resolvedPath != string.Empty;
if (installed)
{
Debug.Log($"{packageName} is already installed");
return;
}
Debug.Log($"Installation of package \"{packageName}\" will start in a moment...");
AddRequest addRequest = Client.Add(packageInfo.name + "@" + packageInfo.versions.latestCompatible);
}
}
}
}

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 758e43dd4bbd4106af8f4817e1dc4832
timeCreated: 1731943756
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/Installer.cs
uploadId: 770287

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 80efacfdc732f144aa910ee5c422e086
timeCreated: 1716196788

View File

@ -1,200 +0,0 @@
// Stylized Water 3 by Staggart Creations (http://staggart.xyz)
// COPYRIGHT PROTECTED UNDER THE UNITY ASSET STORE EULA (https://unity.com/legal/as-terms)
// • Copying or referencing source code for the production of new asset store, or public, content is strictly prohibited!
// • Uploading this file to a public repository will subject it to an automated DMCA takedown request.
using UnityEngine;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine.UIElements;
namespace StylizedWater3
{
[CustomPropertyDrawer(typeof(HeightQuerySystem.Interface))]
public class HeightInterfaceDrawer : PropertyDrawer
{
private bool waveProfileMismatch;
private bool renderFeatureSetup;
private bool enabled;
private void OnEnable()
{
enabled = true;
CheckRenderFeature();
}
private void CheckRenderFeature()
{
renderFeatureSetup = StylizedWaterEditor.IsRenderFeatureSetup();
}
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
if(!enabled) OnEnable();
GUILayout.Space(-GetPropertyHeight(property, label));
EditorGUILayout.LabelField("Water Height Interface", EditorStyles.boldLabel);
var methodProperty = property.FindPropertyRelative("method");
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(methodProperty);
if (EditorGUI.EndChangeCheck())
{
CheckRenderFeature();
}
if (methodProperty.intValue == (int)HeightQuerySystem.Interface.Method.CPU)
{
EditorGUILayout.Separator();
EditorGUI.BeginChangeCheck();
EditorGUI.indentLevel++;
var waterObject = property.FindPropertyRelative("waterObject");
var autoFind = property.FindPropertyRelative("autoFind");
using (new EditorGUI.DisabledScope(autoFind.boolValue))
{
EditorGUILayout.PropertyField(waterObject);
}
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(autoFind);
EditorGUI.indentLevel--;
var waveProfile = property.FindPropertyRelative("waveProfile");
EditorGUILayout.PropertyField(waveProfile);
if (waveProfile.objectReferenceValue == null)
{
if (waterObject.objectReferenceValue)
{
UI.DrawNotification(true, "A wave profile must assigned", "Try get", () =>
{
waveProfile.objectReferenceValue = WaveProfileEditor.LoadFromWaterObject(waterObject.objectReferenceValue as WaterObject);
}, MessageType.Error);
}
else
{
UI.DrawNotification("A wave profile must assigned", MessageType.Error);
}
}
else
{
if (waveProfileMismatch)
{
UI.DrawNotification(true, "The wave profile does not match the one used on the water material." +
"\n\nWave animations will likely appear out of sync", "Attempt fix",() =>
{
WaterObject obj = (WaterObject)waterObject.objectReferenceValue;
waveProfile.objectReferenceValue = WaveProfileEditor.LoadFromMaterial(obj.material);
}, MessageType.Warning);
}
}
var waterLevelSource = property.FindPropertyRelative("waterLevelSource");
EditorGUILayout.PropertyField(waterLevelSource);
if (waterLevelSource.intValue == (int)HeightQuerySystem.Interface.WaterLevelSource.FixedValue)
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(property.FindPropertyRelative("waterLevel"));
EditorGUI.indentLevel--;
}
EditorGUI.indentLevel--;
if (EditorGUI.EndChangeCheck())
{
waveProfileMismatch = false;
if (waveProfile.objectReferenceValue && waterObject.objectReferenceValue)
{
WaveProfile profile = (WaveProfile)waveProfile.objectReferenceValue;
WaterObject obj = (WaterObject)waterObject.objectReferenceValue;
WaveProfile materialProfile = WaveProfileEditor.LoadFromMaterial(obj.material);
waveProfileMismatch = materialProfile != profile;
}
}
}
else
{
#if UNITY_WEBGL
UI.DrawNotification("This technique is not supported on the WebGL/WebGPU platform." +
"\n\n" +
"It does not support asynchronous compute shaders, which this functionality relies on.", MessageType.Error);
#endif
UI.DrawRenderFeatureSetupError(ref renderFeatureSetup);
if (Application.isPlaying == false && HeightQuerySystem.DISABLE_IN_EDIT_MODE)
{
UI.DrawNotification("GPU height queries have been disabled while in edit mode. You'll find this option on the render feature", MessageType.Warning);
}
using (new EditorGUILayout.HorizontalScope())
{
EditorGUILayout.LabelField("");
if (GUILayout.Button(new GUIContent(" Inspect Queries", EditorGUIUtility.FindTexture("_Help"))))
{
HeightQuerySystemEditor.HeightQueryInspector.Open();
}
}
}
}
/*
private PropertyField waterObjectField;
private PropertyField waveProfileField;
public override VisualElement CreatePropertyGUI(SerializedProperty property)
{
// Create property container element.
var container = new VisualElement();
Label headerLabel = new Label("Height interface");
container.Add(headerLabel);
var methodProperty = property.FindPropertyRelative("method");
// Create property fields.
var methodField = new PropertyField(methodProperty);
methodField.RegisterValueChangeCallback(OnMethodChange);
waterObjectField = new PropertyField(property.FindPropertyRelative("waterObject"));
var autoFindProperty = property.FindPropertyRelative("autoFind");
var autoFind = new PropertyField(autoFindProperty, "Auto find");
waveProfileField = new PropertyField(property.FindPropertyRelative("waveProfile"));
autoFind.RegisterValueChangeCallback(OnAutoFindChange);
// Add fields to the container.
container.Add(methodField);
container.Add(waterObjectField);
container.Add(autoFind);
container.Add(waveProfileField);
container.Add(new PropertyField(property.FindPropertyRelative("waterLevelSource")));
container.Add(new PropertyField(property.FindPropertyRelative("waterLevel")));
return container;
}
private void OnMethodChange(SerializedPropertyChangeEvent evt)
{
HeightQuerySystem.Interface.Method method = (HeightQuerySystem.Interface.Method)evt.changedProperty.intValue;
waterObjectField.visible = method == HeightQuerySystem.Interface.Method.CPU;
waveProfileField.visible = method == HeightQuerySystem.Interface.Method.CPU;
}
private void OnAutoFindChange(SerializedPropertyChangeEvent evt)
{
waterObjectField.SetEnabled(!evt.changedProperty.boolValue);
}
*/
}
}

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 76d63d50bd644766b0f1ad187f4492e7
timeCreated: 1719918895
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/PropertyDrawers/HeightInterfaceDrawer.cs
uploadId: 770287

View File

@ -1,66 +0,0 @@
// Stylized Water 3 by Staggart Creations (http://staggart.xyz)
// COPYRIGHT PROTECTED UNDER THE UNITY ASSET STORE EULA (https://unity.com/legal/as-terms)
// • Copying or referencing source code for the production of new asset store, or public, content is strictly prohibited!
// • Uploading this file to a public repository will subject it to an automated DMCA takedown request.
using UnityEditor;
using UnityEngine;
namespace StylizedWater3
{
//Use as "[MinMaxSlider(0, 5)]" on a material property. Proper should be a Vector type
public class MinMaxSliderDrawer : MaterialPropertyDrawer
{
private readonly float min;
private readonly float max;
private Rect minFieldRect;
private Rect sliderFieldRect;
private Rect maxFieldRect;
public MinMaxSliderDrawer(float min, float max)
{
this.min = min;
this.max = max;
}
public override void OnGUI(Rect position, MaterialProperty prop, GUIContent label, MaterialEditor editor)
{
MaterialEditor.BeginProperty(prop);
float minVal = prop.vectorValue.x;
float maxVal = prop.vectorValue.y;
EditorGUI.BeginChangeCheck();
EditorGUI.showMixedValue = prop.hasMixedValue;
Rect labelRect = position;
labelRect.width = EditorGUIUtility.labelWidth;
EditorGUI.LabelField(labelRect, label);
minFieldRect = labelRect;
minFieldRect.x = labelRect.x + labelRect.width;
minFieldRect.width = EditorGUIUtility.fieldWidth;
minVal = EditorGUI.FloatField(minFieldRect, minVal);
sliderFieldRect = labelRect;
sliderFieldRect.x = minFieldRect.x + minFieldRect.width + 5f;
sliderFieldRect.width = position.width - (EditorGUIUtility.fieldWidth * 2f) - labelRect.width - 10f;
EditorGUI.MinMaxSlider(sliderFieldRect, ref minVal, ref maxVal, min, max);
maxFieldRect = labelRect;
maxFieldRect.x = sliderFieldRect.x + sliderFieldRect.width + 5f;
maxFieldRect.width = EditorGUIUtility.fieldWidth;
maxVal = EditorGUI.FloatField(maxFieldRect, maxVal);
if (EditorGUI.EndChangeCheck())
{
prop.vectorValue = new Vector4(minVal, maxVal);
}
EditorGUI.showMixedValue = false;
MaterialEditor.EndProperty();
}
}
}

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: cf68eb48df7045e6ab979eeb7dd25215
timeCreated: 1718782193
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/PropertyDrawers/MinMaxSlider.cs
uploadId: 770287

View File

@ -1,53 +0,0 @@
// Stylized Water 3 by Staggart Creations (http://staggart.xyz)
// COPYRIGHT PROTECTED UNDER THE UNITY ASSET STORE EULA (https://unity.com/legal/as-terms)
// • Copying or referencing source code for the production of new asset store, or public, content is strictly prohibited!
// • Uploading this file to a public repository will subject it to an automated DMCA takedown request.
using System;
using UnityEditor;
using UnityEngine;
namespace StylizedWater3
{
public class WaveProfileDrawer : MaterialPropertyDrawer
{
private const float EDIT_BTN_WIDTH = 50f;
public override void OnGUI (Rect position, MaterialProperty prop, String label, MaterialEditor editor)
{
MaterialEditor.BeginProperty(prop);
// Setup
WaveProfile profile = WaveProfileEditor.LoadFromLUT(prop.textureValue);
EditorGUI.BeginChangeCheck();
EditorGUI.showMixedValue = prop.hasMixedValue;
Rect labelRect = position;
labelRect.width = EditorGUIUtility.labelWidth + 37;
EditorGUI.LabelField(labelRect, label);
Rect fieldRect = position;
fieldRect.x = labelRect.width;
fieldRect.width = (EditorGUIUtility.fieldWidth * 4f) - EDIT_BTN_WIDTH;
profile = (WaveProfile)EditorGUI.ObjectField(fieldRect, profile, typeof(WaveProfile), false);
Rect editBtnRect = position;
editBtnRect.x = fieldRect.x + fieldRect.width;
editBtnRect.width = EDIT_BTN_WIDTH;
if (GUI.Button(editBtnRect, "Edit"))
{
Selection.activeObject = WaveProfileEditor.LoadFromLUT(prop.textureValue);
}
EditorGUI.showMixedValue = false;
if (EditorGUI.EndChangeCheck())
{
prop.textureValue = profile.shaderParametersLUT;
}
MaterialEditor.EndProperty();
}
}
}

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 4d2ada3c8d25ab44ebe13baf27cd9427
timeCreated: 1716196796
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/PropertyDrawers/WaveProfileDrawer.cs
uploadId: 770287

View File

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

Binary file not shown.

View File

@ -1,154 +0,0 @@
fileFormatVersion: 2
guid: 22661e393f063dd4085f7fe57377fbc7
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: 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: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 1
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: Android
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: WebGL
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: Server
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: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/Resources/water-object-icon.png
uploadId: 770287

Binary file not shown.

View File

@ -1,154 +0,0 @@
fileFormatVersion: 2
guid: 6029dbabe4690f0489934aee6b44ec4a
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: 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: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 1
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: Android
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: WebGL
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: Server
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: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/Resources/water-shader-icon.png
uploadId: 770287

Binary file not shown.

View File

@ -1,124 +0,0 @@
fileFormatVersion: 2
guid: 0c0ecf1cb80894043a5dd86626f73513
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/Resources/wave-profile-icon.png
uploadId: 770287

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 224b51d419be4102913e055f9be99871
timeCreated: 1729855785

File diff suppressed because one or more lines are too long

View File

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 3a3be5417b7946088b3cbec887cf0dfe
timeCreated: 1729855911
AssetOrigin:
serializedVersion: 1
productId: 287769
packageName: Stylized Water 3
packageVersion: 3.2.1
assetPath: Assets/External/Stylized Water 3/Editor/Shader/FogIntegration.cs
uploadId: 770287

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