升级水插件
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,7 @@ RenderSettings:
|
||||
m_AmbientIntensity: 0.8050667
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.8679245, g: 0.8679245, b: 0.8679245, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 1558624448}
|
||||
m_SkyboxMaterial: {fileID: 1670076013}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
@@ -556,65 +556,78 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: e64c239f69eea46778ded6dcc3427a34, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: WaveHarmonic.Crest::WaveHarmonic.Crest.WaterRenderer
|
||||
_Version: 0
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_WindSpeed: 10
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: 8ab064b6606504a55b489af2787350c2, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 1516456258233481520, guid: 17840562212c147d6bdb5144d35bc442, type: 3}
|
||||
_CastShadows: 0
|
||||
_WriteMotionVectors: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Version: 1
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_WindZone: {fileID: 0}
|
||||
_OverrideWindZoneWindSpeed: 0
|
||||
_WindSpeed: 10
|
||||
_OverrideWindZoneWindDirection: 0
|
||||
_WindDirection: 0
|
||||
_OverrideWindZoneWindTurbulence: 0
|
||||
_WindTurbulence: 0.145
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_InjectionPoint: 0
|
||||
_WriteToColorTexture: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WriteMotionVectors: 1
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_Surface:
|
||||
rid: 4604655935489310866
|
||||
_ScaleRange: {x: 4, y: 256}
|
||||
_DropDetailHeightBasedOnWaves: 0.2
|
||||
_Slices: 7
|
||||
_Slices: 9
|
||||
_Resolution: 384
|
||||
_GeometryDownSampleFactor: 2
|
||||
_ExtentsSizeMultiplier: 100
|
||||
_Viewpoint: {fileID: 0}
|
||||
_CenterOfDetailDisplacementCorrection: 1
|
||||
_SampleTerrainHeightForScale: 1
|
||||
_ForceScaleChangeSmoothing: 0
|
||||
_TeleportThreshold: 100
|
||||
_AnimatedWavesLod:
|
||||
rid: 4604655776581025792
|
||||
rid: 4604655935489310867
|
||||
_DepthLod:
|
||||
rid: 4604655776581025793
|
||||
rid: 4604655935489310868
|
||||
_LevelLod:
|
||||
rid: 4604655776581025794
|
||||
rid: 4604655935489310869
|
||||
_FoamLod:
|
||||
rid: 4604655776581025795
|
||||
rid: 4604655935489310870
|
||||
_DynamicWavesLod:
|
||||
rid: 4604655776581025796
|
||||
rid: 4604655935489310871
|
||||
_FlowLod:
|
||||
rid: 4604655776581025797
|
||||
rid: 4604655935489310872
|
||||
_ShadowLod:
|
||||
rid: 4604655776581025798
|
||||
rid: 4604655935489310873
|
||||
_AbsorptionLod:
|
||||
rid: 4604655776581025799
|
||||
rid: 4604655935489310874
|
||||
_ScatteringLod:
|
||||
rid: 4604655776581025800
|
||||
rid: 4604655935489310875
|
||||
_ClipLod:
|
||||
rid: 4604655776581025801
|
||||
rid: 4604655935489310876
|
||||
_AlbedoLod:
|
||||
rid: 4604655776581025802
|
||||
rid: 4604655935489310877
|
||||
_Reflections:
|
||||
rid: 4604655776581025803
|
||||
rid: 4604655935489310878
|
||||
_Underwater:
|
||||
rid: 4604655776581025804
|
||||
rid: 4604655935489310879
|
||||
_Meniscus:
|
||||
rid: 4604655935489310880
|
||||
_Portals:
|
||||
rid: 4604655776581025805
|
||||
rid: 4604655935489310881
|
||||
_ShowWaterProxyPlane: 0
|
||||
_EditModeFrameRate: 30
|
||||
_FollowSceneCamera: 1
|
||||
@@ -627,13 +640,29 @@ MonoBehaviour:
|
||||
_LogScaleChange: 0
|
||||
_PauseOnScaleChange: 0
|
||||
_IgnoreWavesForScaleChange: 0
|
||||
_ForceBatchMode: 0
|
||||
_ForceNoGraphics: 0
|
||||
_Resources: {fileID: 11400000, guid: 0817af17dea584e5382e6216db162d4a, type: 2}
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
- rid: 4604655776581025792
|
||||
- rid: 4604655935489310866
|
||||
type: {class: SurfaceRenderer, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Version: 0
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: 07f640ada75ec1a47aefdbab1c7cd068, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 1516456258233481520, guid: 1fa5bda715b77f44ab384955ea0b6e4f, type: 3}
|
||||
_CastShadows: 0
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Debug:
|
||||
_UniformTiles: 0
|
||||
_DisableSkirt: 0
|
||||
- rid: 4604655935489310867
|
||||
type: {class: AnimatedWavesLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 1
|
||||
@@ -648,7 +677,7 @@ MonoBehaviour:
|
||||
_CollisionLayers: -1
|
||||
_MaximumQueryCount: 4096
|
||||
_BakedWaveData: {fileID: 0}
|
||||
- rid: 4604655776581025793
|
||||
- rid: 4604655935489310868
|
||||
type: {class: DepthLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 1
|
||||
@@ -656,8 +685,9 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 46
|
||||
_IncludeTerrainHeight: 1
|
||||
_EnableSignedDistanceFields: 1
|
||||
- rid: 4604655776581025794
|
||||
- rid: 4604655935489310869
|
||||
type: {class: LevelLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 0
|
||||
@@ -665,10 +695,10 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 300
|
||||
_TextureFormat: 45
|
||||
- rid: 4604655776581025795
|
||||
- rid: 4604655935489310870
|
||||
type: {class: FoamLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 1
|
||||
_Enabled: 0
|
||||
_OverrideResolution: 1
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
@@ -676,7 +706,7 @@ MonoBehaviour:
|
||||
_SimulationFrequency: 30
|
||||
_Prewarm: 1
|
||||
_Settings: {fileID: 0}
|
||||
- rid: 4604655776581025796
|
||||
- rid: 4604655935489310871
|
||||
type: {class: DynamicWavesLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 0
|
||||
@@ -687,7 +717,7 @@ MonoBehaviour:
|
||||
_SimulationFrequency: 60
|
||||
_AttenuationInShallows: 1
|
||||
_Settings: {fileID: 0}
|
||||
- rid: 4604655776581025797
|
||||
- rid: 4604655935489310872
|
||||
type: {class: FlowLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 0
|
||||
@@ -695,7 +725,7 @@ MonoBehaviour:
|
||||
_Resolution: 128
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 46
|
||||
- rid: 4604655776581025798
|
||||
- rid: 4604655935489310873
|
||||
type: {class: ShadowLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 1
|
||||
@@ -703,6 +733,7 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 6
|
||||
_SimulationFrequency: 60
|
||||
_DynamicSoftShadows: 1
|
||||
_SoftJitterExtinctionFactor: 0.75
|
||||
_JitterDiameterSoft: 15
|
||||
@@ -711,7 +742,7 @@ MonoBehaviour:
|
||||
_CurrentFrameWeightHard: 0.15
|
||||
_AllowNullLight: 0
|
||||
_AllowNoShadows: 0
|
||||
- rid: 4604655776581025799
|
||||
- rid: 4604655935489310874
|
||||
type: {class: AbsorptionLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 0
|
||||
@@ -723,7 +754,7 @@ MonoBehaviour:
|
||||
_ShorelineColor: {r: 0.513, g: 1, b: 1, a: 0.153}
|
||||
_ShorelineColorMaximumDistance: 10
|
||||
_ShorelineColorFalloff: 2
|
||||
- rid: 4604655776581025800
|
||||
- rid: 4604655935489310875
|
||||
type: {class: ScatteringLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 0
|
||||
@@ -735,7 +766,7 @@ MonoBehaviour:
|
||||
_ShorelineColor: {r: 0, g: 0.588, b: 1, a: 1}
|
||||
_ShorelineColorMaximumDistance: 10
|
||||
_ShorelineColorFalloff: 2
|
||||
- rid: 4604655776581025801
|
||||
- rid: 4604655935489310876
|
||||
type: {class: ClipLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 0
|
||||
@@ -744,7 +775,7 @@ MonoBehaviour:
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 5
|
||||
_DefaultClippingState: 0
|
||||
- rid: 4604655776581025802
|
||||
- rid: 4604655935489310877
|
||||
type: {class: AlbedoLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 0
|
||||
@@ -752,15 +783,15 @@ MonoBehaviour:
|
||||
_Resolution: 768
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 8
|
||||
- rid: 4604655776581025803
|
||||
- rid: 4604655935489310878
|
||||
type: {class: WaterReflections, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Version: 0
|
||||
_Enabled: 1
|
||||
_Enabled: 0
|
||||
_Mode: 1
|
||||
_Layers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Bits: 1
|
||||
_Resolution: 256
|
||||
_RenderOnlySingleCamera: 0
|
||||
_Sky: 1
|
||||
@@ -787,7 +818,7 @@ MonoBehaviour:
|
||||
_Debug:
|
||||
_ShowHiddenObjects: 0
|
||||
_DisableRecursiveRendering: 0
|
||||
- rid: 4604655776581025804
|
||||
- rid: 4604655935489310879
|
||||
type: {class: UnderwaterRenderer, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Version: 0
|
||||
@@ -797,10 +828,6 @@ MonoBehaviour:
|
||||
_EnvironmentalLightingEnable: 0
|
||||
_EnvironmentalLightingWeight: 1
|
||||
_EnvironmentalLightingVolumeProfile: {fileID: 0}
|
||||
_EnableShaderAPI: 0
|
||||
_TransparentObjectLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
_AllCameras: 0
|
||||
_CopyWaterMaterialParametersEachFrame: 1
|
||||
_FarPlaneMultiplier: 0.68
|
||||
@@ -812,7 +839,13 @@ MonoBehaviour:
|
||||
_DisableHeightAboveWaterOptimization: 0
|
||||
_DisableArtifactCorrection: 0
|
||||
_OnlyReflectionCameras: 0
|
||||
- rid: 4604655776581025805
|
||||
- rid: 4604655935489310880
|
||||
type: {class: Meniscus, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: 238e45299a5ec46308e9bf99ddf67963, type: 2}
|
||||
- rid: 4604655935489310881
|
||||
type: {class: PortalRenderer, ns: WaveHarmonic.Crest.Portals, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
--- !u!1 &862991151
|
||||
@@ -1354,7 +1387,7 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!21 &1558624448
|
||||
--- !u!21 &1670076013
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -11,7 +11,7 @@ GameObject:
|
||||
- component: {fileID: 5573293823876610619}
|
||||
- component: {fileID: 6121422689720352427}
|
||||
m_Layer: 4
|
||||
m_Name: Water Chunk1
|
||||
m_Name: Chunk 1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -49,9 +49,6 @@ MeshRenderer:
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials: []
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e4b1708c3e7d90f4ab48ff0a501d57f4
|
||||
guid: 1fa5bda715b77f44ab384955ea0b6e4f
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
107
Assets/ResRaw/Water/Water 1.mat
Normal file
107
Assets/ResRaw/Water/Water 1.mat
Normal file
@@ -0,0 +1,107 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-5994654682710206810
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 13
|
||||
hdPluginSubTargetMaterialVersions:
|
||||
m_Keys: []
|
||||
m_Values:
|
||||
--- !u!114 &-4042563326011365698
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Water 1
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 00ffe7d0b7161420897069dc6e12822c, type: 3}
|
||||
m_Parent: {fileID: -876546973899608171, guid: 00ffe7d0b7161420897069dc6e12822c, type: 3}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHATEST_ON
|
||||
- _BUILTIN_ALPHATEST_ON
|
||||
- _BUILTIN_AlphaClip
|
||||
- _BUILTIN_SURFACE_TYPE_TRANSPARENT
|
||||
- _BUILTIN_TRANSPARENT_RECEIVES_SHADOWS
|
||||
- _DOUBLESIDED_ON
|
||||
- _ENABLE_FOG_ON_TRANSPARENT
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
- _TRANSPARENT_WRITES_MOTION_VEC
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 2
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 1
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
MotionVector: User
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses:
|
||||
- TransparentDepthPostpass
|
||||
- TransparentBackface
|
||||
- RayTracingPrepass
|
||||
- MOTIONVECTORS
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs: []
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AlphaDstBlend: 10
|
||||
- _BUILTIN_DstBlend: 10
|
||||
- _BUILTIN_QueueControl: 0
|
||||
- _BUILTIN_SrcBlend: 5
|
||||
- _BUILTIN_ZWrite: 1
|
||||
- _Crest_FoamEnabled: 1
|
||||
- _Crest_PlanarReflectionsEnabled: 1
|
||||
- _Crest_SSSEnabled: 0
|
||||
- _CullMode: 0
|
||||
- _CullModeForward: 0
|
||||
- _DstBlend: 10
|
||||
- _QueueControl: 0
|
||||
- _RefractionModel: 0
|
||||
- _SrcBlend: 5
|
||||
- _ZTestGBuffer: 3
|
||||
m_Colors:
|
||||
- _Crest_Absorption: {r: 0.49963623, g: 0.49033588, b: 0.497967, a: 1}
|
||||
- _Crest_AbsorptionColor: {r: 0.46502313, g: 0.4716981, b: 0.4662141, a: 0.1019608}
|
||||
- _Crest_Scattering: {r: 0.11320752, g: 0.11320752, b: 0.11320752, a: 1}
|
||||
- _DoubleSidedConstants: {r: 1, g: 1, b: 1, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &4748330692745026848
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 0
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1911984e2b778d241869f62e89b400fe
|
||||
guid: 07f640ada75ec1a47aefdbab1c7cd068
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
@@ -1,250 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Water1
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 00ffe7d0b7161420897069dc6e12822c, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHATEST_ON
|
||||
- _DOUBLESIDED_ON
|
||||
- _ENABLE_FOG_ON_TRANSPARENT
|
||||
- _MATERIAL_FEATURE_SPECULAR_COLOR
|
||||
- _REFRACTION_PLANE
|
||||
- _SPECULAR_SETUP
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
- _TRANSPARENT_WRITES_MOTION_VEC
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 2
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 1
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
MotionVector: User
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses:
|
||||
- SHADOWCASTER
|
||||
- MOTIONVECTORS
|
||||
- TransparentDepthPostpass
|
||||
- TransparentBackface
|
||||
- RayTracingPrepass
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _Crest_CausticsDistortionTexture:
|
||||
m_Texture: {fileID: 2800000, guid: 7aa3f69cfb40b429a865c45a7271c5f5, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Crest_CausticsTexture:
|
||||
m_Texture: {fileID: 2800000, guid: 1407209016967410da2ae6fdd4d97fc6, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Crest_FoamTexture:
|
||||
m_Texture: {fileID: 2800000, guid: 959dd0505e2c54585865f51257daa0e3, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Crest_NormalMapTexture:
|
||||
m_Texture: {fileID: 2800000, guid: 7aa3f69cfb40b429a865c45a7271c5f5, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- CREST_FLOW: 0
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 1
|
||||
- _AlphaCutoffEnable: 1
|
||||
- _AlphaDstBlend: 10
|
||||
- _AlphaSrcBlend: 1
|
||||
- _AlphaToMask: 0
|
||||
- _BUILTIN_AlphaClip: 1
|
||||
- _BUILTIN_Blend: 0
|
||||
- _BUILTIN_CullMode: 0
|
||||
- _BUILTIN_DstBlend: 10
|
||||
- _BUILTIN_QueueControl: 0
|
||||
- _BUILTIN_QueueOffset: 0
|
||||
- _BUILTIN_SrcBlend: 5
|
||||
- _BUILTIN_Surface: 1
|
||||
- _BUILTIN_ZTest: 4
|
||||
- _BUILTIN_ZWrite: 1
|
||||
- _BUILTIN_ZWriteControl: 1
|
||||
- _Blend: 0
|
||||
- _BlendMode: 0
|
||||
- _BlendModePreserveSpecular: 0
|
||||
- _CastShadows: 0
|
||||
- _ConservativeDepthOffsetEnable: 0
|
||||
- _Crest_AlbedoEnabled: 0
|
||||
- _Crest_AlbedoIgnoreFoam: 1
|
||||
- _Crest_AmbientTerm: 1
|
||||
- _Crest_Anisotropy: 0.5
|
||||
- _Crest_CausticsDepthOfField: 6
|
||||
- _Crest_CausticsDistortionScale: 250
|
||||
- _Crest_CausticsDistortionStrength: 0.173
|
||||
- _Crest_CausticsEnabled: 1
|
||||
- _Crest_CausticsFocalDepth: 2
|
||||
- _Crest_CausticsMotionBlur: 1
|
||||
- _Crest_CausticsScrollSpeed: 1
|
||||
- _Crest_CausticsStrength: 1.61
|
||||
- _Crest_CausticsTextureAverage: 0.07
|
||||
- _Crest_CausticsTextureScale: 50.6
|
||||
- _Crest_DirectTerm: 1
|
||||
- _Crest_FoamEnabled: 1
|
||||
- _Crest_FoamFeather: 0.75
|
||||
- _Crest_FoamIntensityAlbedo: 1
|
||||
- _Crest_FoamNormalStrength: 1
|
||||
- _Crest_FoamScale: 5
|
||||
- _Crest_FoamScrollSpeed: 1
|
||||
- _Crest_FoamSmoothness: 0.7
|
||||
- _Crest_MinimumReflectionDirectionY: 0
|
||||
- _Crest_NormalMapEnabled: 1
|
||||
- _Crest_NormalMapScale: 10.8
|
||||
- _Crest_NormalMapScrollSpeed: 1
|
||||
- _Crest_NormalMapStrength: 0.33
|
||||
- _Crest_NormalsStrengthOverall: 0.197
|
||||
- _Crest_Occlusion: 1
|
||||
- _Crest_OcclusionUnderwater: 0
|
||||
- _Crest_PlanarReflectionsDistortion: 1
|
||||
- _Crest_PlanarReflectionsEnabled: 1
|
||||
- _Crest_PlanarReflectionsIntensity: 1
|
||||
- _Crest_PlanarReflectionsRoughness: 1
|
||||
- _Crest_RefractionStrength: 1
|
||||
- _Crest_RefractiveIndexOfWater: 1.646
|
||||
- _Crest_SSSDirectionalFalloff: 2
|
||||
- _Crest_SSSEnabled: 1
|
||||
- _Crest_SSSIntensity: 10
|
||||
- _Crest_SSSPinchFalloff: 1.5
|
||||
- _Crest_SSSPinchMaximum: 1.67
|
||||
- _Crest_SSSPinchMinimum: 0.57
|
||||
- _Crest_ShadowCasterThreshold: 0.5
|
||||
- _Crest_ShadowsAffectsAmbientFactor: 0.5
|
||||
- _Crest_ShadowsEnabled: 1
|
||||
- _Crest_Smoothness: 0.9
|
||||
- _Crest_SmoothnessFalloff: 0.5
|
||||
- _Crest_SmoothnessFar: 0.4
|
||||
- _Crest_SmoothnessFarDistance: 4000
|
||||
- _Crest_Specular: 0.25
|
||||
- _Crest_TotalInternalReflectionIntensity: 1
|
||||
- _Crest_Version: 0
|
||||
- _Cull: 0
|
||||
- _CullMode: 0
|
||||
- _CullModeForward: 0
|
||||
- _DepthOffsetEnable: 0
|
||||
- _DoubleSidedEnable: 1
|
||||
- _DoubleSidedGIMode: 0
|
||||
- _DoubleSidedNormalMode: 2
|
||||
- _DstBlend: 10
|
||||
- _DstBlend2: 10
|
||||
- _EnableBlendModePreserveSpecularLighting: 0
|
||||
- _EnableFogOnTransparent: 1
|
||||
- _ExcludeFromTUAndAA: 0
|
||||
- _MaterialID: 4
|
||||
- _MaterialTypeMask: 16
|
||||
- _OpaqueCullMode: 2
|
||||
- _PerPixelSorting: 0
|
||||
- _QueueControl: 0
|
||||
- _QueueOffset: 0
|
||||
- _RayTracing: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _ReceivesSSR: 1
|
||||
- _ReceivesSSRTransparent: 1
|
||||
- _RefractionModel: 1
|
||||
- _RenderQueueType: 3
|
||||
- _RequireSplitLighting: 0
|
||||
- _SrcBlend: 5
|
||||
- _StencilRef: 0
|
||||
- _StencilRefDepth: 24
|
||||
- _StencilRefDistortionVec: 4
|
||||
- _StencilRefGBuffer: 10
|
||||
- _StencilRefMV: 40
|
||||
- _StencilWriteMask: 6
|
||||
- _StencilWriteMaskDepth: 25
|
||||
- _StencilWriteMaskDistortionVec: 4
|
||||
- _StencilWriteMaskGBuffer: 15
|
||||
- _StencilWriteMaskMV: 41
|
||||
- _SupportDecals: 1
|
||||
- _Surface: 1
|
||||
- _SurfaceType: 1
|
||||
- _TransmissionEnable: 1
|
||||
- _TransparentBackfaceEnable: 0
|
||||
- _TransparentCullMode: 2
|
||||
- _TransparentDepthPostpassEnable: 0
|
||||
- _TransparentDepthPrepassEnable: 0
|
||||
- _TransparentSortPriority: 0
|
||||
- _TransparentWritingMotionVec: 1
|
||||
- _TransparentZWrite: 1
|
||||
- _UseShadowThreshold: 0
|
||||
- _WorkflowMode: 0
|
||||
- _ZTest: 4
|
||||
- _ZTestDepthEqualForOpaque: 4
|
||||
- _ZTestGBuffer: 3
|
||||
- _ZTestTransparent: 4
|
||||
- _ZWrite: 1
|
||||
- _ZWriteControl: 1
|
||||
m_Colors:
|
||||
- _Crest_Absorption: {r: 7.7473936, g: 6.665305, b: 9.93459, a: 1}
|
||||
- _Crest_AbsorptionColor: {r: 0.29803923, g: 0.3529412, b: 0.21176471, a: 1}
|
||||
- _Crest_Scattering: {r: 0.19378929, g: 0.3207547, b: 0, a: 1}
|
||||
- _DoubleSidedConstants: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &5834112337178765781
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!114 &6553897719873794358
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 0
|
||||
--- !u!114 &8806993520622682055
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 13
|
||||
hdPluginSubTargetMaterialVersions:
|
||||
m_Keys: []
|
||||
m_Values:
|
||||
@@ -1643,28 +1643,38 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: e64c239f69eea46778ded6dcc3427a34, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_Version: 0
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_WindSpeed: 150
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: 8ab064b6606504a55b489af2787350c2, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 1516456258233481520, guid: 17840562212c147d6bdb5144d35bc442,
|
||||
type: 3}
|
||||
_CastShadows: 0
|
||||
_WriteMotionVectors: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Version: 1
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_WindZone: {fileID: 0}
|
||||
_OverrideWindZoneWindSpeed: 0
|
||||
_WindSpeed: 150
|
||||
_OverrideWindZoneWindDirection: 0
|
||||
_WindDirection: 0
|
||||
_OverrideWindZoneWindTurbulence: 0
|
||||
_WindTurbulence: 0.145
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_InjectionPoint: 0
|
||||
_WriteToColorTexture: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WriteMotionVectors: 1
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_Surface:
|
||||
rid: 1002
|
||||
_ScaleRange: {x: 4, y: 256}
|
||||
_DropDetailHeightBasedOnWaves: 0.2
|
||||
_Slices: 7
|
||||
@@ -1672,6 +1682,7 @@ MonoBehaviour:
|
||||
_GeometryDownSampleFactor: 2
|
||||
_ExtentsSizeMultiplier: 100
|
||||
_Viewpoint: {fileID: 0}
|
||||
_CenterOfDetailDisplacementCorrection: 1
|
||||
_SampleTerrainHeightForScale: 1
|
||||
_ForceScaleChangeSmoothing: 0
|
||||
_TeleportThreshold: 10
|
||||
@@ -1701,6 +1712,8 @@ MonoBehaviour:
|
||||
rid: 162836781179600905
|
||||
_Underwater:
|
||||
rid: 162836781179600906
|
||||
_Meniscus:
|
||||
rid: 1003
|
||||
_Portals:
|
||||
rid: 162836781179600907
|
||||
_ShowWaterProxyPlane: 0
|
||||
@@ -1712,15 +1725,11 @@ MonoBehaviour:
|
||||
_ShowHiddenObjects: 0
|
||||
_DisableFollowViewpoint: 0
|
||||
_DestroyResourcesInOnDisable: 0
|
||||
_DisableChunks: 0
|
||||
_UniformTiles: 0
|
||||
_DisableSkirt: 0
|
||||
_DrawLodOutline: 0
|
||||
_ShowDebugInformation: 0
|
||||
_LogScaleChange: 0
|
||||
_PauseOnScaleChange: 0
|
||||
_IgnoreWavesForScaleChange: 0
|
||||
_ForceBatchMode: 0
|
||||
_ForceNoGraphics: 0
|
||||
_Resources: {fileID: 11400000, guid: 0817af17dea584e5382e6216db162d4a, type: 2}
|
||||
references:
|
||||
@@ -1750,6 +1759,30 @@ MonoBehaviour:
|
||||
_ShorelineColor: {r: 0, g: 0.588, b: 1.2, a: 6}
|
||||
_ShorelineColorMaximumDistance: 10
|
||||
_ShorelineColorFalloff: 2
|
||||
- rid: 1002
|
||||
type: {class: SurfaceRenderer, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Version: 0
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: 8ab064b6606504a55b489af2787350c2, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 1516456258233481520, guid: 17840562212c147d6bdb5144d35bc442,
|
||||
type: 3}
|
||||
_CastShadows: 0
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Debug:
|
||||
_UniformTiles: 0
|
||||
_DisableSkirt: 0
|
||||
- rid: 1003
|
||||
type: {class: Meniscus, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: 238e45299a5ec46308e9bf99ddf67963, type: 2}
|
||||
- rid: 162836781179600896
|
||||
type: {class: AnimatedWavesLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
@@ -1773,6 +1806,7 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 46
|
||||
_IncludeTerrainHeight: 0
|
||||
_EnableSignedDistanceFields: 1
|
||||
- rid: 162836781179600898
|
||||
type: {class: LevelLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
@@ -1820,6 +1854,7 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 6
|
||||
_SimulationFrequency: 60
|
||||
_DynamicSoftShadows: 1
|
||||
_SoftJitterExtinctionFactor: 0.75
|
||||
_JitterDiameterSoft: 15
|
||||
@@ -1890,10 +1925,6 @@ MonoBehaviour:
|
||||
_EnvironmentalLightingEnable: 0
|
||||
_EnvironmentalLightingWeight: 1
|
||||
_EnvironmentalLightingVolumeProfile: {fileID: 0}
|
||||
_EnableShaderAPI: 0
|
||||
_TransparentObjectLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
_AllCameras: 0
|
||||
_CopyWaterMaterialParametersEachFrame: 1
|
||||
_FarPlaneMultiplier: 0.68
|
||||
@@ -2197,12 +2228,14 @@ MonoBehaviour:
|
||||
_Spectrum: {fileID: 11400000, guid: 4fde516347f8f410cb7bf7ec2b66c163, type: 2}
|
||||
_EvaluateSpectrumAtRunTimeEveryFrame: 0
|
||||
_RespectShallowWaterAttenuation: 1
|
||||
_OverrideGlobalWindDirection: 1
|
||||
_WaveDirectionHeadingAngle: 0
|
||||
_OverrideGlobalWindSpeed: 0
|
||||
_WindSpeed: 20
|
||||
_Resolution: 128
|
||||
_DrawSlicesInEditor: 0
|
||||
_AlphaSource: 0
|
||||
_OverrideGlobalWindTurbulence: 1
|
||||
_WindTurbulence: 0.145
|
||||
_WindAlignment: 0
|
||||
_TimeLoopLength: Infinity
|
||||
@@ -2212,7 +2245,7 @@ MonoBehaviour:
|
||||
_TimeResolution: 4
|
||||
_SmallestWavelengthRequired: 2
|
||||
_BakedTimeLoopLength: 32
|
||||
_Version: 1
|
||||
_Version: 2
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
|
||||
@@ -45,28 +45,38 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: e64c239f69eea46778ded6dcc3427a34, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_Version: 0
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_WindSpeed: 150
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: 8ab064b6606504a55b489af2787350c2, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 1516456258233481520, guid: 17840562212c147d6bdb5144d35bc442,
|
||||
type: 3}
|
||||
_CastShadows: 0
|
||||
_WriteMotionVectors: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Version: 1
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_WindZone: {fileID: 0}
|
||||
_OverrideWindZoneWindSpeed: 0
|
||||
_WindSpeed: 150
|
||||
_OverrideWindZoneWindDirection: 0
|
||||
_WindDirection: 0
|
||||
_OverrideWindZoneWindTurbulence: 0
|
||||
_WindTurbulence: 0.145
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_InjectionPoint: 0
|
||||
_WriteToColorTexture: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WriteMotionVectors: 1
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_Surface:
|
||||
rid: 1002
|
||||
_ScaleRange: {x: 4, y: 256}
|
||||
_DropDetailHeightBasedOnWaves: 0.2
|
||||
_Slices: 7
|
||||
@@ -74,6 +84,7 @@ MonoBehaviour:
|
||||
_GeometryDownSampleFactor: 2
|
||||
_ExtentsSizeMultiplier: 100
|
||||
_Viewpoint: {fileID: 0}
|
||||
_CenterOfDetailDisplacementCorrection: 1
|
||||
_SampleTerrainHeightForScale: 1
|
||||
_ForceScaleChangeSmoothing: 0
|
||||
_TeleportThreshold: 10
|
||||
@@ -103,6 +114,8 @@ MonoBehaviour:
|
||||
rid: 162836781179600921
|
||||
_Underwater:
|
||||
rid: 162836781179600922
|
||||
_Meniscus:
|
||||
rid: 1003
|
||||
_Portals:
|
||||
rid: 162836781179600923
|
||||
_ShowWaterProxyPlane: 0
|
||||
@@ -114,15 +127,11 @@ MonoBehaviour:
|
||||
_ShowHiddenObjects: 0
|
||||
_DisableFollowViewpoint: 0
|
||||
_DestroyResourcesInOnDisable: 0
|
||||
_DisableChunks: 0
|
||||
_UniformTiles: 0
|
||||
_DisableSkirt: 0
|
||||
_DrawLodOutline: 0
|
||||
_ShowDebugInformation: 0
|
||||
_LogScaleChange: 0
|
||||
_PauseOnScaleChange: 0
|
||||
_IgnoreWavesForScaleChange: 0
|
||||
_ForceBatchMode: 0
|
||||
_ForceNoGraphics: 0
|
||||
_Resources: {fileID: 11400000, guid: 0817af17dea584e5382e6216db162d4a, type: 2}
|
||||
references:
|
||||
@@ -152,6 +161,30 @@ MonoBehaviour:
|
||||
_ShorelineColor: {r: 0, g: 0.588, b: 1.2, a: 6}
|
||||
_ShorelineColorMaximumDistance: 10
|
||||
_ShorelineColorFalloff: 2
|
||||
- rid: 1002
|
||||
type: {class: SurfaceRenderer, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Version: 0
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: 8ab064b6606504a55b489af2787350c2, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 1516456258233481520, guid: 17840562212c147d6bdb5144d35bc442,
|
||||
type: 3}
|
||||
_CastShadows: 0
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Debug:
|
||||
_UniformTiles: 0
|
||||
_DisableSkirt: 0
|
||||
- rid: 1003
|
||||
type: {class: Meniscus, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: 238e45299a5ec46308e9bf99ddf67963, type: 2}
|
||||
- rid: 162836781179600912
|
||||
type: {class: AnimatedWavesLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
@@ -175,6 +208,7 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 46
|
||||
_IncludeTerrainHeight: 0
|
||||
_EnableSignedDistanceFields: 1
|
||||
- rid: 162836781179600914
|
||||
type: {class: LevelLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
@@ -222,6 +256,7 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 6
|
||||
_SimulationFrequency: 60
|
||||
_DynamicSoftShadows: 1
|
||||
_SoftJitterExtinctionFactor: 0.75
|
||||
_JitterDiameterSoft: 15
|
||||
@@ -292,10 +327,6 @@ MonoBehaviour:
|
||||
_EnvironmentalLightingEnable: 0
|
||||
_EnvironmentalLightingWeight: 1
|
||||
_EnvironmentalLightingVolumeProfile: {fileID: 0}
|
||||
_EnableShaderAPI: 0
|
||||
_TransparentObjectLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
_AllCameras: 0
|
||||
_CopyWaterMaterialParametersEachFrame: 1
|
||||
_FarPlaneMultiplier: 0.68
|
||||
@@ -370,12 +401,14 @@ MonoBehaviour:
|
||||
_Spectrum: {fileID: 11400000, guid: 28a29b5ef0c644735b5d7ba47d2863d4, type: 2}
|
||||
_EvaluateSpectrumAtRunTimeEveryFrame: 0
|
||||
_RespectShallowWaterAttenuation: 1
|
||||
_OverrideGlobalWindDirection: 1
|
||||
_WaveDirectionHeadingAngle: 180
|
||||
_OverrideGlobalWindSpeed: 0
|
||||
_WindSpeed: 20
|
||||
_Resolution: 32
|
||||
_DrawSlicesInEditor: 0
|
||||
_AlphaSource: 0
|
||||
_OverrideGlobalWindTurbulence: 1
|
||||
_WindTurbulence: 0.145
|
||||
_WindAlignment: 0
|
||||
_TimeLoopLength: 32
|
||||
@@ -385,7 +418,7 @@ MonoBehaviour:
|
||||
_TimeResolution: 4
|
||||
_SmallestWavelengthRequired: 2
|
||||
_BakedTimeLoopLength: 32
|
||||
_Version: 1
|
||||
_Version: 2
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
|
||||
@@ -59,9 +59,9 @@ Material:
|
||||
- _BUILTIN_ALPHATEST_ON
|
||||
- _BUILTIN_AlphaClip
|
||||
- _BUILTIN_SURFACE_TYPE_TRANSPARENT
|
||||
- _BUILTIN_TRANSPARENT_RECEIVES_SHADOWS
|
||||
- _DOUBLESIDED_ON
|
||||
- _ENABLE_FOG_ON_TRANSPARENT
|
||||
- _SPECULAR_SETUP
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
- _TRANSPARENT_WRITES_MOTION_VEC
|
||||
m_InvalidKeywords:
|
||||
|
||||
@@ -314,12 +314,14 @@ MonoBehaviour:
|
||||
_Spectrum: {fileID: 11400000, guid: e13a1902b10e34e9fb08e1d09e39b5d4, type: 2}
|
||||
_EvaluateSpectrumAtRunTimeEveryFrame: 0
|
||||
_RespectShallowWaterAttenuation: 1
|
||||
_OverrideGlobalWindDirection: 1
|
||||
_WaveDirectionHeadingAngle: 0
|
||||
_OverrideGlobalWindSpeed: 0
|
||||
_WindSpeed: 20
|
||||
_Resolution: 32
|
||||
_DrawSlicesInEditor: 0
|
||||
_AlphaSource: 0
|
||||
_OverrideGlobalWindTurbulence: 1
|
||||
_WindTurbulence: 0.35
|
||||
_WindAlignment: 0
|
||||
_TimeLoopLength: Infinity
|
||||
@@ -329,7 +331,7 @@ MonoBehaviour:
|
||||
_TimeResolution: 4
|
||||
_SmallestWavelengthRequired: 2
|
||||
_BakedTimeLoopLength: 32
|
||||
_Version: 1
|
||||
_Version: 2
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
@@ -1365,27 +1367,37 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: e64c239f69eea46778ded6dcc3427a34, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_Version: 0
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_WindSpeed: 10
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: d82d92d8d8f214cd0b8bf7c185b2c341, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 0}
|
||||
_CastShadows: 0
|
||||
_WriteMotionVectors: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Version: 1
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_WindZone: {fileID: 0}
|
||||
_OverrideWindZoneWindSpeed: 0
|
||||
_WindSpeed: 10
|
||||
_OverrideWindZoneWindDirection: 0
|
||||
_WindDirection: 0
|
||||
_OverrideWindZoneWindTurbulence: 0
|
||||
_WindTurbulence: 0.145
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_InjectionPoint: 0
|
||||
_WriteToColorTexture: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WriteMotionVectors: 1
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_Surface:
|
||||
rid: 1013
|
||||
_ScaleRange: {x: 8, y: 8}
|
||||
_DropDetailHeightBasedOnWaves: 0.081
|
||||
_Slices: 7
|
||||
@@ -1393,6 +1405,7 @@ MonoBehaviour:
|
||||
_GeometryDownSampleFactor: 2
|
||||
_ExtentsSizeMultiplier: 100
|
||||
_Viewpoint: {fileID: 2613380069347621712}
|
||||
_CenterOfDetailDisplacementCorrection: 1
|
||||
_SampleTerrainHeightForScale: 1
|
||||
_ForceScaleChangeSmoothing: 0
|
||||
_TeleportThreshold: 10
|
||||
@@ -1422,6 +1435,8 @@ MonoBehaviour:
|
||||
rid: 1009
|
||||
_Underwater:
|
||||
rid: 1010
|
||||
_Meniscus:
|
||||
rid: 1014
|
||||
_Portals:
|
||||
rid: 1011
|
||||
_ShowWaterProxyPlane: 0
|
||||
@@ -1433,15 +1448,11 @@ MonoBehaviour:
|
||||
_ShowHiddenObjects: 0
|
||||
_DisableFollowViewpoint: 0
|
||||
_DestroyResourcesInOnDisable: 0
|
||||
_DisableChunks: 0
|
||||
_UniformTiles: 0
|
||||
_DisableSkirt: 0
|
||||
_DrawLodOutline: 0
|
||||
_ShowDebugInformation: 0
|
||||
_LogScaleChange: 0
|
||||
_PauseOnScaleChange: 0
|
||||
_IgnoreWavesForScaleChange: 0
|
||||
_ForceBatchMode: 0
|
||||
_ForceNoGraphics: 0
|
||||
_Resources: {fileID: 11400000, guid: 0817af17dea584e5382e6216db162d4a, type: 2}
|
||||
references:
|
||||
@@ -1467,6 +1478,7 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 46
|
||||
_IncludeTerrainHeight: 0
|
||||
_EnableSignedDistanceFields: 1
|
||||
- rid: 1002
|
||||
type: {class: LevelLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
@@ -1514,6 +1526,7 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 6
|
||||
_SimulationFrequency: 60
|
||||
_DynamicSoftShadows: 1
|
||||
_SoftJitterExtinctionFactor: 0.75
|
||||
_JitterDiameterSoft: 15
|
||||
@@ -1584,10 +1597,6 @@ MonoBehaviour:
|
||||
_EnvironmentalLightingEnable: 0
|
||||
_EnvironmentalLightingWeight: 1
|
||||
_EnvironmentalLightingVolumeProfile: {fileID: 0}
|
||||
_EnableShaderAPI: 0
|
||||
_TransparentObjectLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
_AllCameras: 0
|
||||
_CopyWaterMaterialParametersEachFrame: 1
|
||||
_FarPlaneMultiplier: 0.68
|
||||
@@ -1618,6 +1627,29 @@ MonoBehaviour:
|
||||
_ShorelineColor: {r: 0, g: 0.588, b: 1.2, a: 6}
|
||||
_ShorelineColorMaximumDistance: 10
|
||||
_ShorelineColorFalloff: 2
|
||||
- rid: 1013
|
||||
type: {class: SurfaceRenderer, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Version: 0
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: d82d92d8d8f214cd0b8bf7c185b2c341, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 0}
|
||||
_CastShadows: 0
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Debug:
|
||||
_UniformTiles: 0
|
||||
_DisableSkirt: 0
|
||||
- rid: 1014
|
||||
type: {class: Meniscus, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: 238e45299a5ec46308e9bf99ddf67963, type: 2}
|
||||
- rid: 5163698739167625228
|
||||
type: {class: AnimatedWavesLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
|
||||
@@ -56,12 +56,14 @@ MonoBehaviour:
|
||||
_Spectrum: {fileID: 0}
|
||||
_EvaluateSpectrumAtRunTimeEveryFrame: 0
|
||||
_RespectShallowWaterAttenuation: 1
|
||||
_OverrideGlobalWindDirection: 1
|
||||
_WaveDirectionHeadingAngle: 0
|
||||
_OverrideGlobalWindSpeed: 1
|
||||
_WindSpeed: 3
|
||||
_Resolution: 128
|
||||
_DrawSlicesInEditor: 0
|
||||
_AlphaSource: 0
|
||||
_OverrideGlobalWindTurbulence: 1
|
||||
_WindTurbulence: 0.145
|
||||
_WindAlignment: 0
|
||||
_TimeLoopLength: Infinity
|
||||
@@ -71,7 +73,7 @@ MonoBehaviour:
|
||||
_TimeResolution: 4
|
||||
_SmallestWavelengthRequired: 2
|
||||
_BakedTimeLoopLength: 32
|
||||
_Version: 1
|
||||
_Version: 2
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
@@ -80,6 +82,7 @@ MonoBehaviour:
|
||||
data:
|
||||
_Input: {fileID: 5261791568129114886}
|
||||
_Texture: {fileID: 2800000, guid: b922f588948724e039eadd46288af89d, type: 3}
|
||||
_Multiplier: {x: 1, y: 1, z: 1, w: 1}
|
||||
_NegativeValues: 1
|
||||
--- !u!1001 &5419066683695935889
|
||||
PrefabInstance:
|
||||
|
||||
@@ -179,51 +179,6 @@ PrefabInstance:
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5628891711212661418, guid: 8b98a14ae91dd498d8f577f0f8f4aff1,
|
||||
type: 3}
|
||||
propertyPath: m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5628891711212661418, guid: 8b98a14ae91dd498d8f577f0f8f4aff1,
|
||||
type: 3}
|
||||
propertyPath: _OnHighDefinitionPipeline.m_PersistentCalls.m_Calls.Array.size
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5628891711212661418, guid: 8b98a14ae91dd498d8f577f0f8f4aff1,
|
||||
type: 3}
|
||||
propertyPath: _OnHighDefinitionPipeline.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5628891711212661418, guid: 8b98a14ae91dd498d8f577f0f8f4aff1,
|
||||
type: 3}
|
||||
propertyPath: _OnHighDefinitionPipeline.m_PersistentCalls.m_Calls.Array.data[0].m_Target
|
||||
value:
|
||||
objectReference: {fileID: 8893367339784545046}
|
||||
- target: {fileID: 5628891711212661418, guid: 8b98a14ae91dd498d8f577f0f8f4aff1,
|
||||
type: 3}
|
||||
propertyPath: _OnHighDefinitionPipeline.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5628891711212661418, guid: 8b98a14ae91dd498d8f577f0f8f4aff1,
|
||||
type: 3}
|
||||
propertyPath: _OnHighDefinitionPipeline.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: SetActive
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5628891711212661418, guid: 8b98a14ae91dd498d8f577f0f8f4aff1,
|
||||
type: 3}
|
||||
propertyPath: _OnHighDefinitionPipeline.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
|
||||
value: UnityEngine.GameObject, UnityEngine
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5628891711212661418, guid: 8b98a14ae91dd498d8f577f0f8f4aff1,
|
||||
type: 3}
|
||||
propertyPath: _OnHighDefinitionPipeline.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_BoolArgument
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5628891711212661418, guid: 8b98a14ae91dd498d8f577f0f8f4aff1,
|
||||
type: 3}
|
||||
propertyPath: _OnHighDefinitionPipeline.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
|
||||
value: UnityEngine.Object, UnityEngine
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5655619906866042202, guid: 8b98a14ae91dd498d8f577f0f8f4aff1,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
@@ -299,9 +254,3 @@ Transform:
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 7420766973803980796}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &8893367339784545046 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 2130284292857808106, guid: 8b98a14ae91dd498d8f577f0f8f4aff1,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 7420766973803980796}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
||||
@@ -56,16 +56,19 @@ MonoBehaviour:
|
||||
_Spectrum: {fileID: 11400000, guid: 6b50b5218dbe2488fb5d00db49d15dae, type: 2}
|
||||
_EvaluateSpectrumAtRunTimeEveryFrame: 0
|
||||
_RespectShallowWaterAttenuation: 1
|
||||
_OverrideGlobalWindDirection: 1
|
||||
_WaveDirectionHeadingAngle: 0
|
||||
_OverrideGlobalWindSpeed: 1
|
||||
_WindSpeed: 150
|
||||
_Resolution: 128
|
||||
_DrawSlicesInEditor: 0
|
||||
_AlphaSource: 0
|
||||
_Swell: 0
|
||||
_ReverseWaveWeight: 0
|
||||
_ComponentsPerOctave: 8
|
||||
_RandomSeed: 0
|
||||
_Version: 1
|
||||
_ManualGeneration: 0
|
||||
_Version: 2
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
|
||||
@@ -212,16 +212,19 @@ MonoBehaviour:
|
||||
_Spectrum: {fileID: 11400000, guid: e13a1902b10e34e9fb08e1d09e39b5d4, type: 2}
|
||||
_EvaluateSpectrumAtRunTimeEveryFrame: 0
|
||||
_RespectShallowWaterAttenuation: 1
|
||||
_OverrideGlobalWindDirection: 1
|
||||
_WaveDirectionHeadingAngle: -58.00273
|
||||
_OverrideGlobalWindSpeed: 0
|
||||
_WindSpeed: 20
|
||||
_Resolution: 128
|
||||
_DrawSlicesInEditor: 0
|
||||
_AlphaSource: 0
|
||||
_Swell: 0
|
||||
_ReverseWaveWeight: 0.5
|
||||
_ComponentsPerOctave: 8
|
||||
_RandomSeed: 0
|
||||
_Version: 1
|
||||
_ManualGeneration: 0
|
||||
_Version: 2
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
@@ -422,12 +425,14 @@ MonoBehaviour:
|
||||
_Spectrum: {fileID: 11400000, guid: e13a1902b10e34e9fb08e1d09e39b5d4, type: 2}
|
||||
_EvaluateSpectrumAtRunTimeEveryFrame: 0
|
||||
_RespectShallowWaterAttenuation: 1
|
||||
_OverrideGlobalWindDirection: 1
|
||||
_WaveDirectionHeadingAngle: 0
|
||||
_OverrideGlobalWindSpeed: 0
|
||||
_WindSpeed: 20
|
||||
_Resolution: 128
|
||||
_DrawSlicesInEditor: 0
|
||||
_AlphaSource: 0
|
||||
_OverrideGlobalWindTurbulence: 1
|
||||
_WindTurbulence: 0.145
|
||||
_WindAlignment: 0
|
||||
_TimeLoopLength: Infinity
|
||||
@@ -437,7 +442,7 @@ MonoBehaviour:
|
||||
_TimeResolution: 4
|
||||
_SmallestWavelengthRequired: 2
|
||||
_BakedTimeLoopLength: 32
|
||||
_Version: 1
|
||||
_Version: 2
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
|
||||
@@ -58,12 +58,14 @@ MonoBehaviour:
|
||||
_Spectrum: {fileID: 0}
|
||||
_EvaluateSpectrumAtRunTimeEveryFrame: 0
|
||||
_RespectShallowWaterAttenuation: 1
|
||||
_OverrideGlobalWindDirection: 1
|
||||
_WaveDirectionHeadingAngle: 0
|
||||
_OverrideGlobalWindSpeed: 0
|
||||
_WindSpeed: 20
|
||||
_Resolution: 32
|
||||
_DrawSlicesInEditor: 0
|
||||
_AlphaSource: 0
|
||||
_OverrideGlobalWindTurbulence: 1
|
||||
_WindTurbulence: 0.145
|
||||
_WindAlignment: 0
|
||||
_TimeLoopLength: Infinity
|
||||
@@ -73,7 +75,7 @@ MonoBehaviour:
|
||||
_TimeResolution: 4
|
||||
_SmallestWavelengthRequired: 2
|
||||
_BakedTimeLoopLength: 32
|
||||
_Version: 1
|
||||
_Version: 2
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
|
||||
@@ -13,7 +13,7 @@ OcclusionCullingSettings:
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
@@ -42,8 +42,8 @@ RenderSettings:
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
serializedVersion: 13
|
||||
m_BakeOnSceneLoad: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
@@ -66,9 +66,6 @@ LightmapSettings:
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
@@ -96,9 +93,8 @@ LightmapSettings:
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 4890085278179872738, guid: 6e72aca972f324f7886200f86939d735,
|
||||
type: 2}
|
||||
m_LightingDataAsset: {fileID: 112000000, guid: be61fd374ee0fad46a337d78e0ed01ae, type: 2}
|
||||
m_LightingSettings: {fileID: 4890085278179872738, guid: 6e72aca972f324f7886200f86939d735, type: 2}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
@@ -771,28 +767,17 @@ MonoBehaviour:
|
||||
m_MoveRepeatDelay: 0.5
|
||||
m_MoveRepeatRate: 0.1
|
||||
m_XRTrackingOrigin: {fileID: 0}
|
||||
m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018,
|
||||
type: 3}
|
||||
m_PointAction: {fileID: 1054132383583890850, guid: ca9f5fa95ffab41fb9a615ab714db018,
|
||||
type: 3}
|
||||
m_MoveAction: {fileID: 3710738434707379630, guid: ca9f5fa95ffab41fb9a615ab714db018,
|
||||
type: 3}
|
||||
m_SubmitAction: {fileID: 2064916234097673511, guid: ca9f5fa95ffab41fb9a615ab714db018,
|
||||
type: 3}
|
||||
m_CancelAction: {fileID: -1967631576421560919, guid: ca9f5fa95ffab41fb9a615ab714db018,
|
||||
type: 3}
|
||||
m_LeftClickAction: {fileID: 8056856818456041789, guid: ca9f5fa95ffab41fb9a615ab714db018,
|
||||
type: 3}
|
||||
m_MiddleClickAction: {fileID: 3279352641294131588, guid: ca9f5fa95ffab41fb9a615ab714db018,
|
||||
type: 3}
|
||||
m_RightClickAction: {fileID: 3837173908680883260, guid: ca9f5fa95ffab41fb9a615ab714db018,
|
||||
type: 3}
|
||||
m_ScrollWheelAction: {fileID: 4502412055082496612, guid: ca9f5fa95ffab41fb9a615ab714db018,
|
||||
type: 3}
|
||||
m_TrackedDevicePositionAction: {fileID: 4754684134866288074, guid: ca9f5fa95ffab41fb9a615ab714db018,
|
||||
type: 3}
|
||||
m_TrackedDeviceOrientationAction: {fileID: 1025543830046995696, guid: ca9f5fa95ffab41fb9a615ab714db018,
|
||||
type: 3}
|
||||
m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
||||
m_PointAction: {fileID: 1054132383583890850, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
||||
m_MoveAction: {fileID: 3710738434707379630, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
||||
m_SubmitAction: {fileID: 2064916234097673511, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
||||
m_CancelAction: {fileID: -1967631576421560919, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
||||
m_LeftClickAction: {fileID: 8056856818456041789, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
||||
m_MiddleClickAction: {fileID: 3279352641294131588, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
||||
m_RightClickAction: {fileID: 3837173908680883260, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
||||
m_ScrollWheelAction: {fileID: 4502412055082496612, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
||||
m_TrackedDevicePositionAction: {fileID: 4754684134866288074, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
||||
m_TrackedDeviceOrientationAction: {fileID: 1025543830046995696, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
||||
m_DeselectOnBackgroundClick: 1
|
||||
m_PointerBehavior: 0
|
||||
m_CursorLockBehavior: 0
|
||||
@@ -882,6 +867,11 @@ MeshRenderer:
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
@@ -903,6 +893,7 @@ MeshRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
@@ -938,58 +929,47 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1845454492}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.9063079
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0.42261827
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 105
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 15
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5304508333967466499, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
- target: {fileID: 5304508333967466499, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Sun
|
||||
objectReference: {fileID: 0}
|
||||
@@ -1000,8 +980,7 @@ PrefabInstance:
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
--- !u!4 &1364867124 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
m_CorrespondingSourceObject: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
m_PrefabInstance: {fileID: 1364867123}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1682107712
|
||||
@@ -1093,58 +1072,47 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1845454492}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2942909709672342223, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
- target: {fileID: 2942909709672342223, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Atmosphere
|
||||
objectReference: {fileID: 0}
|
||||
@@ -1155,8 +1123,7 @@ PrefabInstance:
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
--- !u!4 &1734491900 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
m_CorrespondingSourceObject: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
m_PrefabInstance: {fileID: 1734491899}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1835631273
|
||||
@@ -1304,58 +1271,47 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1845454492}
|
||||
m_Modifications:
|
||||
- target: {fileID: 963553959586484309, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
- target: {fileID: 963553959586484309, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Lighting
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
@@ -1366,8 +1322,7 @@ PrefabInstance:
|
||||
m_SourcePrefab: {fileID: 100100000, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
--- !u!4 &1886939755 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
m_CorrespondingSourceObject: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
m_PrefabInstance: {fileID: 1886939754}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &2128464135
|
||||
|
||||
Binary file not shown.
@@ -36,12 +36,6 @@
|
||||
{
|
||||
"m_Id": "cd0f156c542b4619b7281770039836b5"
|
||||
},
|
||||
{
|
||||
"m_Id": "f4c1405668a94fcea48969bdf227848c"
|
||||
},
|
||||
{
|
||||
"m_Id": "0c7cf37480bc4ef0b974856817777a03"
|
||||
},
|
||||
{
|
||||
"m_Id": "98621ce2e8384650a727003ac9fe6ae3"
|
||||
},
|
||||
@@ -273,12 +267,6 @@
|
||||
"m_Blocks": [
|
||||
{
|
||||
"m_Id": "7adbe727b57a468eaafd52267fc097d2"
|
||||
},
|
||||
{
|
||||
"m_Id": "f4c1405668a94fcea48969bdf227848c"
|
||||
},
|
||||
{
|
||||
"m_Id": "0c7cf37480bc4ef0b974856817777a03"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -301,10 +289,7 @@
|
||||
"m_Id": "1b9d4d1e66054d0f8c6930b3fa52d986"
|
||||
},
|
||||
{
|
||||
"m_Id": "666e5ce71520453f886b902afbe47d67"
|
||||
},
|
||||
{
|
||||
"m_Id": "a7a5bf24ad3d443f911d872cdffa4e6c"
|
||||
"m_Id": "d844ace01485410e80662a30ebca0fe0"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -324,21 +309,6 @@
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "0399ec53adad4e459c8dcbc7631a3d5b",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Alpha",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Alpha",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 1.0,
|
||||
"m_DefaultValue": 1.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
@@ -397,40 +367,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "0c7cf37480bc4ef0b974856817777a03",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.Alpha",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "0399ec53adad4e459c8dcbc7631a3d5b"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.Alpha"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
|
||||
@@ -479,39 +415,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.SystemData",
|
||||
"m_ObjectId": "0f03685dd1484a778c8ad3dbf87e9719",
|
||||
"m_MaterialNeedsUpdateHash": 0,
|
||||
"m_SurfaceType": 0,
|
||||
"m_RenderingPass": 1,
|
||||
"m_BlendMode": 0,
|
||||
"m_ZTest": 4,
|
||||
"m_ZWrite": false,
|
||||
"m_TransparentCullMode": 2,
|
||||
"m_OpaqueCullMode": 2,
|
||||
"m_SortPriority": 0,
|
||||
"m_AlphaTest": false,
|
||||
"m_ExcludeFromTUAndAA": false,
|
||||
"m_TransparentDepthPrepass": false,
|
||||
"m_TransparentDepthPostpass": false,
|
||||
"m_SupportLodCrossFade": false,
|
||||
"m_DoubleSidedMode": 0,
|
||||
"m_DOTSInstancing": false,
|
||||
"m_CustomVelocity": false,
|
||||
"m_Tessellation": false,
|
||||
"m_TessellationMode": 0,
|
||||
"m_TessellationFactorMinDistance": 20.0,
|
||||
"m_TessellationFactorMaxDistance": 50.0,
|
||||
"m_TessellationFactorTriangleSize": 100.0,
|
||||
"m_TessellationShapeFactor": 0.75,
|
||||
"m_TessellationBackFaceCullEpsilon": -0.25,
|
||||
"m_TessellationMaxDisplacement": 0.009999999776482582,
|
||||
"m_Version": 1,
|
||||
"inspectorFoldoutMask": 0
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
@@ -527,6 +430,12 @@
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 2,
|
||||
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget",
|
||||
"m_ObjectId": "186d62d80d5342778df6756e00152eb0"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
@@ -569,8 +478,8 @@
|
||||
},
|
||||
"m_AllowMaterialOverride": false,
|
||||
"m_SurfaceType": 0,
|
||||
"m_ZWriteControl": 0,
|
||||
"m_ZTestMode": 4,
|
||||
"m_ZWriteControl": 2,
|
||||
"m_ZTestMode": 8,
|
||||
"m_AlphaMode": 0,
|
||||
"m_RenderFace": 2,
|
||||
"m_AlphaClip": false,
|
||||
@@ -772,12 +681,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 2,
|
||||
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalUnlitSubTarget",
|
||||
"m_ObjectId": "4beb3457ecff455e81b2a38737480fde"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
@@ -899,14 +802,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDUnlitData",
|
||||
"m_ObjectId": "56cb2ffc93b44d849bf40c5e58b2f9c3",
|
||||
"m_EnableShadowMatte": false,
|
||||
"m_DistortionOnly": false
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
|
||||
@@ -1091,29 +986,6 @@
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDTarget",
|
||||
"m_ObjectId": "666e5ce71520453f886b902afbe47d67",
|
||||
"m_ActiveSubTarget": {
|
||||
"m_Id": "ad6b12314a1a4bfdab2f7dc03c885480"
|
||||
},
|
||||
"m_Datas": [
|
||||
{
|
||||
"m_Id": "86dc2941a072419a906d1d9d771faa2e"
|
||||
},
|
||||
{
|
||||
"m_Id": "0f03685dd1484a778c8ad3dbf87e9719"
|
||||
},
|
||||
{
|
||||
"m_Id": "56cb2ffc93b44d849bf40c5e58b2f9c3"
|
||||
}
|
||||
],
|
||||
"m_CustomEditorGUI": "",
|
||||
"m_SupportVFX": false,
|
||||
"m_SupportComputeForVertexSetup": false
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInUnlitSubTarget",
|
||||
@@ -1454,25 +1326,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.BuiltinData",
|
||||
"m_ObjectId": "86dc2941a072419a906d1d9d771faa2e",
|
||||
"m_Distortion": false,
|
||||
"m_DistortionMode": 0,
|
||||
"m_DistortionDepthTest": true,
|
||||
"m_AddPrecomputedVelocity": false,
|
||||
"m_TransparentWritesMotionVec": false,
|
||||
"m_DepthOffset": false,
|
||||
"m_ConservativeDepthOffset": false,
|
||||
"m_TransparencyFog": true,
|
||||
"m_AlphaTestShadow": false,
|
||||
"m_BackThenFrontRendering": false,
|
||||
"m_TransparentDepthPrepass": false,
|
||||
"m_TransparentDepthPostpass": false,
|
||||
"m_SupportLodCrossFade": false
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 1,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
|
||||
@@ -1501,36 +1354,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot",
|
||||
"m_ObjectId": "8ed07cb6ee9245b195f845215e00d7ed",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Emission",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Emission",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"m_DefaultValue": {
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
"m_Labels": [],
|
||||
"m_ColorMode": 1,
|
||||
"m_DefaultColor": {
|
||||
"r": 0.0,
|
||||
"g": 0.0,
|
||||
"b": 0.0,
|
||||
"a": 1.0
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
@@ -1678,34 +1501,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 1,
|
||||
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget",
|
||||
"m_ObjectId": "a7a5bf24ad3d443f911d872cdffa4e6c",
|
||||
"m_Datas": [],
|
||||
"m_ActiveSubTarget": {
|
||||
"m_Id": "4beb3457ecff455e81b2a38737480fde"
|
||||
},
|
||||
"m_AllowMaterialOverride": false,
|
||||
"m_SurfaceType": 0,
|
||||
"m_ZTestMode": 4,
|
||||
"m_ZWriteControl": 0,
|
||||
"m_AlphaMode": 0,
|
||||
"m_RenderFace": 2,
|
||||
"m_AlphaClip": false,
|
||||
"m_CastShadows": true,
|
||||
"m_ReceiveShadows": true,
|
||||
"m_SupportsLODCrossFade": false,
|
||||
"m_CustomEditorGUI": "",
|
||||
"m_SupportVFX": false
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDUnlitSubTarget",
|
||||
"m_ObjectId": "ad6b12314a1a4bfdab2f7dc03c885480"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
|
||||
@@ -2037,6 +1832,28 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 1,
|
||||
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget",
|
||||
"m_ObjectId": "d844ace01485410e80662a30ebca0fe0",
|
||||
"m_Datas": [],
|
||||
"m_ActiveSubTarget": {
|
||||
"m_Id": "186d62d80d5342778df6756e00152eb0"
|
||||
},
|
||||
"m_AllowMaterialOverride": false,
|
||||
"m_SurfaceType": 0,
|
||||
"m_ZTestMode": 8,
|
||||
"m_ZWriteControl": 2,
|
||||
"m_AlphaMode": 0,
|
||||
"m_RenderFace": 2,
|
||||
"m_AlphaClip": false,
|
||||
"m_CastShadows": false,
|
||||
"m_ReceiveShadows": true,
|
||||
"m_SupportsLODCrossFade": false,
|
||||
"m_CustomEditorGUI": "",
|
||||
"m_SupportVFX": false
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
|
||||
@@ -2181,40 +1998,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "f4c1405668a94fcea48969bdf227848c",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.Emission",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "8ed07cb6ee9245b195f845215e00d7ed"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.Emission"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.UVNode",
|
||||
|
||||
@@ -106,6 +106,32 @@ TextureImporter:
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
|
||||
@@ -106,6 +106,32 @@ TextureImporter:
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
|
||||
@@ -106,6 +106,32 @@ TextureImporter:
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
|
||||
@@ -29,9 +29,9 @@ Material:
|
||||
- _BUILTIN_ALPHATEST_ON
|
||||
- _BUILTIN_AlphaClip
|
||||
- _BUILTIN_SURFACE_TYPE_TRANSPARENT
|
||||
- _BUILTIN_TRANSPARENT_RECEIVES_SHADOWS
|
||||
- _DOUBLESIDED_ON
|
||||
- _ENABLE_FOG_ON_TRANSPARENT
|
||||
- _SPECULAR_SETUP
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
- _TRANSPARENT_WRITES_MOTION_VEC
|
||||
m_InvalidKeywords: []
|
||||
|
||||
@@ -56,12 +56,14 @@ MonoBehaviour:
|
||||
_Spectrum: {fileID: 11400000, guid: ce5a3f1aff978418c90b45d58f574528, type: 2}
|
||||
_EvaluateSpectrumAtRunTimeEveryFrame: 0
|
||||
_RespectShallowWaterAttenuation: 1
|
||||
_OverrideGlobalWindDirection: 1
|
||||
_WaveDirectionHeadingAngle: 180
|
||||
_OverrideGlobalWindSpeed: 0
|
||||
_WindSpeed: 20
|
||||
_Resolution: 128
|
||||
_DrawSlicesInEditor: 0
|
||||
_AlphaSource: 0
|
||||
_OverrideGlobalWindTurbulence: 1
|
||||
_WindTurbulence: 0.145
|
||||
_WindAlignment: 0
|
||||
_TimeLoopLength: Infinity
|
||||
@@ -71,7 +73,7 @@ MonoBehaviour:
|
||||
_TimeResolution: 4
|
||||
_SmallestWavelengthRequired: 2
|
||||
_BakedTimeLoopLength: 32
|
||||
_Version: 1
|
||||
_Version: 2
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
@@ -296,34 +298,45 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: e64c239f69eea46778ded6dcc3427a34, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_Version: 0
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_WindSpeed: 150
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: d340825b528984c3ea62563460223aa4, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 0}
|
||||
_CastShadows: 0
|
||||
_WriteMotionVectors: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Version: 1
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_WindZone: {fileID: 0}
|
||||
_OverrideWindZoneWindSpeed: 0
|
||||
_WindSpeed: 150
|
||||
_OverrideWindZoneWindDirection: 0
|
||||
_WindDirection: 0
|
||||
_OverrideWindZoneWindTurbulence: 0
|
||||
_WindTurbulence: 0.145
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_InjectionPoint: 0
|
||||
_WriteToColorTexture: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WriteMotionVectors: 1
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_Surface:
|
||||
rid: 1010
|
||||
_ScaleRange: {x: 4, y: 256}
|
||||
_DropDetailHeightBasedOnWaves: 0.2
|
||||
_Slices: 7
|
||||
_Slices: 9
|
||||
_Resolution: 384
|
||||
_GeometryDownSampleFactor: 4
|
||||
_ExtentsSizeMultiplier: 100
|
||||
_Viewpoint: {fileID: 0}
|
||||
_CenterOfDetailDisplacementCorrection: 1
|
||||
_SampleTerrainHeightForScale: 1
|
||||
_ForceScaleChangeSmoothing: 0
|
||||
_TeleportThreshold: 10
|
||||
@@ -353,6 +366,8 @@ MonoBehaviour:
|
||||
rid: 1720327093404827649
|
||||
_Underwater:
|
||||
rid: 1720327093404827648
|
||||
_Meniscus:
|
||||
rid: 1011
|
||||
_Portals:
|
||||
rid: 7000983677634084867
|
||||
_ShowWaterProxyPlane: 0
|
||||
@@ -364,15 +379,11 @@ MonoBehaviour:
|
||||
_ShowHiddenObjects: 0
|
||||
_DisableFollowViewpoint: 0
|
||||
_DestroyResourcesInOnDisable: 0
|
||||
_DisableChunks: 0
|
||||
_UniformTiles: 0
|
||||
_DisableSkirt: 0
|
||||
_DrawLodOutline: 0
|
||||
_ShowDebugInformation: 0
|
||||
_LogScaleChange: 0
|
||||
_PauseOnScaleChange: 0
|
||||
_IgnoreWavesForScaleChange: 0
|
||||
_ForceBatchMode: 0
|
||||
_ForceNoGraphics: 0
|
||||
_Resources: {fileID: 11400000, guid: 0817af17dea584e5382e6216db162d4a, type: 2}
|
||||
references:
|
||||
@@ -401,6 +412,7 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 46
|
||||
_IncludeTerrainHeight: 0
|
||||
_EnableSignedDistanceFields: 1
|
||||
- rid: 1002
|
||||
type: {class: FoamLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
@@ -440,6 +452,7 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 6
|
||||
_SimulationFrequency: 60
|
||||
_DynamicSoftShadows: 1
|
||||
_SoftJitterExtinctionFactor: 0.75
|
||||
_JitterDiameterSoft: 15
|
||||
@@ -489,6 +502,29 @@ MonoBehaviour:
|
||||
_ShorelineColor: {r: 0, g: 0.588, b: 1.2, a: 6}
|
||||
_ShorelineColorMaximumDistance: 10
|
||||
_ShorelineColorFalloff: 2
|
||||
- rid: 1010
|
||||
type: {class: SurfaceRenderer, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Version: 0
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: d340825b528984c3ea62563460223aa4, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 0}
|
||||
_CastShadows: 0
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Debug:
|
||||
_UniformTiles: 0
|
||||
_DisableSkirt: 0
|
||||
- rid: 1011
|
||||
type: {class: Meniscus, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: 238e45299a5ec46308e9bf99ddf67963, type: 2}
|
||||
- rid: 1720327093404827648
|
||||
type: {class: UnderwaterRenderer, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
@@ -499,10 +535,6 @@ MonoBehaviour:
|
||||
_EnvironmentalLightingEnable: 0
|
||||
_EnvironmentalLightingWeight: 1
|
||||
_EnvironmentalLightingVolumeProfile: {fileID: 0}
|
||||
_EnableShaderAPI: 0
|
||||
_TransparentObjectLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
_AllCameras: 0
|
||||
_CopyWaterMaterialParametersEachFrame: 1
|
||||
_FarPlaneMultiplier: 0.68
|
||||
@@ -519,7 +551,7 @@ MonoBehaviour:
|
||||
data:
|
||||
_Version: 0
|
||||
_Enabled: 0
|
||||
_Mode: 0
|
||||
_Mode: 1
|
||||
_Layers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 2147483649
|
||||
|
||||
Binary file not shown.
@@ -45,9 +45,9 @@ Material:
|
||||
- _BUILTIN_ALPHATEST_ON
|
||||
- _BUILTIN_AlphaClip
|
||||
- _BUILTIN_SURFACE_TYPE_TRANSPARENT
|
||||
- _BUILTIN_TRANSPARENT_RECEIVES_SHADOWS
|
||||
- _DOUBLESIDED_ON
|
||||
- _ENABLE_FOG_ON_TRANSPARENT
|
||||
- _SPECULAR_SETUP
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
- _TRANSPARENT_WRITES_MOTION_VEC
|
||||
m_InvalidKeywords: []
|
||||
|
||||
@@ -13,7 +13,7 @@ OcclusionCullingSettings:
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
@@ -42,8 +42,8 @@ RenderSettings:
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 13
|
||||
m_BakeOnSceneLoad: 1
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
@@ -66,6 +66,9 @@ LightmapSettings:
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
@@ -93,8 +96,9 @@ LightmapSettings:
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 112000000, guid: 2fb19c05f04ea8c4fad841f42065b207, type: 2}
|
||||
m_LightingSettings: {fileID: 4890085278179872738, guid: 6e72aca972f324f7886200f86939d735, type: 2}
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 4890085278179872738, guid: 6e72aca972f324f7886200f86939d735,
|
||||
type: 2}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
@@ -160,47 +164,58 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1737612588}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
- target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2942909709672342223, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
- target: {fileID: 2942909709672342223, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Atmosphere
|
||||
objectReference: {fileID: 0}
|
||||
@@ -211,7 +226,8 @@ PrefabInstance:
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
--- !u!4 &849648606 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3}
|
||||
m_CorrespondingSourceObject: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 849648605}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &1305144322
|
||||
@@ -222,47 +238,58 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 204793448}
|
||||
m_Modifications:
|
||||
- target: {fileID: 6079220456006713144, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
- target: {fileID: 6079220456006713144, guid: 5e01cffb9e8324147affb8e08fd5ed13,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: PostProcessing
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
- target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
@@ -273,7 +300,8 @@ PrefabInstance:
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
--- !u!4 &1305144323 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3}
|
||||
m_CorrespondingSourceObject: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1305144322}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1713053106
|
||||
@@ -318,47 +346,58 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 204793448}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2452750316707852747, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3}
|
||||
- target: {fileID: 2452750316707852747, guid: c26fe2b4fef6c484089497b549dd6b04,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Camera
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -12.755484
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 3.9116275
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -0.47643661
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.6911961
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.1276672
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.6994695
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0.12919533
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3}
|
||||
- target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
@@ -369,7 +408,8 @@ PrefabInstance:
|
||||
m_SourcePrefab: {fileID: 100100000, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3}
|
||||
--- !u!4 &1730370255 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3}
|
||||
m_CorrespondingSourceObject: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1730370254}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1737612587
|
||||
@@ -414,47 +454,58 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1737612588}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: -0.6898038
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0.28572607
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.6145928
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0.25457266
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 45
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 276.6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
- target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5304508333967466499, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
- target: {fileID: 5304508333967466499, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Sun
|
||||
objectReference: {fileID: 0}
|
||||
@@ -465,7 +516,8 @@ PrefabInstance:
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
--- !u!4 &1745844464 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3}
|
||||
m_CorrespondingSourceObject: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1745844463}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &1773514258
|
||||
@@ -476,47 +528,58 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1737612588}
|
||||
m_Modifications:
|
||||
- target: {fileID: 963553959586484309, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
- target: {fileID: 963553959586484309, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Lighting
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
- target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
@@ -527,7 +590,8 @@ PrefabInstance:
|
||||
m_SourcePrefab: {fileID: 100100000, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
--- !u!4 &1773514259 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3}
|
||||
m_CorrespondingSourceObject: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 1773514258}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1887373152
|
||||
@@ -574,27 +638,38 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: e64c239f69eea46778ded6dcc3427a34, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_Version: 0
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_WindSpeed: 10
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: aa74fe26a90564079a48cdae97645f7b, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 1516456258233481520, guid: 17840562212c147d6bdb5144d35bc442, type: 3}
|
||||
_ChunkTemplate: {fileID: 1516456258233481520, guid: 17840562212c147d6bdb5144d35bc442,
|
||||
type: 3}
|
||||
_CastShadows: 0
|
||||
_WriteMotionVectors: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Version: 1
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_WindZone: {fileID: 0}
|
||||
_OverrideWindZoneWindSpeed: 0
|
||||
_WindSpeed: 10
|
||||
_OverrideWindZoneWindDirection: 0
|
||||
_WindDirection: 0
|
||||
_OverrideWindZoneWindTurbulence: 0
|
||||
_WindTurbulence: 0.145
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_InjectionPoint: 0
|
||||
_WriteToColorTexture: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WriteMotionVectors: 1
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_Surface:
|
||||
rid: 4199187345983668226
|
||||
_ScaleRange: {x: 4, y: 256}
|
||||
_DropDetailHeightBasedOnWaves: 0.2
|
||||
_Slices: 7
|
||||
@@ -602,6 +677,7 @@ MonoBehaviour:
|
||||
_GeometryDownSampleFactor: 2
|
||||
_ExtentsSizeMultiplier: 100
|
||||
_Viewpoint: {fileID: 0}
|
||||
_CenterOfDetailDisplacementCorrection: 1
|
||||
_SampleTerrainHeightForScale: 1
|
||||
_ForceScaleChangeSmoothing: 0
|
||||
_TeleportThreshold: 10
|
||||
@@ -631,6 +707,8 @@ MonoBehaviour:
|
||||
rid: 9154139594981113868
|
||||
_Underwater:
|
||||
rid: 9154139594981113869
|
||||
_Meniscus:
|
||||
rid: 9040549687677943810
|
||||
_Portals:
|
||||
rid: 9154139594981113870
|
||||
_ShowWaterProxyPlane: 0
|
||||
@@ -642,10 +720,11 @@ MonoBehaviour:
|
||||
_ShowHiddenObjects: 0
|
||||
_DisableFollowViewpoint: 0
|
||||
_DestroyResourcesInOnDisable: 0
|
||||
_DrawLodOutline: 0
|
||||
_ShowDebugInformation: 0
|
||||
_LogScaleChange: 0
|
||||
_PauseOnScaleChange: 0
|
||||
_IgnoreWavesForScaleChange: 0
|
||||
_ForceBatchMode: 0
|
||||
_ForceNoGraphics: 0
|
||||
_Resources: {fileID: 11400000, guid: 0817af17dea584e5382e6216db162d4a, type: 2}
|
||||
references:
|
||||
@@ -675,6 +754,30 @@ MonoBehaviour:
|
||||
_ShorelineColor: {r: 0, g: 0.588, b: 1.2, a: 6}
|
||||
_ShorelineColorMaximumDistance: 10
|
||||
_ShorelineColorFalloff: 2
|
||||
- rid: 4199187345983668226
|
||||
type: {class: SurfaceRenderer, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Version: 0
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: aa74fe26a90564079a48cdae97645f7b, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 1516456258233481520, guid: 17840562212c147d6bdb5144d35bc442,
|
||||
type: 3}
|
||||
_CastShadows: 0
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Debug:
|
||||
_UniformTiles: 0
|
||||
_DisableSkirt: 0
|
||||
- rid: 9040549687677943810
|
||||
type: {class: Meniscus, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: 238e45299a5ec46308e9bf99ddf67963, type: 2}
|
||||
- rid: 9154139594981113859
|
||||
type: {class: AnimatedWavesLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
@@ -698,6 +801,7 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 46
|
||||
_IncludeTerrainHeight: 0
|
||||
_EnableSignedDistanceFields: 1
|
||||
- rid: 9154139594981113861
|
||||
type: {class: LevelLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
@@ -745,6 +849,7 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 6
|
||||
_SimulationFrequency: 60
|
||||
_DynamicSoftShadows: 1
|
||||
_SoftJitterExtinctionFactor: 0.75
|
||||
_JitterDiameterSoft: 15
|
||||
@@ -815,10 +920,6 @@ MonoBehaviour:
|
||||
_EnvironmentalLightingEnable: 0
|
||||
_EnvironmentalLightingWeight: 1
|
||||
_EnvironmentalLightingVolumeProfile: {fileID: 0}
|
||||
_EnableShaderAPI: 0
|
||||
_TransparentObjectLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
_AllCameras: 0
|
||||
_CopyWaterMaterialParametersEachFrame: 1
|
||||
_FarPlaneMultiplier: 0.68
|
||||
@@ -832,7 +933,11 @@ MonoBehaviour:
|
||||
_OnlyReflectionCameras: 0
|
||||
- rid: 9154139594981113870
|
||||
type: {class: PortalRenderer, ns: WaveHarmonic.Crest.Portals, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
data:
|
||||
_Enabled: 0
|
||||
_Mode: 2
|
||||
_Geometry: {fileID: 0}
|
||||
_Invert: 0
|
||||
--- !u!1001 &2904561123747805697
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -841,47 +946,58 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, type: 3}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, type: 3}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, type: 3}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, type: 3}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, type: 3}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, type: 3}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, type: 3}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, type: 3}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 90
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, type: 3}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, type: 3}
|
||||
- target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6920241850790494902, guid: 178ae2ae1dc4f4224a165b75c017acfa, type: 3}
|
||||
- target: {fileID: 6920241850790494902, guid: 178ae2ae1dc4f4224a165b75c017acfa,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Ripple Generator
|
||||
objectReference: {fileID: 0}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
@@ -45,9 +45,9 @@ Material:
|
||||
- _BUILTIN_ALPHATEST_ON
|
||||
- _BUILTIN_AlphaClip
|
||||
- _BUILTIN_SURFACE_TYPE_TRANSPARENT
|
||||
- _BUILTIN_TRANSPARENT_RECEIVES_SHADOWS
|
||||
- _DOUBLESIDED_ON
|
||||
- _ENABLE_FOG_ON_TRANSPARENT
|
||||
- _SPECULAR_SETUP
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
- _TRANSPARENT_WRITES_MOTION_VEC
|
||||
m_InvalidKeywords: []
|
||||
|
||||
@@ -270,35 +270,46 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: e64c239f69eea46778ded6dcc3427a34, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_Version: 0
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_WindSpeed: 150
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: d6e4d43be817745be8c654fe12d10077, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 1516456258233481520, guid: 17840562212c147d6bdb5144d35bc442,
|
||||
type: 3}
|
||||
_CastShadows: 0
|
||||
_WriteMotionVectors: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Version: 1
|
||||
_Camera: {fileID: 0}
|
||||
_TimeProvider: {fileID: 0}
|
||||
_WindZone: {fileID: 0}
|
||||
_OverrideWindZoneWindSpeed: 0
|
||||
_WindSpeed: 150
|
||||
_OverrideWindZoneWindDirection: 0
|
||||
_WindDirection: 0
|
||||
_OverrideWindZoneWindTurbulence: 0
|
||||
_WindTurbulence: 0.145
|
||||
_OverrideGravity: 0
|
||||
_GravityOverride: -9.8
|
||||
_GravityMultiplier: 1
|
||||
_PrimaryLight: {fileID: 0}
|
||||
_InjectionPoint: 0
|
||||
_WriteToColorTexture: 1
|
||||
_WriteToDepthTexture: 1
|
||||
_WriteMotionVectors: 1
|
||||
_OverrideRenderHDR: 0
|
||||
_RenderHDR: 1
|
||||
_Surface:
|
||||
rid: 1002
|
||||
_ScaleRange: {x: 4, y: 256}
|
||||
_DropDetailHeightBasedOnWaves: 0.2
|
||||
_Slices: 7
|
||||
_Slices: 9
|
||||
_Resolution: 384
|
||||
_GeometryDownSampleFactor: 2
|
||||
_ExtentsSizeMultiplier: 100
|
||||
_Viewpoint: {fileID: 0}
|
||||
_CenterOfDetailDisplacementCorrection: 1
|
||||
_SampleTerrainHeightForScale: 1
|
||||
_ForceScaleChangeSmoothing: 0
|
||||
_TeleportThreshold: 10
|
||||
@@ -328,6 +339,8 @@ MonoBehaviour:
|
||||
rid: 162836781179600933
|
||||
_Underwater:
|
||||
rid: 162836781179600934
|
||||
_Meniscus:
|
||||
rid: 1003
|
||||
_Portals:
|
||||
rid: 162836781179600935
|
||||
_ShowWaterProxyPlane: 0
|
||||
@@ -339,15 +352,11 @@ MonoBehaviour:
|
||||
_ShowHiddenObjects: 0
|
||||
_DisableFollowViewpoint: 0
|
||||
_DestroyResourcesInOnDisable: 0
|
||||
_DisableChunks: 0
|
||||
_UniformTiles: 0
|
||||
_DisableSkirt: 0
|
||||
_DrawLodOutline: 0
|
||||
_ShowDebugInformation: 0
|
||||
_LogScaleChange: 0
|
||||
_PauseOnScaleChange: 0
|
||||
_IgnoreWavesForScaleChange: 0
|
||||
_ForceBatchMode: 0
|
||||
_ForceNoGraphics: 0
|
||||
_Resources: {fileID: 11400000, guid: 0817af17dea584e5382e6216db162d4a, type: 2}
|
||||
references:
|
||||
@@ -377,6 +386,30 @@ MonoBehaviour:
|
||||
_ShorelineColor: {r: 0, g: 0.588, b: 1.2, a: 6}
|
||||
_ShorelineColorMaximumDistance: 10
|
||||
_ShorelineColorFalloff: 2
|
||||
- rid: 1002
|
||||
type: {class: SurfaceRenderer, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Version: 0
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: d6e4d43be817745be8c654fe12d10077, type: 2}
|
||||
_VolumeMaterial: {fileID: 0}
|
||||
_ChunkTemplate: {fileID: 1516456258233481520, guid: 17840562212c147d6bdb5144d35bc442,
|
||||
type: 3}
|
||||
_CastShadows: 0
|
||||
_WaterBodyCulling: 1
|
||||
_TimeSliceBoundsUpdateFrameCount: 1
|
||||
_SurfaceSelfIntersectionFixMode: 4
|
||||
_AllowRenderQueueSorting: 0
|
||||
_Debug:
|
||||
_UniformTiles: 0
|
||||
_DisableSkirt: 0
|
||||
- rid: 1003
|
||||
type: {class: Meniscus, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
_Enabled: 1
|
||||
_Layer: 4
|
||||
_Material: {fileID: 2100000, guid: 238e45299a5ec46308e9bf99ddf67963, type: 2}
|
||||
- rid: 162836781179600924
|
||||
type: {class: AnimatedWavesLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
data:
|
||||
@@ -400,6 +433,7 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 46
|
||||
_IncludeTerrainHeight: 0
|
||||
_EnableSignedDistanceFields: 1
|
||||
- rid: 162836781179600926
|
||||
type: {class: LevelLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest}
|
||||
@@ -447,6 +481,7 @@ MonoBehaviour:
|
||||
_Resolution: 256
|
||||
_TextureFormatMode: 100
|
||||
_TextureFormat: 6
|
||||
_SimulationFrequency: 60
|
||||
_DynamicSoftShadows: 1
|
||||
_SoftJitterExtinctionFactor: 0.75
|
||||
_JitterDiameterSoft: 15
|
||||
@@ -517,10 +552,6 @@ MonoBehaviour:
|
||||
_EnvironmentalLightingEnable: 0
|
||||
_EnvironmentalLightingWeight: 1
|
||||
_EnvironmentalLightingVolumeProfile: {fileID: 0}
|
||||
_EnableShaderAPI: 0
|
||||
_TransparentObjectLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
_AllCameras: 0
|
||||
_CopyWaterMaterialParametersEachFrame: 1
|
||||
_FarPlaneMultiplier: 0.68
|
||||
@@ -650,12 +681,14 @@ MonoBehaviour:
|
||||
_Spectrum: {fileID: 11400000, guid: 30151f29a777a41f39698cb262ee599b, type: 2}
|
||||
_EvaluateSpectrumAtRunTimeEveryFrame: 1
|
||||
_RespectShallowWaterAttenuation: 1
|
||||
_OverrideGlobalWindDirection: 1
|
||||
_WaveDirectionHeadingAngle: -90
|
||||
_OverrideGlobalWindSpeed: 0
|
||||
_WindSpeed: 20
|
||||
_Resolution: 128
|
||||
_DrawSlicesInEditor: 0
|
||||
_AlphaSource: 0
|
||||
_OverrideGlobalWindTurbulence: 1
|
||||
_WindTurbulence: 0.145
|
||||
_WindAlignment: 0
|
||||
_TimeLoopLength: Infinity
|
||||
@@ -665,7 +698,7 @@ MonoBehaviour:
|
||||
_TimeResolution: 4
|
||||
_SmallestWavelengthRequired: 2
|
||||
_BakedTimeLoopLength: 32
|
||||
_Version: 1
|
||||
_Version: 2
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
|
||||
@@ -12,5 +12,5 @@ MonoBehaviour:
|
||||
m_Script: {fileID: -1063058285, guid: 448d62fcada76fd4ab5702190add98fd, type: 3}
|
||||
m_Name: EditorUndoStackPointer
|
||||
m_EditorClassIdentifier: "UMotionEditor.dll::\u0389\u0389\u0389\u0389\u038A\u0389\u0389\u0389\u038A\u038A\u038A\u038A\u038A\u0389\u038A\u038A\u038A\u0389\u038A\u038A\u0389\u0389\u0389\u038A\u038A\u038A\u038A\u038A\u038A\u0389\u038A\u038A\u0389\u038A\u038A\u0389\u038A\u0389\u0389\u0389\u038A\u0389\u0389\u0389\u0389\u0389\u038A"
|
||||
"\u0389\u038A\u0389\u038A\u0389\u038A\u0389\u038A\u038A\u038A\u038A\u0389\u038A\u0389\u038A\u0389\u0389\u038A\u0389\u038A\u0389\u038A\u0389\u038A\u0389\u038A\u0389\u0389\u038A\u0389\u0389\u038A\u0389\u038A\u038A\u0389\u0389\u038A\u038A\u0389\u0389\u038A\u0389\u038A\u038A\u0389\u038A": 1.29p03
|
||||
"\u038A\u038A\u0389\u038A\u038A\u0389\u0389\u0389\u038A\u0389\u038A\u038A\u038A\u0389\u038A\u0389\u0389\u0389\u038A\u0389\u038A\u0389\u038A\u038A\u038A\u038A\u038A\u0389\u0389\u0389\u0389\u0389\u038A\u038A\u0389\u038A\u0389\u0389\u0389\u0389\u038A\u038A\u0389\u038A\u0389\u0389\u0389": 176
|
||||
"\u0389\u038A\u0389\u038A\u0389\u038A\u0389\u038A\u038A\u038A\u038A\u0389\u038A\u0389\u038A\u0389\u0389\u038A\u0389\u038A\u0389\u038A\u0389\u038A\u0389\u038A\u0389\u0389\u038A\u0389\u0389\u038A\u0389\u038A\u038A\u0389\u0389\u038A\u038A\u0389\u0389\u038A\u0389\u038A\u038A\u0389\u038A":
|
||||
"\u038A\u038A\u0389\u038A\u038A\u0389\u0389\u0389\u038A\u0389\u038A\u038A\u038A\u0389\u038A\u0389\u0389\u0389\u038A\u0389\u038A\u0389\u038A\u038A\u038A\u038A\u038A\u0389\u0389\u0389\u0389\u0389\u038A\u038A\u0389\u038A\u0389\u0389\u0389\u0389\u038A\u038A\u0389\u038A\u0389\u0389\u0389": -1
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -93,6 +93,32 @@ TextureImporter:
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
|
||||
@@ -29,6 +29,8 @@ namespace WaveHarmonic.Crest.Editor.Build
|
||||
false;
|
||||
#endif
|
||||
|
||||
static readonly string[] s_ShadowCollectorKeywords = { "SHADOWS_SINGLE_CASCADE", "SHADOWS_SPLIT_SPHERES", "SHADOWS_SOFT" };
|
||||
|
||||
public void OnProcessShader(Shader shader, ShaderSnippetData snippet, IList<ShaderCompilerData> data)
|
||||
{
|
||||
// Not one of our shaders.
|
||||
@@ -49,6 +51,8 @@ namespace WaveHarmonic.Crest.Editor.Build
|
||||
return;
|
||||
}
|
||||
|
||||
// NOTE: There is no point checking against sub-shader count.
|
||||
|
||||
_VariantCount += data.Count;
|
||||
|
||||
// Strip BIRP sub-shader if not using BIRP, as Unity only strips HDRP/URP sub-shaders.
|
||||
@@ -61,34 +65,36 @@ namespace WaveHarmonic.Crest.Editor.Build
|
||||
|
||||
for (var i = data.Count - 1; i >= 0; --i)
|
||||
{
|
||||
var strip = false;
|
||||
var keywords = data[i].shaderKeywordSet.GetShaderKeywords();
|
||||
var isLightingPass = snippet.passType is PassType.ForwardBase or PassType.ForwardAdd;
|
||||
var isTransparent = keywords.Any(x => x.name == "_BUILTIN_SURFACE_TYPE_TRANSPARENT");
|
||||
var isTransparentShadowReceiver = keywords.Any(x => x.name == "_BUILTIN_TRANSPARENT_RECEIVES_SHADOWS");
|
||||
|
||||
foreach (var keyword in keywords)
|
||||
// Invalid combination.
|
||||
if (isLightingPass && !isTransparent && isTransparentShadowReceiver)
|
||||
{
|
||||
var name = keyword.name;
|
||||
var strip =
|
||||
// Main light shadows. Never used.
|
||||
name.StartsWithNoAlloc("_MAIN_LIGHT_") ||
|
||||
// Additional lights. Never used. Although, vertex lighting keyword is set.
|
||||
name.StartsWithNoAlloc("_ADDITIONAL_LIGHT") ||
|
||||
// Never used. Used in deferred pass, but not defined in deferred pass.
|
||||
keyword.name is "LIGHTMAP_SHADOW_MIXING" or "SHADOWS_SHADOWMASK" ||
|
||||
// Never used.
|
||||
keyword.name is "_SCREEN_SPACE_OCCLUSION" or "_SHADOWS_SOFT" or "_CASTING_PUNCTUAL_LIGHT_SHADOW" ||
|
||||
// BIRP does not support this feature (URP does).
|
||||
keyword.name is "_GBUFFER_NORMALS_OCT" ||
|
||||
// TODO: check LightMode instead of pass name.
|
||||
// Shadow keywords are not enabled for transparent objects, except if casting.
|
||||
isTransparent && snippet.passName == "ShadowCaster" && keyword.name.Contains("SHADOW");
|
||||
strip = true;
|
||||
}
|
||||
|
||||
if (strip)
|
||||
if (!strip)
|
||||
{
|
||||
foreach (var keyword in keywords)
|
||||
{
|
||||
_VariantCountStripped++;
|
||||
data.RemoveAt(i);
|
||||
break;
|
||||
var name = keyword.name;
|
||||
strip =
|
||||
// Invalid combination.
|
||||
isLightingPass && (!isTransparent || !isTransparentShadowReceiver) && s_ShadowCollectorKeywords.Contains(keyword.name);
|
||||
|
||||
if (strip) break;
|
||||
}
|
||||
}
|
||||
|
||||
if (strip)
|
||||
{
|
||||
_VariantCountStripped++;
|
||||
data.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,6 +223,14 @@ namespace WaveHarmonic.Crest.Editor.Build
|
||||
}
|
||||
}
|
||||
|
||||
if (!RenderPipelineHelper.IsLegacy)
|
||||
{
|
||||
if (shader.name.StartsWithNoAlloc("Hidden/Crest/Legacy/"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -273,8 +287,8 @@ namespace WaveHarmonic.Crest.Editor.Build
|
||||
return false;
|
||||
}
|
||||
|
||||
// There will be at least three sub-shaders if one per render pipeline.
|
||||
if (shader.subshaderCount <= 2)
|
||||
// There will be at least two sub-shaders if other render pipelines.
|
||||
if (shader.subshaderCount <= 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -10,10 +10,14 @@ namespace WaveHarmonic.Crest.Editor
|
||||
[CustomEditor(typeof(WaterRenderer))]
|
||||
sealed class WaterRendererEditor : Inspector
|
||||
{
|
||||
// Whether validation was triggered by user request, which should never skip console logging.
|
||||
internal static bool ManualValidation { get; private set; }
|
||||
|
||||
WaterRenderer _Target;
|
||||
|
||||
void OnEnable()
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
_Target = (WaterRenderer)target;
|
||||
}
|
||||
|
||||
@@ -65,9 +69,9 @@ namespace WaveHarmonic.Crest.Editor
|
||||
if (i < target.LodLevels - 1) message += "\n\n";
|
||||
}
|
||||
|
||||
if (target.Material.HasVector(WaterRenderer.ShaderIDs.s_Absorption))
|
||||
if (target.Surface.Material.HasVector(WaterRenderer.ShaderIDs.s_Absorption))
|
||||
{
|
||||
message += $"\n\nDepth Fog Density: {target.Material.GetVector(WaterRenderer.ShaderIDs.s_Absorption)}";
|
||||
message += $"\n\nDepth Fog Density: {target.Surface.Material.GetVector(WaterRenderer.ShaderIDs.s_Absorption)}";
|
||||
}
|
||||
|
||||
EditorGUILayout.HelpBox(message, MessageType.None);
|
||||
@@ -98,6 +102,8 @@ namespace WaveHarmonic.Crest.Editor
|
||||
|
||||
if (GUILayout.Button("Validate Setup"))
|
||||
{
|
||||
ManualValidation = true;
|
||||
|
||||
ValidatedHelper.ExecuteValidators(target, ValidatedHelper.DebugLog);
|
||||
|
||||
foreach (var component in FindObjectsByType<EditorBehaviour>(FindObjectsSortMode.None))
|
||||
@@ -107,6 +113,8 @@ namespace WaveHarmonic.Crest.Editor
|
||||
}
|
||||
|
||||
Debug.Log("Crest: Validation complete!", target);
|
||||
|
||||
ManualValidation = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,8 +136,10 @@ namespace WaveHarmonic.Crest.Editor
|
||||
_HostComponentType = hostComponentType;
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
Undo.undoRedoEvent -= OnUndoRedo;
|
||||
Undo.undoRedoEvent += OnUndoRedo;
|
||||
}
|
||||
@@ -297,7 +307,8 @@ namespace WaveHarmonic.Crest.Editor
|
||||
switch (spectrumModel)
|
||||
{
|
||||
case WaveSpectrum.SpectrumModel.PiersonMoskowitz:
|
||||
spec.ApplyPiersonMoskowitzSpectrum();
|
||||
var water = WaterRenderer.Instance;
|
||||
spec.ApplyPiersonMoskowitzSpectrum(water != null ? water.Gravity : Mathf.Abs(Physics.gravity.y));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -383,7 +394,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
var canBake = !onDemand && !Application.isPlaying;
|
||||
var canPopulate = Application.isPlaying ? onDemand : target.Type != DepthProbeMode.Baked;
|
||||
|
||||
if (target.SavedTexture != null && isBaked ? GUILayout.Button("Switch to Real-Time") : GUILayout.Button("Switch to Baked"))
|
||||
if (isBaked ? GUILayout.Button("Switch to Real-Time") : target.SavedTexture != null && GUILayout.Button("Switch to Baked"))
|
||||
{
|
||||
Undo.RecordObject(target, isBaked ? "Switch to Real-Time" : "Switch to Baked");
|
||||
target.Type = isBaked ? DepthProbeMode.RealTime : DepthProbeMode.Baked;
|
||||
@@ -451,6 +462,10 @@ namespace WaveHarmonic.Crest.Editor
|
||||
settings.singleChannelComponent = TextureImporterSingleChannelComponent.Red;
|
||||
ti.SetTextureSettings(settings);
|
||||
}
|
||||
else
|
||||
{
|
||||
ti.textureType = TextureImporterType.Default;
|
||||
}
|
||||
|
||||
// Set format.
|
||||
{
|
||||
|
||||
@@ -16,6 +16,12 @@ namespace WaveHarmonic.Crest.Editor
|
||||
: s_VisualizeMaterial = new(Shader.Find("Local/Debug/Visualize Signed Texture"));
|
||||
#endif
|
||||
|
||||
static void DrawLine(Vector3 start, Vector3 end, Color color, float _)
|
||||
{
|
||||
Gizmos.color = color;
|
||||
Gizmos.DrawLine(start, end);
|
||||
}
|
||||
|
||||
[DrawGizmo(GizmoType.Selected | GizmoType.NonSelected)]
|
||||
static void DrawGizmos(WaterRenderer target, GizmoType type)
|
||||
{
|
||||
@@ -51,12 +57,12 @@ namespace WaveHarmonic.Crest.Editor
|
||||
// Create proxy if not present already, and proxy enabled
|
||||
if (target._ProxyPlane == null && target._ShowWaterProxyPlane)
|
||||
{
|
||||
target._ProxyPlane = GameObject.CreatePrimitive(PrimitiveType.Plane);
|
||||
target._ProxyPlane = GameObject.CreatePrimitive(PrimitiveType.Quad);
|
||||
Helpers.Destroy(target._ProxyPlane.GetComponent<Collider>());
|
||||
target._ProxyPlane.hideFlags = HideFlags.HideAndDontSave;
|
||||
target._ProxyPlane.transform.parent = target.transform;
|
||||
target._ProxyPlane.transform.SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity);
|
||||
target._ProxyPlane.transform.localScale = 4000f * Vector3.one;
|
||||
target._ProxyPlane.transform.SetLocalPositionAndRotation(Vector3.zero, Quaternion.Euler(90f, 0f, 0f));
|
||||
target._ProxyPlane.transform.localScale = 1000000f * Vector3.one;
|
||||
|
||||
target._ProxyPlane.GetComponent<Renderer>().sharedMaterial = new(Shader.Find(WaterRenderer.k_ProxyShader));
|
||||
}
|
||||
@@ -70,11 +76,6 @@ namespace WaveHarmonic.Crest.Editor
|
||||
EditorWindow view = EditorWindow.GetWindow<SceneView>();
|
||||
view.Repaint();
|
||||
}
|
||||
|
||||
if (target.Root != null)
|
||||
{
|
||||
target.Root.gameObject.SetActive(!target._ShowWaterProxyPlane);
|
||||
}
|
||||
}
|
||||
|
||||
[DrawGizmo(GizmoType.Selected)]
|
||||
@@ -87,7 +88,8 @@ namespace WaveHarmonic.Crest.Editor
|
||||
var rect = target.Rect;
|
||||
if (rect != Rect.zero)
|
||||
{
|
||||
var height = WaterRenderer.Instance ? WaterRenderer.Instance.SeaLevel : target.transform.position.y;
|
||||
var water = WaterRenderer.Instance;
|
||||
var height = water ? water.SeaLevel : target.transform.position.y;
|
||||
Gizmos.color = Color.magenta;
|
||||
Gizmos.DrawWireCube
|
||||
(
|
||||
@@ -146,7 +148,8 @@ namespace WaveHarmonic.Crest.Editor
|
||||
var rect = target.Rect;
|
||||
if (rect != Rect.zero)
|
||||
{
|
||||
var height = WaterRenderer.Instance ? WaterRenderer.Instance.SeaLevel : target.transform.position.y;
|
||||
var water = WaterRenderer.Instance;
|
||||
var height = water ? water.SeaLevel : target.transform.position.y;
|
||||
Gizmos.color = Color.magenta;
|
||||
Gizmos.DrawWireCube
|
||||
(
|
||||
@@ -209,6 +212,14 @@ namespace WaveHarmonic.Crest.Editor
|
||||
}
|
||||
}
|
||||
|
||||
[DrawGizmo(GizmoType.Selected | GizmoType.NonSelected)]
|
||||
static void DrawGizmos(CollisionAreaVisualizer target, GizmoType type)
|
||||
{
|
||||
var water = WaterRenderer.Instance;
|
||||
if (water == null) return;
|
||||
target.Render(water, DrawLine);
|
||||
}
|
||||
|
||||
[DrawGizmo(GizmoType.Selected | GizmoType.NonSelected)]
|
||||
static void DrawGizmos(DepthProbe target, GizmoType type)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76bb1904a4c3377478b2e551e16f2d59
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a5b1db7ccbfeda46871d9c365e6a914
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,6 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
// Define empty namespaces for when assemblies are not present.
|
||||
|
||||
namespace WaveHarmonic.Crest.ShallowWater { }
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a1364267b3de043daae23dda97c99063
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,259 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
// This file is subject to the MIT License as seen in the root of this folder structure (LICENSE)
|
||||
|
||||
using Gaia;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using WaveHarmonic.Crest.ShallowWater;
|
||||
|
||||
namespace WaveHarmonic.Crest
|
||||
{
|
||||
sealed class GRC_Crest : GaiaRuntimeComponent
|
||||
{
|
||||
[SerializeField]
|
||||
bool _Wind = true;
|
||||
|
||||
[SerializeField]
|
||||
bool _Swell = true;
|
||||
|
||||
[SerializeField]
|
||||
bool _ShallowWater = true;
|
||||
|
||||
GUIContent _HelpLink;
|
||||
GUIContent _PanelLabel;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override GUIContent PanelLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_PanelLabel == null || _PanelLabel.text == "")
|
||||
{
|
||||
_PanelLabel = new GUIContent("Crest Water", "Adds Crest Water to your scene.");
|
||||
}
|
||||
|
||||
return _PanelLabel;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
{
|
||||
// Order components appear in the UI. Try to keep in alphabetical order.
|
||||
m_orderNumber = 210;
|
||||
|
||||
if (_HelpLink == null || _HelpLink.text == "")
|
||||
{
|
||||
_HelpLink = new GUIContent("Crest Online documentation", "Opens the documentation for the Crest Water System in your browser.");
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void DrawUI()
|
||||
{
|
||||
// Displays "?" help button.
|
||||
DisplayHelp
|
||||
(
|
||||
"This module adds the Crest Water System to your scene. Please visit the link to learn more:",
|
||||
_HelpLink,
|
||||
"https://docs.crest.waveharmonic.com/About/Introduction.html"
|
||||
);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
{
|
||||
_Swell = EditorGUILayout.Toggle("Swell Waves", _Swell);
|
||||
DisplayHelp("Whether to add swell waves to the scene. Swell waves will come from conditions far away from the scene. Modify the component after creation to customize.");
|
||||
|
||||
_Wind = EditorGUILayout.Toggle("Wind Waves", _Wind);
|
||||
DisplayHelp("Whether to add wind waves to the scene. These waves are based on local wind conditions. Requires Gaia's Wind Zone (note that the defaul wind value will produce no waves). Modify the component after creation to customize.");
|
||||
|
||||
#if d_WaveHarmonic_Crest_ShallowWater
|
||||
_ShallowWater = EditorGUILayout.Toggle("Shoreline Simulation", _ShallowWater);
|
||||
DisplayHelp("Whether to add a shoreline shallow water simulation to the scene. Modify the component after creation to customize.");
|
||||
#endif
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.FlexibleSpace();
|
||||
if (GUILayout.Button("Remove")) RemoveFromScene();
|
||||
GUILayout.Space(15);
|
||||
if (GUILayout.Button("Apply")) AddToScene();
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
EditorUtility.SetDirty(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// Called when either "Apply" or "Create Runtime" is pressed.
|
||||
/// <inheritdoc/>
|
||||
public override void AddToScene()
|
||||
{
|
||||
// Re-initialize to keep user's changes.
|
||||
var water = FindFirstObjectByType<WaterRenderer>(FindObjectsInactive.Include);
|
||||
|
||||
if (water == null)
|
||||
{
|
||||
water = new GameObject("Water").AddComponent<WaterRenderer>();
|
||||
}
|
||||
|
||||
// Sea level is height above terrain bottom.
|
||||
var seaLevel = GaiaAPI.GetSeaLevel();
|
||||
|
||||
water.transform.position = new Vector3(0f, seaLevel, 0f);
|
||||
|
||||
var managed = water.transform.Find("Managed");
|
||||
|
||||
if (managed == null)
|
||||
{
|
||||
managed = new GameObject("Managed").transform;
|
||||
}
|
||||
|
||||
managed.SetParent(water.transform, worldPositionStays: false);
|
||||
|
||||
// Wind
|
||||
if (_Wind)
|
||||
{
|
||||
var wind = FindFirstObjectByType<WindManager>();
|
||||
|
||||
if (wind != null)
|
||||
{
|
||||
water.WindZone = wind.GetComponent<WindZone>();
|
||||
}
|
||||
}
|
||||
|
||||
// Depth
|
||||
water.DepthLod.IncludeTerrainHeight = false;
|
||||
|
||||
foreach (var terrain in FindObjectsByType<Terrain>(FindObjectsInactive.Include, FindObjectsSortMode.None))
|
||||
{
|
||||
var dp = terrain.GetComponentInChildren<DepthProbe>(includeInactive: true);
|
||||
|
||||
if (dp == null)
|
||||
{
|
||||
dp = new GameObject("WaterDepthProbe").AddComponent<DepthProbe>();
|
||||
}
|
||||
|
||||
dp.gameObject.layer = water.Surface.Layer;
|
||||
dp.transform.SetParent(terrain.transform, worldPositionStays: false);
|
||||
dp.transform.localPosition = terrain.terrainData.size * 0.5f;
|
||||
var position = dp.transform.position;
|
||||
position.y = seaLevel;
|
||||
dp.transform.position = position;
|
||||
dp.transform.localScale = new(terrain.terrainData.size.x, 1f, terrain.terrainData.size.z);
|
||||
dp.Layers = 1 << terrain.gameObject.layer;
|
||||
// 1m below terrain bottom to 1m above maximum terrain height.
|
||||
dp.CaptureRange = new(-seaLevel + -1f, terrain.terrainData.size.y - seaLevel + 1);
|
||||
dp.Resolution = terrain.terrainData.heightmapResolution - 1;
|
||||
dp.Populate();
|
||||
}
|
||||
|
||||
// Wind Waves
|
||||
if (_Wind && water.WindZone != null)
|
||||
{
|
||||
GetOrAddComponentToScene<ShapeFFT>(managed, "WaterWindWaves", out _);
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveComponentFromScene<ShapeFFT>(managed);
|
||||
}
|
||||
|
||||
// Swell Waves
|
||||
if (_Swell)
|
||||
{
|
||||
GetOrAddComponentToScene<ShapeGerstner>(managed, "WaterSwellWaves", out var waves);
|
||||
|
||||
waves.OverrideGlobalWindDirection = true;
|
||||
waves.OverrideGlobalWindSpeed = true;
|
||||
waves.ReverseWaveWeight = 0;
|
||||
waves.Swell = true;
|
||||
|
||||
if (!waves.TryGetComponent<ShapeFFT>(out var fft))
|
||||
{
|
||||
fft = waves.gameObject.AddComponent<ShapeFFT>();
|
||||
fft.Spectrum = AssetDatabase.LoadAssetAtPath<WaveSpectrum>("Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesSwell.asset");
|
||||
}
|
||||
|
||||
fft.OverrideGlobalWindDirection = true;
|
||||
fft.OverrideGlobalWindSpeed = true;
|
||||
fft.OverrideGlobalWindTurbulence = true;
|
||||
fft.WindAlignment = 0.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveComponentFromScene<ShapeGerstner>(managed);
|
||||
}
|
||||
|
||||
#if d_WaveHarmonic_Crest_ShallowWater
|
||||
if (_ShallowWater)
|
||||
{
|
||||
water.FlowLod.Enabled = true;
|
||||
|
||||
if (GetOrAddComponentToScene<ShallowWaterSimulation>(managed, "ShorelineSimulation", out var sws))
|
||||
{
|
||||
water.Surface.Material = AssetDatabase.LoadAssetAtPath<Material>("Packages/com.waveharmonic.crest/Runtime/Materials/Water (Flow).mat");
|
||||
sws.Width = 256;
|
||||
}
|
||||
|
||||
if (!sws.TryGetComponent<DepthProbe>(out var dp))
|
||||
{
|
||||
dp = sws.gameObject.AddComponent<DepthProbe>();
|
||||
}
|
||||
|
||||
dp.GenerateSignedDistanceField = false;
|
||||
|
||||
sws.Preset = ShallowWaterSimulationPreset.Shoreline;
|
||||
sws.Placement = Placement.Viewpoint;
|
||||
sws.DynamicSeabed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveComponentFromScene<ShallowWaterSimulation>(managed);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool GetOrAddComponentToScene<T>(Transform managed, string name, out T component) where T : MonoBehaviour
|
||||
{
|
||||
component = managed.GetComponentInChildren<T>();
|
||||
|
||||
var create = component == null;
|
||||
|
||||
if (create)
|
||||
{
|
||||
component = new GameObject(name).AddComponent<T>();
|
||||
component.transform.SetParent(managed.transform, worldPositionStays: false);
|
||||
}
|
||||
|
||||
return create;
|
||||
}
|
||||
|
||||
void RemoveComponentFromScene<T>(Transform managed) where T : MonoBehaviour
|
||||
{
|
||||
var component = managed.GetComponentInChildren<T>();
|
||||
|
||||
if (component != null)
|
||||
{
|
||||
DestroyImmediate(component.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
/// Called when "Remove" is pressed.
|
||||
/// <inheritdoc/>
|
||||
public override void RemoveFromScene()
|
||||
{
|
||||
var water = FindFirstObjectByType<WaterRenderer>(FindObjectsInactive.Include);
|
||||
if (water != null) DestroyImmediate(water.gameObject);
|
||||
|
||||
foreach (var terrain in FindObjectsByType<Terrain>(FindObjectsInactive.Include, FindObjectsSortMode.None))
|
||||
{
|
||||
var depthCache = terrain.GetComponentInChildren<DepthProbe>(includeInactive: true);
|
||||
if (depthCache != null) DestroyImmediate(depthCache.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f9d5fab14f7242db80be581a62d53c9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "WaveHarmonic.Crest.Integration.Gaia",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:532136e3ad79fba44b9e7d74f4e53abe",
|
||||
"GUID:cc49c744ac0d6fa459f6fb20f0066991",
|
||||
"GUID:7c347618730f5467f86a58f333ce21df",
|
||||
"GUID:98db37baed0fc4b73a47a9d66f791aae",
|
||||
"GUID:056ff2a5b2f124d468c6655552acdca5",
|
||||
"GUID:d365b04c036e04304a59ef9aa90b3924"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": false,
|
||||
"defineConstraints": [
|
||||
"UNITY_2022_3_OR_NEWER",
|
||||
"GAIA_2023"
|
||||
],
|
||||
"versionDefines": [
|
||||
{
|
||||
"name": "com.waveharmonic.crest.shallow-water",
|
||||
"expression": "",
|
||||
"define": "d_WaveHarmonic_Crest_ShallowWater"
|
||||
}
|
||||
],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c4070cb1d689471b80e17ee7aa518e6
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -25,7 +25,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
internal static readonly Dictionary<string, Dictionary<string, MaterialAttribute>> s_Grouped = new()
|
||||
{
|
||||
{
|
||||
"Crest/Underwater", new()
|
||||
UnderwaterRenderer.k_ShaderNameEffect, new()
|
||||
{
|
||||
{ "_Crest_DataSliceOffset", new() { _IntegerRange = new(0, Lod.k_MaximumSlices - 2) } },
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
}
|
||||
},
|
||||
{
|
||||
"Crest/Underwater", new()
|
||||
UnderwaterRenderer.k_ShaderNameEffect, new()
|
||||
{
|
||||
{ "_Crest_ExtinctionMultiplier", "Scales the depth fog density. Useful to reduce the intensity of the depth fog when underwater only" },
|
||||
{ "_Crest_SunBoost", "Boost the intensity of the sun scattering" },
|
||||
@@ -149,7 +149,26 @@ namespace WaveHarmonic.Crest.Editor
|
||||
|
||||
internal static MaterialProperty[] FilterProperties(MaterialProperty[] properties)
|
||||
{
|
||||
return properties.Where(x => x.name != "_Crest_Absorption").ToArray();
|
||||
// Show specular control.
|
||||
var specular = true;
|
||||
|
||||
if (!RenderPipelineHelper.IsHighDefinition)
|
||||
{
|
||||
specular = properties
|
||||
.First(x => x.name == (RenderPipelineHelper.IsLegacy ? "_BUILTIN_WorkflowMode" : "_WorkflowMode")).floatValue == 0;
|
||||
}
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
else
|
||||
{
|
||||
// Always show specular control for U5, as it cannot be overriden by the material.
|
||||
specular = properties
|
||||
.First(x => x.name == "_MaterialID").floatValue == 4;
|
||||
}
|
||||
#endif
|
||||
|
||||
return properties
|
||||
.Where(x => (specular || x.name != "_Crest_Specular") && x.name != "_Crest_Absorption")
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +194,11 @@ namespace WaveHarmonic.Crest.Editor
|
||||
|
||||
foreach (var property in properties)
|
||||
{
|
||||
#if UNITY_6000_2_OR_NEWER
|
||||
if ((property.propertyFlags & UnityEngine.Rendering.ShaderPropertyFlags.HideInInspector) != 0) continue;
|
||||
#else
|
||||
if ((property.flags & MaterialProperty.PropFlags.HideInInspector) != 0) continue;
|
||||
#endif
|
||||
|
||||
var name = property.name;
|
||||
s_Label.text = property.displayName;
|
||||
@@ -187,7 +210,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
}
|
||||
|
||||
#if d_UnityShaderGraph
|
||||
class LegacyCustomShaderGUI : UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInBaseShaderGUI
|
||||
class LegacyCustomShaderGUI : ShaderGraph.CustomBuiltInLitGUI
|
||||
{
|
||||
MaterialEditor _Editor;
|
||||
MaterialProperty[] _Properties;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -21,7 +22,17 @@ namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!Lod.Enabled || !((WaterRenderer)target).isActiveAndEnabled) return null;
|
||||
var water = (WaterRenderer)target;
|
||||
|
||||
if ((!Application.isPlaying && !water.runInEditMode) || !water.isActiveAndEnabled)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!Lod.Enabled)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var texture = Lod.DataTexture;
|
||||
|
||||
@@ -245,21 +256,41 @@ namespace WaveHarmonic.Crest.Editor
|
||||
sealed class WaterLevelDepthPreview : TexturePreview
|
||||
{
|
||||
public override GUIContent GetPreviewTitle() => new("Water Level Screen-Space Depth");
|
||||
protected override Texture OriginalTexture => (target as WaterRenderer).WaterLevelDepthTexture;
|
||||
protected override Texture OriginalTexture => (target as WaterRenderer).Surface.WaterLevelDepthTexture;
|
||||
}
|
||||
|
||||
[CustomPreview(typeof(WaterRenderer))]
|
||||
sealed class WaterLinePreview : TexturePreview
|
||||
{
|
||||
public override GUIContent GetPreviewTitle() => new("Pre-Computed Displacement");
|
||||
protected override Texture OriginalTexture => (target as WaterRenderer).Surface.HeightRT;
|
||||
}
|
||||
|
||||
[CustomPreview(typeof(WaterRenderer))]
|
||||
sealed class WaterVolumeMaskPreview : TexturePreview
|
||||
{
|
||||
public override GUIContent GetPreviewTitle() => new("Water Volume Mask");
|
||||
protected override Texture OriginalTexture => RenderPipelineHelper.IsLegacy && (target as WaterRenderer)._Underwater._MaskRT && (target as WaterRenderer)._Underwater._MaskRT.width > 0 ? (target as WaterRenderer)._Underwater._MaskRT : null;
|
||||
protected override Texture OriginalTexture
|
||||
{
|
||||
get
|
||||
{
|
||||
var target = this.target as WaterRenderer;
|
||||
return target._Mask?.ColorT != null && target._Mask?.ColorT.width > 0
|
||||
? target._Mask.ColorT
|
||||
: null;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[CustomPreview(typeof(WaterRenderer))]
|
||||
sealed class ReflectionPreview : TexturePreview
|
||||
{
|
||||
static readonly PropertyInfo s_DefaultReflection = typeof(RenderSettings).GetProperty("defaultReflection", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
|
||||
public override GUIContent GetPreviewTitle() => new("Water Reflections");
|
||||
protected override Texture OriginalTexture => (target as WaterRenderer)._Reflections._Enabled ? (target as WaterRenderer)._Reflections.ReflectionTexture : null;
|
||||
protected override Texture OriginalTexture => (target as WaterRenderer)._Reflections._Enabled
|
||||
? (target as WaterRenderer)._Reflections.ReflectionTexture
|
||||
: s_DefaultReflection?.GetValue(null) as Texture;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
@@ -41,9 +43,13 @@ namespace WaveHarmonic.Crest.Editor.Settings
|
||||
[@DecoratedField, SerializeField]
|
||||
bool _FullPrecisionDisplacementOnHalfPrecisionPlatforms = true;
|
||||
|
||||
[Tooltip("Whether to sample shadow maps for built-in renderer.")]
|
||||
[Tooltip("Whether to render atmospheric scattering (ie fog) for pixels receiving aquatic scattering (underwater only).\n\nWhen disabled, if a pixel is receiving aquatic scattering, then it will not receive atmospheric scattering.")]
|
||||
[@DecoratedField, SerializeField]
|
||||
bool _BuiltInRendererSampleShadowMaps = true;
|
||||
bool _RenderAtmosphericScatteringWhenUnderWater;
|
||||
|
||||
[Tooltip("Renders the underwater effect after transparency and uses the more expensive mask.\n\nYou may need this if rendering the underwater to multiple cameras. The other benefit is that transparent objects will be fogged (albeit incorrectly).\n\nThe downsides are that there can be artifacts if waves are very choppy, has a less impressive meniscus, and generally more expensive to execute.")]
|
||||
[@DecoratedField, SerializeField]
|
||||
bool _LegacyUnderwater;
|
||||
|
||||
#pragma warning restore IDE0032 // Use auto property
|
||||
|
||||
@@ -63,7 +69,8 @@ namespace WaveHarmonic.Crest.Editor.Settings
|
||||
internal bool LogStrippedVariants => _DebugEnableStrippingLogging && !_DebugOnlyLogRemainingVariants;
|
||||
internal bool LogKeptVariants => _DebugEnableStrippingLogging && _DebugOnlyLogRemainingVariants;
|
||||
internal bool FullPrecisionDisplacementOnHalfPrecisionPlatforms => _FullPrecisionDisplacementOnHalfPrecisionPlatforms;
|
||||
internal bool BuiltInRendererSampleShadowMaps => _BuiltInRendererSampleShadowMaps;
|
||||
internal bool RenderAtmosphericScatteringWhenUnderWater => _RenderAtmosphericScatteringWhenUnderWater;
|
||||
internal bool LegacyUnderwater => _LegacyUnderwater;
|
||||
|
||||
|
||||
void OnEnable()
|
||||
@@ -83,12 +90,83 @@ namespace WaveHarmonic.Crest.Editor.Settings
|
||||
{
|
||||
switch (path)
|
||||
{
|
||||
case nameof(_BuiltInRendererSampleShadowMaps):
|
||||
case nameof(_FullPrecisionDisplacementOnHalfPrecisionPlatforms):
|
||||
ShaderSettingsGenerator.Generate();
|
||||
case nameof(_RenderAtmosphericScatteringWhenUnderWater):
|
||||
case nameof(_LegacyUnderwater):
|
||||
UpdateSymbols();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateScriptingSymbols()
|
||||
{
|
||||
ScriptingSymbols.Set(ProjectSymbols.k_LegacyUnderwaterScriptingSymbol, _LegacyUnderwater);
|
||||
}
|
||||
|
||||
void UpdateSymbols()
|
||||
{
|
||||
UpdateScriptingSymbols();
|
||||
ShaderSettingsGenerator.Generate();
|
||||
}
|
||||
|
||||
sealed class ProjectSymbols : AssetModificationProcessor
|
||||
{
|
||||
public const string k_LegacyUnderwaterScriptingSymbol = "d_Crest_LegacyUnderwater";
|
||||
|
||||
static FileSystemWatcher s_Watcher;
|
||||
|
||||
// Will run on load and recompile preventing symbol removal in player settings.
|
||||
[InitializeOnLoadMethod]
|
||||
static void OnLoad()
|
||||
{
|
||||
if (Instance != null)
|
||||
{
|
||||
Instance.UpdateScriptingSymbols();
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(k_Path));
|
||||
|
||||
s_Watcher = new(Path.GetDirectoryName(k_Path))
|
||||
{
|
||||
Filter = Path.GetFileName(k_Path),
|
||||
NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size,
|
||||
EnableRaisingEvents = true
|
||||
};
|
||||
|
||||
s_Watcher.Changed -= OnChanged;
|
||||
s_Watcher.Changed += OnChanged;
|
||||
}
|
||||
|
||||
// Handle external edits. Possibly unreliable, but not important if fails.
|
||||
static void OnChanged(object sender, FileSystemEventArgs e)
|
||||
{
|
||||
EditorApplication.delayCall += () =>
|
||||
{
|
||||
// Destroy instance to reflect changes.
|
||||
Helpers.Destroy(Instance);
|
||||
typeof(ScriptableSingleton<ProjectSettings>)
|
||||
.GetField("s_Instance", BindingFlags.Static | BindingFlags.NonPublic)
|
||||
.SetValue(null, null);
|
||||
Instance.UpdateSymbols();
|
||||
};
|
||||
}
|
||||
|
||||
static AssetDeleteResult OnWillDeleteAsset(string path, RemoveAssetOptions options)
|
||||
{
|
||||
// Only remove symbols if this file is deleted.
|
||||
if (Path.GetFullPath(path) == GetCurrentFileName())
|
||||
{
|
||||
ScriptingSymbols.Remove(ScriptingSymbols.Symbols.Where(x => x.StartsWith("d_Crest_")).ToArray());
|
||||
}
|
||||
|
||||
return AssetDeleteResult.DidNotDelete;
|
||||
}
|
||||
|
||||
static string GetCurrentFileName([System.Runtime.CompilerServices.CallerFilePath] string fileName = null)
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sealed class SettingsProvider : UnityEditor.SettingsProvider
|
||||
|
||||
@@ -14,37 +14,37 @@
|
||||
"versionDefines": [
|
||||
{
|
||||
"name": "com.waveharmonic.crest.cpu-queries",
|
||||
"expression": "(,1.0.4)",
|
||||
"expression": "(,1.0.8)",
|
||||
"define": "d_UpdateCPUQueries"
|
||||
},
|
||||
{
|
||||
"name": "com.waveharmonic.crest.paint",
|
||||
"expression": "(,1.2.0)",
|
||||
"expression": "(,1.2.3)",
|
||||
"define": "d_UpdatePaint"
|
||||
},
|
||||
{
|
||||
"name": "com.waveharmonic.crest.portals",
|
||||
"expression": "(,1.2.1)",
|
||||
"expression": "(,1.2.8)",
|
||||
"define": "d_UpdatePortals"
|
||||
},
|
||||
{
|
||||
"name": "com.waveharmonic.crest.shallow-water",
|
||||
"expression": "(,1.3.1)",
|
||||
"expression": "(,1.3.3)",
|
||||
"define": "d_UpdateShallowWater"
|
||||
},
|
||||
{
|
||||
"name": "com.waveharmonic.crest.shifting-origin",
|
||||
"expression": "(,1.2.1)",
|
||||
"expression": "(,1.3.0)",
|
||||
"define": "d_UpdateShiftingOrigin"
|
||||
},
|
||||
{
|
||||
"name": "com.waveharmonic.crest.splines",
|
||||
"expression": "(,1.3.2)",
|
||||
"expression": "(,1.4.4)",
|
||||
"define": "d_UpdateSplines"
|
||||
},
|
||||
{
|
||||
"name": "com.waveharmonic.crest.whirlpool",
|
||||
"expression": "(,1.0.1)",
|
||||
"expression": "(,1.0.3)",
|
||||
"define": "d_UpdateWhirlpool"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -26,6 +26,11 @@ namespace WaveHarmonic.Crest.Editor
|
||||
return;
|
||||
}
|
||||
|
||||
if (EditorApplication.isUpdating)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EditorApplication.update -= GenerateAfterReloadScripts;
|
||||
|
||||
// Generate HLSL from C#. Only targets WaveHarmonic.Crest assemblies.
|
||||
@@ -46,6 +51,8 @@ namespace WaveHarmonic.Crest.Editor
|
||||
|
||||
sealed class AssetPostProcessor : AssetPostprocessor
|
||||
{
|
||||
const string k_SettingsPath = "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl";
|
||||
|
||||
static async void OnPostprocessAllAssets(string[] imported, string[] deleted, string[] movedTo, string[] movedFrom, bool domainReload)
|
||||
{
|
||||
// Unused.
|
||||
@@ -53,12 +60,32 @@ namespace WaveHarmonic.Crest.Editor
|
||||
|
||||
if (EditorApplication.isCompiling)
|
||||
{
|
||||
#if CREST_DEBUG
|
||||
if (imported.Contains(k_SettingsPath))
|
||||
{
|
||||
UnityEngine.Debug.Log($"Crest: Settings.Crest.hlsl changed during compilation!");
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if (EditorApplication.isUpdating)
|
||||
{
|
||||
#if CREST_DEBUG
|
||||
if (imported.Contains(k_SettingsPath))
|
||||
{
|
||||
UnityEngine.Debug.Log($"Crest: Settings.Crest.hlsl changed during asset database update!");
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
// Regenerate if file changed like re-importing.
|
||||
if (imported.Contains("Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl"))
|
||||
if (imported.Contains(k_SettingsPath))
|
||||
{
|
||||
#if CREST_DEBUG
|
||||
UnityEngine.Debug.Log($"Crest: Settings.Crest.hlsl changed!");
|
||||
#endif
|
||||
// Generate HLSL from C#. Only targets WaveHarmonic.Crest assemblies.
|
||||
await ShaderGeneratorUtility.GenerateAll();
|
||||
AssetDatabase.Refresh();
|
||||
@@ -70,6 +97,19 @@ namespace WaveHarmonic.Crest.Editor
|
||||
[GenerateHLSL(sourcePath = "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest")]
|
||||
sealed class ShaderSettings
|
||||
{
|
||||
// These two are here for compute shaders.
|
||||
public static int s_CrestPackageHDRP = 0
|
||||
#if d_UnityHDRP
|
||||
+ 1
|
||||
#endif
|
||||
;
|
||||
|
||||
public static int s_CrestPackageURP = 0
|
||||
#if d_UnityURP
|
||||
+ 1
|
||||
#endif
|
||||
;
|
||||
|
||||
public static int s_CrestPortals =
|
||||
#if d_CrestPortals
|
||||
1
|
||||
@@ -86,7 +126,10 @@ namespace WaveHarmonic.Crest.Editor
|
||||
#endif
|
||||
;
|
||||
|
||||
public static int s_CrestShadowsBuiltInRenderPipeline = ProjectSettings.Instance.BuiltInRendererSampleShadowMaps ? 1 : 0;
|
||||
public static int s_CrestFullPrecisionDisplacement = ProjectSettings.Instance.FullPrecisionDisplacementOnHalfPrecisionPlatforms ? 1 : 0;
|
||||
|
||||
public static int s_CrestDiscardAtmosphericScattering = ProjectSettings.Instance.RenderAtmosphericScatteringWhenUnderWater ? 0 : 1;
|
||||
|
||||
public static int s_CrestLegacyUnderwater = ProjectSettings.Instance.LegacyUnderwater ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
// Adapted from:
|
||||
@@ -619,6 +619,44 @@ namespace WaveHarmonic.Crest
|
||||
}
|
||||
}
|
||||
|
||||
sealed class InlineToggle : DecoratedProperty
|
||||
{
|
||||
// Add extra y offset. Needed for foldouts in foldouts so far.
|
||||
readonly bool _Fix;
|
||||
|
||||
public InlineToggle(bool fix = false)
|
||||
{
|
||||
_Fix = fix;
|
||||
}
|
||||
|
||||
internal override bool NeedsControlRectangle(SerializedProperty property)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
internal override void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer)
|
||||
{
|
||||
var r = position;
|
||||
r.x -= 16f;
|
||||
// Align with Space offset.
|
||||
if (drawer.Space > 0) r.y += drawer.Space + 2f;
|
||||
if (_Fix) r.y += EditorGUIUtility.singleLineHeight + 2f;
|
||||
// Seems to be needed.
|
||||
r.width = 16f * (1f + EditorGUI.indentLevel);
|
||||
r.height = EditorGUIUtility.singleLineHeight;
|
||||
label.text = "";
|
||||
|
||||
using (new EditorGUI.PropertyScope(r, label, property))
|
||||
{
|
||||
EditorGUI.BeginProperty(r, label, property);
|
||||
// Passing a tooltip to Toggle does nothing.
|
||||
GUI.Label(r, label);
|
||||
property.boolValue = EditorGUI.Toggle(r, property.boolValue);
|
||||
EditorGUI.EndProperty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows an enum to render only a subset of options in subclasses.
|
||||
/// </summary>
|
||||
@@ -793,6 +831,9 @@ namespace WaveHarmonic.Crest
|
||||
case SerializedPropertyType.Float:
|
||||
EditorGUILayout.FloatField(label, (float)_PropertyInfo.GetValue(_Target));
|
||||
break;
|
||||
case SerializedPropertyType.Integer:
|
||||
EditorGUILayout.IntField(label, (int)_PropertyInfo.GetValue(_Target));
|
||||
break;
|
||||
case SerializedPropertyType.Enum:
|
||||
_EnumValues ??= Enum.GetValues(_PropertyInfo.PropertyType);
|
||||
EditorGUILayout.Popup(label, Array.IndexOf(_EnumValues, _PropertyInfo.GetValue(_Target)), property.enumDisplayNames);
|
||||
@@ -886,7 +927,7 @@ namespace WaveHarmonic.Crest
|
||||
/// </summary>
|
||||
sealed class Space : Decorator
|
||||
{
|
||||
readonly float _Height;
|
||||
public readonly float _Height;
|
||||
readonly bool _AlwaysVisible;
|
||||
|
||||
public Space(float height, bool isAlwaysVisible = false)
|
||||
@@ -978,13 +1019,13 @@ namespace WaveHarmonic.Crest
|
||||
}
|
||||
}
|
||||
|
||||
sealed class AttachMaterialEditor : Decorator
|
||||
sealed class AttachMaterialEditor : Attribute
|
||||
{
|
||||
public override bool AlwaysVisible => true;
|
||||
public int Order { get; private set; }
|
||||
|
||||
internal override void Decorate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer)
|
||||
public AttachMaterialEditor(int order = 0)
|
||||
{
|
||||
Inspector.Current._Materials.Add((Material)property.objectReferenceValue);
|
||||
Order = order;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEditor;
|
||||
@@ -11,17 +11,19 @@ namespace WaveHarmonic.Crest
|
||||
sealed class Embedded : DecoratedProperty
|
||||
{
|
||||
internal EmbeddedAssetEditor _Editor;
|
||||
readonly int _BottomMargin;
|
||||
public int BottomMargin { get; private set; }
|
||||
public string DefaultPropertyName { get; private set; }
|
||||
|
||||
public Embedded(int margin = 0)
|
||||
public Embedded(int margin = 0, string defaultPropertyName = null)
|
||||
{
|
||||
_Editor = new();
|
||||
_BottomMargin = margin;
|
||||
BottomMargin = margin;
|
||||
DefaultPropertyName = defaultPropertyName;
|
||||
}
|
||||
|
||||
internal override void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer)
|
||||
{
|
||||
_Editor.DrawEditorCombo(label, drawer, property, "asset", _BottomMargin);
|
||||
_Editor.DrawEditorCombo(this, label, drawer, property, "asset");
|
||||
}
|
||||
|
||||
internal override bool NeedsControlRectangle(SerializedProperty property) => false;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using System;
|
||||
@@ -51,6 +51,12 @@ namespace WaveHarmonic.Crest
|
||||
_Member = _Type.GetMember(member, Helpers.s_AnyMethod)[0];
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Predicated(Type, string, object, bool, bool)"/>
|
||||
public Predicated(Type type, string member, bool inverted = false, bool hide = false) : this(type, member, true, inverted, hide)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable/Disable field depending on the current type of the component.
|
||||
/// </summary>
|
||||
@@ -165,11 +171,11 @@ namespace WaveHarmonic.Crest
|
||||
if (_Member is PropertyInfo autoProperty)
|
||||
{
|
||||
// == operator does not work.
|
||||
enabled = autoProperty.GetValue(@object).Equals(_DisableValue);
|
||||
enabled = !autoProperty.GetValue(@object).Equals(_DisableValue);
|
||||
}
|
||||
else if (_Member is MethodInfo method)
|
||||
{
|
||||
enabled = method.Invoke(@object, new object[] { }).Equals(_DisableValue);
|
||||
enabled = !method.Invoke(@object, new object[] { }).Equals(_DisableValue);
|
||||
}
|
||||
|
||||
if (_Inverted) enabled = !enabled;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
// Adapted from:
|
||||
@@ -27,6 +27,8 @@ namespace WaveHarmonic.Crest.Editor
|
||||
public static bool s_TemporaryColor;
|
||||
public static Color s_PreviousColor;
|
||||
|
||||
public float Space { get; private set; }
|
||||
|
||||
List<object> _Decorators = null;
|
||||
List<object> Decorators
|
||||
{
|
||||
@@ -84,6 +86,16 @@ namespace WaveHarmonic.Crest.Editor
|
||||
attribute.Decorate(position, property, label, this);
|
||||
}
|
||||
|
||||
Space = 0;
|
||||
|
||||
// Execute all labels
|
||||
for (var index = 0; index < Decorators.Count; index++)
|
||||
{
|
||||
var attribute = (Decorator)Decorators[index];
|
||||
if (attribute is Space space) Space = space._Height;
|
||||
label = attribute.BuildLabel(label);
|
||||
}
|
||||
|
||||
if (!s_HideInInspector && (!s_IsFoldout || s_IsFoldoutOpen))
|
||||
{
|
||||
// Execute all visual attributes.
|
||||
@@ -91,7 +103,6 @@ namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
var attribute = (Decorator)Decorators[index];
|
||||
if (attribute.AlwaysVisible) continue;
|
||||
label = attribute.BuildLabel(label);
|
||||
attribute.Decorate(position, property, label, this);
|
||||
}
|
||||
|
||||
@@ -101,6 +112,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
: position;
|
||||
|
||||
// Call for labels again as EditorGUI.GetPropertyHeight will revert them.
|
||||
// Specifically for nested classes where the label will revert once opened.
|
||||
for (var index = 0; index < Decorators.Count; index++)
|
||||
{
|
||||
var attribute = (Decorator)Decorators[index];
|
||||
@@ -163,7 +175,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
var targetType = target.GetType();
|
||||
|
||||
var isActive = true;
|
||||
if (property.serializedObject.targetObject is Internal.EditorBehaviour c && !c.isActiveAndEnabled)
|
||||
if (property.serializedObject.targetObject is Crest.Internal.EditorBehaviour c && !c.isActiveAndEnabled)
|
||||
{
|
||||
isActive = false;
|
||||
}
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
// Lovingly adapted from Cinemachine:
|
||||
// https://github.com/Unity-Technologies/com.unity.cinemachine/blob/593fa283bee378322337e5d9f5a7b91331a45799/Editor/Utility/EmbeddedAssetHelpers.cs
|
||||
|
||||
using UnityEngine;
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEditor.VersionControl;
|
||||
using UnityEngine;
|
||||
|
||||
namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
@@ -66,23 +67,24 @@ namespace WaveHarmonic.Crest.Editor
|
||||
System.Type _Type;
|
||||
|
||||
Object _DefaultTarget;
|
||||
FieldInfo _DefaultTargetField;
|
||||
|
||||
const int k_IndentOffset = 3;
|
||||
|
||||
public void DrawEditorCombo(GUIContent label, PropertyDrawer drawer, SerializedProperty property, string extension, int bottomMargin = 0)
|
||||
public void DrawEditorCombo(Embedded embedded, GUIContent label, PropertyDrawer drawer, SerializedProperty property, string extension)
|
||||
{
|
||||
_Type = drawer.fieldInfo.FieldType;
|
||||
|
||||
DrawEditorCombo
|
||||
(
|
||||
embedded,
|
||||
label,
|
||||
$"Create {property.displayName} Asset",
|
||||
$"{property.displayName.Replace(' ', '_')}",
|
||||
extension,
|
||||
string.Empty,
|
||||
false,
|
||||
property,
|
||||
bottomMargin
|
||||
property
|
||||
);
|
||||
}
|
||||
|
||||
@@ -92,17 +94,17 @@ namespace WaveHarmonic.Crest.Editor
|
||||
/// </summary>
|
||||
public void DrawEditorCombo
|
||||
(
|
||||
Embedded embedded,
|
||||
GUIContent label,
|
||||
string title,
|
||||
string defaultName,
|
||||
string extension,
|
||||
string message,
|
||||
bool indent,
|
||||
SerializedProperty property,
|
||||
int bottomMargin
|
||||
SerializedProperty property
|
||||
)
|
||||
{
|
||||
UpdateEditor(property);
|
||||
UpdateEditor(property, embedded);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
var rect = AssetField(label, property, title, defaultName, extension, message);
|
||||
@@ -110,7 +112,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
property.serializedObject.ApplyModifiedProperties();
|
||||
UpdateEditor(property);
|
||||
UpdateEditor(property, embedded);
|
||||
}
|
||||
|
||||
// Display embedded editor.
|
||||
@@ -145,9 +147,9 @@ namespace WaveHarmonic.Crest.Editor
|
||||
EditorGUILayout.EndVertical();
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
if (bottomMargin > 0)
|
||||
if (embedded.BottomMargin > 0)
|
||||
{
|
||||
EditorGUILayout.Space(bottomMargin);
|
||||
EditorGUILayout.Space(embedded.BottomMargin);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,14 +203,31 @@ namespace WaveHarmonic.Crest.Editor
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateEditor(SerializedProperty property)
|
||||
public void UpdateEditor(SerializedProperty property, Embedded embedded)
|
||||
{
|
||||
var target = property.objectReferenceValue;
|
||||
var hasDefaultField = !string.IsNullOrEmpty(embedded.DefaultPropertyName);
|
||||
|
||||
if (target == null && _DefaultTarget == null)
|
||||
if (target == null)
|
||||
{
|
||||
_DefaultTarget = ScriptableObject.CreateInstance(_Type);
|
||||
_DefaultTarget.hideFlags = HideFlags.DontSave | HideFlags.NotEditable;
|
||||
if (!hasDefaultField)
|
||||
{
|
||||
if (_DefaultTarget == null)
|
||||
{
|
||||
_DefaultTarget = ScriptableObject.CreateInstance(_Type);
|
||||
_DefaultTarget.hideFlags = HideFlags.DontSave | HideFlags.NotEditable;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_DefaultTargetField == null)
|
||||
{
|
||||
_DefaultTargetField = property.serializedObject.targetObject.GetType().GetField(embedded.DefaultPropertyName, Helpers.s_AnyMethod);
|
||||
}
|
||||
|
||||
// Always call, as it is dynamic.
|
||||
_DefaultTarget = (Object)_DefaultTargetField.GetValue(property.serializedObject.targetObject);
|
||||
}
|
||||
}
|
||||
|
||||
if (target == null)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -15,7 +15,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
/// <summary>
|
||||
/// Provides general helper functions for the editor.
|
||||
/// </summary>
|
||||
static class EditorHelpers
|
||||
static partial class EditorHelpers
|
||||
{
|
||||
internal static ComputeShader s_VisualizeNegativeValuesShader;
|
||||
internal static ComputeShader VisualizeNegativeValuesShader
|
||||
@@ -227,27 +227,6 @@ namespace WaveHarmonic.Crest.Editor
|
||||
UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(UnityEngine.SceneManagement.SceneManager.GetActiveScene());
|
||||
}
|
||||
}
|
||||
|
||||
static readonly MethodInfo s_ButtonWithDropdownList = typeof(EditorGUI).GetMethod
|
||||
(
|
||||
"ButtonWithDropdownList",
|
||||
BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public,
|
||||
null,
|
||||
new System.Type[] { typeof(GUIContent), typeof(string[]), typeof(GenericMenu.MenuFunction2), typeof(GUILayoutOption[]) },
|
||||
null
|
||||
);
|
||||
|
||||
static readonly GUILayoutOption[] s_GUILayoutOptionsZero;
|
||||
|
||||
public static bool ButtonWithDropdownList(GUIContent name, string[] names, GenericMenu.MenuFunction2 callback)
|
||||
{
|
||||
if (names == null)
|
||||
{
|
||||
return GUILayout.Button(name);
|
||||
}
|
||||
|
||||
return (bool)s_ButtonWithDropdownList.Invoke(null, new object[] { name, names, callback, s_GUILayoutOptionsZero });
|
||||
}
|
||||
}
|
||||
|
||||
static partial class Extensions
|
||||
@@ -269,4 +248,241 @@ namespace WaveHarmonic.Crest.Editor
|
||||
return tag.name;
|
||||
}
|
||||
}
|
||||
|
||||
static partial class EditorHelpers
|
||||
{
|
||||
const int k_ButtonDropDownWidth = 15;
|
||||
|
||||
static readonly GUIContent s_ButtonDropDownIcon = new(EditorGUIUtility.FindTexture("icon dropdown@2x"));
|
||||
static readonly PropertyInfo s_TopLevel = typeof(GUILayoutUtility).GetProperty("topLevel", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
static readonly MethodInfo s_GetLast = typeof(GUILayoutUtility).Assembly.GetType("UnityEngine.GUILayoutGroup").GetMethod("GetLast", BindingFlags.Public | BindingFlags.Instance);
|
||||
|
||||
// Only way to identify the caller is its rect.
|
||||
static Rect s_ButtonChooser;
|
||||
static int s_ButtonChoice = -2;
|
||||
|
||||
// Normal button or split button with dropdown.
|
||||
public static bool Button
|
||||
(
|
||||
GUIContent label,
|
||||
out int choice,
|
||||
string[] labels,
|
||||
bool disableMain = false,
|
||||
bool disableDropDown = false,
|
||||
bool centerLabel = false,
|
||||
bool expandWidth = true,
|
||||
int minimumWidth = 0
|
||||
)
|
||||
{
|
||||
choice = -2;
|
||||
var chosen = false;
|
||||
|
||||
var hasDropDown = labels?.Length > 0;
|
||||
var skin = GUI.skin.button;
|
||||
|
||||
using (new EditorGUI.DisabledGroupScope(disableMain))
|
||||
{
|
||||
var style = new GUIStyle(hasDropDown ? EditorStyles.miniButtonLeft : EditorStyles.miniButton)
|
||||
{
|
||||
padding = skin.padding,
|
||||
stretchHeight = skin.stretchHeight,
|
||||
fixedHeight = skin.fixedHeight
|
||||
};
|
||||
|
||||
var width = style.CalcSize(label).x + style.padding.left +
|
||||
style.padding.right + style.border.left + style.border.right;
|
||||
width = Mathf.Max(width, minimumWidth);
|
||||
// TODO: Add option to disable this (consistent width).
|
||||
if (!hasDropDown && minimumWidth > 0) width += k_ButtonDropDownWidth;
|
||||
if (centerLabel && hasDropDown) style.padding.left += k_ButtonDropDownWidth;
|
||||
|
||||
if (GUILayout.Button(label, style, expandWidth ? GUILayout.ExpandWidth(true) : GUILayout.Width(width)))
|
||||
{
|
||||
choice = -1;
|
||||
chosen = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasDropDown)
|
||||
{
|
||||
using (new EditorGUI.DisabledGroupScope(disableDropDown))
|
||||
{
|
||||
// TODO: color interior border same as exterior (lighten).
|
||||
var style = new GUIStyle(EditorStyles.miniButtonRight)
|
||||
{
|
||||
padding = new(1, 1, 3, 3),
|
||||
stretchHeight = skin.stretchHeight,
|
||||
fixedHeight = skin.fixedHeight
|
||||
};
|
||||
|
||||
var rect = (Rect)s_GetLast.Invoke(s_TopLevel.GetValue(null), null);
|
||||
rect.width += k_ButtonDropDownWidth;
|
||||
|
||||
if (s_ButtonChoice > -1 && s_ButtonChooser == rect)
|
||||
{
|
||||
choice = s_ButtonChoice;
|
||||
chosen = true;
|
||||
s_ButtonChoice = -2;
|
||||
s_ButtonChooser = Rect.zero;
|
||||
}
|
||||
|
||||
if (GUILayout.Button(s_ButtonDropDownIcon, style, GUILayout.Width(k_ButtonDropDownWidth), GUILayout.ExpandHeight(true)))
|
||||
{
|
||||
var menu = new GenericMenu();
|
||||
|
||||
for (var i = 0; i < labels.Length; i++)
|
||||
{
|
||||
menu.AddItem(new(labels[i]), false, x => { s_ButtonChoice = (int)x; s_ButtonChooser = rect; }, i);
|
||||
}
|
||||
|
||||
menu.DropDown(rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return chosen;
|
||||
}
|
||||
}
|
||||
|
||||
static partial class EditorHelpers
|
||||
{
|
||||
// Adapted from (public API may support this in future):
|
||||
// com.unity.splines@2.7.2/Editor/Components/SplineContainerEditor.cs
|
||||
static GUIStyle s_HelpLabelStyle;
|
||||
static GUIStyle HelpLabelStyle => s_HelpLabelStyle ??= new(EditorStyles.label)
|
||||
{
|
||||
wordWrap = EditorStyles.helpBox.wordWrap,
|
||||
fontSize = EditorStyles.helpBox.fontSize,
|
||||
padding = new(-2, 0, 0, 0),
|
||||
richText = true,
|
||||
};
|
||||
|
||||
static readonly MethodInfo s_GetHelpIcon = typeof(EditorGUIUtility).GetMethod("GetHelpIcon", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
|
||||
internal static int? HelpBox
|
||||
(
|
||||
GUIContent message,
|
||||
MessageType type,
|
||||
GUIContent button = null,
|
||||
string[] buttons = null,
|
||||
bool buttonCenterLabel = false,
|
||||
int buttonMinimumWidth = 0
|
||||
)
|
||||
{
|
||||
return HelpBox
|
||||
(
|
||||
message,
|
||||
new GUIContent((Texture2D)s_GetHelpIcon.Invoke(null, new object[] { type })),
|
||||
button,
|
||||
buttons,
|
||||
buttonCenterLabel,
|
||||
buttonMinimumWidth
|
||||
);
|
||||
}
|
||||
|
||||
internal static int? HelpBox
|
||||
(
|
||||
GUIContent message,
|
||||
GUIContent icon,
|
||||
GUIContent button = null,
|
||||
string[] buttons = null,
|
||||
bool buttonCenterLabel = false,
|
||||
int buttonMinimumWidth = 0
|
||||
)
|
||||
{
|
||||
int? result = null;
|
||||
|
||||
// Box
|
||||
EditorGUILayout.BeginHorizontal(EditorStyles.helpBox);
|
||||
|
||||
// Icon
|
||||
EditorGUIUtility.SetIconSize(new(32f, 32f));
|
||||
EditorGUILayout.LabelField(icon, GUILayout.Width(34), GUILayout.MinHeight(34), GUILayout.ExpandHeight(true));
|
||||
EditorGUIUtility.SetIconSize(Vector2.zero);
|
||||
|
||||
// Text
|
||||
EditorGUILayout.LabelField(message, HelpLabelStyle, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));
|
||||
|
||||
// Button
|
||||
if (button != null)
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
EditorGUILayout.BeginVertical();
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
if (Button(button, out var choice, buttons, centerLabel: buttonCenterLabel, minimumWidth: buttonMinimumWidth, expandWidth: false))
|
||||
{
|
||||
result = choice;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.FlexibleSpace();
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
namespace Internal
|
||||
{
|
||||
static class Extensions
|
||||
{
|
||||
// Recursively find the field owner (instance).
|
||||
public static bool FindOwner(this FieldInfo field, ref object target)
|
||||
{
|
||||
if (field.DeclaringType.IsAssignableFrom(target.GetType()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return field.FindOwnerInFields(ref target);
|
||||
}
|
||||
|
||||
public static bool FindOwnerInFields(this FieldInfo targetField, ref object target)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var fields = target.GetType()
|
||||
.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
||||
|
||||
foreach (var field in fields)
|
||||
{
|
||||
if (field.GetCustomAttribute<SerializeReference>() == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var value = field.GetValue(target);
|
||||
if (value == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (targetField.DeclaringType.IsAssignableFrom(value.GetType()))
|
||||
{
|
||||
target = value;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (FindOwnerInFields(targetField, ref value))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,16 +9,12 @@ namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
partial class Inspector
|
||||
{
|
||||
static readonly bool s_GroupMessages = false;
|
||||
static GUIContent s_JumpButtonContent = null;
|
||||
static GUIContent s_FixButtonContent = null;
|
||||
static readonly string[] s_FixButtonDropDown = { "Inspect" };
|
||||
static readonly GUIContent s_FixButtonContent = new("Fix");
|
||||
static readonly GUIContent s_InspectButtonContent = new("Inspect", "Jump to object to resolve issue.");
|
||||
|
||||
protected virtual void RenderValidationMessages()
|
||||
{
|
||||
// Enable rich text in help boxes. Store original so we can revert since this might be a "hack".
|
||||
var styleRichText = GUI.skin.GetStyle("HelpBox").richText;
|
||||
GUI.skin.GetStyle("HelpBox").richText = true;
|
||||
|
||||
// This is a static list so we need to clear it before use. Not sure if this will ever be a threaded
|
||||
// operation which would be an issue.
|
||||
foreach (var messages in ValidatedHelper.s_Messages)
|
||||
@@ -30,7 +26,43 @@ namespace WaveHarmonic.Crest.Editor
|
||||
|
||||
// We only want space before and after the list of help boxes. We don't want space between.
|
||||
var needsSpaceAbove = true;
|
||||
var needsSpaceBelow = false;
|
||||
|
||||
// Work out if button label needs aligning.
|
||||
var needsAlignment = false;
|
||||
var hasBoth = false;
|
||||
var hasEither = false;
|
||||
for (var messageTypeIndex = 0; messageTypeIndex < ValidatedHelper.s_Messages.Length; messageTypeIndex++)
|
||||
{
|
||||
var messages = ValidatedHelper.s_Messages[messageTypeIndex];
|
||||
|
||||
if (messages.Count > 0)
|
||||
{
|
||||
var messageType = (MessageType)ValidatedHelper.s_Messages.Length - messageTypeIndex;
|
||||
|
||||
foreach (var message in messages)
|
||||
{
|
||||
var hasFix = message._Action != null;
|
||||
var hasInspect = false;
|
||||
|
||||
if (message._Object != null)
|
||||
{
|
||||
var casted = message._Object as MonoBehaviour;
|
||||
|
||||
if (Selection.activeObject != message._Object && (casted == null || casted.gameObject != Selection.activeObject))
|
||||
{
|
||||
hasInspect = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasFix && hasInspect) hasBoth = true;
|
||||
if (hasInspect != hasFix) hasEither = true;
|
||||
if (hasBoth && hasEither) goto exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exit:
|
||||
needsAlignment = hasBoth && hasEither;
|
||||
|
||||
// We loop through in reverse order so errors appears at the top.
|
||||
for (var messageTypeIndex = 0; messageTypeIndex < ValidatedHelper.s_Messages.Length; messageTypeIndex++)
|
||||
@@ -41,118 +73,87 @@ namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
if (needsSpaceAbove)
|
||||
{
|
||||
// Double space looks good at top.
|
||||
EditorGUILayout.Space();
|
||||
// EditorGUILayout.Space();
|
||||
needsSpaceAbove = false;
|
||||
}
|
||||
|
||||
needsSpaceBelow = true;
|
||||
|
||||
// Map Validated.MessageType to HelpBox.MessageType.
|
||||
var messageType = (MessageType)ValidatedHelper.s_Messages.Length - messageTypeIndex;
|
||||
|
||||
if (s_GroupMessages)
|
||||
foreach (var message in messages)
|
||||
{
|
||||
// We join the messages together to reduce vertical space since HelpBox has padding, borders etc.
|
||||
var joinedMessage = messages[0]._Message;
|
||||
// Format as list if we have more than one message.
|
||||
if (messages.Count > 1) joinedMessage = $"- {joinedMessage}";
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
for (var messageIndex = 1; messageIndex < messages.Count; messageIndex++)
|
||||
var originalGUIEnabled = GUI.enabled;
|
||||
|
||||
if ((message._Action == ValidatedHelper.FixAddMissingMathPackage || message._Action == ValidatedHelper.FixAddMissingBurstPackage) && PackageManagerHelpers.IsBusy)
|
||||
{
|
||||
joinedMessage += $"\n- {messages[messageIndex]}";
|
||||
GUI.enabled = false;
|
||||
}
|
||||
|
||||
EditorGUILayout.HelpBox(joinedMessage, messageType);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var message in messages)
|
||||
if (message._FixDescription != null)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
var fixDescription = message._FixDescription;
|
||||
var originalGUIEnabled = GUI.enabled;
|
||||
|
||||
if (message._Action != null)
|
||||
{
|
||||
fixDescription += " Click the fix/repair button on the right to fix.";
|
||||
|
||||
if ((message._Action == ValidatedHelper.FixAddMissingMathPackage || message._Action == ValidatedHelper.FixAddMissingBurstPackage) && PackageManagerHelpers.IsBusy)
|
||||
{
|
||||
GUI.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.HelpBox($"{message._Message} {fixDescription}", messageType);
|
||||
|
||||
// Jump to object button.
|
||||
if (message._Object != null)
|
||||
{
|
||||
// Selection.activeObject can be message._object.gameObject instead of the component
|
||||
// itself. We soft cast to MonoBehaviour to get the gameObject for comparison.
|
||||
// Alternatively, we could always pass gameObject instead of "this".
|
||||
var casted = message._Object as MonoBehaviour;
|
||||
|
||||
if (Selection.activeObject != message._Object && (casted == null || casted.gameObject != Selection.activeObject))
|
||||
{
|
||||
s_JumpButtonContent ??= new(EditorGUIUtility.FindTexture("scenepicking_pickable_hover@2x"), "Jump to object to resolve issue");
|
||||
|
||||
if (GUILayout.Button(s_JumpButtonContent, GUILayout.ExpandWidth(false), GUILayout.ExpandHeight(true)))
|
||||
{
|
||||
Selection.activeObject = message._Object;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fix the issue button.
|
||||
if (message._Action != null)
|
||||
{
|
||||
s_FixButtonContent ??= new(EditorGUIUtility.FindTexture("SceneViewTools"));
|
||||
|
||||
if (message._FixDescription != null)
|
||||
{
|
||||
var sanitisedFixDescr = Regex.Replace(message._FixDescription, @"<[^<>]*>", "'");
|
||||
s_FixButtonContent.tooltip = $"Apply fix: {sanitisedFixDescr}";
|
||||
}
|
||||
else
|
||||
{
|
||||
s_FixButtonContent.tooltip = "Fix issue";
|
||||
}
|
||||
|
||||
if (GUILayout.Button(s_FixButtonContent, GUILayout.ExpandWidth(false), GUILayout.ExpandHeight(true)))
|
||||
{
|
||||
// Run fix function
|
||||
var serializedObject = new SerializedObject(message._Object);
|
||||
// Property is optional.
|
||||
var property = message._PropertyPath != null ? serializedObject?.FindProperty(message._PropertyPath) : null;
|
||||
var oldValue = property?.boxedValue;
|
||||
message._Action.Invoke(serializedObject, property);
|
||||
if (serializedObject.ApplyModifiedProperties())
|
||||
{
|
||||
// SerializedObject does this for us, but gives the history item a nicer label.
|
||||
Undo.RecordObject(message._Object, s_FixButtonContent.tooltip);
|
||||
DecoratedDrawer.OnChange(property, oldValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GUI.enabled = originalGUIEnabled;
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
var sanitized = Regex.Replace(message._FixDescription, @"<[^<>]*>", "'");
|
||||
s_FixButtonContent.tooltip = $"Fix: {sanitized}";
|
||||
}
|
||||
else
|
||||
{
|
||||
s_FixButtonContent.tooltip = "Fix issue";
|
||||
}
|
||||
|
||||
var canFix = message._Action != null;
|
||||
var canInspect = false;
|
||||
|
||||
// Jump to object button.
|
||||
if (message._Object != null)
|
||||
{
|
||||
// Selection.activeObject can be message._object.gameObject instead of the component
|
||||
// itself. We soft cast to MonoBehaviour to get the gameObject for comparison.
|
||||
// Alternatively, we could always pass gameObject instead of "this".
|
||||
var casted = message._Object as MonoBehaviour;
|
||||
|
||||
if (Selection.activeObject != message._Object && (casted == null || casted.gameObject != Selection.activeObject))
|
||||
{
|
||||
canInspect = true;
|
||||
}
|
||||
}
|
||||
|
||||
var result = EditorHelpers.HelpBox
|
||||
(
|
||||
new($"{message._Message} {message._FixDescription}"),
|
||||
messageType,
|
||||
canFix ? s_FixButtonContent : canInspect ? s_InspectButtonContent : null,
|
||||
buttons: canInspect && canFix ? s_FixButtonDropDown : null,
|
||||
buttonCenterLabel: needsAlignment,
|
||||
buttonMinimumWidth: 72
|
||||
);
|
||||
|
||||
if (canFix && result == -1)
|
||||
{
|
||||
// Run fix function.
|
||||
var serializedObject = new SerializedObject(message._Object);
|
||||
// Property is optional.
|
||||
var property = message._PropertyPath != null ? serializedObject?.FindProperty(message._PropertyPath) : null;
|
||||
var oldValue = property?.boxedValue;
|
||||
message._Action.Invoke(serializedObject, property);
|
||||
if (serializedObject.ApplyModifiedProperties())
|
||||
{
|
||||
// SerializedObject does this for us, but gives the history item a nicer label.
|
||||
Undo.RecordObject(message._Object, s_FixButtonContent.tooltip);
|
||||
DecoratedDrawer.OnChange(property, oldValue);
|
||||
}
|
||||
}
|
||||
else if (canInspect && result != null)
|
||||
{
|
||||
Selection.activeObject = message._Object;
|
||||
}
|
||||
|
||||
GUI.enabled = originalGUIEnabled;
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (needsSpaceBelow)
|
||||
{
|
||||
// EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
// Revert skin since it persists.
|
||||
GUI.skin.GetStyle("HelpBox").richText = styleRichText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using WaveHarmonic.Crest.Editor.Internal;
|
||||
using WaveHarmonic.Crest.Internal;
|
||||
|
||||
namespace WaveHarmonic.Crest.Editor
|
||||
@@ -21,15 +23,32 @@ namespace WaveHarmonic.Crest.Editor
|
||||
|
||||
internal static Inspector Current { get; private set; }
|
||||
|
||||
readonly Dictionary<FieldInfo, object> _MaterialOwners = new();
|
||||
readonly Dictionary<Material, MaterialEditor> _MaterialEditors = new();
|
||||
|
||||
public override bool RequiresConstantRepaint() => TexturePreview.AnyActivePreviews;
|
||||
public override bool RequiresConstantRepaint() => TexturePreview.s_ActiveInstance?.Open == true;
|
||||
|
||||
// Set this from a decorator to enable the material editor.
|
||||
internal List<Material> _Materials = new();
|
||||
static readonly IOrderedEnumerable<FieldInfo> s_AttachMaterialEditors = TypeCache
|
||||
.GetFieldsWithAttribute<AttachMaterialEditor>()
|
||||
.OrderBy(x => x.GetCustomAttribute<AttachMaterialEditor>().Order);
|
||||
|
||||
readonly Utility.SortedList<int, SerializedProperty> _Properties = new(Helpers.DuplicateComparison);
|
||||
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
_MaterialOwners.Clear();
|
||||
|
||||
foreach (var field in s_AttachMaterialEditors)
|
||||
{
|
||||
var target = (object)this.target;
|
||||
|
||||
if (field.FindOwner(ref target))
|
||||
{
|
||||
_MaterialOwners.Add(field, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
// Reset foldout values.
|
||||
@@ -61,7 +80,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
}
|
||||
}
|
||||
|
||||
protected void RenderBeforeInspectorGUI()
|
||||
protected virtual void RenderBeforeInspectorGUI()
|
||||
{
|
||||
if (this.target is EditorBehaviour target && target._IsPrefabStageInstance)
|
||||
{
|
||||
@@ -143,13 +162,14 @@ namespace WaveHarmonic.Crest.Editor
|
||||
|
||||
protected virtual void RenderAfterInspectorGUI()
|
||||
{
|
||||
foreach (var material in _Materials)
|
||||
foreach (var mapping in _MaterialOwners)
|
||||
{
|
||||
if (material == null) continue;
|
||||
DrawMaterialEditor(material);
|
||||
var material = (Material)mapping.Key.GetValue(mapping.Value);
|
||||
if (material != null)
|
||||
{
|
||||
DrawMaterialEditor(material);
|
||||
}
|
||||
}
|
||||
|
||||
_Materials.Clear();
|
||||
}
|
||||
|
||||
// Adapted from: http://answers.unity.com/answers/975894/view.html
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build;
|
||||
|
||||
namespace WaveHarmonic.Crest.Editor.Settings
|
||||
{
|
||||
static class ScriptingSymbols
|
||||
{
|
||||
static NamedBuildTarget CurrentNamedBuildTarget
|
||||
{
|
||||
get
|
||||
{
|
||||
#if UNITY_SERVER
|
||||
return NamedBuildTarget.Server;
|
||||
#else
|
||||
return NamedBuildTarget.FromBuildTargetGroup(BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
public static string[] Symbols => PlayerSettings.GetScriptingDefineSymbols(CurrentNamedBuildTarget).Split(';');
|
||||
|
||||
public static void Add(string[] symbols)
|
||||
{
|
||||
// We remove our symbols from the list first to prevent duplicates - just to be safe.
|
||||
SetScriptingDefineSymbols(Symbols.Except(symbols).Concat(symbols).ToArray());
|
||||
}
|
||||
|
||||
public static void Add(string symbol)
|
||||
{
|
||||
Add(new string[] { symbol });
|
||||
}
|
||||
|
||||
public static void Remove(string[] symbols)
|
||||
{
|
||||
SetScriptingDefineSymbols(Symbols.Except(symbols).ToArray());
|
||||
}
|
||||
|
||||
public static void Remove(string symbol)
|
||||
{
|
||||
Remove(new string[] { symbol });
|
||||
}
|
||||
|
||||
public static void Set(string[] symbols, bool enable)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
Add(symbols);
|
||||
}
|
||||
else
|
||||
{
|
||||
Remove(symbols);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Set(string symbol, bool enable)
|
||||
{
|
||||
Set(new string[] { symbol }, enable);
|
||||
}
|
||||
|
||||
static void SetScriptingDefineSymbols(string[] symbols)
|
||||
{
|
||||
SetScriptingDefineSymbols(string.Join(";", symbols));
|
||||
}
|
||||
|
||||
static void SetScriptingDefineSymbols(string symbols)
|
||||
{
|
||||
PlayerSettings.SetScriptingDefineSymbols(CurrentNamedBuildTarget, symbols);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c03a1671f6a84ed4ac42813e95a07d7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,739 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Rendering.BuiltIn;
|
||||
using UnityEditor.Rendering.BuiltIn.ShaderGraph;
|
||||
using UnityEditor.ShaderGraph;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
#if UNITY_2022_3_OR_NEWER
|
||||
using UnityEngine.UIElements;
|
||||
#else
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor.UIElements;
|
||||
#endif
|
||||
|
||||
using UnityBuiltInLitSubTarget = UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInLitSubTarget;
|
||||
|
||||
namespace WaveHarmonic.Crest.Editor.ShaderGraph
|
||||
{
|
||||
sealed class MaterialModificationProcessor : AssetModificationProcessor
|
||||
{
|
||||
static void OnWillCreateAsset(string asset)
|
||||
{
|
||||
if (!asset.ToLowerInvariant().EndsWith(".mat"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
MaterialPostProcessor.s_CreatedAssets.Add(asset);
|
||||
}
|
||||
}
|
||||
|
||||
sealed class MaterialPostProcessor : AssetPostprocessor
|
||||
{
|
||||
public override int GetPostprocessOrder()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
internal static readonly List<string> s_CreatedAssets = new();
|
||||
|
||||
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
|
||||
{
|
||||
foreach (var asset in importedAssets)
|
||||
{
|
||||
// We only care about materials
|
||||
if (!asset.EndsWith(".mat", System.StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Load the material and look for it's BuiltIn ShaderID.
|
||||
// We only care about versioning materials using a known BuiltIn ShaderID.
|
||||
// This skips any materials that only target other render pipelines, are user shaders,
|
||||
// or are shaders we don't care to version
|
||||
var material = (Material)AssetDatabase.LoadAssetAtPath(asset, typeof(Material));
|
||||
var shaderID = ShaderUtils.GetShaderID(material.shader);
|
||||
if (shaderID == ShaderUtils.ShaderID.Unknown)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (material.shader == null || material.shader.name != "Crest/Water")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Look for the BuiltIn AssetVersion
|
||||
AssetVersion assetVersion = null;
|
||||
var allAssets = AssetDatabase.LoadAllAssetsAtPath(asset);
|
||||
foreach (var subAsset in allAssets)
|
||||
{
|
||||
if (subAsset is AssetVersion sub)
|
||||
{
|
||||
assetVersion = sub;
|
||||
}
|
||||
}
|
||||
|
||||
if (!assetVersion)
|
||||
{
|
||||
if (s_CreatedAssets.Contains(asset))
|
||||
{
|
||||
s_CreatedAssets.Remove(asset);
|
||||
CustomBuiltInLitGUI.UpdateMaterial(material);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class CustomBuiltInLitGUI : BuiltInLitGUI
|
||||
{
|
||||
MaterialEditor _MaterialEditor;
|
||||
MaterialProperty[] _Properties;
|
||||
|
||||
static readonly GUIContent s_WorkflowModeText = EditorGUIUtility.TrTextContent
|
||||
(
|
||||
"Workflow Mode",
|
||||
"Select a workflow that fits your textures. Choose between Metallic or Specular."
|
||||
);
|
||||
|
||||
static readonly GUIContent s_TransparentReceiveShadowsText = EditorGUIUtility.TrTextContent
|
||||
(
|
||||
"Receives Shadows",
|
||||
"When enabled, other GameObjects can cast shadows onto this GameObject."
|
||||
);
|
||||
|
||||
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
|
||||
{
|
||||
_MaterialEditor = materialEditor;
|
||||
_Properties = properties;
|
||||
|
||||
base.OnGUI(materialEditor, properties);
|
||||
}
|
||||
|
||||
public override void ValidateMaterial(Material material)
|
||||
{
|
||||
base.ValidateMaterial(material);
|
||||
UpdateMaterial(material);
|
||||
}
|
||||
|
||||
public override void AssignNewShaderToMaterial(Material material, Shader oldShader, Shader newShader)
|
||||
{
|
||||
base.AssignNewShaderToMaterial(material, oldShader, newShader);
|
||||
UpdateMaterial(material);
|
||||
}
|
||||
|
||||
protected override void DrawSurfaceOptions(Material material)
|
||||
{
|
||||
var materialEditor = _MaterialEditor;
|
||||
var properties = _Properties;
|
||||
|
||||
var workflowProperty = FindProperty(Property.SpecularWorkflowMode(), properties, false);
|
||||
if (workflowProperty != null)
|
||||
{
|
||||
DoPopup(s_WorkflowModeText, materialEditor, workflowProperty, System.Enum.GetNames(typeof(WorkflowMode)));
|
||||
}
|
||||
|
||||
base.DrawSurfaceOptions(material);
|
||||
|
||||
var surfaceTypeProp = FindProperty(Property.Surface(), properties, false);
|
||||
if (surfaceTypeProp != null && (SurfaceType)surfaceTypeProp.floatValue == SurfaceType.Transparent)
|
||||
{
|
||||
var trsProperty = FindProperty(BuiltInLitSubTarget.s_TransparentReceiveShadowsProperty, properties, false);
|
||||
DrawFloatToggleProperty(s_TransparentReceiveShadowsText, trsProperty);
|
||||
}
|
||||
}
|
||||
|
||||
// Should be called by ShaderGraphMaterialsUpdater, but we will never upgrade.
|
||||
public static new void UpdateMaterial(Material material)
|
||||
{
|
||||
if (material.HasProperty(Property.SpecularWorkflowMode()))
|
||||
{
|
||||
var workflow = (WorkflowMode)material.GetFloat(Property.SpecularWorkflowMode());
|
||||
CoreUtils.SetKeyword(material, BuiltInLitSubTarget.LitDefines.s_SpecularSetup.referenceName, workflow == WorkflowMode.Specular);
|
||||
}
|
||||
|
||||
if (material.HasProperty(BuiltInLitSubTarget.s_TransparentReceiveShadowsProperty))
|
||||
{
|
||||
var receive = material.GetFloat(BuiltInLitSubTarget.s_TransparentReceiveShadowsProperty) == 1f;
|
||||
CoreUtils.SetKeyword(material, BuiltInLitSubTarget.LitDefines.s_TransparentReceivesShadows.referenceName, receive);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sealed class BuiltInLitSubTarget : BuiltInSubTarget
|
||||
{
|
||||
const string k_ShaderPath = "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy";
|
||||
const string k_TemplatePath = "Packages/com.waveharmonic.crest/Editor/Shaders/Templates";
|
||||
|
||||
readonly UnityBuiltInLitSubTarget _BuiltInLitSubTarget;
|
||||
|
||||
#pragma warning disable IDE0032, IDE1006
|
||||
[SerializeField]
|
||||
WorkflowMode m_WorkflowMode = WorkflowMode.Metallic;
|
||||
|
||||
[SerializeField]
|
||||
NormalDropOffSpace m_NormalDropOffSpace = NormalDropOffSpace.Tangent;
|
||||
|
||||
[SerializeField]
|
||||
bool m_TransparentReceiveShadows = true;
|
||||
#pragma warning restore IDE0032, IDE1006
|
||||
|
||||
public static readonly string s_TransparentReceiveShadowsProperty = "_BUILTIN_TransparentReceiveShadows";
|
||||
|
||||
public BuiltInLitSubTarget()
|
||||
{
|
||||
_BuiltInLitSubTarget = new();
|
||||
displayName = _BuiltInLitSubTarget.displayName;
|
||||
}
|
||||
|
||||
protected override ShaderUtils.ShaderID shaderID => ShaderUtils.ShaderID.SG_Lit;
|
||||
public override bool IsActive() => true;
|
||||
|
||||
WorkflowMode WorkflowMode
|
||||
{
|
||||
get => m_WorkflowMode;
|
||||
set => m_WorkflowMode = value;
|
||||
}
|
||||
|
||||
NormalDropOffSpace NormalDropOffSpace
|
||||
{
|
||||
get => m_NormalDropOffSpace;
|
||||
set => m_NormalDropOffSpace = value;
|
||||
}
|
||||
|
||||
bool TransparentReceiveShadows
|
||||
{
|
||||
get => m_TransparentReceiveShadows;
|
||||
set => m_TransparentReceiveShadows = value;
|
||||
}
|
||||
|
||||
#if UNITY_2022_3_OR_NEWER
|
||||
static FieldInfo s_CustomEditorForRenderPipelines;
|
||||
static FieldInfo CustomEditorForRenderPipelines => s_CustomEditorForRenderPipelines ??= typeof(TargetSetupContext).GetField("customEditorForRenderPipelines", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
#endif
|
||||
|
||||
public override void Setup(ref TargetSetupContext context)
|
||||
{
|
||||
_BuiltInLitSubTarget.target = target;
|
||||
_BuiltInLitSubTarget.normalDropOffSpace = NormalDropOffSpace;
|
||||
_BuiltInLitSubTarget.Setup(ref context);
|
||||
|
||||
// Caused a crash: !context.HasCustomEditorForRenderPipeline(null)
|
||||
if (string.IsNullOrEmpty(target.customEditorGUI))
|
||||
{
|
||||
#if UNITY_2022_3_OR_NEWER
|
||||
var editors = (List<ShaderCustomEditor>)CustomEditorForRenderPipelines.GetValue(context);
|
||||
if (editors.Count > 0)
|
||||
{
|
||||
editors.RemoveAt(editors.Count - 1);
|
||||
}
|
||||
|
||||
context.AddCustomEditorForRenderPipeline(typeof(CustomBuiltInLitGUI).FullName, "");
|
||||
#else
|
||||
if (context.customEditorForRenderPipelines.Count > 0)
|
||||
{
|
||||
context.customEditorForRenderPipelines.RemoveAt(context.customEditorForRenderPipelines.Count - 1);
|
||||
}
|
||||
|
||||
context.customEditorForRenderPipelines.Add((typeof(CustomBuiltInLitGUI).FullName, ""));
|
||||
#endif
|
||||
}
|
||||
|
||||
context.subShaders.RemoveAt(0);
|
||||
context.AddSubShader(SubShaders.Lit(this));
|
||||
}
|
||||
|
||||
public override void ProcessPreviewMaterial(Material material)
|
||||
{
|
||||
_BuiltInLitSubTarget.target = target;
|
||||
_BuiltInLitSubTarget.normalDropOffSpace = NormalDropOffSpace;
|
||||
_BuiltInLitSubTarget.ProcessPreviewMaterial(material);
|
||||
CustomBuiltInLitGUI.UpdateMaterial(material);
|
||||
}
|
||||
|
||||
public override void GetFields(ref TargetFieldContext context)
|
||||
{
|
||||
_BuiltInLitSubTarget.target = target;
|
||||
_BuiltInLitSubTarget.normalDropOffSpace = NormalDropOffSpace;
|
||||
_BuiltInLitSubTarget.GetFields(ref context);
|
||||
// Do not use this, as we handle this properly.
|
||||
context.AddField(BuiltInFields.SpecularSetup, false);
|
||||
}
|
||||
|
||||
public override void GetActiveBlocks(ref TargetActiveBlockContext context)
|
||||
{
|
||||
_BuiltInLitSubTarget.target = target;
|
||||
_BuiltInLitSubTarget.normalDropOffSpace = NormalDropOffSpace;
|
||||
_BuiltInLitSubTarget.GetActiveBlocks(ref context);
|
||||
|
||||
context.activeBlocks.Remove(BlockFields.SurfaceDescription.Metallic);
|
||||
var insertion = context.activeBlocks.FindIndex(x => x == BlockFields.SurfaceDescription.Occlusion) + 1;
|
||||
|
||||
if ((WorkflowMode == WorkflowMode.Specular) || target.allowMaterialOverride)
|
||||
{
|
||||
context.activeBlocks.Insert(insertion, BlockFields.SurfaceDescription.Specular);
|
||||
}
|
||||
|
||||
if ((WorkflowMode == WorkflowMode.Metallic) || target.allowMaterialOverride)
|
||||
{
|
||||
context.activeBlocks.Insert(insertion, BlockFields.SurfaceDescription.Metallic);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CollectShaderProperties(PropertyCollector collector, GenerationMode generationMode)
|
||||
{
|
||||
if (target.allowMaterialOverride)
|
||||
{
|
||||
collector.AddFloatProperty(Property.SpecularWorkflowMode(), (float)WorkflowMode);
|
||||
}
|
||||
|
||||
_BuiltInLitSubTarget.target = target;
|
||||
_BuiltInLitSubTarget.normalDropOffSpace = NormalDropOffSpace;
|
||||
_BuiltInLitSubTarget.CollectShaderProperties(collector, generationMode);
|
||||
|
||||
if (target.allowMaterialOverride)
|
||||
{
|
||||
collector.AddFloatProperty(s_TransparentReceiveShadowsProperty, TransparentReceiveShadows ? 1f : 0f);
|
||||
}
|
||||
|
||||
// LEqual
|
||||
collector.AddFloatProperty(SubShaders.k_ShadowCasterZTest, 4, UnityEditor.ShaderGraph.Internal.HLSLDeclaration.UnityPerMaterial);
|
||||
}
|
||||
|
||||
public override void GetPropertiesGUI(ref TargetPropertyGUIContext context, System.Action onChange, System.Action<string> registerUndo)
|
||||
{
|
||||
target.AddDefaultMaterialOverrideGUI(ref context, onChange, registerUndo);
|
||||
|
||||
context.AddProperty("Workflow", new EnumField(WorkflowMode.Metallic) { value = WorkflowMode }, (evt) =>
|
||||
{
|
||||
if (Equals(WorkflowMode, evt.newValue))
|
||||
return;
|
||||
|
||||
registerUndo("Change Workflow");
|
||||
WorkflowMode = (WorkflowMode)evt.newValue;
|
||||
onChange();
|
||||
});
|
||||
|
||||
target.GetDefaultSurfacePropertiesGUI(ref context, onChange, registerUndo);
|
||||
|
||||
context.AddProperty("Transparent Receives Shadows", new Toggle() { value = TransparentReceiveShadows }, (evt) =>
|
||||
{
|
||||
if (Equals(TransparentReceiveShadows, evt.newValue))
|
||||
return;
|
||||
|
||||
registerUndo("Change Transparent Receives Shadows");
|
||||
TransparentReceiveShadows = evt.newValue;
|
||||
onChange();
|
||||
});
|
||||
|
||||
context.AddProperty("Fragment Normal Space", new EnumField(NormalDropOffSpace.Tangent) { value = NormalDropOffSpace }, (evt) =>
|
||||
{
|
||||
if (Equals(NormalDropOffSpace, evt.newValue))
|
||||
return;
|
||||
|
||||
registerUndo("Change Fragment Normal Space");
|
||||
NormalDropOffSpace = (NormalDropOffSpace)evt.newValue;
|
||||
_BuiltInLitSubTarget.normalDropOffSpace = NormalDropOffSpace;
|
||||
onChange();
|
||||
});
|
||||
}
|
||||
|
||||
static class SubShaders
|
||||
{
|
||||
static readonly string s_ShaderPathDefines = $"{k_ShaderPath}/Defines.hlsl";
|
||||
static readonly string s_ShaderPathBuilding = $"{k_ShaderPath}/LegacyBuilding.hlsl";
|
||||
|
||||
// SetShaderPassEnabled on ShadowCaster pass does not work for BIRP. We set ZTest
|
||||
// to Never which is the best we can do. We are still incurring the draw call cost.
|
||||
// This is an issue because of the way we trigger motion vectors, but is a bug with
|
||||
// Unity and should be reported.
|
||||
internal const string k_ShadowCasterZTest = "_Crest_BUILTIN_ShadowCasterZTest";
|
||||
|
||||
internal static System.Type s_SubShadersType;
|
||||
internal static System.Type SubShadersType => s_SubShadersType ??= typeof(UnityBuiltInLitSubTarget).GetNestedType("SubShaders", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
internal static MethodInfo s_LitMethod;
|
||||
internal static MethodInfo LitMethod => s_LitMethod ??= SubShadersType.GetMethod("Lit", BindingFlags.Static | BindingFlags.Public);
|
||||
|
||||
static void PatchIncludes(ref PassDescriptor result)
|
||||
{
|
||||
var includes = new IncludeCollection();
|
||||
|
||||
includes.Add(s_ShaderPathDefines, IncludeLocation.Pregraph);
|
||||
includes.Add("Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/Editor/ShaderGraph/Includes/ShaderPass.hlsl", IncludeLocation.Pregraph);
|
||||
|
||||
foreach (var include in result.includes)
|
||||
{
|
||||
includes.AddInternal(include.guid, include.path, include.location, include.fieldConditions);
|
||||
}
|
||||
|
||||
result.includes = includes;
|
||||
}
|
||||
|
||||
static void PatchSpecularIncludes(ref PassDescriptor result, string file)
|
||||
{
|
||||
var ic = new IncludeCollection();
|
||||
foreach (var include in result.includes)
|
||||
{
|
||||
if (include.path.EndsWith(file))
|
||||
{
|
||||
ic.Add(s_ShaderPathBuilding, include.location);
|
||||
ic.AddInternal(include.guid, include.path, include.location, include.fieldConditions);
|
||||
}
|
||||
else
|
||||
{
|
||||
ic.AddInternal(include.guid, include.path, include.location, include.fieldConditions);
|
||||
}
|
||||
}
|
||||
|
||||
result.includes = ic;
|
||||
}
|
||||
|
||||
static readonly Dictionary<string, string> s_Mappings = new()
|
||||
{
|
||||
{ "SHADERPASS_FORWARD", "PBRForwardPass.hlsl" },
|
||||
{ "SHADERPASS_FORWARD_ADD", "PBRForwardAddPass.hlsl" },
|
||||
{ "SHADERPASS_DEFERRED", "PBRDeferredPass.hlsl" },
|
||||
};
|
||||
|
||||
static readonly string[] s_SkipVariants = new string[]
|
||||
{
|
||||
"LIGHTMAP_ON",
|
||||
"LIGHTMAP_SHADOW_MIXING",
|
||||
"DIRLIGHTMAP_COMBINED",
|
||||
"DYNAMICLIGHTMAP_ON",
|
||||
"SHADOWS_SHADOWMASK",
|
||||
};
|
||||
|
||||
public static SubShaderDescriptor Lit(BuiltInLitSubTarget subtarget)
|
||||
{
|
||||
var target = subtarget.target;
|
||||
var ssd = (SubShaderDescriptor)LitMethod.Invoke(null, new object[] { target, target.renderType, target.renderQueue });
|
||||
|
||||
PassCollection passes = new();
|
||||
|
||||
foreach (var item in ssd.passes)
|
||||
{
|
||||
// Many artifacts in U6 if our Write Depth enabled.
|
||||
// Caused by _SURFACE_TYPE_TRANSPARENT in m_ValidKeywords.
|
||||
if (item.descriptor.referenceName == "SceneSelectionPass")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var result = item.descriptor;
|
||||
|
||||
var keywords = new KeywordCollection();
|
||||
|
||||
foreach (var keyword in result.keywords)
|
||||
{
|
||||
// All others are either duplicate or unused.
|
||||
if (!keyword.descriptor.referenceName.StartsWith("_BUILTIN_"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
keywords.Add(keyword.descriptor, keyword.fieldConditions);
|
||||
}
|
||||
|
||||
result.keywords = keywords;
|
||||
|
||||
switch (item.descriptor.referenceName)
|
||||
{
|
||||
case "SHADERPASS_FORWARD":
|
||||
case "SHADERPASS_FORWARD_ADD":
|
||||
case "SHADERPASS_DEFERRED":
|
||||
AddWorkflowModeControlToPass(ref result, target, subtarget.WorkflowMode);
|
||||
PatchSpecularIncludes(ref result, s_Mappings[item.descriptor.referenceName]);
|
||||
|
||||
var pragmas = new PragmaCollection();
|
||||
foreach (var pragma in result.pragmas)
|
||||
{
|
||||
// For UAVs (RWStructuredBuffer).
|
||||
if (pragma.descriptor.value.StartsWithNoAlloc("target"))
|
||||
{
|
||||
pragmas.Add(Pragma.Target(ShaderModel.Target45));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pragma.descriptor.value.StartsWithNoAlloc("vertex"))
|
||||
{
|
||||
pragmas.Add(Pragma.SkipVariants(s_SkipVariants));
|
||||
}
|
||||
|
||||
pragmas.Add(pragma.descriptor, pragma.fieldConditions);
|
||||
}
|
||||
result.pragmas = pragmas;
|
||||
|
||||
goto default;
|
||||
default:
|
||||
PatchIncludes(ref result);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (item.descriptor.referenceName)
|
||||
{
|
||||
case "SHADERPASS_FORWARD":
|
||||
case "SHADERPASS_FORWARD_ADD":
|
||||
AddReceivesShadowsControlToPass(ref result, target, subtarget.TransparentReceiveShadows);
|
||||
break;
|
||||
case "SHADERPASS_SHADOWCASTER":
|
||||
var states = new RenderStateCollection();
|
||||
foreach (var state in result.renderStates)
|
||||
{
|
||||
if (state.descriptor.type == RenderStateType.ZTest)
|
||||
{
|
||||
states.Add(RenderState.ZTest($"[{k_ShadowCasterZTest}]"));
|
||||
continue;
|
||||
}
|
||||
|
||||
states.Add(state.descriptor, state.fieldConditions);
|
||||
}
|
||||
|
||||
result.renderStates = states;
|
||||
break;
|
||||
}
|
||||
|
||||
// Add missing cull render state.
|
||||
if (item.descriptor.referenceName == "SHADERPASS_FORWARD_ADD")
|
||||
{
|
||||
CoreRenderStates.AddUberSwitchedCull(target, result.renderStates);
|
||||
}
|
||||
|
||||
// Inject MV before DO pass.
|
||||
if (item.descriptor.referenceName == "SHADERPASS_DEPTHONLY")
|
||||
{
|
||||
var mv = LitPasses.MotionVectors(target);
|
||||
PatchIncludes(ref mv);
|
||||
passes.Add(mv);
|
||||
}
|
||||
|
||||
// Fix XR SPI.
|
||||
if (result.requiredFields != null)
|
||||
{
|
||||
var found = false;
|
||||
|
||||
foreach (var collection in result.requiredFields)
|
||||
{
|
||||
if (collection.field == StructFields.Attributes.instanceID)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
result.requiredFields.Add(StructFields.Attributes.instanceID);
|
||||
}
|
||||
}
|
||||
|
||||
passes.Add(result);
|
||||
}
|
||||
|
||||
ssd.passes = passes;
|
||||
|
||||
return ssd;
|
||||
}
|
||||
|
||||
static void AddWorkflowModeControlToPass(ref PassDescriptor pass, BuiltInTarget target, WorkflowMode workflowMode)
|
||||
{
|
||||
if (target.allowMaterialOverride)
|
||||
{
|
||||
pass.keywords.Add(LitDefines.s_SpecularSetup);
|
||||
}
|
||||
else if (workflowMode == WorkflowMode.Specular)
|
||||
{
|
||||
pass.defines.Add(LitDefines.s_SpecularSetup, 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void AddReceivesShadowsControlToPass(ref PassDescriptor pass, BuiltInTarget target, bool receives)
|
||||
{
|
||||
if (target.allowMaterialOverride)
|
||||
{
|
||||
pass.keywords.Add(LitDefines.s_TransparentReceivesShadows);
|
||||
pass.keywords.Add(LitDefines.s_ShadowsSingleCascade);
|
||||
pass.keywords.Add(LitDefines.s_ShadowsSplitSpheres);
|
||||
pass.keywords.Add(LitDefines.s_ShadowsSoft);
|
||||
}
|
||||
else if (receives)
|
||||
{
|
||||
pass.defines.Add(LitDefines.s_TransparentReceivesShadows, 1);
|
||||
pass.keywords.Add(LitDefines.s_ShadowsSingleCascade);
|
||||
pass.keywords.Add(LitDefines.s_ShadowsSplitSpheres);
|
||||
pass.keywords.Add(LitDefines.s_ShadowsSoft);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class LitPasses
|
||||
{
|
||||
static readonly string s_ShaderPathMotionVectorCommon = $"{k_ShaderPath}/MotionVectorCommon.hlsl";
|
||||
static readonly string s_ShaderPathMotionVectorPass = $"{k_ShaderPath}/MotionVectorPass.hlsl";
|
||||
|
||||
public static RenderStateDescriptor UberSwitchedCullRenderState(BuiltInTarget target)
|
||||
{
|
||||
if (target.allowMaterialOverride)
|
||||
{
|
||||
return RenderState.Cull(CoreRenderStates.Uniforms.cullMode);
|
||||
}
|
||||
else
|
||||
{
|
||||
return RenderState.Cull(CoreRenderStates.RenderFaceToCull(target.renderFace));
|
||||
}
|
||||
}
|
||||
|
||||
public static PassDescriptor MotionVectors(BuiltInTarget target)
|
||||
{
|
||||
var result = new PassDescriptor()
|
||||
{
|
||||
// Definition
|
||||
displayName = "BuiltIn MotionVectors",
|
||||
referenceName = "SHADERPASS_MOTION_VECTORS",
|
||||
lightMode = "MotionVectors",
|
||||
useInPreview = false,
|
||||
|
||||
// Template
|
||||
passTemplatePath = BuiltInTarget.kTemplatePath,
|
||||
sharedTemplateDirectories = BuiltInTarget.kSharedTemplateDirectories.Union
|
||||
(
|
||||
new string[]
|
||||
{
|
||||
k_TemplatePath,
|
||||
"Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/Editor/ShaderGraph"
|
||||
}
|
||||
).ToArray(),
|
||||
|
||||
// Port Mask
|
||||
validVertexBlocks = new BlockFieldDescriptor[]
|
||||
{
|
||||
BlockFields.VertexDescription.Position,
|
||||
},
|
||||
validPixelBlocks = CoreBlockMasks.FragmentAlphaOnly,
|
||||
|
||||
// Fields
|
||||
structs = CoreStructCollections.Default,
|
||||
requiredFields = new()
|
||||
{
|
||||
// Needed for XR, but not sure if correct.
|
||||
StructFields.Attributes.instanceID,
|
||||
},
|
||||
fieldDependencies = CoreFieldDependencies.Default,
|
||||
|
||||
// Conditional State
|
||||
renderStates = new()
|
||||
{
|
||||
{ RenderState.ZTest(ZTest.LEqual) },
|
||||
{ RenderState.ZWrite(ZWrite.On) },
|
||||
{ UberSwitchedCullRenderState(target) },
|
||||
// MVs write to the depth buffer causing z-fighting. Luckily, the depth texture has
|
||||
// already been updated, and will not be updated before water renders.
|
||||
{ RenderState.ColorMask("ColorMask RG\nOffset 1, 1") },
|
||||
},
|
||||
|
||||
pragmas = new()
|
||||
{
|
||||
{ Pragma.Target(ShaderModel.Target35) }, // NOTE: SM 2.0 only GL
|
||||
{ Pragma.MultiCompileInstancing },
|
||||
{ Pragma.Vertex("vert") },
|
||||
{ Pragma.Fragment("frag") },
|
||||
},
|
||||
|
||||
defines = new() { CoreDefines.BuiltInTargetAPI },
|
||||
keywords = new(),
|
||||
includes = new()
|
||||
{
|
||||
// Pre-graph
|
||||
{ CoreIncludes.CorePregraph },
|
||||
{ CoreIncludes.ShaderGraphPregraph },
|
||||
|
||||
// Post-graph
|
||||
{ s_ShaderPathMotionVectorCommon, IncludeLocation.Postgraph },
|
||||
{ CoreIncludes.CorePostgraph },
|
||||
{ s_ShaderPathMotionVectorPass, IncludeLocation.Postgraph },
|
||||
},
|
||||
|
||||
// Custom Interpolator Support
|
||||
customInterpolators = CoreCustomInterpDescriptors.Common,
|
||||
};
|
||||
|
||||
// Only support time for now.
|
||||
result.defines.Add(LitDefines.s_AutomaticTimeBasedMotionVectors, 1);
|
||||
|
||||
CorePasses.AddAlphaClipControlToPass(ref result, target);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
internal static class LitDefines
|
||||
{
|
||||
public static readonly KeywordDescriptor s_AutomaticTimeBasedMotionVectors = new()
|
||||
{
|
||||
displayName = "Automatic Time-Based Motion Vectors",
|
||||
referenceName = "AUTOMATIC_TIME_BASED_MOTION_VECTORS",
|
||||
type = KeywordType.Boolean,
|
||||
definition = KeywordDefinition.Predefined,
|
||||
scope = KeywordScope.Local,
|
||||
stages = KeywordShaderStage.Vertex,
|
||||
};
|
||||
|
||||
public static readonly KeywordDescriptor s_SpecularSetup = new()
|
||||
{
|
||||
displayName = "Specular Setup",
|
||||
referenceName = "_BUILTIN_SPECULAR_SETUP",
|
||||
type = KeywordType.Boolean,
|
||||
definition = KeywordDefinition.ShaderFeature,
|
||||
scope = KeywordScope.Local,
|
||||
stages = KeywordShaderStage.Fragment
|
||||
};
|
||||
|
||||
public static readonly KeywordDescriptor s_TransparentReceivesShadows = new()
|
||||
{
|
||||
displayName = "Transparent Receives Shadows",
|
||||
referenceName = "_BUILTIN_TRANSPARENT_RECEIVES_SHADOWS",
|
||||
type = KeywordType.Boolean,
|
||||
definition = KeywordDefinition.ShaderFeature,
|
||||
scope = KeywordScope.Local,
|
||||
stages = KeywordShaderStage.Fragment
|
||||
};
|
||||
|
||||
public static readonly KeywordDescriptor s_ShadowsSingleCascade = new()
|
||||
{
|
||||
displayName = "Single Cascade Shadows",
|
||||
referenceName = "SHADOWS_SINGLE_CASCADE",
|
||||
type = KeywordType.Boolean,
|
||||
definition = KeywordDefinition.MultiCompile,
|
||||
scope = KeywordScope.Global,
|
||||
stages = KeywordShaderStage.All,
|
||||
};
|
||||
|
||||
public static readonly KeywordDescriptor s_ShadowsSoft = new()
|
||||
{
|
||||
displayName = "Soft Shadows",
|
||||
referenceName = "SHADOWS_SOFT",
|
||||
type = KeywordType.Boolean,
|
||||
definition = KeywordDefinition.MultiCompile,
|
||||
scope = KeywordScope.Global,
|
||||
stages = KeywordShaderStage.All,
|
||||
};
|
||||
|
||||
public static readonly KeywordDescriptor s_ShadowsSplitSpheres = new()
|
||||
{
|
||||
displayName = "Stable Fit Shadows",
|
||||
referenceName = "SHADOWS_SPLIT_SPHERES",
|
||||
type = KeywordType.Boolean,
|
||||
definition = KeywordDefinition.MultiCompile,
|
||||
scope = KeywordScope.Global,
|
||||
stages = KeywordShaderStage.All,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4c99fd6915934b21a43efb6ca9915f7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -10,7 +10,8 @@ namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
abstract class TexturePreview : ObjectPreview
|
||||
{
|
||||
public static bool AnyActivePreviews { get; private set; }
|
||||
public static TexturePreview s_ActiveInstance;
|
||||
public bool Open { get; private set; }
|
||||
|
||||
UnityEditor.Editor _Editor;
|
||||
RenderTexture _RenderTexture;
|
||||
@@ -34,7 +35,11 @@ namespace WaveHarmonic.Crest.Editor
|
||||
|
||||
public override bool HasPreviewGUI()
|
||||
{
|
||||
AnyActivePreviews = false;
|
||||
if (Event.current != null && Event.current.type == EventType.Layout)
|
||||
{
|
||||
Open = false;
|
||||
}
|
||||
|
||||
return OriginalTexture;
|
||||
}
|
||||
|
||||
@@ -61,7 +66,8 @@ namespace WaveHarmonic.Crest.Editor
|
||||
|
||||
public override void OnPreviewGUI(Rect rect, GUIStyle background)
|
||||
{
|
||||
AnyActivePreviews = true;
|
||||
s_ActiveInstance = this;
|
||||
Open = true;
|
||||
|
||||
// This check is in original.
|
||||
if (Event.current.type == EventType.Repaint)
|
||||
@@ -69,6 +75,18 @@ namespace WaveHarmonic.Crest.Editor
|
||||
background.Draw(rect, false, false, false, false);
|
||||
}
|
||||
|
||||
if (Texture is Cubemap)
|
||||
{
|
||||
if (_Editor == null || _Editor.target != Texture)
|
||||
{
|
||||
Object.DestroyImmediate(_Editor);
|
||||
_Editor = UnityEditor.Editor.CreateEditor(Texture);
|
||||
}
|
||||
|
||||
_Editor.DrawPreview(rect);
|
||||
return;
|
||||
}
|
||||
|
||||
var descriptor = Texture.GetDescriptor();
|
||||
|
||||
if (Helpers.RenderTextureNeedsUpdating(descriptor, _OriginalDescriptor))
|
||||
@@ -111,6 +129,11 @@ namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
OnPreviewGUI(rect, background);
|
||||
|
||||
if (Texture is Cubemap)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Show pixel value in preview.
|
||||
_Slice = Development.Utility.GetPreviewSlice(_Editor, Texture);
|
||||
var color = Development.Utility.InspectPixel(rect, OriginalTexture, Flipped, _Slice);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
// How to use:
|
||||
@@ -79,7 +79,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
s_Messages[(int)type].Add(new() { _Message = message, _FixDescription = fixDescription, _Object = @object, _Action = action, _PropertyPath = property });
|
||||
}
|
||||
|
||||
public static void Suppressed(string message, string fixDescription, MessageType type, Object @object = null, FixValidation action = null, string property = null)
|
||||
public static void Suppressed(string _0, string _1, MessageType _2, Object _3 = null, FixValidation _4 = null, string _5 = null)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.HighDefinition;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using WaveHarmonic.Crest.Internal;
|
||||
using WaveHarmonic.Crest.Watercraft;
|
||||
@@ -17,7 +18,11 @@ namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
static class Validators
|
||||
{
|
||||
// HDRP sub-shader always first.
|
||||
const int k_SubShaderIndexHDRP = 0;
|
||||
internal static WaterRenderer Water => Utility.Water;
|
||||
static readonly System.Collections.Generic.List<Terrain> s_Terrains = new();
|
||||
static readonly ShaderTagId s_RenderPipelineShaderTagID = new("RenderPipeline");
|
||||
|
||||
[Validator(typeof(LodInput))]
|
||||
static bool ValidateTextureInput(LodInput target, ShowMessage messenger)
|
||||
@@ -94,6 +99,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
var material = materials[i];
|
||||
if (material == null) continue;
|
||||
if (material.shader == null) continue;
|
||||
|
||||
if (data._OverrideShaderPass && data._ShaderPassIndex > material.shader.passCount - 1)
|
||||
{
|
||||
@@ -119,6 +125,22 @@ namespace WaveHarmonic.Crest.Editor
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#if d_UnityHDRP
|
||||
if (RenderPipelineHelper.IsHighDefinition)
|
||||
{
|
||||
if (AssetDatabase.GetAssetPath(material.shader).EndsWith(".shadergraph") && material.shader.FindSubshaderTagValue(k_SubShaderIndexHDRP, s_RenderPipelineShaderTagID).name == "HDRenderPipeline")
|
||||
{
|
||||
messenger
|
||||
(
|
||||
"It appears you are using Shader Graph with the HDRP target. " +
|
||||
"Make sure to use the Built-In target instead for your Shader Graph to work.",
|
||||
"Remove the HDRP target and add the Built-In target.",
|
||||
MessageType.Warning, material.shader
|
||||
);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return isValid;
|
||||
@@ -126,18 +148,18 @@ namespace WaveHarmonic.Crest.Editor
|
||||
|
||||
static bool ValidateRendererLayer(GameObject gameObject, ShowMessage messenger, WaterRenderer water)
|
||||
{
|
||||
if (water != null && gameObject.layer != water.Layer)
|
||||
if (water != null && gameObject.layer != water.Surface.Layer)
|
||||
{
|
||||
var layerName = LayerMask.LayerToName(water.Layer);
|
||||
var layerName = LayerMask.LayerToName(water.Surface.Layer);
|
||||
messenger
|
||||
(
|
||||
$"The layer is not the same as the <i>{nameof(WaterRenderer)}.{nameof(WaterRenderer.Layer)} ({layerName})</i> which can cause problems if the <i>{layerName}</i> layer is excluded from any culling masks.",
|
||||
$"The layer is not the same as the <i>{nameof(WaterRenderer)}.{nameof(WaterRenderer.Surface)}.{nameof(SurfaceRenderer.Layer)} ({layerName})</i> which can cause problems if the <i>{layerName}</i> layer is excluded from any culling masks.",
|
||||
$"Set layer to <i>{layerName}</i>.",
|
||||
MessageType.Warning, gameObject,
|
||||
(_, _) =>
|
||||
{
|
||||
Undo.RecordObject(gameObject, $"Change Layer to {layerName}");
|
||||
gameObject.layer = water.Layer;
|
||||
gameObject.layer = water.Surface.Layer;
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -155,7 +177,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
return isValid;
|
||||
}
|
||||
|
||||
var material = water.Material;
|
||||
var material = water.Surface.Material;
|
||||
|
||||
if (material != null)
|
||||
{
|
||||
@@ -231,9 +253,38 @@ namespace WaveHarmonic.Crest.Editor
|
||||
return isValid;
|
||||
}
|
||||
|
||||
if (water != null && water.Material != null)
|
||||
#if !d_Crest_LegacyUnderwater
|
||||
if (target.AllCameras)
|
||||
{
|
||||
var material = water.Material;
|
||||
messenger
|
||||
(
|
||||
"<i>All Cameras</i> requires <i>Legacy Underwater</i> to be enabled.",
|
||||
"Either disable <i>All Cameras</i> or enable <i>Project Settings > Crest > Legacy Underwater</i>.",
|
||||
MessageType.Warning, water
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (target.Material != null)
|
||||
{
|
||||
var material = target.Material;
|
||||
|
||||
if (material.shader.name.StartsWithNoAlloc("Crest/") && material.shader.name != "Crest/Underwater")
|
||||
{
|
||||
messenger
|
||||
(
|
||||
$"The material {material.name} assigned to Underwater has the wrong shader ({material.shader.name}).",
|
||||
"Use a material with the correct shader (Crest/Underwater).",
|
||||
MessageType.Error, water
|
||||
);
|
||||
|
||||
isValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (water != null && water.Surface.Material != null)
|
||||
{
|
||||
var material = water.Surface.Material;
|
||||
|
||||
var cullModeName =
|
||||
#if d_UnityURP
|
||||
@@ -290,6 +341,34 @@ namespace WaveHarmonic.Crest.Editor
|
||||
return isValid;
|
||||
}
|
||||
|
||||
static bool Validate(Meniscus target, ShowMessage messenger, WaterRenderer water)
|
||||
{
|
||||
var isValid = true;
|
||||
|
||||
if (!target._Enabled)
|
||||
{
|
||||
return isValid;
|
||||
}
|
||||
|
||||
if (target._Material == null)
|
||||
{
|
||||
messenger
|
||||
(
|
||||
"The meniscus material is missing. The meniscus will not render.",
|
||||
"Add the default material or your own.",
|
||||
MessageType.Warning,
|
||||
water,
|
||||
(so, sp) =>
|
||||
{
|
||||
sp.objectReferenceValue = AssetDatabase.LoadAssetAtPath<Material>(Meniscus.k_MaterialPath);
|
||||
},
|
||||
$"{nameof(WaterRenderer._Meniscus)}.{nameof(Meniscus._Material)}"
|
||||
);
|
||||
}
|
||||
|
||||
return isValid;
|
||||
}
|
||||
|
||||
[Validator(typeof(WaterRenderer))]
|
||||
static bool Validate(WaterRenderer target, ShowMessage messenger)
|
||||
{
|
||||
@@ -299,6 +378,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
|
||||
isValid = isValid && Validate(target._Underwater, messenger, target);
|
||||
isValid = isValid && Validate(target._Reflections, messenger, target);
|
||||
isValid = isValid && Validate(target._Meniscus, messenger, target);
|
||||
isValid = isValid && ValidateNoRotation(target, target.transform, messenger);
|
||||
isValid = isValid && ValidateNoScale(target, target.transform, messenger);
|
||||
|
||||
@@ -326,7 +406,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
if (target.Material == null)
|
||||
if (target.Surface.Material == null)
|
||||
{
|
||||
messenger
|
||||
(
|
||||
@@ -339,33 +419,33 @@ namespace WaveHarmonic.Crest.Editor
|
||||
}
|
||||
else
|
||||
{
|
||||
isValid = ValidateWaterMaterial(target, messenger, water, target.Material) && isValid;
|
||||
isValid = ValidateWaterMaterial(target, messenger, water, target.Surface.Material) && isValid;
|
||||
|
||||
if (RenderPipelineHelper.IsHighDefinition && target.Material.GetFloat("_RefractionModel") > 0)
|
||||
if (RenderPipelineHelper.IsHighDefinition && target.Surface.Material.GetFloat("_RefractionModel") > 0)
|
||||
{
|
||||
messenger
|
||||
(
|
||||
$"<i>Refraction Model</i> is not <i>None</i> for <i>{target.Material}</i>. " +
|
||||
$"<i>Refraction Model</i> is not <i>None</i> for <i>{target.Surface.Material}</i>. " +
|
||||
"This is set by default so it is available in the inspector, " +
|
||||
"but it incurs an overhead and will produce a dark edge at the edge of the viewport (see <i>Screen Space Refraction > Screen Weight Distance</i>). " +
|
||||
"Enabling the refraction model is only useful to allow volumetric clouds to render over the water surface when view from above. " +
|
||||
"The refraction model has no effect on refractions.",
|
||||
$"Set <i>Refraction Model</i> to <i>None</i>.",
|
||||
MessageType.Info, target.Material
|
||||
MessageType.Info, target.Surface.Material
|
||||
);
|
||||
}
|
||||
|
||||
if (RenderPipelineHelper.IsHighDefinition && target.Material.HasFloat("_TransparentWritingMotionVec") && target.WriteMotionVectors != (target.Material.GetFloat("_TransparentWritingMotionVec") == 1f))
|
||||
if (RenderPipelineHelper.IsHighDefinition && target.Surface.Material.HasFloat("_TransparentWritingMotionVec") && target.WriteMotionVectors != (target.Surface.Material.GetFloat("_TransparentWritingMotionVec") == 1f))
|
||||
{
|
||||
messenger
|
||||
(
|
||||
$"<i>Water Renderer > Surface Renderer > Motion Vectors</i> and <i>Transparent Writes Motion Vectors</i> on <i>{target.Material}</i> do not match. ",
|
||||
$"<i>Water Renderer > Surface Renderer > Motion Vectors</i> and <i>Transparent Writes Motion Vectors</i> on <i>{target.Surface.Material}</i> do not match. ",
|
||||
$"Either disable or enable both <i>Water Renderer > Surface Renderer > Motion Vectors</i> and <i>Transparent Writes Motion Vectors</i>",
|
||||
MessageType.Info, target.Material
|
||||
MessageType.Info, target.Surface.Material
|
||||
);
|
||||
}
|
||||
|
||||
ValidateMaterialParent(target._VolumeMaterial, target.Material, messenger);
|
||||
ValidateMaterialParent(target.Surface.VolumeMaterial, target.Surface.Material, messenger);
|
||||
}
|
||||
|
||||
if (Object.FindObjectsByType<WaterRenderer>(FindObjectsInactive.Exclude, FindObjectsSortMode.None).Length > 1)
|
||||
@@ -403,13 +483,13 @@ namespace WaveHarmonic.Crest.Editor
|
||||
}
|
||||
|
||||
// We need to find hidden probes too, but do not include assets.
|
||||
if (Resources.FindObjectsOfTypeAll<ReflectionProbe>().Where(x => !EditorUtility.IsPersistent(x)).Count() > 0)
|
||||
if (Resources.FindObjectsOfTypeAll<ReflectionProbe>().Count(x => !EditorUtility.IsPersistent(x)) > 0)
|
||||
{
|
||||
messenger
|
||||
(
|
||||
"There are reflection probes in the scene. These can cause tiling to appear on the water surface if not set up correctly.",
|
||||
"For reflections probes that affect the water, they will either need to cover the visible water tiles or water tiles need to ignore reflection probes (can done done with <i>Water Tile Prefab</i> field). " +
|
||||
$"For all reflection probles that include the <i>{LayerMask.LayerToName(target.Layer)}</i> layer, make sure they are above the water surface as underwater reflections are not supported.",
|
||||
$"For all reflection probles that include the <i>{LayerMask.LayerToName(target.Surface.Layer)}</i> layer, make sure they are above the water surface as underwater reflections are not supported.",
|
||||
MessageType.Info, target
|
||||
);
|
||||
}
|
||||
@@ -470,7 +550,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
}
|
||||
|
||||
// For safety.
|
||||
if (target != null && target.Material != null)
|
||||
if (target != null && target.Surface.Material != null)
|
||||
{
|
||||
foreach (var simulation in target.Simulations)
|
||||
{
|
||||
@@ -488,7 +568,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
);
|
||||
}
|
||||
|
||||
if (target.Viewer == null)
|
||||
if (target.Viewer == null && !target.IsRunningWithoutGraphics)
|
||||
{
|
||||
messenger
|
||||
(
|
||||
@@ -503,7 +583,10 @@ namespace WaveHarmonic.Crest.Editor
|
||||
#if d_UnityHDRP
|
||||
if (RenderPipelineHelper.IsHighDefinition)
|
||||
{
|
||||
var hdAsset = GraphicsSettings.currentRenderPipeline as UnityEngine.Rendering.HighDefinition.HDRenderPipelineAsset;
|
||||
var material = target.Surface.Material;
|
||||
var camera = target._Camera != null ? target._Camera : Camera.main;
|
||||
var hdCamera = camera != null ? HDCamera.GetOrCreate(camera) : null;
|
||||
var hdAsset = GraphicsSettings.currentRenderPipeline as HDRenderPipelineAsset;
|
||||
var mvs = hdAsset.currentPlatformRenderPipelineSettings.supportMotionVectors;
|
||||
|
||||
// Only check the RP asset for now.
|
||||
@@ -518,6 +601,50 @@ namespace WaveHarmonic.Crest.Editor
|
||||
MessageType.Info, target
|
||||
);
|
||||
}
|
||||
|
||||
if (!hdAsset.currentPlatformRenderPipelineSettings.supportCustomPass)
|
||||
{
|
||||
messenger
|
||||
(
|
||||
"Custom passes are disabled. Underwater and other features require them to work.",
|
||||
"Enabled them on the global asset.",
|
||||
MessageType.Error, hdCamera.camera
|
||||
);
|
||||
}
|
||||
|
||||
if (target.RenderBeforeTransparency && WaterRenderer.s_CameraMSAA)
|
||||
{
|
||||
messenger
|
||||
(
|
||||
$"The water injection point is before transparency and MSAA is enabled for a camera. This combination is not currently supported for HDRP.",
|
||||
"Disable MSAA or change the water injection point.",
|
||||
MessageType.Error, target
|
||||
);
|
||||
}
|
||||
|
||||
// Seems that logging is too early for these. And edit mode has false positives.
|
||||
if (Application.isPlaying && messenger == ValidatedHelper.HelpBox)
|
||||
{
|
||||
if (hdCamera?.frameSettings.IsEnabled(FrameSettingsField.CustomPass) == false)
|
||||
{
|
||||
messenger
|
||||
(
|
||||
$"Custom passes are disabled for the primary camera ({camera}). Underwater and other features require them to work.",
|
||||
"Enable them in the camera frame settings on the camera or the default frame settings in the global settings.",
|
||||
MessageType.Error, hdCamera.camera
|
||||
);
|
||||
}
|
||||
|
||||
if (hdCamera?.frameSettings.IsEnabled(FrameSettingsField.Refraction) == false && material != null && SurfaceRenderer.IsTransparent(material))
|
||||
{
|
||||
messenger
|
||||
(
|
||||
"Refraction is disabled. Transparency requires it to work.",
|
||||
"Enable it in the camera frame settings on the camera, or the default frame settings in the global settings.",
|
||||
MessageType.Error, hdCamera.camera
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // d_UnityHDRP
|
||||
|
||||
@@ -541,11 +668,11 @@ namespace WaveHarmonic.Crest.Editor
|
||||
}
|
||||
#endif // d_UnityURP
|
||||
|
||||
if (!RenderPipelineHelper.IsHighDefinition && target.Material != null)
|
||||
if (!RenderPipelineHelper.IsHighDefinition && target.Surface.Material != null)
|
||||
{
|
||||
if (!target.AllowRenderQueueSorting && !System.Enum.IsDefined(typeof(RenderQueue), target.Material.renderQueue))
|
||||
if (!target.Surface.AllowRenderQueueSorting && !System.Enum.IsDefined(typeof(RenderQueue), target.Surface.Material.renderQueue))
|
||||
{
|
||||
var field = nameof(WaterRenderer.AllowRenderQueueSorting).Pretty().Italic();
|
||||
var field = nameof(SurfaceRenderer.AllowRenderQueueSorting).Pretty().Italic();
|
||||
messenger
|
||||
(
|
||||
$"The render queue has a sub-sort applied, but {field} is not enabled. Sub-sorting will not work.",
|
||||
@@ -563,11 +690,13 @@ namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
var isValid = true;
|
||||
|
||||
var water = Water;
|
||||
|
||||
if (Object.FindObjectsByType<WaterRenderer>(FindObjectsInactive.Include, FindObjectsSortMode.None).Length == 0)
|
||||
{
|
||||
messenger
|
||||
(
|
||||
$"Water body <i>{target.gameObject.name}</i> requires an water renderer component to be present.",
|
||||
$"Water body <i>{target.gameObject.name}</i> requires a <i>{nameof(WaterRenderer)}</i> component to be present.",
|
||||
$"Create a separate GameObject and add an <i>{nameof(WaterRenderer)}</i> component to it.",
|
||||
MessageType.Error, target
|
||||
);
|
||||
@@ -595,6 +724,25 @@ namespace WaveHarmonic.Crest.Editor
|
||||
|
||||
isValid = isValid && ValidateNoRotation(target, target.transform, messenger);
|
||||
|
||||
if (target.Clipped && water != null)
|
||||
{
|
||||
// Validate main material, then overriden material.
|
||||
ValidateLod(OptionalLod.Get(typeof(ClipLod)), messenger, water);
|
||||
ValidateLod(OptionalLod.Get(typeof(ClipLod)), messenger, water, material: target._Material);
|
||||
|
||||
if (water.ClipLod.DefaultClippingState == DefaultClippingState.NothingClipped)
|
||||
{
|
||||
messenger
|
||||
(
|
||||
$"The {nameof(ClipLod.DefaultClippingState)} on the {nameof(WaterRenderer)} is set to {DefaultClippingState.NothingClipped}. " +
|
||||
$"The {nameof(WaterBody.Clipped)} option will have no effect.",
|
||||
$"Disable {nameof(WaterBody.Clipped)} or set {nameof(ClipLod.DefaultClippingState)} to {DefaultClippingState.NothingClipped}.",
|
||||
MessageType.Warning,
|
||||
water
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return isValid;
|
||||
}
|
||||
|
||||
@@ -602,7 +750,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
/// <summary>
|
||||
/// Does validation for a feature on the water component and on the material
|
||||
/// </summary>
|
||||
internal static bool ValidateLod(OptionalLod target, ShowMessage messenger, WaterRenderer water, string dependent = null)
|
||||
internal static bool ValidateLod(OptionalLod target, ShowMessage messenger, WaterRenderer water, string dependent = null, Material material = null, Object context = null)
|
||||
{
|
||||
var isValid = true;
|
||||
|
||||
@@ -620,7 +768,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
dependentClause = $", as {dependent} needs it.";
|
||||
}
|
||||
|
||||
if (!simulation._Enabled)
|
||||
if (!simulation._Enabled && material == null)
|
||||
{
|
||||
messenger
|
||||
(
|
||||
@@ -645,7 +793,10 @@ namespace WaveHarmonic.Crest.Editor
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
var material = water.Material;
|
||||
if (material == null)
|
||||
{
|
||||
material = water.Surface.Material;
|
||||
}
|
||||
|
||||
if (target.HasMaterialToggle && material != null)
|
||||
{
|
||||
@@ -709,7 +860,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
}
|
||||
|
||||
// These checks are not necessary for our material but there may be custom materials.
|
||||
if (!water.Material.HasProperty(target.MaterialProperty))
|
||||
if (!water.Surface.Material.HasProperty(target.MaterialProperty))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -717,14 +868,14 @@ namespace WaveHarmonic.Crest.Editor
|
||||
var feature = target.GetLod(water);
|
||||
|
||||
// There is only a problem if there is a mismatch.
|
||||
if (feature.Enabled == (water.Material.GetFloat(target.MaterialProperty) == 1f))
|
||||
if (feature._Enabled == (water.Surface.Material.GetFloat(target.MaterialProperty) == 1f))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (feature.Enabled)
|
||||
if (feature._Enabled)
|
||||
{
|
||||
ShowMaterialValidationMessage(target, water.Material, messenger);
|
||||
ShowMaterialValidationMessage(target, water.Surface.Material, messenger);
|
||||
}
|
||||
else if (messenger != DebugLog)
|
||||
{
|
||||
@@ -756,7 +907,7 @@ namespace WaveHarmonic.Crest.Editor
|
||||
);
|
||||
}
|
||||
|
||||
if (target.Blend == LodInputBlend.AlphaClip && target.Mode is not LodInputMode.Texture or LodInputMode.Paint)
|
||||
if (target.Blend == LodInputBlend.AlphaClip && target.Mode is not (LodInputMode.Texture or LodInputMode.Paint))
|
||||
{
|
||||
messenger
|
||||
(
|
||||
@@ -999,19 +1150,20 @@ namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
var isValid = true;
|
||||
|
||||
var camera = target._Camera;
|
||||
if (camera != null && camera.targetTexture != null && target.RealtimeTexture != null)
|
||||
messenger
|
||||
(
|
||||
"If you see an error <i>RenderTexture color format cannot be set to a depth/stencil format</i> or <i>RenderTexture.Create failed</i>, this is likely a bug with Unity (grab pass) or third-party, as they may be registered to execute a custom pass to the DepthProbe camera.", "", MessageType.Info, target
|
||||
);
|
||||
|
||||
if (target.Outdated && (messenger != DebugLog || WaterRendererEditor.ManualValidation))
|
||||
{
|
||||
if (target.Outdated)
|
||||
{
|
||||
messenger
|
||||
(
|
||||
"<i>Depth Probe</i> is outdated.",
|
||||
"Click <i>Populate</i> or re-bake the probe to bring the probe up-to-date with component changes.",
|
||||
MessageType.Warning, target,
|
||||
(_, _) => target.Populate()
|
||||
);
|
||||
}
|
||||
messenger
|
||||
(
|
||||
"<i>Depth Probe</i> is outdated.",
|
||||
"Click <i>Populate</i> or re-bake the probe to bring the probe up-to-date with component changes.",
|
||||
MessageType.Warning, target,
|
||||
(_, _) => target.Populate()
|
||||
);
|
||||
}
|
||||
|
||||
if (target.Type == DepthProbeMode.Baked)
|
||||
@@ -1042,12 +1194,34 @@ namespace WaveHarmonic.Crest.Editor
|
||||
messenger
|
||||
(
|
||||
"No layers specified for rendering into depth probe.",
|
||||
"Specify one or may layers using the Layers field.",
|
||||
"Specify one or many layers using the Layers field.",
|
||||
MessageType.Error, target
|
||||
);
|
||||
|
||||
isValid = false;
|
||||
}
|
||||
#if d_Unity_Terrain
|
||||
else
|
||||
{
|
||||
Terrain.GetActiveTerrains(s_Terrains);
|
||||
foreach (var terrain in s_Terrains)
|
||||
{
|
||||
if (Helpers.MaskIncludesLayer(target.Layers, terrain.gameObject.layer))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
messenger
|
||||
(
|
||||
$"There are terrains on a layer that is not in {nameof(DepthProbe)}.{nameof(DepthProbe.Layers)}.",
|
||||
"This is typically mistake leading to no data (ie no shorelines). Please ignore if intentional.",
|
||||
MessageType.Info, target
|
||||
);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif // d_Unity_Terrain
|
||||
|
||||
if (target._Debug._ForceAlwaysUpdateDebug)
|
||||
{
|
||||
@@ -1196,6 +1370,19 @@ namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
isValid = isValid && ValidateSignedDistanceFieldsLod(messenger, water, "Generate Signed Distance Field");
|
||||
}
|
||||
|
||||
if (water.DepthLod.IncludeTerrainHeight && Object.FindAnyObjectByType<Terrain>(FindObjectsInactive.Include) != null)
|
||||
{
|
||||
messenger
|
||||
(
|
||||
"The Water Depth data is configured to automatically include terrain height via <i>Include Terrain Height</i>. " +
|
||||
"Using a DepthProbe is still valid to capture non-terrain details like rocks. " +
|
||||
"But typically, if you are using a DepthProbe, it is best to capture the terrain too, as it is more accurate. " +
|
||||
"One reason to use a DepthProbe together with the auto capture is for better real-time/on-demand depth capture performance.",
|
||||
string.Empty,
|
||||
MessageType.Info, water
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,11 @@
|
||||
"expression": "",
|
||||
"define": "d_ModuleUnityDirector"
|
||||
},
|
||||
{
|
||||
"name": "com.unity.modules.terrain",
|
||||
"expression": "",
|
||||
"define": "d_Unity_Terrain"
|
||||
},
|
||||
{
|
||||
"name": "com.unity.postprocessing",
|
||||
"expression": "",
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d8df6c721738dc4e9406af4d13e5e63
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,6 @@
|
||||
// Shader Graph Complete
|
||||
// Copyright © 2025 Wave Harmonic. All rights reserved.
|
||||
|
||||
$include("Templates/SharedCode.template.hlsl")
|
||||
|
||||
$VertexDescriptionInputs.TimeParameters: #define GRAPH_VERTEX_USES_TIME_PARAMETERS_INPUT
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee5a966d356084782a3e3e78ec78b8e3
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
#pragma kernel CrestVisualizeNegativeValues_Scalar
|
||||
|
||||
@@ -62,10 +62,7 @@ Shader "Hidden/Crest/Editor/Water Level (Depth)"
|
||||
#pragma vertex Vertex
|
||||
#pragma fragment Fragment
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl"
|
||||
#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl"
|
||||
|
||||
#include "Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.hlsl"
|
||||
ENDHLSL
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
Shader "Hidden/Crest/Editor/WaterProxy"
|
||||
@@ -8,6 +8,7 @@ Shader "Hidden/Crest/Editor/WaterProxy"
|
||||
Tags { "RenderType"="Transparent" "Queue"="Transparent"}
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZWrite Off
|
||||
Cull Off
|
||||
|
||||
Pass
|
||||
{
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 382a5d8b1147b4e78a31353c022b8e15, type: 3}
|
||||
m_Name: WavesSwell
|
||||
m_EditorClassIdentifier:
|
||||
_Version: 0
|
||||
_WaveDirectionVariance: 90
|
||||
_GravityScale: 1
|
||||
_Multiplier: 1
|
||||
_PowerLogarithmicScales:
|
||||
- -7.10794
|
||||
- -6.42794
|
||||
- -5.93794
|
||||
- -5.27794
|
||||
- -4.67794
|
||||
- -3.71794
|
||||
- -3.17794
|
||||
- -2.60794
|
||||
- -1.93794
|
||||
- -1.11794
|
||||
- -0.85794
|
||||
- -0.36794
|
||||
- 0.04206
|
||||
- -8
|
||||
_PowerDisabled: 0101010101010101000000000000
|
||||
_ChopScales:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
_GravityScales:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
_Chop: 1.6
|
||||
_ShowAdvancedControls: 0
|
||||
_Model: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: efa03f442951949c7bbfadb22765f653
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Meniscus
|
||||
m_Shader: {fileID: 4800000, guid: ec7c774912c6f4b3cb6d73444cdedeca, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- d_Crest_Lighting
|
||||
- d_Crest_Refraction
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs: []
|
||||
m_Ints:
|
||||
- _Crest_LightingEnabled: 1
|
||||
- _Crest_RefractionEnabled: 1
|
||||
m_Floats:
|
||||
- _Crest_Radius: 0.01
|
||||
- _Crest_RefractionStrength: 0.2
|
||||
m_Colors: []
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 238e45299a5ec46308e9bf99ddf67963
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,92 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-3046556431833965186
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 0
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Water (Flow)
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 00ffe7d0b7161420897069dc6e12822c, type: 3}
|
||||
m_Parent: {fileID: 2100000, guid: 8ab064b6606504a55b489af2787350c2, type: 2}
|
||||
m_ModifiedSerializedProperties: 26
|
||||
m_ValidKeywords:
|
||||
- CREST_FLOW_ON
|
||||
- _ALPHATEST_ON
|
||||
- _BUILTIN_ALPHATEST_ON
|
||||
- _BUILTIN_AlphaClip
|
||||
- _BUILTIN_SURFACE_TYPE_TRANSPARENT
|
||||
- _BUILTIN_TRANSPARENT_RECEIVES_SHADOWS
|
||||
- _DOUBLESIDED_ON
|
||||
- _ENABLE_FOG_ON_TRANSPARENT
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
- _TRANSPARENT_WRITES_MOTION_VEC
|
||||
m_InvalidKeywords:
|
||||
- _EMISSION
|
||||
m_LightmapFlags: 2
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 1
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
MotionVector: User
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses:
|
||||
- TransparentDepthPostpass
|
||||
- TransparentBackface
|
||||
- RayTracingPrepass
|
||||
- MOTIONVECTORS
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs: []
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- CREST_FLOW: 1
|
||||
- _SrcBlend: 5
|
||||
m_Colors: []
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &84831097882938775
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 13
|
||||
hdPluginSubTargetMaterialVersions:
|
||||
m_Keys: []
|
||||
m_Values:
|
||||
--- !u!114 &8072045821928201339
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 10
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b26ad6c6869b4091881e76c99363dac
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -12,16 +12,16 @@ Material:
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- d_Crest_NoMaskDepth
|
||||
- d_Dithering
|
||||
- d_Meniscus
|
||||
m_InvalidKeywords:
|
||||
- _ALPHATEST_ON
|
||||
- _BUILTIN_ALPHATEST_ON
|
||||
- _BUILTIN_AlphaClip
|
||||
- _BUILTIN_SURFACE_TYPE_TRANSPARENT
|
||||
- _BUILTIN_TRANSPARENT_RECEIVES_SHADOWS
|
||||
- _DOUBLESIDED_ON
|
||||
- _ENABLE_FOG_ON_TRANSPARENT
|
||||
- _SPECULAR_SETUP
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
- _TRANSPARENT_WRITES_MOTION_VEC
|
||||
m_LightmapFlags: 4
|
||||
@@ -45,7 +45,6 @@ Material:
|
||||
m_Ints:
|
||||
- _Crest_DataSliceOffset: 13
|
||||
- _Crest_DitheringEnabled: 1
|
||||
- _Crest_MeniscusEnabled: 1
|
||||
- _Crest_Version: 0
|
||||
m_Floats:
|
||||
- CREST_FLOW: 0
|
||||
@@ -69,7 +68,7 @@ Material:
|
||||
- _Crest_ShadowsAffectsAmbientFactor: 0.5
|
||||
- _Crest_SunBoost: 2
|
||||
m_Colors:
|
||||
- _Crest_AbsorptionColor: {r: 0.34162676, g: 0.6954546, b: 0.85, a: 0.1019608}
|
||||
- _Crest_Scattering: {r: 0, g: 0.09803919, b: 0.19999996, a: 1}
|
||||
- _Crest_AbsorptionColor: {r: 0.46502313, g: 0.4716981, b: 0.4662141, a: 0.1019608}
|
||||
- _Crest_Scattering: {r: 0.11320752, g: 0.11320752, b: 0.11320752, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
|
||||
@@ -45,9 +45,9 @@ Material:
|
||||
- _BUILTIN_ALPHATEST_ON
|
||||
- _BUILTIN_AlphaClip
|
||||
- _BUILTIN_SURFACE_TYPE_TRANSPARENT
|
||||
- _BUILTIN_TRANSPARENT_RECEIVES_SHADOWS
|
||||
- _DOUBLESIDED_ON
|
||||
- _ENABLE_FOG_ON_TRANSPARENT
|
||||
- _SPECULAR_SETUP
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
- _TRANSPARENT_WRITES_MOTION_VEC
|
||||
m_InvalidKeywords: []
|
||||
@@ -70,29 +70,20 @@ Material:
|
||||
m_TexEnvs: []
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- CREST_FLOW: 0
|
||||
- _AlphaClip: 1
|
||||
- _AlphaDstBlend: 10
|
||||
- _BUILTIN_DstBlend: 10
|
||||
- _BUILTIN_QueueControl: 0
|
||||
- _BUILTIN_SrcBlend: 5
|
||||
- _BUILTIN_ZWrite: 1
|
||||
- _Crest_AlbedoEnabled: 0
|
||||
- _Crest_CausticsEnabled: 1
|
||||
- _Crest_FoamEnabled: 1
|
||||
- _Crest_NormalMapEnabled: 1
|
||||
- _Crest_FoamEnabled: 0
|
||||
- _Crest_PlanarReflectionsEnabled: 1
|
||||
- _Crest_RefractionStrength: 1
|
||||
- _Crest_SSSEnabled: 0
|
||||
- _Crest_ShadowsEnabled: 1
|
||||
- _CullMode: 0
|
||||
- _CullModeForward: 0
|
||||
- _DstBlend: 10
|
||||
- _QueueControl: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _RefractionModel: 0
|
||||
- _SrcBlend: 5
|
||||
- _WorkflowMode: 0
|
||||
- _ZTestGBuffer: 3
|
||||
m_Colors:
|
||||
- _DoubleSidedConstants: {r: 1, g: 1, b: 1, a: 0}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
// 9160b2d47f1cb3d7559ed4fafa79e52b9448ef2a6d863948fe3c4eeddcd958da
|
||||
|
||||
namespace WaveHarmonic.Crest
|
||||
{
|
||||
static class Constants
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
@@ -32,10 +32,11 @@ namespace WaveHarmonic.Crest
|
||||
get
|
||||
{
|
||||
var color = Color.clear;
|
||||
var surface = _Water.Surface;
|
||||
|
||||
if (_Water.Material != null)
|
||||
if (surface.Material != null && surface.Material.HasVector(WaterRenderer.ShaderIDs.s_Absorption))
|
||||
{
|
||||
color = _Water.Material.GetVector(WaterRenderer.ShaderIDs.s_Absorption);
|
||||
color = surface.Material.GetVector(WaterRenderer.ShaderIDs.s_Absorption);
|
||||
color.a = 0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
@@ -20,55 +20,39 @@ namespace WaveHarmonic.Crest
|
||||
/// <summary>
|
||||
/// The source of collisions (ie water shape).
|
||||
/// </summary>
|
||||
[@GenerateDoc]
|
||||
public enum CollisionSource
|
||||
{
|
||||
/// <summary>
|
||||
/// No collision source. Flat water.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.CollisionSource.None"/>
|
||||
[Tooltip("No collision source. Flat water.")]
|
||||
None = 0,
|
||||
|
||||
// GerstnerWavesCPU = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Uses AsyncGPUReadback to retrieve data from GPU to CPU.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is the most optimal approach.
|
||||
/// </remarks>
|
||||
/// <inheritdoc cref="Generated.CollisionSource.GPU"/>
|
||||
[Tooltip("Uses AsyncGPUReadback to retrieve data from GPU to CPU.\n\nThis is the most optimal approach.")]
|
||||
GPU = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Computes data entirely on the CPU.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.CollisionSource.CPU"/>
|
||||
[Tooltip("Computes data entirely on the CPU.")]
|
||||
CPU = 3,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The pass to render displacement into.
|
||||
/// </summary>
|
||||
[@GenerateDoc]
|
||||
public enum DisplacementPass
|
||||
{
|
||||
/// <summary>
|
||||
/// Displacement that is dependent on an LOD (eg waves).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Uses filtering to determine which LOD to write to.
|
||||
/// </remarks>
|
||||
/// <inheritdoc cref="Generated.DisplacementPass.LodDependent"/>
|
||||
[Tooltip("Displacement that is dependent on an LOD (eg waves).\n\nUses filtering to determine which LOD to write to.")]
|
||||
LodDependent,
|
||||
|
||||
/// <summary>
|
||||
/// Renders to all LODs.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.DisplacementPass.LodIndependent"/>
|
||||
[Tooltip("Renders to all LODs.")]
|
||||
LodIndependent,
|
||||
|
||||
/// <summary>
|
||||
/// Renders to all LODs, but as a separate pass.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Typically used to render visual displacement which does not affect collisions.
|
||||
/// </remarks>
|
||||
/// <inheritdoc cref="Generated.DisplacementPass.LodIndependentLast"/>
|
||||
[Tooltip("Renders to all LODs, but as a separate pass.\n\nTypically used to render visual displacement which does not affect collisions.")]
|
||||
[InspectorName("Lod Independent (Last)")]
|
||||
LodIndependentLast,
|
||||
@@ -78,35 +62,24 @@ namespace WaveHarmonic.Crest
|
||||
/// Flags to enable extra collsion layers.
|
||||
/// </summary>
|
||||
[System.Flags]
|
||||
[@GenerateDoc]
|
||||
public enum CollisionLayers
|
||||
{
|
||||
// NOTE: numbers must be in order for defaults to work (everything first).
|
||||
|
||||
/// <summary>
|
||||
/// All layers.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.CollisionLayers.Everything"/>
|
||||
[Tooltip("All layers.")]
|
||||
Everything = -1,
|
||||
|
||||
/// <summary>
|
||||
/// No extra layers (ie single layer).
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.CollisionLayers.Nothing"/>
|
||||
[Tooltip("No extra layers (ie single layer).")]
|
||||
Nothing,
|
||||
|
||||
/// <summary>
|
||||
/// Separate layer for dynamic waves.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Dynamic waves are normally combined together for efficiency. By enabling this
|
||||
/// layer, dynamic waves are combined and added in a separate pass.
|
||||
/// </remarks>
|
||||
/// <inheritdoc cref="Generated.CollisionLayers.DynamicWaves"/>
|
||||
[Tooltip("Separate layer for dynamic waves.\n\nDynamic waves are normally combined together for efficiency. By enabling this layer, dynamic waves are combined and added in a separate pass.")]
|
||||
DynamicWaves = 1 << 1,
|
||||
|
||||
/// <summary>
|
||||
/// Extra displacement layer for visual displacement.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.CollisionLayers.Displacement"/>
|
||||
[Tooltip("Extra displacement layer for visual displacement.")]
|
||||
Displacement = 1 << 2,
|
||||
}
|
||||
@@ -180,6 +153,9 @@ namespace WaveHarmonic.Crest
|
||||
internal BakedWaveData _BakedWaveData;
|
||||
|
||||
|
||||
const string k_DrawCombine = "Combine";
|
||||
|
||||
|
||||
internal static new partial class ShaderIDs
|
||||
{
|
||||
public static readonly int s_WaveBuffer = Shader.PropertyToID("_Crest_WaveBuffer");
|
||||
@@ -201,7 +177,6 @@ namespace WaveHarmonic.Crest
|
||||
private protected override bool NeedToReadWriteTextureData => true;
|
||||
private protected override Color ClearColor => Color.black;
|
||||
internal override int BufferCount => _Water.WriteMotionVectors ? 2 : 1;
|
||||
internal override bool RunsInHeadless => true;
|
||||
|
||||
// NOTE: Tried RGB111110Float but errors becomes visible. One option would be to use a UNORM setup.
|
||||
private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch
|
||||
@@ -259,7 +234,7 @@ namespace WaveHarmonic.Crest
|
||||
|
||||
internal override void BuildCommandBuffer(WaterRenderer water, CommandBuffer buffer)
|
||||
{
|
||||
buffer.BeginSample(Name);
|
||||
buffer.BeginSample(ID);
|
||||
|
||||
FlipBuffers();
|
||||
|
||||
@@ -267,8 +242,7 @@ namespace WaveHarmonic.Crest
|
||||
|
||||
// Get temporary buffer to store waves. They will be copied in the combine pass.
|
||||
buffer.GetTemporaryRT(ShaderIDs.s_WaveBuffer, DataTexture.descriptor);
|
||||
buffer.SetRenderTarget(ShaderIDs.s_WaveBuffer, 0, CubemapFace.Unknown, -1);
|
||||
buffer.ClearRenderTarget(false, true, ClearColor);
|
||||
CoreUtils.SetRenderTarget(buffer, ShaderIDs.s_WaveBuffer, ClearFlag.Color, ClearColor);
|
||||
|
||||
// LOD dependent data.
|
||||
// Write to per-octave _WaveBuffers. Not the same as _AnimatedWaves.
|
||||
@@ -304,7 +278,7 @@ namespace WaveHarmonic.Crest
|
||||
}
|
||||
}
|
||||
|
||||
buffer.BeginSample("Combine");
|
||||
buffer.BeginSample(k_DrawCombine);
|
||||
|
||||
// Combine waves.
|
||||
for (var slice = lastSlice; slice >= 0; slice--)
|
||||
@@ -327,7 +301,7 @@ namespace WaveHarmonic.Crest
|
||||
wrapper.Dispatch(threadSize, threadSize, 1);
|
||||
}
|
||||
|
||||
buffer.EndSample("Combine");
|
||||
buffer.EndSample(k_DrawCombine);
|
||||
}
|
||||
|
||||
buffer.ReleaseTemporaryRT(ShaderIDs.s_WaveBuffer);
|
||||
@@ -372,16 +346,22 @@ namespace WaveHarmonic.Crest
|
||||
|
||||
// Query collisions including only Animated Waves.
|
||||
// Requires copying the water level.
|
||||
Provider.UpdateQueries(_Water, CollisionLayer.AfterAnimatedWaves);
|
||||
// Guard not required, as Query already does this check before returning the
|
||||
// correct provider, thus nothing would be reqistered nor dispatched. But seems
|
||||
// right to do so anyhow.
|
||||
if (_CollisionLayers != CollisionLayers.Nothing)
|
||||
{
|
||||
Provider.UpdateQueries(_Water, CollisionLayer.AfterAnimatedWaves);
|
||||
}
|
||||
|
||||
// Transfer Dynamic Waves to Animated Waves.
|
||||
if (_CollisionLayers.HasFlag(CollisionLayers.DynamicWaves) && _Water._DynamicWavesLod.Enabled)
|
||||
{
|
||||
buffer.BeginSample("Combine");
|
||||
buffer.BeginSample(k_DrawCombine);
|
||||
// Clearing not required as we overwrite enter texture.
|
||||
buffer.GetTemporaryRT(ShaderIDs.s_DynamicWavesTarget, DataTexture.descriptor);
|
||||
|
||||
var wrapper = new PropertyWrapperCompute(buffer, _CombineShader, 8);
|
||||
var wrapper = new PropertyWrapperCompute(buffer, _CombineShader, 9);
|
||||
|
||||
wrapper.SetTexture(ShaderIDs.s_DynamicWavesTarget, ShaderIDs.s_DynamicWavesTarget);
|
||||
|
||||
@@ -392,22 +372,28 @@ namespace WaveHarmonic.Crest
|
||||
{
|
||||
wrapper.SetInteger(Lod.ShaderIDs.s_LodIndex, slice);
|
||||
wrapper.Dispatch(threadSize, threadSize, 1);
|
||||
|
||||
// Change to kernel with combine enabled.
|
||||
if (slice == lastSlice)
|
||||
{
|
||||
wrapper = new(buffer, _CombineShader, 8);
|
||||
}
|
||||
}
|
||||
|
||||
// Copy Dynamic Waves displacement into Animated Waves.
|
||||
{
|
||||
wrapper = new PropertyWrapperCompute(buffer, _CombineShader, 9);
|
||||
wrapper = new(buffer, _CombineShader, 10);
|
||||
wrapper.SetTexture(ShaderIDs.s_AnimatedWavesTarget, DataTexture);
|
||||
wrapper.SetTexture(ShaderIDs.s_DynamicWavesTarget, ShaderIDs.s_DynamicWavesTarget);
|
||||
wrapper.Dispatch(threadSize, threadSize, Slices);
|
||||
}
|
||||
|
||||
buffer.ReleaseTemporaryRT(ShaderIDs.s_DynamicWavesTarget);
|
||||
buffer.EndSample("Combine");
|
||||
buffer.EndSample(k_DrawCombine);
|
||||
|
||||
// Query collisions including Dynamic Waves.
|
||||
// Does not require copying the water level as they are added with zero alpha.
|
||||
_Water.CollisionProvider.UpdateQueries(_Water, CollisionLayer.AfterDynamicWaves);
|
||||
Provider.UpdateQueries(_Water, CollisionLayer.AfterDynamicWaves);
|
||||
}
|
||||
|
||||
if (_CollisionLayers.HasFlag(CollisionLayers.Displacement))
|
||||
@@ -429,7 +415,12 @@ namespace WaveHarmonic.Crest
|
||||
Shader.SetGlobalTexture(_TextureShaderID, DataTexture);
|
||||
}
|
||||
|
||||
buffer.EndSample(Name);
|
||||
buffer.EndSample(ID);
|
||||
}
|
||||
|
||||
internal override void AfterExecute()
|
||||
{
|
||||
Provider.SendReadBack(_Water, _CollisionLayers);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
@@ -11,16 +11,15 @@ namespace WaveHarmonic.Crest
|
||||
/// <summary>
|
||||
/// The default state for clipping.
|
||||
/// </summary>
|
||||
[@GenerateDoc]
|
||||
public enum DefaultClippingState
|
||||
{
|
||||
/// <summary>
|
||||
/// By default, nothing is clipped. Use clip inputs to remove water.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.DefaultClippingState.NothingClipped"/>
|
||||
[Tooltip("By default, nothing is clipped. Use clip inputs to remove water.")]
|
||||
NothingClipped,
|
||||
|
||||
/// <summary>
|
||||
/// By default, everything is clipped. Use clip inputs to add water.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.DefaultClippingState.EverythingClipped"/>
|
||||
[Tooltip("By default, everything is clipped. Use clip inputs to add water.")]
|
||||
EverythingClipped,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
@@ -10,21 +10,19 @@ namespace WaveHarmonic.Crest
|
||||
/// <summary>
|
||||
/// The source of depth color.
|
||||
/// </summary>
|
||||
[@GenerateDoc]
|
||||
public enum ShorelineVolumeColorSource
|
||||
{
|
||||
/// <summary>
|
||||
/// No depth color.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.ShorelineVolumeColorSource.None"/>
|
||||
[Tooltip("No depth color.")]
|
||||
None,
|
||||
|
||||
/// <summary>
|
||||
/// Depth color based on water depth.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.ShorelineVolumeColorSource.Depth"/>
|
||||
[Tooltip("Depth color based on water depth.")]
|
||||
Depth,
|
||||
|
||||
/// <summary>
|
||||
/// Depth color based on shoreline distance.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.ShorelineVolumeColorSource.Distance"/>
|
||||
[Tooltip("Depth color based on shoreline distance.")]
|
||||
Distance,
|
||||
}
|
||||
|
||||
@@ -32,6 +30,7 @@ namespace WaveHarmonic.Crest
|
||||
/// Contains shared functionality for <see cref="AbsorptionLod"/> and <see cref="ScatteringLod"/>.
|
||||
/// </summary>
|
||||
[FilterEnum(nameof(_TextureFormatMode), Filtered.Mode.Exclude, (int)LodTextureFormatMode.Automatic)]
|
||||
[System.Serializable]
|
||||
public abstract partial class ColorLod : Lod
|
||||
{
|
||||
[@Space(10f)]
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.Experimental.Rendering;
|
||||
using UnityEngine.Rendering;
|
||||
using WaveHarmonic.Crest.Internal;
|
||||
using WaveHarmonic.Crest.Utility;
|
||||
|
||||
namespace WaveHarmonic.Crest
|
||||
@@ -13,6 +15,13 @@ namespace WaveHarmonic.Crest
|
||||
[FilterEnum(nameof(_TextureFormatMode), Filtered.Mode.Exclude, (int)LodTextureFormatMode.Automatic)]
|
||||
public sealed partial class DepthLod : Lod<IDepthProvider>
|
||||
{
|
||||
[@Space(10)]
|
||||
|
||||
[Tooltip("Whether to include the terrain height automatically.\n\nThis will not include terrain details, nor will it produce a signed-distance field. There may also be a slight deviation due to differences in height data and terrain mesh. In these cases, please use the DepthProbe.")]
|
||||
[@GenerateAPI]
|
||||
[@DecoratedField, SerializeField]
|
||||
internal bool _IncludeTerrainHeight = true;
|
||||
|
||||
[Tooltip("Support signed distance field data generated from the depth probes.\n\nRequires a two component texture format.")]
|
||||
[@GenerateAPI(Setter.Custom)]
|
||||
[@DecoratedField, SerializeField]
|
||||
@@ -30,7 +39,6 @@ namespace WaveHarmonic.Crest
|
||||
internal override Color GizmoColor => s_GizmoColor;
|
||||
private protected override Color ClearColor => s_NullColor;
|
||||
private protected override bool NeedToReadWriteTextureData => true;
|
||||
internal override bool RunsInHeadless => true;
|
||||
|
||||
private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch
|
||||
{
|
||||
@@ -89,6 +97,76 @@ namespace WaveHarmonic.Crest
|
||||
ReAllocate();
|
||||
}
|
||||
|
||||
#if d_Unity_Terrain
|
||||
TerrainDepthInput _TerrainDepthInput;
|
||||
|
||||
internal override void Enable()
|
||||
{
|
||||
base.Enable();
|
||||
|
||||
if (Enabled)
|
||||
{
|
||||
_TerrainDepthInput ??= new(this);
|
||||
Inputs.Add(_TerrainDepthInput.Queue, _TerrainDepthInput);
|
||||
}
|
||||
}
|
||||
|
||||
internal override void Disable()
|
||||
{
|
||||
base.Disable();
|
||||
|
||||
Inputs.Remove(_TerrainDepthInput);
|
||||
}
|
||||
|
||||
sealed class TerrainDepthInput : ILodInput
|
||||
{
|
||||
public bool Enabled => _DepthLod._IncludeTerrainHeight;
|
||||
public bool IsCompute => true;
|
||||
public int Queue => int.MinValue;
|
||||
public int Pass => -1;
|
||||
public Rect Rect => Rect.zero;
|
||||
public MonoBehaviour Component => null;
|
||||
public float Filter(WaterRenderer water, int slice) => 1f;
|
||||
|
||||
readonly DepthLod _DepthLod;
|
||||
readonly System.Collections.Generic.List<Terrain> _Terrains = new();
|
||||
|
||||
public TerrainDepthInput(DepthLod lod)
|
||||
{
|
||||
_DepthLod = lod;
|
||||
}
|
||||
|
||||
public void Draw(Lod lod, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1, int slices = -1)
|
||||
{
|
||||
var resources = WaterResources.Instance;
|
||||
var wrapper = new PropertyWrapperCompute(buffer, resources.Compute._DepthTexture, 0);
|
||||
|
||||
var threads = lod.Resolution / k_ThreadGroupSize;
|
||||
|
||||
wrapper.SetTexture(Crest.ShaderIDs.s_Target, target);
|
||||
wrapper.SetVector(Crest.ShaderIDs.s_TextureRotation, new(0, 1));
|
||||
wrapper.SetBoolean(DepthLodInput.ShaderIDs.s_SDF, false);
|
||||
wrapper.SetKeyword(resources.Keywords.DepthTextureSDF, lod._Water._DepthLod._EnableSignedDistanceFields);
|
||||
|
||||
Terrain.GetActiveTerrains(_Terrains);
|
||||
foreach (var terrain in _Terrains)
|
||||
{
|
||||
var data = terrain.terrainData;
|
||||
if (data == null) continue;
|
||||
var size = data.size;
|
||||
var position = terrain.GetPosition();
|
||||
|
||||
wrapper.SetFloat(DepthLodInput.ShaderIDs.s_HeightOffset, position.y);
|
||||
wrapper.SetVector(Crest.ShaderIDs.s_Multiplier, new(size.y * 2f, 1, 1, 1));
|
||||
wrapper.SetVector(Crest.ShaderIDs.s_TexturePosition, position.XZ() + (size.XZ() * 0.5f));
|
||||
wrapper.SetVector(Crest.ShaderIDs.s_TextureSize, size.XZ());
|
||||
wrapper.SetTexture(Crest.ShaderIDs.s_Texture, data.heightmapTexture);
|
||||
wrapper.Dispatch(threads, threads, slices);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // d_Unity_Terrain
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[@OnChange]
|
||||
private protected override void OnChange(string propertyPath, object previousValue)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
@@ -41,7 +41,6 @@ namespace WaveHarmonic.Crest
|
||||
internal override string Name => "Dynamic Waves";
|
||||
internal override Color GizmoColor => s_GizmoColor;
|
||||
private protected override Color ClearColor => Color.black;
|
||||
internal override bool RunsInHeadless => true;
|
||||
private protected override ComputeShader SimulationShader => WaterResources.Instance.Compute._UpdateDynamicWaves;
|
||||
private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch
|
||||
{
|
||||
@@ -88,7 +87,7 @@ namespace WaveHarmonic.Crest
|
||||
target.SetFloat(ShaderIDs.s_DisplaceClamp, Settings._DisplaceClamp);
|
||||
}
|
||||
|
||||
private protected override void SetAdditionalSimulationParameters<T>(T simMaterial)
|
||||
private protected override void SetAdditionalSimulationParameters(PropertyWrapperCompute simMaterial)
|
||||
{
|
||||
base.SetAdditionalSimulationParameters(simMaterial);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
@@ -21,7 +21,6 @@ namespace WaveHarmonic.Crest
|
||||
internal override Color GizmoColor => s_GizmoColor;
|
||||
private protected override Color ClearColor => Color.black;
|
||||
private protected override bool NeedToReadWriteTextureData => true;
|
||||
internal override bool RunsInHeadless => true;
|
||||
|
||||
private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
@@ -52,7 +52,7 @@ namespace WaveHarmonic.Crest
|
||||
_ => throw new System.NotImplementedException(),
|
||||
};
|
||||
|
||||
private protected override void SetAdditionalSimulationParameters<T>(T properties)
|
||||
private protected override void SetAdditionalSimulationParameters(PropertyWrapperCompute properties)
|
||||
{
|
||||
base.SetAdditionalSimulationParameters(properties);
|
||||
|
||||
|
||||
@@ -8,6 +8,32 @@ using WaveHarmonic.Crest.Utility;
|
||||
|
||||
namespace WaveHarmonic.Crest
|
||||
{
|
||||
[System.Serializable]
|
||||
partial class AbsorptionLod
|
||||
{
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
partial class AlbedoLod
|
||||
{
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
partial class AnimatedWavesLod
|
||||
{
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
partial class ClipLod
|
||||
{
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
partial class DepthLod
|
||||
{
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
partial class DynamicWavesLod
|
||||
{
|
||||
DynamicWavesLodSettings _DefaultSettings;
|
||||
@@ -36,6 +62,12 @@ namespace WaveHarmonic.Crest
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
partial class FlowLod
|
||||
{
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
partial class FoamLod
|
||||
{
|
||||
FoamLodSettings _DefaultSettings;
|
||||
@@ -63,4 +95,19 @@ namespace WaveHarmonic.Crest
|
||||
Helpers.Destroy(_DefaultSettings);
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
partial class LevelLod
|
||||
{
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
partial class ScatteringLod
|
||||
{
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
partial class ShadowLod
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
@@ -32,7 +32,7 @@ namespace WaveHarmonic.Crest
|
||||
[Tooltip("Whether the data is relative to the input height.\n\nUseful for procedural placement.")]
|
||||
[@GenerateAPI]
|
||||
[@DecoratedField, SerializeField]
|
||||
internal bool _Relative;
|
||||
internal bool _Relative = true;
|
||||
|
||||
[@Label("Copy Signed Distance Field")]
|
||||
[Tooltip("Whether to copy the signed distance field.")]
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.HighDefinition;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using WaveHarmonic.Crest.Internal;
|
||||
using WaveHarmonic.Crest.Utility;
|
||||
|
||||
@@ -14,55 +11,51 @@ namespace WaveHarmonic.Crest
|
||||
/// <summary>
|
||||
/// <see cref="DepthProbe"/>'s update mode.
|
||||
/// </summary>
|
||||
[@GenerateDoc]
|
||||
public enum DepthProbeMode
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="DepthProbe"/> is updating in real-time, in accordance to <see cref="DepthProbeRefreshMode"/>.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.DepthProbeMode.RealTime"/>
|
||||
[Tooltip("Update in real-time in accordance to refresh mode.")]
|
||||
RealTime,
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="DepthProbe"/> is baked in the Editor.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.DepthProbeMode.Baked"/>
|
||||
[Tooltip("Baked in the editor.")]
|
||||
Baked,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// How the <see cref="DepthProbe"/> refreshes when using <see cref="DepthProbeMode.RealTime"/>.
|
||||
/// </summary>
|
||||
[@GenerateDoc]
|
||||
public enum DepthProbeRefreshMode
|
||||
{
|
||||
/// <summary>
|
||||
/// Populates the <see cref="DepthProbe"/> in Start.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.DepthProbeRefreshMode.OnStart"/>
|
||||
[Tooltip("Populates the DepthProbe in Start.")]
|
||||
OnStart = 0,
|
||||
|
||||
// EveryFrame = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Requires manual updating via <see cref="DepthProbe.Populate"/>.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.DepthProbeRefreshMode.ViaScripting"/>
|
||||
[Tooltip("Requires manual updating via DepthProbe.Populate.")]
|
||||
ViaScripting = 2,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// How a component is placed in the world.
|
||||
/// </summary>
|
||||
[@GenerateDoc]
|
||||
public enum Placement
|
||||
{
|
||||
/// <summary>
|
||||
/// The component is in a fixed position.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.Placement.Fixed"/>
|
||||
[Tooltip("The component is in a fixed position.")]
|
||||
Fixed,
|
||||
|
||||
/// <summary>
|
||||
/// The component follows the transform.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.Placement.Transform"/>
|
||||
[Tooltip("The component follows the transform.")]
|
||||
Transform,
|
||||
|
||||
/// <summary>
|
||||
/// The component follows the viewpoint.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Generated.Placement.Viewpoint"/>
|
||||
[Tooltip("The component follows the viewpoint.")]
|
||||
Viewpoint,
|
||||
}
|
||||
|
||||
@@ -317,17 +310,6 @@ namespace WaveHarmonic.Crest
|
||||
public static readonly int s_VoronoiPingPong1 = Shader.PropertyToID("_Crest_VoronoiPingPong1");
|
||||
}
|
||||
|
||||
#if d_UnityHDRP
|
||||
static readonly List<FrameSettingsField> s_FrameSettingsFields = new()
|
||||
{
|
||||
FrameSettingsField.OpaqueObjects,
|
||||
FrameSettingsField.TransparentObjects,
|
||||
FrameSettingsField.TransparentPrepass,
|
||||
FrameSettingsField.TransparentPostpass,
|
||||
FrameSettingsField.AsyncCompute,
|
||||
};
|
||||
#endif
|
||||
|
||||
internal void Bind<T>(T wrapper) where T : IPropertyWrapper
|
||||
{
|
||||
wrapper.SetTexture(ShaderIDs.s_DepthProbe, Texture);
|
||||
@@ -446,39 +428,13 @@ namespace WaveHarmonic.Crest
|
||||
if (RenderPipelineHelper.IsUniversal)
|
||||
{
|
||||
#if d_UnityURP
|
||||
var additionalCameraData = _Camera.GetUniversalAdditionalCameraData();
|
||||
additionalCameraData.renderShadows = false;
|
||||
additionalCameraData.requiresColorTexture = false;
|
||||
additionalCameraData.requiresDepthTexture = false;
|
||||
additionalCameraData.renderPostProcessing = false;
|
||||
additionalCameraData.allowXRRendering = false;
|
||||
SetUpCameraURP();
|
||||
#endif
|
||||
}
|
||||
else if (RenderPipelineHelper.IsHighDefinition)
|
||||
{
|
||||
#if d_UnityHDRP
|
||||
var additionalCameraData = _Camera.gameObject.AddComponent<HDAdditionalCameraData>();
|
||||
|
||||
additionalCameraData.clearColorMode = HDAdditionalCameraData.ClearColorMode.Color;
|
||||
additionalCameraData.volumeLayerMask = 0;
|
||||
additionalCameraData.probeLayerMask = 0;
|
||||
additionalCameraData.xrRendering = false;
|
||||
|
||||
// Override camera frame settings to disable most of the expensive rendering for this camera.
|
||||
// Most importantly, disable custom passes and post-processing as third-party stuff might throw
|
||||
// errors because of this camera. Even with excluding a lot of HDRP features, it still does a
|
||||
// lit pass which is not cheap.
|
||||
additionalCameraData.customRenderingSettings = true;
|
||||
|
||||
foreach (FrameSettingsField frameSetting in System.Enum.GetValues(typeof(FrameSettingsField)))
|
||||
{
|
||||
if (!s_FrameSettingsFields.Contains(frameSetting))
|
||||
{
|
||||
// Enable override and then disable the feature.
|
||||
additionalCameraData.renderingPathCustomFrameSettingsOverrideMask.mask[(uint)frameSetting] = true;
|
||||
additionalCameraData.renderingPathCustomFrameSettings.SetEnabled(frameSetting, false);
|
||||
}
|
||||
}
|
||||
SetUpCameraHD();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -557,6 +513,10 @@ namespace WaveHarmonic.Crest
|
||||
|
||||
OnBeforeRender?.Invoke(this);
|
||||
|
||||
_CommandBuffer ??= new();
|
||||
_CommandBuffer.Clear();
|
||||
_CommandBuffer.name = "Crest.DepthProbe";
|
||||
|
||||
#if UNITY_EDITOR
|
||||
try
|
||||
#endif
|
||||
@@ -566,6 +526,9 @@ namespace WaveHarmonic.Crest
|
||||
|
||||
if (_FillHolesCaptureHeight > 0f)
|
||||
{
|
||||
Graphics.ExecuteCommandBuffer(_CommandBuffer);
|
||||
_CommandBuffer.Clear();
|
||||
|
||||
// Fill holes pass.
|
||||
RenderDepthIntoProbe(k_FillKernel, _CaptureRange.y + _FillHolesCaptureHeight);
|
||||
}
|
||||
@@ -588,10 +551,14 @@ namespace WaveHarmonic.Crest
|
||||
|
||||
if (_GenerateSignedDistanceField)
|
||||
{
|
||||
_CommandBuffer.BeginSample("SDF");
|
||||
RenderSignedDistanceField(inverted: false);
|
||||
RenderSignedDistanceField(inverted: true);
|
||||
_CommandBuffer.EndSample("SDF");
|
||||
}
|
||||
|
||||
Graphics.ExecuteCommandBuffer(_CommandBuffer);
|
||||
|
||||
HashState(ref _RenderedStateHash);
|
||||
}
|
||||
|
||||
@@ -621,9 +588,17 @@ namespace WaveHarmonic.Crest
|
||||
backFaces = RenderTexture.GetTemporary(target.descriptor);
|
||||
_Camera.targetTexture = backFaces;
|
||||
|
||||
// Does not work for HDRP (handled elsewhere).
|
||||
var oldInvertCulling = GL.invertCulling;
|
||||
GL.invertCulling = true;
|
||||
|
||||
#if d_UnityHDRP
|
||||
if (RenderPipelineHelper.IsHighDefinition)
|
||||
{
|
||||
_HDAdditionalCameraData.invertFaceCulling = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Render scene, saving depths in depth buffer.
|
||||
#if d_UnityURP
|
||||
if (RenderPipelineHelper.IsUniversal)
|
||||
@@ -637,6 +612,14 @@ namespace WaveHarmonic.Crest
|
||||
}
|
||||
|
||||
_Camera.targetTexture = target;
|
||||
|
||||
#if d_UnityHDRP
|
||||
if (RenderPipelineHelper.IsHighDefinition)
|
||||
{
|
||||
_HDAdditionalCameraData.invertFaceCulling = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
GL.invertCulling = oldInvertCulling;
|
||||
}
|
||||
|
||||
@@ -652,7 +635,7 @@ namespace WaveHarmonic.Crest
|
||||
_Camera.Render();
|
||||
}
|
||||
|
||||
var wrapper = new PropertyWrapperComputeStandalone(WaterResources.Instance.Compute._RenderDepthProbe, kernel);
|
||||
var wrapper = new PropertyWrapperCompute(_CommandBuffer, WaterResources.Instance.Compute._RenderDepthProbe, kernel);
|
||||
|
||||
wrapper.SetFloat(ShaderIDs.s_HeightOffset, transform.position.y);
|
||||
|
||||
@@ -699,13 +682,12 @@ namespace WaveHarmonic.Crest
|
||||
return;
|
||||
}
|
||||
|
||||
var buffer = _CommandBuffer;
|
||||
|
||||
var cameraToWorldMatrix = _Camera.cameraToWorldMatrix;
|
||||
var projectionMatrix = _Camera.projectionMatrix;
|
||||
var projectionToWorldMatrix = cameraToWorldMatrix * projectionMatrix.inverse;
|
||||
|
||||
var buffer = _CommandBuffer ??= new();
|
||||
buffer.Clear();
|
||||
buffer.name = "Jump Flood";
|
||||
// Common uniforms.
|
||||
buffer.SetComputeFloatParam(shader, DepthLodInput.ShaderIDs.s_HeightOffset, transform.position.y);
|
||||
buffer.SetComputeIntParam(shader, Crest.ShaderIDs.s_TextureSize, _Resolution);
|
||||
@@ -802,7 +784,6 @@ namespace WaveHarmonic.Crest
|
||||
);
|
||||
}
|
||||
|
||||
Graphics.ExecuteCommandBuffer(buffer);
|
||||
buffer.ReleaseTemporaryRT(voronoiPingPong0);
|
||||
buffer.ReleaseTemporaryRT(voronoiPingPong1);
|
||||
}
|
||||
@@ -929,6 +910,7 @@ namespace WaveHarmonic.Crest
|
||||
wrapper.SetVector(Crest.ShaderIDs.s_TextureSize, _Probe.Scale);
|
||||
wrapper.SetVector(Crest.ShaderIDs.s_TexturePosition, position.XZ());
|
||||
wrapper.SetVector(Crest.ShaderIDs.s_TextureRotation, new Vector2(matrix.m20, matrix.m00).normalized);
|
||||
wrapper.SetVector(Crest.ShaderIDs.s_Multiplier, Vector4.one);
|
||||
wrapper.SetInteger(Crest.ShaderIDs.s_Blend, (int)LodInputBlend.Maximum);
|
||||
wrapper.SetTexture(Crest.ShaderIDs.s_Texture, _Probe.Texture);
|
||||
wrapper.SetTexture(Crest.ShaderIDs.s_Target, target);
|
||||
@@ -962,9 +944,9 @@ namespace WaveHarmonic.Crest
|
||||
Hash.AddBool(_EnableBackFaceInclusion, ref hash);
|
||||
Hash.AddInt(_AdditionalJumpFloodRounds, ref hash);
|
||||
Hash.AddBool(_GenerateSignedDistanceField, ref hash);
|
||||
Hash.AddObject(Position, ref hash);
|
||||
Hash.AddObject(Rotation, ref hash);
|
||||
Hash.AddObject(Scale, ref hash);
|
||||
Hash.AddObject(Managed ? Vector3.zero : Position, ref hash);
|
||||
Hash.AddObject(Managed ? Quaternion.identity : Rotation, ref hash);
|
||||
Hash.AddObject(Managed ? Vector2.zero : Scale, ref hash);
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
@@ -992,7 +974,7 @@ namespace WaveHarmonic.Crest
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (_Debug._ForceAlwaysUpdateDebug)
|
||||
if (_Debug._ForceAlwaysUpdateDebug && _Type != DepthProbeMode.Baked)
|
||||
{
|
||||
Populate();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Crest Water System
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user