更新天气插件

This commit is contained in:
2025-12-24 00:09:42 +08:00
parent e902fb031a
commit 1ead9e6cc8
156 changed files with 60774 additions and 104069 deletions

View File

@@ -1,14 +1,7 @@
fileFormatVersion: 2
guid: 4c5d9e94569284b49b7e45a954e0a780
guid: afebf3bc8cb9d1a4290fdc64739e2436
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 236601
packageName: Enviro 3 - Sky and Weather
packageVersion: 3.1.2
assetPath: Assets/Enviro 3 - Sky and Weather/Documentation.pdf
uploadId: 660896

View File

@@ -79,7 +79,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 43b4e18e1baccc642a82a5e642fd6997, type: 3}
m_Name:
m_EditorClassIdentifier:
configuration: {fileID: 11400000, guid: 8f4428cb504610143921933572be3fe9, type: 2}
configuration: {fileID: 11400000, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2}
lastConfiguration: {fileID: 0}
Time: {fileID: 0}
Lighting: {fileID: 0}

View File

@@ -13,7 +13,7 @@ Material:
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
@@ -56,6 +56,8 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Brightness: 1
- _BrightnessMod: 0.5
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
@@ -63,7 +65,7 @@ Material:
- _GlossMapScale: 1
- _Glossiness: 0
- _GlossyReflections: 1
- _Intensity: 250
- _Intensity: 1
- _Metallic: 0
- _Mode: 3
- _OcclusionStrength: 1
@@ -76,5 +78,5 @@ Material:
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 2.4491117, g: 3.1938896, b: 4.594794, a: 1}
- _TintColor: {r: 0.11222855, g: 0.17016357, b: 0.24528301, a: 0.39607844}
- _TintColor: {r: 0.6037736, g: 0.5781417, b: 0.59230894, a: 1}
m_BuildTextureStacks: []

View File

@@ -13,7 +13,7 @@ Material:
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
@@ -56,6 +56,8 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Brightness: 0
- _BrightnessMod: 0.05
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
@@ -76,5 +78,5 @@ Material:
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 2.4491117, g: 3.1938896, b: 4.594794, a: 1}
- _TintColor: {r: 0.8006408, g: 0.90456, b: 0.9811321, a: 0.003921569}
- _TintColor: {r: 0.9433962, g: 0.9433962, b: 0.9433962, a: 0.34117648}
m_BuildTextureStacks: []

View File

@@ -26,7 +26,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5343805965175246665}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: 0, y: 85, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8233971941884837670}
@@ -45,12 +45,12 @@ Light:
m_Shape: 0
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 2
m_Range: 5000
m_Range: 2500
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
@@ -216,7 +216,7 @@ LineRenderer:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key2: {r: 1, g: 1, b: 1, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
@@ -224,7 +224,7 @@ LineRenderer:
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime2: 65535
ctime3: 0
ctime4: 0
ctime5: 0
@@ -261,15 +261,18 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 07501689299c0de43b5f4c0e6edd5bbd, type: 3}
m_Name:
m_EditorClassIdentifier:
flashIntensity: 2500
flashIntensity: 100
target: {x: 0, y: 0, z: 0}
myLight: {fileID: 2595764858794445228}
planeMat: {fileID: 2100000, guid: eab4ec5ae4f54a540a995343c3d497fa, type: 2}
arcs: 18
arcs: 128
arcLength: 0.5
arcVariation: 2
arcVariation: 4
inaccuracy: 0.5
splits: 1
splits: 10
maxSplits: 8
splitLength: 0.3
splitVariation: 5
toTarget: {x: 0, y: 0, z: 0}
--- !u!1 &8233971943432498349
GameObject:

View File

@@ -151,7 +151,7 @@ ParticleSystem:
startSpeed:
serializedVersion: 2
minMaxState: 0
scalar: -40
scalar: -200
minScalar: 5
maxCurve:
serializedVersion: 2
@@ -267,7 +267,7 @@ ParticleSystem:
startSize:
serializedVersion: 2
minMaxState: 0
scalar: 0.01
scalar: 0.05
minScalar: 1
maxCurve:
serializedVersion: 2
@@ -729,7 +729,7 @@ ParticleSystem:
sphericalDirectionAmount: 0
randomPositionAmount: 0
radius:
value: 5
value: 100
mode: 0
spread: 0
speed:
@@ -848,7 +848,7 @@ ParticleSystem:
rateOverTime:
serializedVersion: 2
minMaxState: 0
scalar: 1999.9999
scalar: 2000
minScalar: 10
maxCurve:
serializedVersion: 2
@@ -2513,7 +2513,7 @@ ParticleSystem:
multiplierCurve:
serializedVersion: 2
minMaxState: 0
scalar: 0.5
scalar: 1
minScalar: 2
maxCurve:
serializedVersion: 2
@@ -3980,7 +3980,7 @@ ParticleSystem:
enabled: 1
subEmitters:
- serializedVersion: 3
emitter: {fileID: 7133312199455739040}
emitter: {fileID: 0}
type: 1
properties: 0
emitProbability: 1
@@ -4959,7 +4959,7 @@ ParticleSystemRenderer:
m_MinParticleSize: 0.001
m_MaxParticleSize: 0.002
m_CameraVelocityScale: 0
m_VelocityScale: 0.01
m_VelocityScale: 0.005
m_LengthScale: 0.1
m_SortingFudge: 0
m_NormalDirection: 1

View File

@@ -62,7 +62,7 @@ ParticleSystem:
m_Curve:
- serializedVersion: 3
time: 0
value: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
@@ -71,7 +71,7 @@ ParticleSystem:
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
@@ -105,7 +105,7 @@ ParticleSystem:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
moveWithTransform: 0
moveWithTransform: 1
moveWithCustomTransform: {fileID: 0}
scalingMode: 2
randomSeed: 0
@@ -674,7 +674,7 @@ ParticleSystem:
sphericalDirectionAmount: 0
randomPositionAmount: 0
radius:
value: 40
value: 100
mode: 0
spread: 0
speed:
@@ -964,7 +964,7 @@ ParticleSystem:
m_RotationOrder: 4
y:
serializedVersion: 2
minMaxState: 0
minMaxState: 2
scalar: 1
minScalar: 1
maxCurve:
@@ -1017,7 +1017,7 @@ ParticleSystem:
m_RotationOrder: 4
z:
serializedVersion: 2
minMaxState: 0
minMaxState: 2
scalar: 1
minScalar: 1
maxCurve:
@@ -3664,7 +3664,7 @@ ParticleSystem:
m_NumAlphaKeys: 2
range: {x: 0, y: 1}
CollisionModule:
enabled: 1
enabled: 0
serializedVersion: 4
type: 1
collisionMode: 0

View File

@@ -17,10 +17,10 @@ MonoBehaviour:
categories: []
uiBounds:
serializedVersion: 2
x: 670
x: 775
y: -190
width: 917
height: 1828
width: 600
height: 1614
--- !u!114 &114350483966674976
MonoBehaviour:
m_ObjectHideFlags: 1
@@ -96,7 +96,7 @@ VisualEffectResource:
m_Infos:
m_RendererSettings:
motionVectorGenerationMode: 0
shadowCastingMode: 1
shadowCastingMode: 0
rayTracingMode: 0
receiveShadows: 0
reflectionProbeUsage: 0
@@ -474,7 +474,7 @@ MonoBehaviour:
m_Type:
m_SerializableType: UnityEditor.VFX.Position, Unity.VisualEffectGraph.Editor,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_SerializableObject: '{"position":{"x":-50.0,"y":0.0,"z":-50.0}}'
m_SerializableObject: '{"position":{"x":-200.0,"y":0.0,"z":-200.0}}'
m_Space: 0
m_Property:
name: A
@@ -644,7 +644,7 @@ MonoBehaviour:
m_Type:
m_SerializableType: UnityEditor.VFX.Position, Unity.VisualEffectGraph.Editor,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_SerializableObject: '{"position":{"x":50.0,"y":0.0,"z":50.0}}'
m_SerializableObject: '{"position":{"x":200.0,"y":0.0,"z":200.0}}'
m_Space: 0
m_Property:
name: B
@@ -2239,8 +2239,8 @@ MonoBehaviour:
m_UICollapsed: 0
m_UISuperCollapsed: 0
m_InputSlots:
- {fileID: 8926484042661614840}
- {fileID: 8926484042661614845}
- {fileID: 8926484042661614846}
- {fileID: 8926484042661614851}
m_OutputSlots: []
m_Label:
m_Data: {fileID: 8926484042661614568}
@@ -2312,14 +2312,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 081ffb0090424ba4cb05370a42ead6b9, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 0}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
opaqueRenderQueue: 0
transparentRenderQueue: 1
--- !u!114 &8926484042661614826
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -2764,7 +2756,7 @@ MonoBehaviour:
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
--- !u!114 &8926484042661614840
--- !u!114 &8926484042661614846
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -2775,18 +2767,18 @@ MonoBehaviour:
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c82227d5759e296488798b1554a72a15, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.VisualEffectGraph.Editor::UnityEditor.VFX.VFXSlotColor
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 0}
m_Children:
- {fileID: 8926484042661614841}
- {fileID: 8926484042661614842}
- {fileID: 8926484042661614843}
- {fileID: 8926484042661614844}
- {fileID: 8926484042661614847}
- {fileID: 8926484042661614848}
- {fileID: 8926484042661614849}
- {fileID: 8926484042661614850}
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
m_MasterSlot: {fileID: 8926484042661614840}
m_MasterSlot: {fileID: 8926484042661614846}
m_MasterData:
m_Owner: {fileID: 8926484042661614817}
m_Value:
@@ -2802,7 +2794,7 @@ MonoBehaviour:
Culture=neutral, PublicKeyToken=null
m_Direction: 0
m_LinkedSlots: []
--- !u!114 &8926484042661614841
--- !u!114 &8926484042661614847
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -2813,14 +2805,14 @@ MonoBehaviour:
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.VisualEffectGraph.Editor::UnityEditor.VFX.VFXSlotFloat
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 8926484042661614840}
m_Parent: {fileID: 8926484042661614846}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
m_MasterSlot: {fileID: 8926484042661614840}
m_MasterSlot: {fileID: 8926484042661614846}
m_MasterData:
m_Owner: {fileID: 0}
m_Value:
@@ -2835,7 +2827,7 @@ MonoBehaviour:
PublicKeyToken=b77a5c561934e089
m_Direction: 0
m_LinkedSlots: []
--- !u!114 &8926484042661614842
--- !u!114 &8926484042661614848
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -2846,14 +2838,14 @@ MonoBehaviour:
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.VisualEffectGraph.Editor::UnityEditor.VFX.VFXSlotFloat
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 8926484042661614840}
m_Parent: {fileID: 8926484042661614846}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
m_MasterSlot: {fileID: 8926484042661614840}
m_MasterSlot: {fileID: 8926484042661614846}
m_MasterData:
m_Owner: {fileID: 0}
m_Value:
@@ -2868,7 +2860,7 @@ MonoBehaviour:
PublicKeyToken=b77a5c561934e089
m_Direction: 0
m_LinkedSlots: []
--- !u!114 &8926484042661614843
--- !u!114 &8926484042661614849
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -2879,14 +2871,14 @@ MonoBehaviour:
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.VisualEffectGraph.Editor::UnityEditor.VFX.VFXSlotFloat
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 8926484042661614840}
m_Parent: {fileID: 8926484042661614846}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
m_MasterSlot: {fileID: 8926484042661614840}
m_MasterSlot: {fileID: 8926484042661614846}
m_MasterData:
m_Owner: {fileID: 0}
m_Value:
@@ -2901,7 +2893,7 @@ MonoBehaviour:
PublicKeyToken=b77a5c561934e089
m_Direction: 0
m_LinkedSlots: []
--- !u!114 &8926484042661614844
--- !u!114 &8926484042661614850
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -2912,14 +2904,14 @@ MonoBehaviour:
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.VisualEffectGraph.Editor::UnityEditor.VFX.VFXSlotFloat
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 8926484042661614840}
m_Parent: {fileID: 8926484042661614846}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
m_MasterSlot: {fileID: 8926484042661614840}
m_MasterSlot: {fileID: 8926484042661614846}
m_MasterData:
m_Owner: {fileID: 0}
m_Value:
@@ -2934,7 +2926,7 @@ MonoBehaviour:
PublicKeyToken=b77a5c561934e089
m_Direction: 0
m_LinkedSlots: []
--- !u!114 &8926484042661614845
--- !u!114 &8926484042661614851
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -2945,21 +2937,21 @@ MonoBehaviour:
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.VisualEffectGraph.Editor::UnityEditor.VFX.VFXSlotTexture2D
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 0}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
m_MasterSlot: {fileID: 8926484042661614845}
m_MasterSlot: {fileID: 8926484042661614851}
m_MasterData:
m_Owner: {fileID: 8926484042661614817}
m_Value:
m_Type:
m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
m_SerializableObject:
m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"5c83282ca2748e94f955da788bd786eb","type":3}}'
m_Space: -1
m_Property:
name: _Main

View File

@@ -17,10 +17,10 @@ MonoBehaviour:
categories: []
uiBounds:
serializedVersion: 2
x: 558
x: 733
y: -190
width: 996
height: 2082
width: 632
height: 2040
--- !u!114 &114350483966674976
MonoBehaviour:
m_ObjectHideFlags: 1
@@ -96,7 +96,7 @@ VisualEffectResource:
m_Infos:
m_RendererSettings:
motionVectorGenerationMode: 0
shadowCastingMode: 1
shadowCastingMode: 0
rayTracingMode: 0
receiveShadows: 0
reflectionProbeUsage: 0
@@ -476,7 +476,7 @@ MonoBehaviour:
m_Type:
m_SerializableType: UnityEditor.VFX.Position, Unity.VisualEffectGraph.Editor,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_SerializableObject: '{"position":{"x":-75.0,"y":0.0,"z":-75.0}}'
m_SerializableObject: '{"position":{"x":-250.0,"y":0.0,"z":-250.0}}'
m_Space: 0
m_Property:
name: A
@@ -646,7 +646,7 @@ MonoBehaviour:
m_Type:
m_SerializableType: UnityEditor.VFX.Position, Unity.VisualEffectGraph.Editor,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_SerializableObject: '{"position":{"x":75.0,"y":0.0,"z":75.0}}'
m_SerializableObject: '{"position":{"x":250.0,"y":0.0,"z":250.0}}'
m_Space: 0
m_Property:
name: B
@@ -3287,8 +3287,8 @@ MonoBehaviour:
m_UICollapsed: 0
m_UISuperCollapsed: 0
m_InputSlots:
- {fileID: 8926484042661614884}
- {fileID: 8926484042661614889}
- {fileID: 8926484042661614890}
- {fileID: 8926484042661614895}
m_OutputSlots: []
m_Label:
m_Data: {fileID: 8926484042661614568}
@@ -3419,14 +3419,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 081ffb0090424ba4cb05370a42ead6b9, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 0}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
opaqueRenderQueue: 0
transparentRenderQueue: 1
--- !u!114 &8926484042661614877
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -3641,7 +3633,7 @@ MonoBehaviour:
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
--- !u!114 &8926484042661614884
--- !u!114 &8926484042661614890
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -3652,18 +3644,18 @@ MonoBehaviour:
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c82227d5759e296488798b1554a72a15, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.VisualEffectGraph.Editor::UnityEditor.VFX.VFXSlotColor
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 0}
m_Children:
- {fileID: 8926484042661614885}
- {fileID: 8926484042661614886}
- {fileID: 8926484042661614887}
- {fileID: 8926484042661614888}
- {fileID: 8926484042661614891}
- {fileID: 8926484042661614892}
- {fileID: 8926484042661614893}
- {fileID: 8926484042661614894}
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
m_MasterSlot: {fileID: 8926484042661614884}
m_MasterSlot: {fileID: 8926484042661614890}
m_MasterData:
m_Owner: {fileID: 8926484042661614860}
m_Value:
@@ -3679,7 +3671,7 @@ MonoBehaviour:
Culture=neutral, PublicKeyToken=null
m_Direction: 0
m_LinkedSlots: []
--- !u!114 &8926484042661614885
--- !u!114 &8926484042661614891
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -3690,14 +3682,14 @@ MonoBehaviour:
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.VisualEffectGraph.Editor::UnityEditor.VFX.VFXSlotFloat
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 8926484042661614884}
m_Parent: {fileID: 8926484042661614890}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
m_MasterSlot: {fileID: 8926484042661614884}
m_MasterSlot: {fileID: 8926484042661614890}
m_MasterData:
m_Owner: {fileID: 0}
m_Value:
@@ -3712,7 +3704,7 @@ MonoBehaviour:
PublicKeyToken=b77a5c561934e089
m_Direction: 0
m_LinkedSlots: []
--- !u!114 &8926484042661614886
--- !u!114 &8926484042661614892
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -3723,14 +3715,14 @@ MonoBehaviour:
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.VisualEffectGraph.Editor::UnityEditor.VFX.VFXSlotFloat
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 8926484042661614884}
m_Parent: {fileID: 8926484042661614890}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
m_MasterSlot: {fileID: 8926484042661614884}
m_MasterSlot: {fileID: 8926484042661614890}
m_MasterData:
m_Owner: {fileID: 0}
m_Value:
@@ -3745,7 +3737,7 @@ MonoBehaviour:
PublicKeyToken=b77a5c561934e089
m_Direction: 0
m_LinkedSlots: []
--- !u!114 &8926484042661614887
--- !u!114 &8926484042661614893
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -3756,14 +3748,14 @@ MonoBehaviour:
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.VisualEffectGraph.Editor::UnityEditor.VFX.VFXSlotFloat
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 8926484042661614884}
m_Parent: {fileID: 8926484042661614890}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
m_MasterSlot: {fileID: 8926484042661614884}
m_MasterSlot: {fileID: 8926484042661614890}
m_MasterData:
m_Owner: {fileID: 0}
m_Value:
@@ -3778,7 +3770,7 @@ MonoBehaviour:
PublicKeyToken=b77a5c561934e089
m_Direction: 0
m_LinkedSlots: []
--- !u!114 &8926484042661614888
--- !u!114 &8926484042661614894
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -3789,14 +3781,14 @@ MonoBehaviour:
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.VisualEffectGraph.Editor::UnityEditor.VFX.VFXSlotFloat
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 8926484042661614884}
m_Parent: {fileID: 8926484042661614890}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
m_MasterSlot: {fileID: 8926484042661614884}
m_MasterSlot: {fileID: 8926484042661614890}
m_MasterData:
m_Owner: {fileID: 0}
m_Value:
@@ -3811,7 +3803,7 @@ MonoBehaviour:
PublicKeyToken=b77a5c561934e089
m_Direction: 0
m_LinkedSlots: []
--- !u!114 &8926484042661614889
--- !u!114 &8926484042661614895
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -3822,21 +3814,21 @@ MonoBehaviour:
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.VisualEffectGraph.Editor::UnityEditor.VFX.VFXSlotTexture2D
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 0}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
m_UISuperCollapsed: 0
m_MasterSlot: {fileID: 8926484042661614889}
m_MasterSlot: {fileID: 8926484042661614895}
m_MasterData:
m_Owner: {fileID: 8926484042661614860}
m_Value:
m_Type:
m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
m_SerializableObject:
m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"e3b1ddad603b54246904e7544f9e3f13","type":3}}'
m_Space: -1
m_Property:
name: _Main

View File

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

View File

@@ -24,7 +24,7 @@ MonoBehaviour:
m_Value: 1
fixedExposure:
m_OverrideState: 1
m_Value: 10.015643
m_Value: 5
compensation:
m_OverrideState: 0
m_Value: 0
@@ -164,26 +164,21 @@ MonoBehaviour:
m_Name: EnviroHDRPSky
m_EditorClassIdentifier:
active: 1
m_AdvancedMode: 0
rotation:
m_OverrideState: 0
m_Value: 0
min: 0
max: 360
skyIntensityMode:
m_OverrideState: 1
m_Value: 0
exposure:
m_OverrideState: 1
m_Value: 11.254836
m_Value: 5
multiplier:
m_OverrideState: 0
m_Value: 1
min: 0
upperHemisphereLuxValue:
m_OverrideState: 0
m_Value: 1
min: 0
upperHemisphereLuxColor:
m_OverrideState: 0
m_Value: {x: 0, y: 0, z: 0}
@@ -196,7 +191,6 @@ MonoBehaviour:
updatePeriod:
m_OverrideState: 0
m_Value: 0
min: 0
includeSunInBaking:
m_OverrideState: 0
m_Value: 0
@@ -216,6 +210,7 @@ MonoBehaviour:
- {fileID: 2642261307547123297}
- {fileID: 3994963388396277213}
- {fileID: 8215393669219850347}
- {fileID: -4333884995096911234}
- {fileID: -4703332889699849288}
--- !u!114 &2642261307547123297
MonoBehaviour:

View File

@@ -23,13 +23,13 @@ MonoBehaviour:
skyMode: 0
volumetricCloudsOverride:
volumetricClouds: 1
dualLayer: 0
lightningSupport: 1
variableBottomNoise: 0
downsampling: 2
stepsLayer1: 128
stepsLayer2: 64
blueNoiseIntensity: 2
reprojectionBlendTime: 2
lodDistance: 0.7
lodDistance: 0.6
fogOverride:
fog: 1
fogQualityMode: 0
@@ -40,6 +40,7 @@ MonoBehaviour:
flatCloudsOverride:
cirrusClouds: 1
flatClouds: 0
flatCloudsShadowSteps: 8
auroraOverride:
aurora: 1
steps: 24

View File

@@ -15,7 +15,7 @@ MonoBehaviour:
showEditor: 0
showSky: 0
showVolumeClouds: 0
showFog: 1
showFog: 0
showFlatClouds: 0
showEffects: 0
showAurora: 0
@@ -23,12 +23,12 @@ MonoBehaviour:
skyMode: 0
volumetricCloudsOverride:
volumetricClouds: 1
dualLayer: 0
lightningSupport: 1
variableBottomNoise: 1
downsampling: 1
stepsLayer1: 256
stepsLayer2: 128
blueNoiseIntensity: 2
reprojectionBlendTime: 2
reprojectionBlendTime: 1
lodDistance: 1
fogOverride:
fog: 1
@@ -40,6 +40,7 @@ MonoBehaviour:
flatCloudsOverride:
cirrusClouds: 1
flatClouds: 0
flatCloudsShadowSteps: 6
auroraOverride:
aurora: 1
steps: 32

View File

@@ -23,13 +23,13 @@ MonoBehaviour:
skyMode: 1
volumetricCloudsOverride:
volumetricClouds: 1
dualLayer: 0
lightningSupport: 0
variableBottomNoise: 0
downsampling: 4
stepsLayer1: 128
stepsLayer2: 64
blueNoiseIntensity: 2
reprojectionBlendTime: 3
lodDistance: 0.7
reprojectionBlendTime: 2
lodDistance: 0.5
fogOverride:
fog: 1
fogQualityMode: 1
@@ -40,6 +40,7 @@ MonoBehaviour:
flatCloudsOverride:
cirrusClouds: 1
flatClouds: 0
flatCloudsShadowSteps: 8
auroraOverride:
aurora: 0
steps: 32

View File

@@ -13,7 +13,7 @@ MonoBehaviour:
m_Name: Medium
m_EditorClassIdentifier:
showEditor: 0
showSky: 0
showSky: 1
showVolumeClouds: 0
showFog: 0
showFlatClouds: 0
@@ -23,10 +23,10 @@ MonoBehaviour:
skyMode: 0
volumetricCloudsOverride:
volumetricClouds: 1
dualLayer: 0
lightningSupport: 1
variableBottomNoise: 0
downsampling: 3
stepsLayer1: 128
stepsLayer2: 64
blueNoiseIntensity: 2
reprojectionBlendTime: 2
lodDistance: 0.7
@@ -40,6 +40,7 @@ MonoBehaviour:
flatCloudsOverride:
cirrusClouds: 1
flatClouds: 0
flatCloudsShadowSteps: 8
auroraOverride:
aurora: 1
steps: 24

View File

@@ -15,7 +15,7 @@ MonoBehaviour:
showEditor: 0
showSky: 0
showVolumeClouds: 0
showFog: 1
showFog: 0
showFlatClouds: 0
showEffects: 0
showAurora: 0
@@ -23,10 +23,10 @@ MonoBehaviour:
skyMode: 0
volumetricCloudsOverride:
volumetricClouds: 1
dualLayer: 0
lightningSupport: 1
variableBottomNoise: 1
downsampling: 2
stepsLayer1: 162
stepsLayer2: 96
stepsLayer1: 160
blueNoiseIntensity: 2
reprojectionBlendTime: 2
lodDistance: 0.85
@@ -40,6 +40,7 @@ MonoBehaviour:
flatCloudsOverride:
cirrusClouds: 1
flatClouds: 0
flatCloudsShadowSteps: 12
auroraOverride:
aurora: 1
steps: 32

View File

@@ -15,10 +15,10 @@ MonoBehaviour:
showEditor: 0
showEffectControls: 0
showCloudControls: 0
showFlatCloudControls: 0
showFlatCloudControls: 1
showFogControls: 0
showSkyControls: 0
showLightingControls: 1
showSkyControls: 1
showLightingControls: 0
showAuroraControls: 0
showEnvironmentControls: 0
showAudioControls: 0
@@ -27,57 +27,53 @@ MonoBehaviour:
showLightningControls: 0
cloudsOverride:
ambientLightIntensity: 1
showLayer1: 0
coverageLayer1: -1
dilateCoverageLayer1: 0.929
dilateTypeLayer1: 1
typeModifierLayer1: 1
anvilBiasLayer1: 0.398
scatteringIntensityLayer1: 1.05
multiScatteringALayer1: 0.575
multiScatteringBLayer1: 0.227
multiScatteringCLayer1: 0
powderIntensityLayer1: 0.848
silverLiningSpreadLayer1: 0.8
ligthAbsorbtionLayer1: 1.01
densityLayer1: 0.55
densitySmoothnessLayer1: 1
baseErosionIntensityLayer1: 0.184
detailErosionIntensityLayer1: 0.3
curlIntensityLayer1: 0.1
showLayer2: 0
coverageLayer2: -1
dilateCoverageLayer2: 1
dilateTypeLayer2: 1
typeModifierLayer2: 1
anvilBiasLayer2: 0.277
scatteringIntensityLayer2: 0.9
multiScatteringALayer2: 0.495
multiScatteringBLayer2: 0.258
multiScatteringCLayer2: 0.548
powderIntensityLayer2: 0.84
silverLiningSpreadLayer2: 0.8
ligthAbsorbtionLayer2: 0.13
densityLayer2: 0.184
densitySmoothnessLayer2: 1
baseErosionIntensityLayer2: 0.449
detailErosionIntensityLayer2: 0.462
curlIntensityLayer2: 0.1
coverage: -1
dilateCoverage: 0.5
dilateType: 0.5
typeModifier: 0.5
cloudTypeShaping: 1
scatteringIntensity: 1.56
multiScatterStrength: 0.5
multiScatterFalloff: 0.0084
ambientFloor: 0.02
lightningIntensity: 0.5
exposure: 1
silverLiningSpread: 0.8
silverLiningIntensity: 1
edgeHighlightStrength: 1
ligthAbsorbtion: 1
density: 0.3
densitySmoothness: 1
baseErosionIntensity: 0
baseNoiseMultiplier: 1
detailErosionIntensity: 0.3
detailNoiseMultiplier: 1
curlIntensity: 0.05
bottomShape: 0
midShape: 0
topShape: 0
topLayer: 0
rampShape: 1
baseNoiseUVMultiplier: 1
detailNoiseUVMultiplier: 1
flatCloudsOverride:
cirrusCloudsAlpha: 0.292
cirrusCloudsCoverage: 0.53
cirrusCloudsColorPower: 1
cirrusCloudsAlpha: 0.518
cirrusCloudsCoverage: 0.275
cirrusCloudsColorPower: 1.15
flatCloudsCoverage: 0
flatCloudsDensity: 1.054
flatCloudsLightIntensity: 0.828
flatCloudsAmbientIntensity: 1.056
flatCloudsAbsorbtion: 1.424
flatCloudsDensity: 1.24
flatCloudsLightIntensity: 1.05
flatCloudsAmbientIntensity: 1.8
flatCloudsShadowIntensity: 1
flatCloudsShadowSteps: 8
lightingOverride:
directLightIntensityModifier: 1.2
ambientIntensityModifier: 1
shadowIntensity: 1
skyOverride:
intensity: 1
mieScatteringMultiplier: 1
skyColorExponent: 1.2
skyColorTint: {r: 1, g: 1, b: 1, a: 1}
fogOverride:
fogDensity: 0.019

View File

@@ -14,77 +14,73 @@ MonoBehaviour:
m_EditorClassIdentifier:
showEditor: 0
showEffectControls: 0
showCloudControls: 0
showCloudControls: 1
showFlatCloudControls: 0
showFogControls: 1
showSkyControls: 1
showFogControls: 0
showSkyControls: 0
showLightingControls: 0
showAuroraControls: 0
showEnvironmentControls: 0
showAudioControls: 0
showAmbientAudioControls: 0
showAmbientAudioControls: 1
showWeatherAudioControls: 0
showLightningControls: 0
cloudsOverride:
ambientLightIntensity: 1
showLayer1: 0
coverageLayer1: -0.141
dilateCoverageLayer1: 0
dilateTypeLayer1: 0
typeModifierLayer1: 0.463
anvilBiasLayer1: 0.247
scatteringIntensityLayer1: 0.814
multiScatteringALayer1: 0.42
multiScatteringBLayer1: 0.179
multiScatteringCLayer1: 0.748
powderIntensityLayer1: 0.972
silverLiningSpreadLayer1: 0.8
ligthAbsorbtionLayer1: 0.82
densityLayer1: 0.394
densitySmoothnessLayer1: 1.402
baseErosionIntensityLayer1: 0.5
detailErosionIntensityLayer1: 0.5
curlIntensityLayer1: 0.25
showLayer2: 1
coverageLayer2: 0.093
dilateCoverageLayer2: 0.302
dilateTypeLayer2: 1
typeModifierLayer2: 0.644
anvilBiasLayer2: 0.373
scatteringIntensityLayer2: 1.235
multiScatteringALayer2: 0.627
multiScatteringBLayer2: 0.193
multiScatteringCLayer2: 0.047
powderIntensityLayer2: 0.907
silverLiningSpreadLayer2: 0.8
ligthAbsorbtionLayer2: 0.423
densityLayer2: 0.142
densitySmoothnessLayer2: 1.677
baseErosionIntensityLayer2: 0.364
detailErosionIntensityLayer2: 0.669
curlIntensityLayer2: 0.191
coverage: 0.27
dilateCoverage: 0.75
dilateType: 0
typeModifier: 0.901
cloudTypeShaping: 0.595
scatteringIntensity: 5.05
multiScatterStrength: 0.541
multiScatterFalloff: 0.201
ambientFloor: 0.19
lightningIntensity: 0
exposure: 0.53
silverLiningSpread: 0.5
silverLiningIntensity: 1.42
edgeHighlightStrength: 0
ligthAbsorbtion: 0.61
density: 1
densitySmoothness: 1.25
baseErosionIntensity: 0.067
baseNoiseMultiplier: 1.1
detailErosionIntensity: 0.2
detailNoiseMultiplier: 1
curlIntensity: 0.757
bottomShape: -0.1
midShape: -1.48
topShape: -4.35
topLayer: 0
rampShape: 0.85
baseNoiseUVMultiplier: 0.89
detailNoiseUVMultiplier: 1.12
flatCloudsOverride:
cirrusCloudsAlpha: 1
cirrusCloudsCoverage: 0.431
cirrusCloudsColorPower: 1.25
cirrusCloudsAlpha: 0
cirrusCloudsCoverage: 0.293
cirrusCloudsColorPower: 1.13
flatCloudsCoverage: 1.287
flatCloudsDensity: 1
flatCloudsLightIntensity: 1.014
flatCloudsAmbientIntensity: 1.05
flatCloudsAbsorbtion: 1.814
flatCloudsShadowIntensity: 0.6
flatCloudsShadowSteps: 8
lightingOverride:
directLightIntensityModifier: 1
ambientIntensityModifier: 1
shadowIntensity: 1
skyOverride:
intensity: 1
mieScatteringMultiplier: 1
skyColorExponent: 1.2
skyColorTint: {r: 1, g: 1, b: 1, a: 1}
fogOverride:
fogDensity: 0.041
fogDensity: 0.015
fogHeightFalloff: 0.0121
fogHeight: 0
fogDensity2: 0.044
fogHeightFalloff2: 0.0056
fogDensity2: 0.412
fogHeightFalloff2: 0.0388
fogHeight2: 0
fogColorBlend: 0.5
fogColorMod: {r: 1, g: 1, b: 1, a: 1}
@@ -100,14 +96,14 @@ MonoBehaviour:
effectsOverride: []
audioOverride:
ambientOverride:
- showEditor: 0
- showEditor: 1
name: Day
volume: 1
spring: 0
summer: 0
autumn: 0
winter: 0
- showEditor: 0
- showEditor: 1
name: Night
volume: 1
spring: 0

View File

@@ -15,10 +15,10 @@ MonoBehaviour:
showEditor: 0
showEffectControls: 0
showCloudControls: 1
showFlatCloudControls: 1
showFogControls: 1
showFlatCloudControls: 0
showFogControls: 0
showSkyControls: 0
showLightingControls: 1
showLightingControls: 0
showAuroraControls: 0
showEnvironmentControls: 0
showAudioControls: 0
@@ -27,42 +27,35 @@ MonoBehaviour:
showLightningControls: 0
cloudsOverride:
ambientLightIntensity: 1
showLayer1: 1
coverageLayer1: -0.073
dilateCoverageLayer1: 0.423
dilateTypeLayer1: 1
typeModifierLayer1: 0.552
anvilBiasLayer1: 0.419
scatteringIntensityLayer1: 1.148
multiScatteringALayer1: 0.392
multiScatteringBLayer1: 0.495
multiScatteringCLayer1: 0.511
powderIntensityLayer1: 0.376
silverLiningSpreadLayer1: 0.903
ligthAbsorbtionLayer1: 1.326
densityLayer1: 0.5
densitySmoothnessLayer1: 1.114
baseErosionIntensityLayer1: 0.071
detailErosionIntensityLayer1: 0.3
curlIntensityLayer1: 0.3
showLayer2: 1
coverageLayer2: -0.177
dilateCoverageLayer2: 1
dilateTypeLayer2: 1
typeModifierLayer2: 0.473
anvilBiasLayer2: 1
scatteringIntensityLayer2: 0.964
multiScatteringALayer2: 0.416
multiScatteringBLayer2: 0.061
multiScatteringCLayer2: 0.188
powderIntensityLayer2: 0.89
silverLiningSpreadLayer2: 0.723
ligthAbsorbtionLayer2: 0.406
densityLayer2: 0.079
densitySmoothnessLayer2: 1.174
baseErosionIntensityLayer2: 0
detailErosionIntensityLayer2: 0.768
curlIntensityLayer2: 0.417
coverage: 0.171
dilateCoverage: 0.189
dilateType: 1
typeModifier: 0.558
cloudTypeShaping: 0.196
scatteringIntensity: 9.07
multiScatterStrength: 0.421
multiScatterFalloff: 0.394
ambientFloor: 0
lightningIntensity: 0
exposure: 2
silverLiningSpread: 0.1
silverLiningIntensity: 0.1
edgeHighlightStrength: 0.5
ligthAbsorbtion: 0.55
density: 0.9
densitySmoothness: 1.15
baseErosionIntensity: 0.046
baseNoiseMultiplier: 1.25
detailErosionIntensity: 0.188
detailNoiseMultiplier: 1
curlIntensity: 0.909
bottomShape: -0.18
midShape: -0.44
topShape: -0.56
topLayer: 0
rampShape: 0.45
baseNoiseUVMultiplier: 0.41
detailNoiseUVMultiplier: 1.25
flatCloudsOverride:
cirrusCloudsAlpha: 0.5
cirrusCloudsCoverage: 0.5
@@ -71,25 +64,28 @@ MonoBehaviour:
flatCloudsDensity: 1
flatCloudsLightIntensity: 0.478
flatCloudsAmbientIntensity: 0.969
flatCloudsAbsorbtion: 0.873
flatCloudsShadowIntensity: 0.6
flatCloudsShadowSteps: 8
lightingOverride:
directLightIntensityModifier: 1
ambientIntensityModifier: 1
shadowIntensity: 0.996
skyOverride:
intensity: 1
mieScatteringMultiplier: 0.75
skyColorExponent: 1.3
skyColorTint: {r: 1, g: 1, b: 1, a: 1}
fogOverride:
fogDensity: 0.059
fogHeightFalloff: 0.0045
fogDensity: 0.01
fogHeightFalloff: 0.0048
fogHeight: 0
fogDensity2: 0.053
fogDensity2: 0.07
fogHeightFalloff2: 0.05
fogHeight2: 0
fogColorBlend: 0.7
fogHeight2: -25
fogColorBlend: 0.75
fogColorMod: {r: 1, g: 1, b: 1, a: 1}
scattering: 0.2
extinction: 0.05
scattering: 0.25
extinction: 0.029
anistropy: 0.5
unityFogDensity: 0.05
unityFogStartDistance: 0
@@ -122,7 +118,7 @@ MonoBehaviour:
temperatureWeatherMod: 0
wetnessTarget: 0
snowTarget: 0
windDirectionX: 1
windDirectionY: -1
windDirectionX: 0.009
windDirectionY: 0.157
windSpeed: 0.25
windTurbulence: 0.25

View File

@@ -19,7 +19,7 @@ MonoBehaviour:
showFogControls: 1
showSkyControls: 0
showLightingControls: 0
showAuroraControls: 1
showAuroraControls: 0
showEnvironmentControls: 0
showAudioControls: 0
showAmbientAudioControls: 0
@@ -27,74 +27,71 @@ MonoBehaviour:
showLightningControls: 0
cloudsOverride:
ambientLightIntensity: 1
showLayer1: 1
coverageLayer1: 0.141
dilateCoverageLayer1: 0.667
dilateTypeLayer1: 0.661
typeModifierLayer1: 1
anvilBiasLayer1: 0
scatteringIntensityLayer1: 1.986
multiScatteringALayer1: 0.765
multiScatteringBLayer1: 0.165
multiScatteringCLayer1: 0.226
powderIntensityLayer1: 0.926
silverLiningSpreadLayer1: 0.82
ligthAbsorbtionLayer1: 0.77
densityLayer1: 1.155
densitySmoothnessLayer1: 2
baseErosionIntensityLayer1: 0
detailErosionIntensityLayer1: 0.5
curlIntensityLayer1: 0.4
showLayer2: 0
coverageLayer2: 0
dilateCoverageLayer2: 0.5
dilateTypeLayer2: 0.5
typeModifierLayer2: 0.5
anvilBiasLayer2: 0
scatteringIntensityLayer2: 1.5
multiScatteringALayer2: 0.5
multiScatteringBLayer2: 0.5
multiScatteringCLayer2: 0.5
powderIntensityLayer2: 0.3
silverLiningSpreadLayer2: 0.8
ligthAbsorbtionLayer2: 1
densityLayer2: 0.3
densitySmoothnessLayer2: 1
baseErosionIntensityLayer2: 0
detailErosionIntensityLayer2: 0.3
curlIntensityLayer2: 0.05
coverage: 0.25
dilateCoverage: 0.757
dilateType: 0
typeModifier: 0
cloudTypeShaping: 0.097
scatteringIntensity: 7.11
multiScatterStrength: 0.367
multiScatterFalloff: 0.209
ambientFloor: 0.117
lightningIntensity: 0
exposure: 0.63
silverLiningSpread: 0.1
silverLiningIntensity: 2
edgeHighlightStrength: 0
ligthAbsorbtion: 0.463
density: 1
densitySmoothness: 1.76
baseErosionIntensity: 0.207
baseNoiseMultiplier: 1.28
detailErosionIntensity: 0.272
detailNoiseMultiplier: 1
curlIntensity: 0.66
bottomShape: 0.15
midShape: -1.78
topShape: 0.24
topLayer: 0
rampShape: 0.13
baseNoiseUVMultiplier: 0.64
detailNoiseUVMultiplier: 1.09
flatCloudsOverride:
cirrusCloudsAlpha: 0.5
cirrusCloudsCoverage: 0.5
cirrusCloudsColorPower: 1
flatCloudsCoverage: 1
flatCloudsDensity: 1
flatCloudsLightIntensity: 1
flatCloudsAmbientIntensity: 1
flatCloudsAbsorbtion: 0.6
flatCloudsCoverage: 1.3
flatCloudsDensity: 1.24
flatCloudsLightIntensity: 0.73
flatCloudsAmbientIntensity: 1.33
flatCloudsShadowIntensity: 0.6
flatCloudsShadowSteps: 8
lightingOverride:
directLightIntensityModifier: 1
ambientIntensityModifier: 1
shadowIntensity: 1
skyOverride:
intensity: 1
mieScatteringMultiplier: 1
skyColorExponent: 1.2
skyColorTint: {r: 1, g: 1, b: 1, a: 1}
fogOverride:
fogDensity: 0.027
fogHeightFalloff: 0.0008
fogDensity: 0.153
fogHeightFalloff: 0.0059
fogHeight: 0
fogDensity2: 0.053
fogDensity2: 0.086
fogHeightFalloff2: 0.05
fogHeight2: 0
fogColorBlend: 0.75
fogColorMod: {r: 1, g: 1, b: 1, a: 1}
scattering: 0.015
extinction: 0.035
anistropy: 0.6
fogColorBlend: 0.482
fogColorMod: {r: 0.8584906, g: 0.8584906, b: 0.8584906, a: 1}
scattering: 0.195
extinction: 0.033
anistropy: 0.435
unityFogDensity: 0.002
unityFogStartDistance: 0
unityFogEndDistance: 1000
auroraOverride:
auroraIntensity: 1
auroraIntensity: 0
effectsOverride:
effectsOverride: []
audioOverride:
@@ -107,7 +104,7 @@ MonoBehaviour:
temperatureWeatherMod: 0
wetnessTarget: 0
snowTarget: 0
windDirectionX: 1
windDirectionY: -1
windSpeed: 0.131
windDirectionX: -1
windDirectionY: 1
windSpeed: 0.2
windTurbulence: 0.111

View File

@@ -0,0 +1,110 @@
%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: 5cbac6e678443724c9bd2baf5d564c1d, type: 3}
m_Name: Cloudy 4
m_EditorClassIdentifier:
showEditor: 0
showEffectControls: 0
showCloudControls: 0
showFlatCloudControls: 0
showFogControls: 1
showSkyControls: 0
showLightingControls: 0
showAuroraControls: 0
showEnvironmentControls: 0
showAudioControls: 0
showAmbientAudioControls: 0
showWeatherAudioControls: 0
showLightningControls: 0
cloudsOverride:
ambientLightIntensity: 1
coverage: 0.74
dilateCoverage: 1
dilateType: 1
typeModifier: 0
cloudTypeShaping: 0.548
scatteringIntensity: 5.27
multiScatterStrength: 0.495
multiScatterFalloff: 0.143
ambientFloor: 0.058
lightningIntensity: 0
exposure: 0.64
silverLiningSpread: 0.2
silverLiningIntensity: 0.86
edgeHighlightStrength: 0
ligthAbsorbtion: 1.37
density: 0.06
densitySmoothness: 0.68
baseErosionIntensity: 0.971
baseNoiseMultiplier: 1.65
detailErosionIntensity: 0.21
detailNoiseMultiplier: 1
curlIntensity: 0.71
bottomShape: -0.04
midShape: -4.27
topShape: 1.47
topLayer: 2
rampShape: 0.21
baseNoiseUVMultiplier: 0.36
detailNoiseUVMultiplier: 1.27
flatCloudsOverride:
cirrusCloudsAlpha: 0.5
cirrusCloudsCoverage: 0.5
cirrusCloudsColorPower: 1
flatCloudsCoverage: 1.3
flatCloudsDensity: 1.24
flatCloudsLightIntensity: 0.73
flatCloudsAmbientIntensity: 1.33
flatCloudsShadowIntensity: 0.6
flatCloudsShadowSteps: 8
lightingOverride:
directLightIntensityModifier: 1
ambientIntensityModifier: 1
shadowIntensity: 1
skyOverride:
intensity: 1
mieScatteringMultiplier: 0.75
skyColorExponent: 1.25
skyColorTint: {r: 1, g: 1, b: 1, a: 1}
fogOverride:
fogDensity: 0.06
fogHeightFalloff: 0.003
fogHeight: 0
fogDensity2: 0.25
fogHeightFalloff2: 0.05
fogHeight2: 25
fogColorBlend: 0.8
fogColorMod: {r: 1, g: 1, b: 1, a: 1}
scattering: 0.1
extinction: 0.02
anistropy: 0.674
unityFogDensity: 0.002
unityFogStartDistance: 0
unityFogEndDistance: 1000
auroraOverride:
auroraIntensity: 1
effectsOverride:
effectsOverride: []
audioOverride:
ambientOverride: []
weatherOverride: []
lightningOverride:
lightningStorm: 0
randomLightningDelay: 1
environmentOverride:
temperatureWeatherMod: 0
wetnessTarget: 0
snowTarget: 0
windDirectionX: -1
windDirectionY: 1
windSpeed: 0.2
windTurbulence: 0.111

View File

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

View File

@@ -27,42 +27,35 @@ MonoBehaviour:
showLightningControls: 0
cloudsOverride:
ambientLightIntensity: 1
showLayer1: 1
coverageLayer1: 0.208
dilateCoverageLayer1: 0.836
dilateTypeLayer1: 0.479
typeModifierLayer1: 0.095
anvilBiasLayer1: 0.228
scatteringIntensityLayer1: 0.954
multiScatteringALayer1: 0.222
multiScatteringBLayer1: 0.341
multiScatteringCLayer1: 0.535
powderIntensityLayer1: 0.6
silverLiningSpreadLayer1: 0.8
ligthAbsorbtionLayer1: 0.739
densityLayer1: 0.234
densitySmoothnessLayer1: 1.281
baseErosionIntensityLayer1: 0.148
detailErosionIntensityLayer1: 0.335
curlIntensityLayer1: 0.414
showLayer2: 0
coverageLayer2: 0
dilateCoverageLayer2: 0.5
dilateTypeLayer2: 0.5
typeModifierLayer2: 0.5
anvilBiasLayer2: 0
scatteringIntensityLayer2: 1.5
multiScatteringALayer2: 0.5
multiScatteringBLayer2: 0.5
multiScatteringCLayer2: 0.5
powderIntensityLayer2: 0.3
silverLiningSpreadLayer2: 0.8
ligthAbsorbtionLayer2: 1
densityLayer2: 0.3
densitySmoothnessLayer2: 1
baseErosionIntensityLayer2: 0
detailErosionIntensityLayer2: 0.3
curlIntensityLayer2: 0.05
coverage: 0.19
dilateCoverage: 0.09
dilateType: 0.117
typeModifier: 1
cloudTypeShaping: 0
scatteringIntensity: 2.19
multiScatterStrength: 0.785
multiScatterFalloff: 0.061
ambientFloor: 0.233
lightningIntensity: 0
exposure: 0.925
silverLiningSpread: 0.25
silverLiningIntensity: 0.934
edgeHighlightStrength: 1
ligthAbsorbtion: 0.45
density: 1.1
densitySmoothness: 1.56
baseErosionIntensity: 0.337
baseNoiseMultiplier: 1.29
detailErosionIntensity: 0.389
detailNoiseMultiplier: 1
curlIntensity: 1
bottomShape: 1.31
midShape: -5
topShape: -5
topLayer: 0
rampShape: 0.87
baseNoiseUVMultiplier: 1
detailNoiseUVMultiplier: 1
flatCloudsOverride:
cirrusCloudsAlpha: 0.5
cirrusCloudsCoverage: 0.5
@@ -71,26 +64,29 @@ MonoBehaviour:
flatCloudsDensity: 1
flatCloudsLightIntensity: 1
flatCloudsAmbientIntensity: 1
flatCloudsAbsorbtion: 0.6
flatCloudsShadowIntensity: 0.6
flatCloudsShadowSteps: 8
lightingOverride:
directLightIntensityModifier: 1
ambientIntensityModifier: 1
shadowIntensity: 1
skyOverride:
intensity: 1
mieScatteringMultiplier: 1
skyColorExponent: 1
skyColorTint: {r: 1, g: 1, b: 1, a: 1}
fogOverride:
fogDensity: 0.142
fogHeightFalloff: 0.0034
fogDensity: 0.809
fogHeightFalloff: 0.0015
fogHeight: 0
fogDensity2: 0.651
fogHeightFalloff2: 0.0469
fogHeight2: 0
fogColorBlend: 0.75
fogDensity2: 0.475
fogHeightFalloff2: 0.05
fogHeight2: 100
fogColorBlend: 0.25
fogColorMod: {r: 1, g: 1, b: 1, a: 1}
scattering: 0.461
extinction: 0.046
anistropy: 0.3
scattering: 0.078
extinction: 0.006
anistropy: 0.331
unityFogDensity: 0.002
unityFogStartDistance: 0
unityFogEndDistance: 1000
@@ -108,7 +104,7 @@ MonoBehaviour:
temperatureWeatherMod: 0
wetnessTarget: 0
snowTarget: 0
windDirectionX: 1
windDirectionY: -1
windDirectionX: -1
windDirectionY: 1
windSpeed: 0.25
windTurbulence: 0.25

View File

@@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
showEditor: 0
showEffectControls: 0
showCloudControls: 0
showCloudControls: 1
showFlatCloudControls: 0
showFogControls: 0
showSkyControls: 0
@@ -26,43 +26,36 @@ MonoBehaviour:
showWeatherAudioControls: 0
showLightningControls: 0
cloudsOverride:
ambientLightIntensity: 0.6
showLayer1: 1
coverageLayer1: 0.48
dilateCoverageLayer1: 1
dilateTypeLayer1: 0.233
typeModifierLayer1: 0.804
anvilBiasLayer1: 0.651
scatteringIntensityLayer1: 0.12
multiScatteringALayer1: 0.44
multiScatteringBLayer1: 0.177
multiScatteringCLayer1: 0.44
powderIntensityLayer1: 0.219
silverLiningSpreadLayer1: 0.8
ligthAbsorbtionLayer1: 1.286
densityLayer1: 0.2
densitySmoothnessLayer1: 1.65
baseErosionIntensityLayer1: 0
detailErosionIntensityLayer1: 0.8
curlIntensityLayer1: 0.2
showLayer2: 0
coverageLayer2: -1
dilateCoverageLayer2: 0.5
dilateTypeLayer2: 0.5
typeModifierLayer2: 0.5
anvilBiasLayer2: 0
scatteringIntensityLayer2: 1.5
multiScatteringALayer2: 0.5
multiScatteringBLayer2: 0.5
multiScatteringCLayer2: 0.5
powderIntensityLayer2: 0.3
silverLiningSpreadLayer2: 0.8
ligthAbsorbtionLayer2: 1
densityLayer2: 0.3
densitySmoothnessLayer2: 1
baseErosionIntensityLayer2: 0
detailErosionIntensityLayer2: 0.3
curlIntensityLayer2: 0.05
ambientLightIntensity: 1
coverage: 0.51
dilateCoverage: 0
dilateType: 0
typeModifier: 0.5
cloudTypeShaping: 0.597
scatteringIntensity: 3.45
multiScatterStrength: 0.433
multiScatterFalloff: 0.049
ambientFloor: 0.093
lightningIntensity: 0
exposure: 0.33
silverLiningSpread: 1
silverLiningIntensity: 0
edgeHighlightStrength: 0
ligthAbsorbtion: 0.5
density: 1
densitySmoothness: 1.5
baseErosionIntensity: 0
baseNoiseMultiplier: 0.72
detailErosionIntensity: 0.067
detailNoiseMultiplier: 1
curlIntensity: 1
bottomShape: 0.06
midShape: 0.52
topShape: -2.45
topLayer: 0
rampShape: 0.16
baseNoiseUVMultiplier: 1.16
detailNoiseUVMultiplier: 1
flatCloudsOverride:
cirrusCloudsAlpha: 0
cirrusCloudsCoverage: 0
@@ -71,15 +64,19 @@ MonoBehaviour:
flatCloudsDensity: 1
flatCloudsLightIntensity: 1
flatCloudsAmbientIntensity: 1
flatCloudsAbsorbtion: 0.6
flatCloudsShadowIntensity: 0.6
flatCloudsShadowSteps: 8
lightingOverride:
directLightIntensityModifier: 0.5
ambientIntensityModifier: 0.6
directLightIntensityModifier: 0.75
ambientIntensityModifier: 1
shadowIntensity: 1
skyOverride:
intensity: 1
skyColorTint: {r: 1, g: 1, b: 1, a: 1}
mieScatteringMultiplier: 0.1
skyColorExponent: 1.1
skyColorTint: {r: 0.20754719, g: 0.20754719, b: 0.20754719, a: 1}
fogOverride:
fogDensity: 0.02
fogDensity: 0.079
fogHeightFalloff: 0.0016
fogHeight: 0
fogDensity2: 0.312
@@ -117,7 +114,7 @@ MonoBehaviour:
temperatureWeatherMod: 0
wetnessTarget: 1
snowTarget: 0
windDirectionX: 1
windDirectionY: -1
windDirectionX: -1
windDirectionY: 1
windSpeed: 0.25
windTurbulence: 0.25

View File

@@ -27,42 +27,35 @@ MonoBehaviour:
showLightningControls: 0
cloudsOverride:
ambientLightIntensity: 1
showLayer1: 1
coverageLayer1: 0.29
dilateCoverageLayer1: 1
dilateTypeLayer1: 1
typeModifierLayer1: 0.86
anvilBiasLayer1: 1
scatteringIntensityLayer1: 0.213
multiScatteringALayer1: 0.687
multiScatteringBLayer1: 0.571
multiScatteringCLayer1: 0.173
powderIntensityLayer1: 0.7
silverLiningSpreadLayer1: 0.8
ligthAbsorbtionLayer1: 0.869
densityLayer1: 0.15
densitySmoothnessLayer1: 1
baseErosionIntensityLayer1: 1
detailErosionIntensityLayer1: 0.5
curlIntensityLayer1: 0.15
showLayer2: 0
coverageLayer2: 0
dilateCoverageLayer2: 0.5
dilateTypeLayer2: 0.5
typeModifierLayer2: 0.5
anvilBiasLayer2: 0
scatteringIntensityLayer2: 1.5
multiScatteringALayer2: 0.5
multiScatteringBLayer2: 0.5
multiScatteringCLayer2: 0.5
powderIntensityLayer2: 0.3
silverLiningSpreadLayer2: 0.8
ligthAbsorbtionLayer2: 1
densityLayer2: 0.3
densitySmoothnessLayer2: 1
baseErosionIntensityLayer2: 0
detailErosionIntensityLayer2: 0.3
curlIntensityLayer2: 0.05
coverage: 0.69
dilateCoverage: 0.1
dilateType: 0
typeModifier: 0.804
cloudTypeShaping: 0.751
scatteringIntensity: 5.02
multiScatterStrength: 0.449
multiScatterFalloff: 0.049
ambientFloor: 0.08
lightningIntensity: 0
exposure: 0.9
silverLiningSpread: 0.708
silverLiningIntensity: 1.136
edgeHighlightStrength: 1
ligthAbsorbtion: 0.81
density: 1
densitySmoothness: 1.5
baseErosionIntensity: 0.29
baseNoiseMultiplier: 0.74
detailErosionIntensity: 0.2
detailNoiseMultiplier: 1
curlIntensity: 0.444
bottomShape: 0.25
midShape: -1.54
topShape: -0.1
topLayer: 0
rampShape: 0.487
baseNoiseUVMultiplier: 1
detailNoiseUVMultiplier: 0.6
flatCloudsOverride:
cirrusCloudsAlpha: 0.5
cirrusCloudsCoverage: 0.5
@@ -71,13 +64,16 @@ MonoBehaviour:
flatCloudsDensity: 1
flatCloudsLightIntensity: 1
flatCloudsAmbientIntensity: 1
flatCloudsAbsorbtion: 0.6
flatCloudsShadowIntensity: 0.6
flatCloudsShadowSteps: 8
lightingOverride:
directLightIntensityModifier: 0.8
ambientIntensityModifier: 0.8
shadowIntensity: 1
skyOverride:
intensity: 1
mieScatteringMultiplier: 1
skyColorExponent: 1
skyColorTint: {r: 1, g: 1, b: 1, a: 1}
fogOverride:
fogDensity: 0.087

View File

@@ -12,9 +12,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5cbac6e678443724c9bd2baf5d564c1d, type: 3}
m_Name: Storm
m_EditorClassIdentifier:
showEditor: 1
showEditor: 0
showEffectControls: 0
showCloudControls: 0
showCloudControls: 1
showFlatCloudControls: 0
showFogControls: 0
showSkyControls: 0
@@ -24,45 +24,38 @@ MonoBehaviour:
showAudioControls: 0
showAmbientAudioControls: 0
showWeatherAudioControls: 0
showLightningControls: 1
showLightningControls: 0
cloudsOverride:
ambientLightIntensity: 0.187
showLayer1: 0
coverageLayer1: 0.163
dilateCoverageLayer1: 1
dilateTypeLayer1: 0.233
typeModifierLayer1: 0.804
anvilBiasLayer1: 0.415
scatteringIntensityLayer1: 0.128
multiScatteringALayer1: 0.386
multiScatteringBLayer1: 0.497
multiScatteringCLayer1: 0.444
powderIntensityLayer1: 0.219
silverLiningSpreadLayer1: 0.8
ligthAbsorbtionLayer1: 1.525
densityLayer1: 0.134
densitySmoothnessLayer1: 1.584
baseErosionIntensityLayer1: 0
detailErosionIntensityLayer1: 0.693
curlIntensityLayer1: 0.2
showLayer2: 0
coverageLayer2: -1
dilateCoverageLayer2: 0.5
dilateTypeLayer2: 0.5
typeModifierLayer2: 0.5
anvilBiasLayer2: 0
scatteringIntensityLayer2: 1.5
multiScatteringALayer2: 0.5
multiScatteringBLayer2: 0.5
multiScatteringCLayer2: 0.5
powderIntensityLayer2: 0.3
silverLiningSpreadLayer2: 0.8
ligthAbsorbtionLayer2: 1
densityLayer2: 0.3
densitySmoothnessLayer2: 1
baseErosionIntensityLayer2: 0
detailErosionIntensityLayer2: 0.3
curlIntensityLayer2: 0.05
ambientLightIntensity: 0.5
coverage: 0.534
dilateCoverage: 1
dilateType: 0
typeModifier: 1
cloudTypeShaping: 0
scatteringIntensity: 7.12
multiScatterStrength: 0.374
multiScatterFalloff: 0.06
ambientFloor: 0
lightningIntensity: 0.75
exposure: 0.31
silverLiningSpread: 0
silverLiningIntensity: 0
edgeHighlightStrength: 0
ligthAbsorbtion: 0.67
density: 0.9
densitySmoothness: 1.2
baseErosionIntensity: 0.155
baseNoiseMultiplier: 1
detailErosionIntensity: 0.212
detailNoiseMultiplier: 1.03
curlIntensity: 1
bottomShape: -0.39
midShape: -0.53
topShape: 0.74
topLayer: 0
rampShape: 0.13
baseNoiseUVMultiplier: 0.61
detailNoiseUVMultiplier: 0.57
flatCloudsOverride:
cirrusCloudsAlpha: 0
cirrusCloudsCoverage: 0
@@ -71,21 +64,24 @@ MonoBehaviour:
flatCloudsDensity: 1
flatCloudsLightIntensity: 0.099
flatCloudsAmbientIntensity: 1
flatCloudsAbsorbtion: 0.782
flatCloudsShadowIntensity: 0.6
flatCloudsShadowSteps: 8
lightingOverride:
directLightIntensityModifier: 0.33
ambientIntensityModifier: 0.5
shadowIntensity: 1
skyOverride:
intensity: 1
skyColorTint: {r: 1, g: 1, b: 1, a: 1}
mieScatteringMultiplier: 0
skyColorExponent: 1.5
skyColorTint: {r: 0.24528301, g: 0.24528301, b: 0.24528301, a: 1}
fogOverride:
fogDensity: 0
fogHeightFalloff: 0.0039
fogDensity: 0.073
fogHeightFalloff: 0.0025
fogHeight: 0
fogDensity2: 0.598
fogHeightFalloff2: 0.0177
fogHeight2: -30
fogDensity2: 0.837
fogHeightFalloff2: 0.0424
fogHeight2: 94.39
fogColorBlend: 0.5
fogColorMod: {r: 0.2735849, g: 0.2722944, b: 0.2722944, a: 1}
scattering: 0.38
@@ -113,12 +109,12 @@ MonoBehaviour:
winter: 0
lightningOverride:
lightningStorm: 1
randomLightningDelay: 5
randomLightningDelay: 3
environmentOverride:
temperatureWeatherMod: 0
wetnessTarget: 1
snowTarget: 0
windDirectionX: 1
windDirectionY: -1
windSpeed: 0.85
windDirectionX: -1
windDirectionY: 1
windSpeed: 0.796
windTurbulence: 0.5

View File

@@ -3,7 +3,6 @@ Shader "Hidden/Enviro/BlitTroughHDRP"
HLSLINCLUDE
#pragma target 4.5
#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch
#pragma multi_compile __ ENVIROHDRP
#if defined (ENVIROHDRP)

View File

@@ -64,7 +64,7 @@
float4 sceneColor = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex,i.uv);
float4 cloudTex = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CloudsTex,i.uv);
float shadowsClouds = saturate(1-(cloudTex.b * saturate(1-cloudTex.a) * _Intensity));
float shadowsClouds = saturate(1-(cloudTex.b * _Intensity));
// shadowsClouds = shadowsClouds * ;
float4 final = float4(sceneColor.rgb * shadowsClouds, sceneColor.a);

View File

@@ -66,7 +66,7 @@
float4 sceneColor = SAMPLE_TEXTURE2D_X_LOD(_MainTex,s_trilinear_clamp_sampler, i.uv, 0);
float4 cloudTex = SAMPLE_TEXTURE2D_X(_CloudsTex,sampler_CloudsTex, i.uv * _HandleScales.xy);
float shadowsClouds = saturate(1-(cloudTex.b * saturate(1-cloudTex.a) * _Intensity));
float shadowsClouds = saturate(1-(cloudTex.b * _Intensity));
float4 final = float4(sceneColor.rgb * shadowsClouds, sceneColor.a);
return final;

View File

@@ -66,7 +66,7 @@
float4 sceneColor = SAMPLE_TEXTURE2D_X(_MainTex,sampler_MainTex,i.uv);
float4 cloudTex = SAMPLE_TEXTURE2D_X(_CloudsTex,sampler_CloudsTex,i.uv);
float shadowsClouds = saturate(1-(cloudTex.b * saturate(1-cloudTex.a) * _Intensity));
float shadowsClouds = saturate(1-(cloudTex.b * _Intensity));
// shadowsClouds = shadowsClouds * ;
float4 final = float4(sceneColor.rgb * shadowsClouds, sceneColor.a);

View File

@@ -21,8 +21,7 @@ Shader "Hidden/EnviroVolumetricCloudsBlend"
#pragma multi_compile __ UNITY_COLORSPACE_GAMMA
#include "UnityCG.cginc"
//#include "../Includes/SkyInclude.cginc"
#include "../Includes/FogInclude.cginc"
#include_with_pragmas "../Includes/FogInclude.cginc"
UNITY_DECLARE_SCREENSPACE_TEXTURE(_MainTex);
@@ -44,7 +43,7 @@ Shader "Hidden/EnviroVolumetricCloudsBlend"
float4 _ProjectionExtentsRight;
float4x4 _CamToWorld;
struct appdata
{
@@ -168,30 +167,21 @@ Shader "Hidden/EnviroVolumetricCloudsBlend"
{
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
float4 vspos = float4(i.vsray, 1.0, 1.0);
float4 vspos = float4(i.vsray, 1.0,1.0);
float4 worldPos = mul(_CamToWorld,vspos);
float3 viewDir = normalize(worldPos.xyz - _WorldSpaceCameraPos);
float4 sourceColor = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex,UnityStereoTransformScreenSpaceTex(i.uv));
float4 sourceColor = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_MainTex,UnityStereoTransformScreenSpaceTex(i.uv));
float4 cloudsColor = Upsample(i);
float3 sunColor = pow(_DirectLightColor.rgb,2) * 2.0f;
float3 skyColor = GetSkyColor(viewDir,0.005f);
float4 finalColor = float4(cloudsColor.r * sunColor + _AmbientColor, cloudsColor.a);
float atmosphericBlendFactor = saturate(exp(-cloudsColor.g / _AtmosphereColorSaturateDistance));
//if(_WorldSpaceCameraPos.y <= 2000)
finalColor.rgb = lerp(skyColor, finalColor.rgb, atmosphericBlendFactor);
float4 finalColor = GetCloudColor(cloudsColor,worldPos);
#if defined(UNITY_COLORSPACE_GAMMA)
finalColor.rgb = LinearToGammaSpace(finalColor.rgb);
#endif
#if ENVIRO_DEPTH_BLENDING
float4 final = float4(sourceColor.rgb * (1 - finalColor.a) + finalColor.rgb * finalColor.a, 1);
float4 final = float4(sourceColor.rgb * (1 - finalColor.a) + lerp(sourceColor.rgb, finalColor.rgb, finalColor.a) * finalColor.a, 1);
return final;
#else
float4 final = sourceColor;
@@ -199,7 +189,7 @@ Shader "Hidden/EnviroVolumetricCloudsBlend"
float sceneDepth = Linear01Depth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, UnityStereoTransformScreenSpaceTex(i.uv)));
if (sceneDepth >= 0.99f)
final = float4(sourceColor.rgb * saturate(1 - finalColor.a) + finalColor.rgb * finalColor.a, 1);
final = float4(sourceColor.rgb * saturate(1 - finalColor.a) + lerp(sourceColor.rgb, finalColor.rgb, finalColor.a) * finalColor.a, 1);
return final;
#endif

View File

@@ -5,7 +5,7 @@ Shader "Hidden/EnviroVolumetricCloudsBlendHDRP"
//_MainTex ("Texture", any) = "white" {}
}
SubShader
{
{
Tags { "RenderType"="Opaque"}
LOD 100
@@ -16,11 +16,10 @@ Shader "Hidden/EnviroVolumetricCloudsBlendHDRP"
HLSLPROGRAM
#pragma target 4.5
#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile __ ENVIRO_DEPTH_BLENDING
#pragma multi_compile __ ENVIROHDRP
#pragma multi_compile __ ENVIROHDRP
#if defined (ENVIROHDRP)
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
@@ -30,8 +29,7 @@ Shader "Hidden/EnviroVolumetricCloudsBlendHDRP"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/RTUpscale.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/AtmosphericScattering/AtmosphericScattering.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUtils.hlsl"
//#include "../Includes/SkyIncludeHLSL.hlsl"
#include "../Includes/FogIncludeHLSL.hlsl"
#include_with_pragmas "../Includes/FogIncludeHLSL.hlsl"
TEXTURE2D_X(_MainTex);
TEXTURE2D_X(_DownsampledDepth);
@@ -156,47 +154,38 @@ Shader "Hidden/EnviroVolumetricCloudsBlendHDRP"
float4 vspos = float4(i.vsray, 1.0, 1.0);
float4 worldPos = mul(_CamToWorld,vspos);
float3 viewDir = normalize(worldPos.xyz - _WorldSpaceCameraPos);
float4 sourceColor = SAMPLE_TEXTURE2D_X_LOD(_MainTex,s_trilinear_clamp_sampler, i.uv, 0);
float4 cloudsColor = float4(0,0,0,0);
#ifdef ENVIRO_DEPTH_BLENDING
float4 cloudsColor = Upsample(i);
cloudsColor = Upsample(i);
#else
//float3 uv = float3(i.uv * (1/_HandleScales.xy) ,unity_StereoEyeIndex);
//float4 cloudsColor = _CloudTex.Sample(sampler_CloudTex, uv);
float4 cloudsColor = SAMPLE_TEXTURE2D_X_LOD(_CloudTex,sampler_CloudTex, i.uv * _HandleScales.xy, 0);
cloudsColor = SAMPLE_TEXTURE2D_X_LOD(_CloudTex,sampler_CloudTex, i.uv * _HandleScales.xy, 0);
#endif
float3 sunColor = pow(_DirectLightColor.rgb,2) * 2.0f;
float3 skyColor = GetSkyColor(viewDir,0.005f);
float4 finalColor = float4((cloudsColor.r * sunColor + _AmbientColor) * _EnviroSkyIntensity * GetCurrentExposureMultiplier(), cloudsColor.a);
float atmosphericBlendFactor = saturate(exp(-cloudsColor.g / _AtmosphereColorSaturateDistance));
//if(_WorldSpaceCameraPos.y <= 2000)
finalColor.rgb = lerp(skyColor, finalColor.rgb, atmosphericBlendFactor);
float4 finalColor = GetCloudColor(cloudsColor,worldPos);
finalColor.rgb *= _EnviroSkyIntensity * GetCurrentExposureMultiplier();
float rawDepth = LOAD_TEXTURE2D_X_LOD(_CameraDepthTexture, i.uv * _ScreenSize.xy * (1/_RTHandleScale.xy), 0);
float sceneDepth = Linear01Depth(rawDepth, _ZBufferParams);
#if ENVIRO_DEPTH_BLENDING
float4 final = float4(sourceColor.rgb * (1 - finalColor.a) + finalColor.rgb * finalColor.a, 1);
float4 final = float4(sourceColor.rgb * (1 - finalColor.a) + lerp(sourceColor.rgb, finalColor.rgb, finalColor.a) * finalColor.a, 1);
#else
float4 final = sourceColor;
if (sceneDepth == 1.0f)
final = half4(sourceColor.rgb * saturate(1 - finalColor.a) + finalColor.rgb * finalColor.a, 1);
final = half4(sourceColor.rgb * saturate(1 - finalColor.a) + lerp(sourceColor.rgb, finalColor.rgb, finalColor.a) * finalColor.a, 1);
#endif
// HDRP Fog
if (sceneDepth == 1.0f)
/*if (sceneDepth == 1.0f)
{
PositionInputs posInput = GetPositionInput(i.vertex.xy, _ScreenSize.zw, rawDepth, UNITY_MATRIX_I_VP, UNITY_MATRIX_V);
float3 V = GetSkyViewDirWS(i.uv * _ScreenSize.xy * (1/_RTHandleScale.xy));
posInput.positionWS = GetCurrentViewPosition() - V * _MaxFogDistance;
EvaluateAtmosphericScattering(posInput, V, color, opacity);
final.rgb = color + (1 - opacity) * final.rgb;
}
}*/
return final;
}

View File

@@ -8,7 +8,7 @@ Shader "Hidden/EnviroVolumetricCloudsBlendURP"
{
Tags { "RenderType"="Opaque" }
LOD 100
Pass
{
Cull Off ZWrite Off ZTest Always
@@ -23,7 +23,7 @@ Shader "Hidden/EnviroVolumetricCloudsBlendURP"
#if defined (ENVIROURP)
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blit.hlsl"
#include "../Includes/FogIncludeHLSL.hlsl"
#include_with_pragmas "../Includes/FogIncludeHLSL.hlsl"
TEXTURE2D_X(_MainTex);
SAMPLER (sampler_MainTex);
@@ -184,22 +184,16 @@ Shader "Hidden/EnviroVolumetricCloudsBlendURP"
float4 sourceColor = SAMPLE_TEXTURE2D_X(_MainTex,sampler_MainTex,i.uv);
float4 cloudsColor = Upsample(i);
float3 sunColor = pow(_DirectLightColor.rgb,2) * 2.0f;
float3 skyColor = GetSkyColor(viewDir,0.005f);
float4 finalColor = float4(cloudsColor.r * sunColor + _AmbientColor, cloudsColor.a);
float atmosphericBlendFactor = saturate(exp(-cloudsColor.g / _AtmosphereColorSaturateDistance));
//if(_WorldSpaceCameraPos.y <= 2000)
finalColor.rgb = lerp(skyColor, finalColor.rgb, atmosphericBlendFactor);
float4 cloudsColor = Upsample(i);
float4 finalColor = GetCloudColor(cloudsColor,worldPos);
#if defined(UNITY_COLORSPACE_GAMMA)
finalColor.rgb = LinearToGammaSpace(finalColor.rgb);
#endif
#if ENVIRO_DEPTH_BLENDING
float4 final = float4(sourceColor.rgb * (1 - finalColor.a) + finalColor.rgb * finalColor.a, 1);
float4 final = float4(sourceColor.rgb * (1 - finalColor.a) + lerp(sourceColor.rgb, finalColor.rgb, finalColor.a) * finalColor.a, 1);
return final;
#else
float4 final = sourceColor;
@@ -207,7 +201,7 @@ Shader "Hidden/EnviroVolumetricCloudsBlendURP"
float sceneDepth = Linear01Depth(SAMPLE_TEXTURE2D_X(_CameraDepthTexture,sampler_CameraDepthTexture, i.uv).r, _ZBufferParams);
if (sceneDepth >= 0.99f)
final = float4(sourceColor.rgb * saturate(1 - finalColor.a) + finalColor.rgb * finalColor.a, 1);
final = float4(sourceColor.rgb * saturate(1 - finalColor.a) + lerp(sourceColor.rgb, finalColor.rgb, finalColor.a) * finalColor.a, 1);
return final;
#endif

View File

@@ -1,7 +1,7 @@
Shader "Hidden/EnviroCloudsRaymarch"
{
Properties
{
{
//_MainTex ("Texture", any) = "white" {}
}
SubShader
@@ -11,16 +11,17 @@ Shader "Hidden/EnviroCloudsRaymarch"
Pass
{
CGPROGRAM
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_local _ ENVIRO_DEPTH_BLENDING
#pragma multi_compile_local _ ENVIRO_DUAL_LAYER
#pragma multi_compile_local _ ENVIRO_CLOUD_SHADOWS
#pragma multi_compile_local _ ENVIRO_LIGHTNING
#pragma multi_compile_local _ ENVIRO_VARIABLE_BOTTOM
#pragma multi_compile _ ENVIROURP
#include "UnityCG.cginc"
#include "../Includes/VolumetricCloudsInclude.cginc"
#include "../Includes/VolumetricCloudsTexInclude.cginc"
#include_with_pragmas "../Includes/VolumetricCloudsInclude.cginc"
#include_with_pragmas "../Includes/VolumetricCloudsTexInclude.cginc"
int _Frame;
uniform float _BlueNoiseIntensity;
@@ -52,8 +53,6 @@ Shader "Hidden/EnviroCloudsRaymarch"
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
//o.eyeIndex = unity_StereoEyeIndex;
#if defined(ENVIROURP)
o.position = float4(v.vertex.xyz,1.0);
#if UNITY_UV_STARTS_AT_TOP
@@ -94,125 +93,32 @@ Shader "Hidden/EnviroCloudsRaymarch"
}
float rayLength = length(ray);
/*float4 highResDepth = LinearEyeDepth(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, UnityStereoTransformScreenSpaceTex(i.uv))).xxxx;
float4 lowResDepth;
lowResDepth[0] = LinearEyeDepth(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_DownsampledDepth, UnityStereoTransformScreenSpaceTex(i.uv00)));
lowResDepth[1] = LinearEyeDepth(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_DownsampledDepth, UnityStereoTransformScreenSpaceTex(i.uv10)));
lowResDepth[2] = LinearEyeDepth(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_DownsampledDepth, UnityStereoTransformScreenSpaceTex(i.uv01)));
lowResDepth[3] = LinearEyeDepth(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_DownsampledDepth, UnityStereoTransformScreenSpaceTex(i.uv11)));
float4 depthDiff = abs(lowResDepth - highResDepth);
float accumDiff = dot(depthDiff, float4(1, 1, 1, 1));
// [branch]
//if (accumDiff < threshold) // small error, not an edge -> use bilinear filter
//{
// return SampleTexture(loColor,linearSampler,input.uv);
//}
// find nearest sample
float minDepthDiff = depthDiff[0];
float2 nearestUv = i.uv00;
if (depthDiff[1] < minDepthDiff)
{
nearestUv = i.uv10;
minDepthDiff = depthDiff[1];
}
if (depthDiff[2] < minDepthDiff)
{
nearestUv = i.uv01;
minDepthDiff = depthDiff[2];
}
if (depthDiff[3] < minDepthDiff)
{
nearestUv = i.uv11;
minDepthDiff = depthDiff[3];
}
float sceneDepth = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CameraDepthTexture, UnityStereoTransformScreenSpaceTex(nearestUv));
*/
float sceneDepth = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_DownsampledDepth, UnityStereoTransformScreenSpaceTex(i.uv));
float3 cameraDirection = -1 * transpose(_InverseRotation)[2].xyz;
float fwdFactor = dot(ray, cameraDirection);
float raymarchEnd = GetRaymarchEndFromSceneDepth(Linear01Depth(sceneDepth) / fwdFactor, 1000000); //* rayLenght
float raymarchEnd = GetRaymarchEndFromSceneDepth(Linear01Depth(sceneDepth) / fwdFactor, 1000000);
float offset = tex2D(_BlueNoise, squareUV(i.uv + _Randomness.xy)).x * _BlueNoiseIntensity;
float3 pCent = float3(EyePosition.x, -_CloudsParameter.w, EyePosition.z);
float bIntensity, bDistance, bAlpha, shadow = 0.0f;
float3 wpos;
#if ENVIRO_DUAL_LAYER
//Clouds Layer 1
RaymarchParameters parametersLayer1;
InitRaymarchParametersLayer1(parametersLayer1);
float2 hitDistanceLayer1 = ResolveRay(EyePosition,ray,pCent, raymarchEnd, parametersLayer1);
float3 layer1Final = Raymarch(EyePosition,ray,hitDistanceLayer1.xy,pCent,parametersLayer1,offset,0);
#if ENVIRO_CLOUD_SHADOWS
//Clouds Shadows Layer1
wpos = CalculateWorldPosition(i.uv,sceneDepth);
wpos -= _WorldOffset;
float shadowsLayer1 = RaymarchShadows(EyePosition,wpos,ray,pCent,parametersLayer1,offset,sceneDepth,0);
#endif
//Clouds Layer 2
RaymarchParameters parametersLayer2;
InitRaymarchParametersLayer2(parametersLayer2);
float2 hitDistanceLayer2 = ResolveRay(EyePosition,ray,pCent,raymarchEnd, parametersLayer2);
float3 layer2Final = Raymarch(EyePosition,ray,hitDistanceLayer2,pCent,parametersLayer2,offset,1);
#if ENVIRO_CLOUD_SHADOWS
//Clouds Shadows Layer2
float intensity, distance, alpha, shadow = 0.0f;
float shadowsLayer2 = RaymarchShadows(EyePosition,wpos,ray,pCent,parametersLayer2,offset,sceneDepth,1);
#endif
if (EyePosition.y < _CloudsParameter2.x)
{
bIntensity = layer2Final.x * (1-layer1Final.z) + layer1Final.x;
bDistance = layer2Final.y * (1-layer1Final.z) + layer1Final.y;
}
else
{
//if(layer2Final.b >= 1.0)
// return float4(layer2Final.r,layer2Final.g,1.0,layer2Final.b);
bIntensity = layer1Final.x * (1-layer2Final.z) + layer2Final.x;
bDistance = layer1Final.y * (1-layer2Final.z) + layer2Final.y;
}
bAlpha = saturate(layer1Final.b + layer2Final.b);
RaymarchParameters parameters;
InitRaymarchParameters(parameters);
float2 hitDistance = ResolveRay(EyePosition,ray,pCent,raymarchEnd,parameters);
float3 result = Raymarch(EyePosition,ray,hitDistance,pCent,parameters,offset);
#if ENVIRO_CLOUD_SHADOWS
//Combine cloud shadows.
shadow = shadowsLayer1 + shadowsLayer2;
float3 wpos = CalculateWorldPosition(i.uv,sceneDepth) - _WorldOffset;
shadow = RaymarchShadows(EyePosition,wpos,ray,pCent,parameters,offset,sceneDepth);
#endif
intensity = result.r;
distance = result.g;
alpha = result.b;
#else
RaymarchParameters parametersLayer1;
InitRaymarchParametersLayer1(parametersLayer1);
float2 hitDistanceLayer1 = ResolveRay(EyePosition,ray,pCent, raymarchEnd, parametersLayer1);
float3 layer1Final = Raymarch(EyePosition,ray,hitDistanceLayer1,pCent,parametersLayer1,offset,0);
#if ENVIRO_CLOUD_SHADOWS
//Clouds Shadows
wpos = CalculateWorldPosition(i.uv,sceneDepth);
wpos -= _WorldOffset;
shadow = RaymarchShadows(EyePosition,wpos,ray,pCent,parametersLayer1,offset,sceneDepth,0);
#endif
bIntensity = layer1Final.r;
bDistance = layer1Final.g;
bAlpha = layer1Final.b;
#endif
return float4(max(bIntensity,0.0),max(bDistance,1.0f),clamp(shadow,0.0,0.25),saturate(bAlpha));
return float4(max(intensity,0.0),max(distance,1.0f),clamp(shadow,0.0,0.25),saturate(alpha));
}
ENDCG
}

View File

@@ -14,11 +14,12 @@
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile _ ENVIRO_DEPTH_BLENDING
#pragma multi_compile _ ENVIRO_DUAL_LAYER
#pragma multi_compile _ ENVIRO_CLOUD_SHADOWS
#pragma multi_compile_local _ ENVIRO_DEPTH_BLENDING
#pragma multi_compile_local _ ENVIRO_CLOUD_SHADOWS
#pragma multi_compile_local _ ENVIRO_LIGHTNING
#pragma multi_compile_local _ ENVIRO_VARIABLE_BOTTOM
#pragma multi_compile __ ENVIROHDRP
#if defined (ENVIROHDRP)
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
@@ -27,8 +28,8 @@
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/RTUpscale.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/AtmosphericScattering/AtmosphericScattering.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUtils.hlsl"
#include "../Includes/VolumetricCloudsInclude.cginc"
#include "../Includes/VolumetricCloudsTexHDRPInclude.cginc"
#include_with_pragmas "../Includes/VolumetricCloudsInclude.cginc"
#include_with_pragmas "../Includes/VolumetricCloudsTexHDRPInclude.cginc"
int _Frame;
@@ -92,75 +93,23 @@
float offset = tex2D(_BlueNoise, squareUV(i.uv + _Randomness.xy)).x * _BlueNoiseIntensity;
float3 pCent = float3(EyePosition.x, -_CloudsParameter.w, EyePosition.z);
float bIntensity, bDistance, bAlpha, shadow = 0.0f;
float3 wpos;
#if ENVIRO_DUAL_LAYER
//Clouds Layer 1
RaymarchParameters parametersLayer1;
InitRaymarchParametersLayer1(parametersLayer1);
float2 hitDistanceLayer1 = ResolveRay(EyePosition,ray,pCent, raymarchEnd, parametersLayer1);
float3 layer1Final = Raymarch(EyePosition,ray,hitDistanceLayer1.xy,pCent,parametersLayer1,offset,0);
#if ENVIRO_CLOUD_SHADOWS
//Clouds Shadows Layer1
wpos = CalculateWorldPosition(i.uv,sceneDepth);
wpos -= _WorldOffset;
float shadowsLayer1 = RaymarchShadows(EyePosition,wpos,ray,pCent,parametersLayer1,offset,sceneDepth,0);
#endif
//Clouds Layer 2
RaymarchParameters parametersLayer2;
InitRaymarchParametersLayer2(parametersLayer2);
float2 hitDistanceLayer2 = ResolveRay(EyePosition,ray,pCent,raymarchEnd, parametersLayer2);
float3 layer2Final = Raymarch(EyePosition,ray,hitDistanceLayer2,pCent,parametersLayer2,offset,1);
#if ENVIRO_CLOUD_SHADOWS
//Clouds Shadows Layer2
float intensity, distance, alpha, shadow = 0.0f;
float shadowsLayer2 = RaymarchShadows(EyePosition,wpos,ray,pCent,parametersLayer2,offset,sceneDepth,1);
#endif
if (EyePosition.y < _CloudsParameter2.x)
{
bIntensity = layer2Final.x * (1-layer1Final.z) + layer1Final.x;
bDistance = layer2Final.y * (1-layer1Final.z) + layer1Final.y;
}
else
{
//if(layer2Final.b >= 1.0)
// return float4(layer2Final.r,layer2Final.g,1.0,layer2Final.b);
bIntensity = layer1Final.x * (1-layer2Final.z) + layer2Final.x;
bDistance = layer1Final.y * (1-layer2Final.z) + layer2Final.y;
}
bAlpha = saturate(layer1Final.b + layer2Final.b);
RaymarchParameters parameters;
InitRaymarchParameters(parameters);
float2 hitDistance = ResolveRay(EyePosition,ray,pCent,raymarchEnd,parameters);
float3 result = Raymarch(EyePosition,ray,hitDistance,pCent,parameters,offset);
#if ENVIRO_CLOUD_SHADOWS
//Combine cloud shadows.
shadow = shadowsLayer1 + shadowsLayer2;
float3 wpos = CalculateWorldPosition(i.uv,sceneDepth) - _WorldOffset;
shadow = RaymarchShadows(EyePosition,wpos,ray,pCent,parameters,offset,sceneDepth);
#endif
intensity = result.r;
distance = result.g;
alpha = result.b;
#else
RaymarchParameters parametersLayer1;
InitRaymarchParametersLayer1(parametersLayer1);
float2 hitDistanceLayer1 = ResolveRay(EyePosition,ray,pCent, raymarchEnd, parametersLayer1);
float3 layer1Final = Raymarch(EyePosition,ray,hitDistanceLayer1,pCent,parametersLayer1,offset,0);
#if ENVIRO_CLOUD_SHADOWS
//Clouds Shadows
wpos = CalculateWorldPosition(i.uv,sceneDepth);
wpos -= _WorldOffset;
shadow = RaymarchShadows(EyePosition,wpos,ray,pCent,parametersLayer1,offset,sceneDepth,0);
#endif
bIntensity = layer1Final.r;
bDistance = layer1Final.g;
bAlpha = layer1Final.b;
#endif
return float4(max(bIntensity,0.0f),max(bDistance,1.0f),clamp(shadow,0.0,0.25),max(bAlpha,0.0f));
return float4(max(intensity,0.0),max(distance,1.0f),clamp(shadow,0.0,0.25),saturate(alpha));
}
#else
struct appdata

View File

@@ -14,16 +14,17 @@ Shader "Hidden/EnviroCloudsRaymarchURP"
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile _ ENVIRO_DEPTH_BLENDING
#pragma multi_compile _ ENVIRO_DUAL_LAYER
#pragma multi_compile _ ENVIRO_CLOUD_SHADOWS
#pragma multi_compile_local _ ENVIRO_DEPTH_BLENDING
#pragma multi_compile_local _ ENVIRO_CLOUD_SHADOWS
#pragma multi_compile_local _ ENVIRO_LIGHTNING
#pragma multi_compile_local _ ENVIRO_VARIABLE_BOTTOM
#pragma multi_compile _ ENVIROURP
#if defined (ENVIROURP)
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "Packages/com.unity.render-pipelines.core/Runtime/Utilities/Blit.hlsl"
#include "../Includes/VolumetricCloudsInclude.cginc"
#include "../Includes/VolumetricCloudsTexURPInclude.cginc"
#include_with_pragmas "../Includes/VolumetricCloudsInclude.cginc"
#include_with_pragmas "../Includes/VolumetricCloudsTexURPInclude.cginc"
int _Frame;
@@ -89,77 +90,28 @@ Shader "Hidden/EnviroCloudsRaymarchURP"
float fwdFactor = dot(ray, cameraDirection);
float raymarchEnd = GetRaymarchEndFromSceneDepth(Linear01Depth(sceneDepth, _ZBufferParams) / fwdFactor, 1000000); //* rayLenght
//float raymarchEndShadows = GetRaymarchEndFromSceneDepth(Linear01Depth(sceneDepth), 1000);
float offset = tex2D(_BlueNoise, squareUV(i.uv + _Randomness.xy)).x * _BlueNoiseIntensity;
float3 pCent = float3(EyePosition.x, -_CloudsParameter.w, EyePosition.z);
float bIntensity, bDistance, bAlpha, shadow = 0.0f;
float3 wpos;
#if ENVIRO_DUAL_LAYER
//Clouds Layer 1
RaymarchParameters parametersLayer1;
InitRaymarchParametersLayer1(parametersLayer1);
float2 hitDistanceLayer1 = ResolveRay(EyePosition,ray,pCent, raymarchEnd, parametersLayer1);
float3 layer1Final = Raymarch(EyePosition,ray,hitDistanceLayer1.xy,pCent,parametersLayer1,offset,0);
#if ENVIRO_CLOUD_SHADOWS
//Clouds Shadows Layer1
wpos = CalculateWorldPosition(i.uv,sceneDepth);
wpos -= _WorldOffset;
float shadowsLayer1 = RaymarchShadows(EyePosition,wpos,ray,pCent,parametersLayer1,offset,sceneDepth,0);
#endif
//Clouds Layer 2
RaymarchParameters parametersLayer2;
InitRaymarchParametersLayer2(parametersLayer2);
float2 hitDistanceLayer2 = ResolveRay(EyePosition,ray,pCent,raymarchEnd, parametersLayer2);
float3 layer2Final = Raymarch(EyePosition,ray,hitDistanceLayer2,pCent,parametersLayer2,offset,1);
#if ENVIRO_CLOUD_SHADOWS
//Clouds Shadows Layer2
float intensity, distance, alpha, shadow = 0.0f;
float shadowsLayer2 = RaymarchShadows(EyePosition,wpos,ray,pCent,parametersLayer2,offset,sceneDepth,1);
#endif
if (EyePosition.y < _CloudsParameter2.x)
{
bIntensity = layer2Final.x * (1-layer1Final.z) + layer1Final.x;
bDistance = layer2Final.y * (1-layer1Final.z) + layer1Final.y;
}
else
{
//if(layer2Final.b >= 1.0)
// return float4(layer2Final.r,layer2Final.g,1.0,layer2Final.b);
bIntensity = layer1Final.x * (1-layer2Final.z) + layer2Final.x;
bDistance = layer1Final.y * (1-layer2Final.z) + layer2Final.y;
}
bAlpha = saturate(layer1Final.b + layer2Final.b);
RaymarchParameters parameters;
InitRaymarchParameters(parameters);
float2 hitDistance = ResolveRay(EyePosition,ray,pCent,raymarchEnd,parameters);
float3 result = Raymarch(EyePosition,ray,hitDistance,pCent,parameters,offset);
#if ENVIRO_CLOUD_SHADOWS
//Combine cloud shadows.
shadow = shadowsLayer1 + shadowsLayer2;
float3 wpos = CalculateWorldPosition(i.uv,sceneDepth) - _WorldOffset;
shadow = RaymarchShadows(EyePosition,wpos,ray,pCent,parameters,offset,sceneDepth);
#endif
intensity = result.r;
distance = result.g;
alpha = result.b;
#else
RaymarchParameters parametersLayer1;
InitRaymarchParametersLayer1(parametersLayer1);
float2 hitDistanceLayer1 = ResolveRay(EyePosition,ray,pCent, raymarchEnd, parametersLayer1);
float3 layer1Final = Raymarch(EyePosition,ray,hitDistanceLayer1,pCent,parametersLayer1,offset,0);
#if ENVIRO_CLOUD_SHADOWS
//Clouds Shadows
wpos = CalculateWorldPosition(i.uv,sceneDepth);
wpos -= _WorldOffset;
shadow = RaymarchShadows(EyePosition,wpos,ray,pCent,parametersLayer1,offset,sceneDepth,0);
#endif
bIntensity = layer1Final.r;
bDistance = layer1Final.g;
bAlpha = layer1Final.b;
#endif
return float4(max(bIntensity,0.0),max(bDistance,1.0f),clamp(shadow,0.0,0.25),saturate(bAlpha));
return float4(max(intensity,0.0),max(distance,1.0f),clamp(shadow,0.0,0.25),saturate(alpha));
}
#else
#else
struct appdata
{
float4 vertex : POSITION;

View File

@@ -28,6 +28,7 @@
UNITY_DECLARE_SCREENSPACE_TEXTURE(_DownsampledDepth);
float4x4 _PrevVP;
float4x4 _PrevVPRight;
float4x4 _CamToWorld;
//float4x4 _CamProjection;
@@ -84,17 +85,21 @@
float2 PrevUV(float4 wspos, out half outOfBound)
{
float4x4 prev = mul(unity_CameraProjection,_PrevVP);
float4 prevUV = mul(prev, wspos);
float4x4 _prev = _PrevVP;
prevUV.xy = 0.5 * (prevUV.xy / prevUV.w) + 0.5;
if(unity_StereoEyeIndex == 1)
_prev = _PrevVPRight;
half oobmax = max(0.0 - prevUV.x, 0.0 - prevUV.y);
half oobmin = max(prevUV.x - 1.0, prevUV.y - 1.0);
float4 prevClip = mul(_prev, wspos);
prevClip.xy /= prevClip.w;
prevClip.xy = prevClip.xy * 0.5 + 0.5;
half oobmax = max(0.0 - prevClip.x, 0.0 - prevClip.y);
half oobmin = max(prevClip.x - 1.0, prevClip.y - 1.0);
outOfBound = step(0, max(oobmin, oobmax));
return prevUV;
return prevClip.xy;
}
float4 ClipAABB(float4 aabbMin, float4 aabbMax, float4 prevSample)

View File

@@ -17,7 +17,6 @@ Shader "Hidden/EnviroVolumetricCloudsReprojectHDRP"
#pragma multi_compile _ ENVIRO_DEPTH_BLENDING
#pragma multi_compile __ ENVIROHDRP
#pragma target 4.5
#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch
#if defined (ENVIROHDRP)
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
@@ -40,6 +39,7 @@ Shader "Hidden/EnviroVolumetricCloudsReprojectHDRP"
SAMPLER(sampler_DownsampledDepth);
float4x4 _PrevVP;
float4x4 _PrevVPRight;
float4x4 _CamToWorld;
float4 _ProjectionExtents;
@@ -88,19 +88,24 @@ Shader "Hidden/EnviroVolumetricCloudsReprojectHDRP"
}
float2 PrevUV(float4 wspos, out half outOfBound)
{
float4x4 prev = mul(UNITY_MATRIX_P,_PrevVP);
float4 prevUV = mul(prev, wspos);
prevUV.xy = 0.5 * (prevUV.xy / prevUV.w) + 0.5;
prevUV.y = 1 - prevUV.y;
half oobmax = max(0.0 - prevUV.x, 0.0 - prevUV.y);
half oobmin = max(prevUV.x - 1.0, prevUV.y - 1.0);
float4x4 _prev = _PrevVP;
if(unity_StereoEyeIndex == 1)
_prev = _PrevVPRight;
float4 prevClip = mul(_prev, wspos);
prevClip.xy /= prevClip.w;
prevClip.xy = prevClip.xy * 0.5 + 0.5;
half oobmax = max(0.0 - prevClip.x, 0.0 - prevClip.y);
half oobmin = max(prevClip.x - 1.0, prevClip.y - 1.0);
outOfBound = step(0, max(oobmin, oobmax));
return prevUV;
return prevClip.xy;
}
float4 ClipAABB(float4 aabbMin, float4 aabbMax, float4 prevSample)

View File

@@ -37,6 +37,7 @@
SAMPLER (sampler_DownsampledDepth);
float4x4 _PrevVP;
float4x4 _PrevVPRight;
float4x4 _CamToWorld;
float4 _ProjectionExtents;
@@ -85,18 +86,21 @@
float2 PrevUV(float4 wspos, out half outOfBound)
{
float4x4 prev = mul(unity_CameraProjection,_PrevVP);
float4 prevUV = mul(prev, wspos);
float4x4 _prev = _PrevVP;
prevUV.xy = 0.5 * (prevUV.xy / prevUV.w) + 0.5;
half oobmax = max(0.0 - prevUV.x, 0.0 - prevUV.y);
half oobmin = max(prevUV.x - 1.0, prevUV.y - 1.0);
if(unity_StereoEyeIndex == 1)
_prev = _PrevVPRight;
float4 prevClip = mul(_prev, wspos);
prevClip.xy /= prevClip.w;
prevClip.xy = prevClip.xy * 0.5 + 0.5;
half oobmax = max(0.0 - prevClip.x, 0.0 - prevClip.y);
half oobmin = max(prevClip.x - 1.0, prevClip.y - 1.0);
outOfBound = step(0, max(oobmin, oobmax));
return prevUV;
return prevClip.xy;
}
float4 ClipAABB(float4 aabbMin, float4 aabbMax, float4 prevSample)

View File

@@ -8,3 +8,10 @@ ShaderImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 236601
packageName: Enviro 3 - Sky and Weather
packageVersion: 3.3.0
assetPath: Assets/Enviro 3 - Sky and Weather/Resources/Shader/Clouds/EnviroVolumetricCloudsReprojectURP.shader
uploadId: 812340

View File

@@ -15,12 +15,10 @@
#pragma fragment frag
#include "UnityCG.cginc"
#include "../Includes/NoiseInclude.cginc"
#pragma target 3.0
#pragma exclude_renderers gles
#pragma multi_compile_local __ ENVIRO_DUAL_LAYER
sampler2D _MainTex;
struct VertexInput
@@ -46,104 +44,43 @@
float4x4 world_view_proj;
float _CoverageLayer1;
float _CoverageLayer2;
float _CloudsTypeLayer1;
float _CloudsTypeLayer2;
float _WorleyFreq1Layer1;
float _WorleyFreq1Layer2;
float _WorleyFreq2Layer1;
float _WorleyFreq2Layer2;
float _DilateCoverageLayer1;
float _DilateCoverageLayer2;
float _DilateTypeLayer1;
float _DilateTypeLayer2;
float _DilateTypeLayer1;
float _CloudsTypeModifierLayer1;
float _CloudsTypeModifierLayer2;
float4 _LocationOffset;
float3 _WindDirectionLayer1;
float3 _WindDirectionLayer2;
//float _WindSpeed;
float4 frag(VertexInput input) : SV_Target
{
float2 uv = input.uv;
float2 windOffsetLayer1 = _WindDirectionLayer1.xy;
float2 windOffsetLayer2 = _WindDirectionLayer2.xy;
float2 fillerUV = uv.xy + windOffsetLayer1 + _LocationOffset.xy;
float covFiller = worleyFbm2DFiller(fillerUV * 2, 2) * 1.2;
///////Layer 1
//float2 offset_pos_Layer1_1 = windOffsetLayer1 + float2(0.1,0.5) + _LocationOffset.xy;
//float2 offset_pos_Layer1_2 = windOffsetLayer1 + float2(0.4,-0.5) + _LocationOffset.xy;
//float2 offset_pos_Layer1_3 = windOffsetLayer1 + float2(-0.2,0.9) + _LocationOffset.xy;
//float2 sampling_pos_Layer1_1 = float2(uv.xy + offset_pos_Layer1_1) * _TilingLayer1;
//float2 sampling_pos_Layer1_2 = float2(uv.xy + offset_pos_Layer1_2) * _TilingLayer1;
//float2 sampling_pos_Layer1_3 = float2(uv.xy + offset_pos_Layer1_3) * _TilingLayer1;
//Perlin Noises
//float perlin_Layer1_1 = saturate(CalculatePerlinTileing(sampling_pos_Layer1_1.xy,float2(_TilingLayer1, _TilingLayer1)));
//float perlin_Layer1_2 = saturate(CalculatePerlinTileing(sampling_pos_Layer1_2.xy,float2(_TilingLayer1, _TilingLayer1)));
//float perlin_Layer1_3 = saturate(CalculatePerlinTileing(sampling_pos_Layer1_3.xy,float2(_TilingLayer1, _TilingLayer1)));
//Worley Noise
float worley1Layer1 = worley2(windOffsetLayer1 + _LocationOffset.xy + uv.xy * _WorleyFreq1Layer1, 1);
float worley2Layer1 = worley2(windOffsetLayer1 + _LocationOffset.xy + uv.xy * _WorleyFreq2Layer1, 1);
//float perlin_Layer1_Combined = saturate(perlin_Layer1_1 + (perlin_Layer1_2 - perlin_Layer1_3) + worleyLayer1);
float dilateCoverageLayer1 = dilate_perlin_worley(worley1Layer1,worley2Layer1,_DilateCoverageLayer1);
//Coverage Layer
float coverageLayer1 = saturate(dilateCoverageLayer1 + (covFiller * _CoverageLayer1));
float dilateTypeLayer1 = dilate_perlin_worley(worley1Layer1,worley2Layer1,_DilateTypeLayer1);
float typeLayer1 = saturate(dilateTypeLayer1 * _CloudsTypeModifierLayer1);
///Layer 1 End
#ifdef ENVIRO_DUAL_LAYER
///////Layer 2
//float2 offset_pos_Layer2_1 = float2(0.78,-0.5) + _LocationOffset.zw;
//float2 offset_pos_Layer2_2 = float2(0.2,0.9) + _LocationOffset.zw;
//float2 offset_pos_Layer2_3 = float2(-0.5,0.14) + _LocationOffset.zw;
//float2 sampling_pos_Layer2_1 = float2(uv.xy + offset_pos_Layer2_1) * _TilingLayer2;
//float2 sampling_pos_Layer2_2 = float2(uv.xy + offset_pos_Layer2_2) * _TilingLayer2;
//float2 sampling_pos_Layer2_3 = float2(uv.xy + offset_pos_Layer2_3) * _TilingLayer2;
//Perlin Noises
//float perlin_Layer2_1 = saturate(CalculatePerlinTileing(sampling_pos_Layer2_1.xy,float2(_TilingLayer2, _TilingLayer2)));
//float perlin_Layer2_2 = saturate(CalculatePerlinTileing(sampling_pos_Layer2_2.xy,float2(_TilingLayer2, _TilingLayer2)));
//float perlin_Layer2_3 = saturate(CalculatePerlinTileing(sampling_pos_Layer2_3.xy,float2(_TilingLayer2, _TilingLayer2)));
//float2 fillerUV = uv.xy + windOffsetLayer1 + _LocationOffset.xy;
//float covFiller = WorleyFBM2D(fillerUV,2,0.75) * 0.8;
int freq1 = _WorleyFreq1Layer1;
int freq2 = _WorleyFreq2Layer1;
//Worley Noise
float worley1Layer2 = worley2(windOffsetLayer2 + _LocationOffset.zw + uv.xy * _WorleyFreq1Layer2, 1);
float worley2Layer2 = worley2(windOffsetLayer2 + _LocationOffset.zw + uv.xy * _WorleyFreq2Layer2, 1);
float worley1Layer1 = WorleyFBM2D((windOffsetLayer1 + _LocationOffset.xy + uv.xy), freq1, 1.4);
float worley2Layer1 = WorleyFBM2D((windOffsetLayer1 + _LocationOffset.xy + uv.xy), freq2, 2.2);
float dilateCoverageLayer1 = lerp(worley1Layer1,worley2Layer1,_DilateCoverageLayer1);
//float perlin_Layer2_Combined = saturate(perlin_Layer2_1 + (perlin_Layer2_2 - perlin_Layer2_3) + worleyLayer2);
float dilateCoverageLayer2 = dilate_perlin_worley(worley1Layer2,worley2Layer2,_DilateCoverageLayer2);
//Coverage Layer
//float covFiller = worleyFbm2DFiller(uv.xy * 4, 4) * 1.2;
float coverageLayer2 = saturate(dilateCoverageLayer2 + (covFiller * _CoverageLayer2));
float dilateTypeLayer2 = dilate_perlin_worley(worley1Layer2,worley2Layer2,_DilateTypeLayer2);
float typeLayer2 = saturate(dilateTypeLayer2 * _CloudsTypeModifierLayer2);
///Layer 2 End
float coverageLayer1 = saturate(dilateCoverageLayer1 + ((1-dilateCoverageLayer1) * _CoverageLayer1));
float dilateTypeLayer1 = (pow(lerp(worley1Layer1,worley2Layer1,_DilateTypeLayer1),0.5) - 0.1) * 0.65;
float typeLayer1 = saturate(dilateTypeLayer1 * _CloudsTypeModifierLayer1);
return float4(coverageLayer1,typeLayer1,coverageLayer2,typeLayer2);
#else
return float4(coverageLayer1,typeLayer1,0.0f,0.0f);
#endif
float topClouds = saturate(pow((worley2Layer1) * worley1Layer1,1.5) + pow(worley1Layer1,_CoverageLayer1 * 2));
return float4(coverageLayer1,typeLayer1,topClouds,pow(topClouds,0.5));
}
ENDCG
}

View File

@@ -376,6 +376,7 @@ Shader "Hidden/EnviroBlur"
//-----------------------------------------------------------------------------------------
float4 BilateralUpsample(v2fUpsample input, Texture2D hiDepth, Texture2D loDepth, Texture2D loColor, SamplerState linearSampler, SamplerState pointSampler)
{
float4 result = float4(0,0,0,0);
const float threshold = UPSAMPLE_DEPTH_THRESHOLD;
// float4 highResDepth = LinearEyeDepth(hiDepth.Sample(pointSampler, input.uv)).xxxx;
float4 highResDepth = LinearEyeDepth(SampleTexture(hiDepth, pointSampler, input.uv)).xxxx;
@@ -394,8 +395,8 @@ Shader "Hidden/EnviroBlur"
[branch]
if (accumDiff < threshold) // small error, not an edge -> use bilinear filter
{
return SampleTexture(loColor,linearSampler,input.uv);
}
result = SampleTexture(loColor,linearSampler,input.uv);
}
// find nearest sample
float minDepthDiff = depthDiff[0];
@@ -418,7 +419,9 @@ Shader "Hidden/EnviroBlur"
nearestUv = input.uv11;
minDepthDiff = depthDiff[3];
}
return SampleTexture(loColor,pointSampler,nearestUv);
result = SampleTexture(loColor,pointSampler,nearestUv);
return result;
}
//-----------------------------------------------------------------------------------------

View File

@@ -188,6 +188,7 @@ Shader "Hidden/EnviroBlurURP"
//-----------------------------------------------------------------------------------------
float4 BilateralUpsample(v2fUpsample input, Texture2DArray hiDepth, Texture2DArray loDepth, Texture2DArray loColor, SamplerState linearSampler, SamplerState pointSampler)
{
float4 result = float4(0,0,0,0);
const float threshold = UPSAMPLE_DEPTH_THRESHOLD;
float4 highResDepth = LinearEyeDepth(SAMPLE_TEXTURE2D_X(hiDepth, pointSampler, input.uv), _ZBufferParams).xxxx;
@@ -205,7 +206,7 @@ Shader "Hidden/EnviroBlurURP"
[branch]
if (accumDiff < threshold) // small error, not an edge -> use bilinear filter
{
return SAMPLE_TEXTURE2D_X(loColor,linearSampler,input.uv);
result = SAMPLE_TEXTURE2D_X(loColor,linearSampler,input.uv);
}
// find nearest sample
@@ -229,7 +230,9 @@ Shader "Hidden/EnviroBlurURP"
nearestUv = input.uv11;
minDepthDiff = depthDiff[3];
}
return SAMPLE_TEXTURE2D_X(loColor,pointSampler,nearestUv);
result = SAMPLE_TEXTURE2D_X(loColor,pointSampler,nearestUv);
return result;
}
//-----------------------------------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
Shader "Hidden/EnviroHeightFog"
{
Properties
{
{
//_MainTex ("Texture", any) = "white" {}
}
SubShader
@@ -9,8 +9,8 @@
// No culling or depth
Cull Off ZWrite Off ZTest Always
Pass
{
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag

View File

@@ -14,9 +14,7 @@
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 4.5
#pragma only_renderers d3d11 ps4 xboxone vulkan metal switch
#pragma target 4.5
#pragma multi_compile __ ENVIROHDRP
#if defined (ENVIROHDRP)
@@ -27,8 +25,7 @@
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/RTUpscale.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/AtmosphericScattering/AtmosphericScattering.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUtils.hlsl"
//#include "../Includes/SkyIncludeHLSL.hlsl"
#include "../Includes/FogIncludeHLSL.hlsl"
#include_with_pragmas "../Includes/FogIncludeHLSL.hlsl"
struct appdata
{

View File

@@ -27,9 +27,14 @@ Shader "Hidden/Volumetrics"
sampler2D _DitherTexture;
UNITY_DECLARE_SHADOWMAP(_CascadeShadowMapTexture);
//UNITY_DECLARE_SCREENSPACE_TEXTURE(_CloudsTex);
UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture);
/* #if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED)
UNITY_DECLARE_TEX2DARRAY(_EnviroCloudsTex);
#else
sampler2D _EnviroCloudsTex;
#endif*/
uniform sampler3D _NoiseTexture;
uniform int _Steps;
@@ -154,7 +159,7 @@ Shader "Hidden/Volumetrics"
denom = sqrt(max(0, denom));
return (1 - gsq) / denom;
}
float Attenuation(float distNorm)
{
return 1.0 / (1.0 + 25.0 * distNorm);
@@ -170,12 +175,12 @@ Shader "Hidden/Volumetrics"
float4 samplePos = GetCascadeShadowCoord(float4(wpos, 1), cascadeWeights);
float shadows = UNITY_SAMPLE_SHADOW(_CascadeShadowMapTexture, samplePos.xyz).r;
atten = inside ? shadows : 1.0f;
if(shadows > 0.0f)
atten = 1.0f;
return atten;
}
#if !SHADER_API_GLES3
@@ -255,19 +260,35 @@ Shader "Hidden/Volumetrics"
float y = uv.y * height;
return float2 (x/scale, y/scale);
}
float2 WorldToScreenUV(float3 worldPos)
{
// Project world position into clip space
float4 clipPos = mul(UNITY_MATRIX_VP, float4(worldPos, 1.0));
float4 RayMarch(float2 uv,float2 screenPos, float3 rayStart, float3 rayDir, float rayLength, float rayLengthLights, float linearDepth)
// Perspective divide
clipPos.xyz /= clipPos.w;
// Convert from clip space (-1..1) to UV space (0..1)
float2 uv = clipPos.xy * 0.5 + 0.5;
return uv;
}
float4 RayMarch(float2 uv,float2 screenPos, float3 rayStart, float3 rayDir, float rayLength, float rayLengthLights, float linearDepth)
{
float2 interleavedPos = (fmod(floor(screenPos.xy), 8.0)) ;
if (rayLength <= 0.01 || !all(isfinite(rayDir)))
return float4(0, 0, 0, 0);
float2 interleavedPos = fmod(floor((screenPos.xy)), 8.0);
interleavedPos = clamp(interleavedPos, 0.0, 7.999);
#if UNITY_SINGLE_PASS_STEREO
float4 scaleOffset = unity_StereoScaleOffset[unity_StereoEyeIndex];
interleavedPos = (interleavedPos - scaleOffset.zw) / scaleOffset.xy;
#endif
float offset = tex2D(_DitherTexture, interleavedPos / 8.0 + float2(0.5 / 8.0, 0.5 / 8.0)).w ; //+ _Randomness.xy
//float offset = tex2D(_DitherTexture, squareUV(uv)).r;
float4 ditherUV = saturate(float4(interleavedPos / 8.0 + float2(0.5 / 8.0, 0.5 / 8.0),0,0));
float offset = tex2Dlod(_DitherTexture, ditherUV).w; //+ _Randomness.xy
int stepCount = _Steps;
@@ -296,12 +317,11 @@ Shader "Hidden/Volumetrics"
for (int i = 0; i < stepCount; i++)
{
float density = GetDensity(currentPosition, density, linearDepth, rayDir);
float atten = DirectionalLight(currentPositionDithered) * 0.1;
//Cloud Shadows
//float cloudShadows = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_CloudsTex,uv).b;
//atten *= (1-cloudShadows);
float2 shadowUV = WorldToScreenUV(currentPositionDithered);
//float cloudsShadows = pow(UNITY_SAMPLE_SCREENSPACE_TEXTURE(_EnviroCloudsTex, shadowUV).b,0.25);
float atten = DirectionalLight(currentPositionDithered) * 0.1 ;//* (1-cloudsShadows);
float scattering = _VolumetricLight.x * density;
extinction += _VolumetricLight.y * density;
@@ -323,7 +343,8 @@ Shader "Hidden/Volumetrics"
return color;
}
float4 frag (v2f i) : SV_Target
{
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
@@ -364,6 +385,8 @@ Shader "Hidden/Volumetrics"
float rayLengthLights = min(rayLength, _MaxRayLengthLights);
rayLength = min(rayLength, _MaxRayLength);
float4 color = RayMarch(uv, i.position.xy, rayStart, rayDir, rayLength, rayLengthLights, linearDepth);

View File

@@ -167,8 +167,8 @@ Shader "Hidden/VolumetricsURP"
atten = inside ? shadows : 1.0f;
if(shadows > 0.0f)
atten = 1.0f;
// if(shadows > 0.0f)
// atten = 1.0f;
return atten;
}
@@ -252,14 +252,20 @@ Shader "Hidden/VolumetricsURP"
float4 RayMarch(float2 uv,float2 screenPos, float3 rayStart, float3 rayDir, float rayLength, float rayLengthLights, float linearDepth)
{
float2 interleavedPos = (fmod(floor(screenPos.xy), 8.0)) ;
if (rayLength <= 0.01 || !all(isfinite(rayDir)))
return float4(0, 0, 0, 0);
float2 interleavedPos = fmod(floor((screenPos.xy)), 8.0);
interleavedPos = clamp(interleavedPos, 0.0, 7.999);
#if UNITY_SINGLE_PASS_STEREO
float4 scaleOffset = unity_StereoScaleOffset[unity_StereoEyeIndex];
interleavedPos = (interleavedPos - scaleOffset.zw) / scaleOffset.xy;
#endif
float offset = tex2D(_DitherTexture, interleavedPos / 8.0 + float2(0.5 / 8.0, 0.5 / 8.0)).w; //+ _Randomness.xy
float4 ditherUV = saturate(float4(interleavedPos / 8.0 + float2(0.5 / 8.0, 0.5 / 8.0),0,0));
float offset = tex2Dlod(_DitherTexture, ditherUV).w; //+ _Randomness.xy
int stepCount = _Steps;
@@ -270,7 +276,7 @@ Shader "Hidden/VolumetricsURP"
float3 stepLights = rayDir * stepSizeLights;
float3 currentPositionDithered = rayStart + step * offset;
float3 currentPositionLightsDithered = rayStart + stepLights * offset;
float3 currentPositionLightsDithered = rayStart + stepLights * offset;
float3 currentPosition = rayStart + step;
float4 color = float4(0.0,0.0,0.0,0);

View File

@@ -0,0 +1,6 @@
#include_with_pragmas "FogInclude.cginc"
float3 ApplyFog(float3 sceneColor, float2 uv, float3 wPos, float linearDepth)
{
return ApplyFogAndVolumetricLights(sceneColor,uv,wPos,linearDepth);
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 7a1642594534635429ca94e74de65d26
timeCreated: 1452690568
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
#include_with_pragmas "FogIncludeHLSL.hlsl"
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUtils.hlsl"
float _EnviroSkyIntensity;
float3 ApplyFog(float3 sceneColor, float2 uv, float3 wPos, float linearDepth)
{
float4 fog = GetExponentialHeightFog(wPos,linearDepth);
fog.rgb *= _EnviroSkyIntensity * GetCurrentExposureMultiplier();
return ApplyVolumetricLights(fog,sceneColor,uv);
}

View File

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

View File

@@ -0,0 +1,6 @@
#include_with_pragmas "FogIncludeHLSL.hlsl"
float3 ApplyFog(float3 sceneColor, float2 uv, float3 wPos, float linearDepth)
{
return ApplyFogAndVolumetricLights(sceneColor,uv,wPos,linearDepth);
}

View File

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

View File

@@ -1,10 +1,18 @@
#include "SkyInclude.cginc"
#include "VolumetricCloudsBlendInclude.cginc"
#ifndef ENVIRO_VOLUMELIGHT_KEYWORD
#define ENVIRO_VOLUMELIGHT_KEYWORD
#pragma multi_compile __ ENVIRO_VOLUMELIGHT
#pragma multi_compile __ ENVIRO_SIMPLESKY
#endif
#ifndef ENVIRO_SIMPLEFOG_KEYWORD
#define ENVIRO_SIMPLEFOG_KEYWORD
#pragma multi_compile __ ENVIRO_SIMPLEFOG
#endif
#if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED)
UNITY_DECLARE_TEX2DARRAY(_EnviroVolumetricFogTex);
#else
@@ -140,11 +148,6 @@ float4 GetExponentialHeightFog(float3 wPos, float linearDepth)
float fogAmount = 0;
float CameraToReceiverLengthSqr = dot(CameraToReceiver, CameraToReceiver);
float CameraToReceiverLengthInv = rsqrt(CameraToReceiverLengthSqr);
float CameraToReceiverLength = CameraToReceiverLengthSqr * CameraToReceiverLengthInv;
float RayLength = CameraToReceiverLength;
float RayDirectionY = CameraToReceiverHeight;
float Exponent = _EnviroFogParameters.y * (camHeightLimiter - _EnviroFogParameters.w);
@@ -153,32 +156,32 @@ float4 GetExponentialHeightFog(float3 wPos, float linearDepth)
float RayOriginTermsSecond = _EnviroFogParameters2.z * exp2(-ExponentSecond);
#if ENVIRO_SIMPLEFOG
fogAmount = CalculateLineIntegral(_EnviroFogParameters.y, RayDirectionY, RayOriginTerms) * RayLength;
fogAmount = CalculateLineIntegral(_EnviroFogParameters.y, RayDirectionY, RayOriginTerms) * viewLength;
#else
fogAmount = (CalculateLineIntegral(_EnviroFogParameters.y, RayDirectionY, RayOriginTerms) + CalculateLineIntegral(_EnviroFogParameters2.y, RayDirectionY, RayOriginTermsSecond)) * RayLength;
fogAmount = (CalculateLineIntegral(_EnviroFogParameters.y, RayDirectionY, RayOriginTerms) + CalculateLineIntegral(_EnviroFogParameters2.y, RayDirectionY, RayOriginTermsSecond)) * viewLength;
#endif
//Start Distance
if(length(CameraToReceiver) <= _EnviroFogParameters3.y)
if(viewLength <= _EnviroFogParameters3.y)
{
float fallOff = ClampedInverseLerp(0.0f,_EnviroFogParameters3.y, length(CameraToReceiver));
float fallOff = ClampedInverseLerp(0.0f,_EnviroFogParameters3.y, viewLength);
fogAmount = fogAmount * pow(fallOff,6);
}
//Fog Zones
fogAmount = clamp(fogAmount,0,10);
#if defined(SHADER_API_D3D11) || defined(SHADER_API_METAL) || defined(SHADER_API_VULKAN)
FogZones(wPos,fogAmount);
#endif
float fogfactor = max(exp2(-fogAmount), MinFogOpacity);
float scatteringFactor = saturate(linearDepth + _EnviroFogParameters3.z);
// Color
// Color
#if ENVIRO_SIMPLESKY
float4 sky = GetSkyColorSimple(viewDirection,0.005f);
float4 sky = GetSkyColorSimple(viewDirection,0.005f,scatteringFactor);
#else
float4 sky = GetSkyColor(viewDirection,0.005f);
float4 sky = GetSkyColor(viewDirection,0.005f,scatteringFactor);
#endif
float3 inscatterColor = lerp(_EnviroFogColor.rgb,sky.rgb,_EnviroFogParameters3.w);
float3 fogColor = inscatterColor * saturate(1 - fogfactor);

View File

@@ -1,9 +1,17 @@
#include "SkyIncludeHLSL.hlsl"
#include "VolumetricCloudsBlendIncludeHLSL.hlsl"
#ifndef ENVIRO_VOLUMELIGHT_KEYWORD
#define ENVIRO_VOLUMELIGHT_KEYWORD
#pragma multi_compile __ ENVIRO_VOLUMELIGHT
#pragma multi_compile __ ENVIRO_SIMPLESKY
#endif
#ifndef ENVIRO_SIMPLEFOG_KEYWORD
#define ENVIRO_SIMPLEFOG_KEYWORD
#pragma multi_compile __ ENVIRO_SIMPLEFOG
#endif
TEXTURE2D_X(_EnviroVolumetricFogTex);
SAMPLER(sampler_EnviroVolumetricFogTex);
@@ -135,12 +143,6 @@ float4 GetExponentialHeightFog(float3 wPos, float linearDepth)
viewDirection /= viewLength;
float fogAmount = 0;
float CameraToReceiverLengthSqr = dot(CameraToReceiver, CameraToReceiver);
float CameraToReceiverLengthInv = rsqrt(CameraToReceiverLengthSqr);
float CameraToReceiverLength = CameraToReceiverLengthSqr * CameraToReceiverLengthInv;
float RayLength = CameraToReceiverLength;
float RayDirectionY = CameraToReceiverHeight;
float Exponent = _EnviroFogParameters.y * (camHeightLimiter - _EnviroFogParameters.w);
@@ -149,30 +151,32 @@ float4 GetExponentialHeightFog(float3 wPos, float linearDepth)
float RayOriginTermsSecond = _EnviroFogParameters2.z * exp2(-ExponentSecond);
#if ENVIRO_SIMPLEFOG
fogAmount = CalculateLineIntegral(_EnviroFogParameters.y, RayDirectionY, RayOriginTerms) * RayLength;
fogAmount = CalculateLineIntegral(_EnviroFogParameters.y, RayDirectionY, RayOriginTerms) * viewLength;
#else
fogAmount = (CalculateLineIntegral(_EnviroFogParameters.y, RayDirectionY, RayOriginTerms) + CalculateLineIntegral(_EnviroFogParameters2.y, RayDirectionY, RayOriginTermsSecond)) * RayLength;
fogAmount = (CalculateLineIntegral(_EnviroFogParameters.y, RayDirectionY, RayOriginTerms) + CalculateLineIntegral(_EnviroFogParameters2.y, RayDirectionY, RayOriginTermsSecond)) * viewLength;
#endif
//Start Distance
if(length(CameraToReceiver) <= _EnviroFogParameters3.y)
if(viewLength <= _EnviroFogParameters3.y)
{
float fallOff = ClampedInverseLerp(0.0f,_EnviroFogParameters3.y, length(CameraToReceiver));
float fallOff = ClampedInverseLerp(0.0f,_EnviroFogParameters3.y, viewLength);
fogAmount = fogAmount * pow(fallOff,6);
}
//Fog Zones
fogAmount = clamp(fogAmount,0,10);
#if defined(SHADER_API_D3D11) || defined(SHADER_API_METAL) || defined(SHADER_API_VULKAN)
FogZones(wPos,fogAmount);
#endif
float fogfactor = max(exp2(-fogAmount), MinFogOpacity);
float scatteringFactor = saturate(linearDepth + _EnviroFogParameters3.z);
// Color
#if ENVIRO_SIMPLESKY
float4 sky = GetSkyColorSimple(viewDirection,0.005f);
float4 sky = GetSkyColorSimple(viewDirection,0.005f,scatteringFactor);
#else
float4 sky = GetSkyColor(viewDirection,0.005f);
float4 sky = GetSkyColor(viewDirection,0.005f,scatteringFactor);
#endif
float3 inscatterColor = lerp(_EnviroFogColor.rgb,sky.rgb,_EnviroFogParameters3.w);
float3 fogColor = inscatterColor * saturate(1 - fogfactor);

View File

@@ -1,293 +1,151 @@
float3 mod(float3 x, float3 y)
///////////PERLIN NOISE////////////////
//////// NOT USED ANYMORE ////////////
// Hash to get pseudo-random gradient direction
float2 hash2(float2 p)
{
return x - y * floor(x / y);
// A simple 2D hash
p = frac(p * float2(127.1, 311.7));
p += dot(p, p + 74.7);
return normalize(frac(float2(p.x * p.y, p.x + p.y)) * 2.0 - 1.0);
}
float4 mod(float4 x, float4 y)
// Quintic fade curve for smooth interpolation
float fade(float t)
{
return x - y * floor(x / y);
return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);
}
float3 mod289(float3 x)
float penoise(float2 uv, float scale)
{
return x - floor(x / 289.0) * 289.0;
}
// Scale and wrap UVs to create tileable domain
float2 p = uv * scale;
float4 mod289(float4 x)
// Integer cell coordinates
float2 i0 = floor(p);
float2 f = frac(p);
// Wrap to ensure seamless tiling
float2 i1 = fmod(i0 + 1.0, scale);
// Gradient vectors for the four cell corners
float2 g00 = hash2(fmod(i0, scale));
float2 g10 = hash2(float2(i1.x, i0.y));
float2 g01 = hash2(float2(i0.x, i1.y));
float2 g11 = hash2(i1);
// Distance vectors to corners
float2 d00 = f - float2(0.0, 0.0);
float2 d10 = f - float2(1.0, 0.0);
float2 d01 = f - float2(0.0, 1.0);
float2 d11 = f - float2(1.0, 1.0);
// Dot products
float n00 = dot(g00, d00);
float n10 = dot(g10, d10);
float n01 = dot(g01, d01);
float n11 = dot(g11, d11);
// Smooth interpolation
float2 u = fade(f);
float nx0 = lerp(n00, n10, u.x);
float nx1 = lerp(n01, n11, u.x);
float nxy = lerp(nx0, nx1, u.y);
// Normalize to [0,1]
return 0.5 + 0.5 * nxy;
}
float perlinFBM(float2 uv, float baseScale, int octaves, float gain, float lacun)
{
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
float total = 0.0;
float amp = 0.5; // starting amplitude
float freq = 1.0; // starting frequency
float weight = 0.0;
float4 permute(float4 x)
{
return mod289(((x*34.0) + 1.0)*x);
}
// Always wrap UV first to avoid precision drift
uv = frac(uv);
float3 fade(float3 t) {
return t*t*t*(t*(t*6.0 - 15.0) + 10.0);
}
float4 taylorInvSqrt(float4 r)
{
return 1.79284291400159 - 0.85373472095314 * r;
}
float2 fade(float2 t) {
return t*t*t*(t*(t*6.0 - 15.0) + 10.0);
}
// Classic Perlin noise, periodic variant
float penoise(float2 P, float2 rep)
{
float4 Pi = floor(P.xyxy) + float4(0.0, 0.0, 1.0, 1.0);
float4 Pf = frac(P.xyxy) - float4(0.0, 0.0, 1.0, 1.0);
Pi = mod(Pi, rep.xyxy); // To create noise with explicit period
Pi = mod289(Pi); // To avoid truncation effects in permutation
float4 ix = Pi.xzxz;
float4 iy = Pi.yyww;
float4 fx = Pf.xzxz;
float4 fy = Pf.yyww;
float4 i = permute(permute(ix) + iy);
float4 gx = frac(i * (1.0 / 41.0)) * 2.0 - 1.0;
float4 gy = abs(gx) - 0.5;
float4 tx = floor(gx + 0.5);
gx = gx - tx;
float2 g00 = float2(gx.x, gy.x);
float2 g10 = float2(gx.y, gy.y);
float2 g01 = float2(gx.z, gy.z);
float2 g11 = float2(gx.w, gy.w);
float4 norm = taylorInvSqrt(float4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11)));
g00 *= norm.x;
g01 *= norm.y;
g10 *= norm.z;
g11 *= norm.w;
float n00 = dot(g00, float2(fx.x, fy.x));
float n10 = dot(g10, float2(fx.y, fy.y));
float n01 = dot(g01, float2(fx.z, fy.z));
float n11 = dot(g11, float2(fx.w, fy.w));
float2 fade_xy = fade(Pf.xy);
float2 n_x = lerp(float2(n00, n01), float2(n10, n11), fade_xy.x);
float n_xy = lerp(n_x.x, n_x.y, fade_xy.y);
return 2.3 * n_xy;
}
float CalculatePerlinTileing5(float2 p, float2 rep)
{
float2 xy = p;
float amplitude_factor = 0.5;
float frequency_factor = 1.0;
float a = 1.0;
float perlin_value = 0.0;
perlin_value += a * penoise(xy, rep).r; a *= amplitude_factor; xy *= (frequency_factor + 1);
perlin_value -= a * penoise(xy, rep).r; a *= amplitude_factor; xy *= (frequency_factor + 1);
perlin_value -= a * penoise(xy, rep).r; a *= amplitude_factor; xy *= (frequency_factor + 1);
perlin_value -= a * penoise(xy, rep).r; a *= amplitude_factor; xy *= (frequency_factor + 1);
perlin_value += a * penoise(xy, rep).r;
return perlin_value;
}
float CalculatePerlinTileing5OLD(float2 p, float2 rep)
{
float2 xy = p;
float amplitude_factor = 0.5;
float frequency_factor = 2.0;
float a = 1.0;
float perlin_value = 0.0;
perlin_value += a * penoise(xy, rep).r; a *= amplitude_factor; xy *= (frequency_factor + 0.12);
perlin_value -= a * penoise(xy, rep).r; a *= amplitude_factor; xy *= (frequency_factor + 0.03);
perlin_value -= a * penoise(xy, rep).r; a *= amplitude_factor; xy *= (frequency_factor + 0.01);
perlin_value -= a * penoise(xy, rep).r; a *= amplitude_factor; xy *= (frequency_factor + 0.01);
perlin_value += a * penoise(xy, rep).r;
return perlin_value;
}
float CalculatePerlinTileing(float2 p, float2 rep)
{
float2 xy = p;
float amplitude_factor = 0.5;
float frequency_factor = 1.0;
float a = 1.0;
float perlin_value = 0.0;
perlin_value += a * penoise(xy, rep).r; a *= amplitude_factor; xy *= (frequency_factor + 1);
perlin_value += a * penoise(xy, rep).r; a *= amplitude_factor; xy *= (frequency_factor + 1);
perlin_value += a * penoise(xy, rep).r; a *= amplitude_factor; xy *= (frequency_factor + 2);
perlin_value -= a * penoise(xy, rep).r;
return perlin_value;
}
///////////WORLEY
float set_range(float value, float low, float high)
{
return saturate((value - low)/(high - low));
}
float dilate_perlin_worley(float p, float w, float x)
{
float curve = 0.75;
if (x < 0.5)
[unroll]
for (int i = 0; i < octaves; i++)
{
x = x / 0.5;
float n = p + w * x;
return n * lerp(1, 0.5, pow(x, curve));
// Sample tileable perlin at increasing frequency
// Keep tiling domain proportional to frequency for seamless wrap
total += amp * penoise(uv * freq, baseScale * freq);
weight += amp;
freq *= lacun; // e.g. 2.0
amp *= gain; // e.g. 0.5
}
else
{
x = (x - 0.5) / 0.5;
float n = w + p * (1.0 - x);
return n * lerp(0.5, 1.0, pow(x, max(1.0 / curve,0.0001)));
}
}
// Normalize to 0..1
return saturate(total / weight);
}
//////////////////////////////////////////
///////////WORLEY NOISE///////////////////
//////////////////////////////////////////
#define UI0 1597334673
#define UI1 3812015801
#define UI2 uint2(UI0, UI1)
#define UI3 uint3(UI0, UI1, 2798796415)
#define UIF (1.0 / float(0xffffffffU))
float3 hash33(float3 p)
// Hash to generate a repeatable 0..1 value for integer coords
float hash21_stable(int2 p, int period)
{
uint3 q = uint3(int3(p)) * UI3;
q = (q.x ^ q.y ^ q.z)*UI3;
return -1. + 2. * float3(q) * UIF;
uint2 pu = (uint2)(p + period * 4096); // shift into positive domain
pu = pu % (uint)period;
uint n = pu.x * 73856093u ^ pu.y * 19349663u;
return frac((float)n * 0.000000119f);
}
float2 hash22(float2 p)
float2 hash22_stable(int2 p, int period)
{
uint2 q = uint2(int2(p)) * UI3.xy;
q = (q.x ^ q.y)*UI3.xy;
return -1. + 2. * float2(q) * UIF;
float h1 = hash21_stable(p, period);
float h2 = hash21_stable(p + int2(17, 37), period);
return float2(h1, h2);
}
// Gradient noise by iq (modified to be tileable)
float gradientNoise(float3 x, float freq)
float Worley2D_Stable(float2 uv, int tileCount)
{
// grid
float3 p = floor(x);
float3 w = frac(x);
// quintic interpolant
float3 u = w * w * w * (w * (w * 6. - 15.) + 10.);
// Tile domain
float2 p = uv * tileCount;
int2 baseCell = int2(floor(p));
float2 f = frac(p);
// gradients
float3 ga = hash33(fmod(p + float3(0., 0., 0.), freq));
float3 gb = hash33(fmod(p + float3(1., 0., 0.), freq));
float3 gc = hash33(fmod(p + float3(0., 1., 0.), freq));
float3 gd = hash33(fmod(p + float3(1., 1., 0.), freq));
float3 ge = hash33(fmod(p + float3(0., 0., 1.), freq));
float3 gf = hash33(fmod(p + float3(1., 0., 1.), freq));
float3 gg = hash33(fmod(p + float3(0., 1., 1.), freq));
float3 gh = hash33(fmod(p + float3(1., 1., 1.), freq));
// projections
float va = dot(ga, w - float3(0., 0., 0.));
float vb = dot(gb, w - float3(1., 0., 0.));
float vc = dot(gc, w - float3(0., 1., 0.));
float vd = dot(gd, w - float3(1., 1., 0.));
float ve = dot(ge, w - float3(0., 0., 1.));
float vf = dot(gf, w - float3(1., 0., 1.));
float vg = dot(gg, w - float3(0., 1., 1.));
float vh = dot(gh, w - float3(1., 1., 1.));
// interpolation
return va +
u.x * (vb - va) +
u.y * (vc - va) +
u.z * (ve - va) +
u.x * u.y * (va - vb - vc + vd) +
u.y * u.z * (va - vc - ve + vg) +
u.z * u.x * (va - vb - ve + vf) +
u.x * u.y * u.z * (-va + vb + vc - vd + ve - vf - vg + vh);
}
float minDist = 1.0;
// Tileable 3D worley noise
float worleyNoise(float3 uv, float freq)
{
float3 id = floor(uv);
float3 p = frac(uv);
float minDist = 10000.;
for (float x = -1.; x <= 1.; ++x)
// Search 3x3 neighborhood
[unroll]
for (int y = -1; y <= 1; y++)
{
for(float y = -1.; y <= 1.; ++y)
[unroll]
for (int x = -1; x <= 1; x++)
{
for(float z = -1.; z <= 1.; ++z)
{
float3 offset = float3(x, y, z);
float3 h = hash33(fmod(id + offset, float3(freq,freq,freq))) * .5 + .5;
h += offset;
float3 d = p - h;
minDist = min(minDist, dot(d, d));
}
int2 neighbor = baseCell + int2(x, y);
float2 rand = hash22_stable(neighbor, tileCount);
float2 feature = float2(x, y) + rand;
float d = length(f - feature);
minDist = min(minDist, d);
}
}
// inverted worley noise
return 1. - minDist;
return saturate(minDist);
}
float worleyFbm(float3 p, float freq)
float WorleyFBM2D(float2 uv, int baseTiles, float bias)
{
return worleyNoise(p*freq, freq) * .625 +
worleyNoise(p*freq*2., freq*2.) * .25 +
worleyNoise(p*freq*4., freq*4.) * .125;
}
uv = frac(uv); // ensure [0,1] input
float worleyNoise2D(float2 uv, float freq)
{
float2 id = floor(uv);
float2 p = frac(uv);
float minDist = 10000.;
for (float x = -1.; x <= 1.; ++x)
float n = 0.0;
float amp = 0.5;
int tiles = baseTiles;
[unroll]
for (int octave = 0; octave < 3; octave++)
{
for(float y = -1.; y <= 1.; ++y)
{
float2 offset = float2(x, y);
float2 h = hash22(fmod(id + offset, float2(freq,freq))) * .5 + .5;
h += offset;
float2 d = p - h;
minDist = min(minDist, dot(d, d));
}
n += amp * Worley2D_Stable(uv, tiles);
tiles *= 2; // double tiles per octave
amp *= 0.5; // halve amplitude
}
// inverted worley noise
return 1. - minDist;
}
float worleyFbm2DFiller(float2 p, float freq)
{
return worleyNoise2D(p*freq, freq) * .625 + worleyNoise2D(p*freq*2., freq*2.) * .225 + worleyNoise2D(p*freq*4., freq*4.) * .125;
}
float worleyFbm2D(float2 p, float freq)
{
return worleyNoise2D(p*freq, freq) * .625 - worleyNoise2D(p*freq*2., freq*2.) * .225 + worleyNoise2D(p*freq*4., freq*4.) * .125;
}
float worley2(float2 p, float freq)
{
float fbm = worleyFbm2D(p*freq * 4, 4) * 1.2;
float worl = worleyNoise2D(p*freq*2, 1) * .425 - worleyNoise2D(p*freq*2, 1) * .225;
return saturate(fbm - worl);
}
// Invert + bias for cloud-like coverage
n = pow(1.0 - n, bias);
return saturate(n);
}

View File

@@ -28,6 +28,7 @@ uniform float _frontBackDistribution3;
uniform float _frontBackDistribution4;
uniform float _Intensity;
uniform float _SkyColorExponent;
uniform float _MieScatteringIntensity;
@@ -87,25 +88,6 @@ float4 CirrusClouds(float3 uvs)
return finalClouds;
}
//2D Clouds
uniform sampler2D _FlatCloudsBaseTexture;
uniform sampler2D _FlatCloudsDetailTexture;
uniform float4 _FlatCloudsAnimation;
uniform float3 _FlatCloudsLightDirection;
uniform float3 _FlatCloudsLightColor;
uniform float3 _FlatCloudsAmbientColor;
uniform float4 _FlatCloudsLightingParams; // x = LightIntensity, y = AmbientIntensity, z = Absorbtion, w = HgPhase
uniform float4 _FlatCloudsParams; // x = Coverage, y = Density, z = Altitude, w = tonemapping
uniform float4 _FlatCloudsTiling; // x = Base, y = Detail
//uniform float _FlatCloudsExposure;
float HenryGreenstein(float cosTheta, float g)
{
float k = 3.0 / (8.0 * 3.1415926f) * (1.0 - g * g) / (2.0 + g * g);
return k * (1.0 + cosTheta * cosTheta) / pow(abs(1.0 + g * g - 2.0 * g * cosTheta), 1.5);
}
half3 tonemapACES(half3 color, float Exposure)
{
color *= Exposure;
@@ -120,6 +102,24 @@ half3 tonemapACES(half3 color, float Exposure)
}
//2D Clouds
uniform sampler2D _FlatCloudsBaseTexture;
uniform sampler2D _FlatCloudsDetailTexture;
uniform float4 _FlatCloudsAnimation;
uniform float3 _FlatCloudsLightDirection;
uniform float3 _FlatCloudsLightColor;
uniform float3 _FlatCloudsAmbientColor;
uniform float4 _FlatCloudsLightingParams; // x = LightIntensity, y = AmbientIntensity, z = Absorbtion, w = HgPhase
uniform float4 _FlatCloudsParams; // x = Coverage, y = Density, z = Altitude, w = shadowSteps
uniform float4 _FlatCloudsTiling; // x = Base, y = Detail
float HenryGreenstein(float cosTheta, float g)
{
float k = 3.0 / (8.0 * 3.1415926f) * (1.0 - g * g) / (2.0 + g * g);
return k * (1.0 + cosTheta * cosTheta) / pow(abs(1.0 + g * g - 2.0 * g * cosTheta), 1.5);
}
float CalculateCloudDensity(float2 posBase, float2 posDetail,float3 worldPos, float coverage)
{
float4 baseNoise = tex2D(_FlatCloudsBaseTexture, posBase);
@@ -138,6 +138,33 @@ float CalculateCloudDensity(float2 posBase, float2 posDetail,float3 worldPos, fl
}
float SampleShadowUV(float2 baseUV, float2 detailUV)
{
// Direction in UV space, scaled by some small factor
// Direction in UV space
float2 dirUV = normalize(_FlatCloudsLightDirection.xz);
// Total shadow length in UV space (constant)
float totalShadowLength = 0.01;
// Per-step offset so total distance remains the same
float2 stepUV = dirUV * (totalShadowLength / _FlatCloudsParams.w);
float shadow = 1.0;
float stepFactor = _FlatCloudsLightingParams.z * 1 / _FlatCloudsParams.w;
for (int i = 1; i <= _FlatCloudsParams.w; i++)
{
float2 uvOffsetBase = baseUV - stepUV * i;
float2 uvOffsetDetail = detailUV - stepUV * i * (_FlatCloudsTiling.y/_FlatCloudsTiling.x);
float d = CalculateCloudDensity(uvOffsetBase, uvOffsetDetail, float3(0,0,0), _FlatCloudsParams.x);
shadow *= exp(-d * stepFactor);
}
return saturate(shadow);
}
float4 Clouds2D (float3 uvs, float3 worldPos)
{
half4 col = 0;
@@ -150,32 +177,37 @@ float4 Clouds2D (float3 uvs, float3 worldPos)
float cloudExtinction = pow(uvs.y, 2);
float density = CalculateCloudDensity(uv1.xy, uv1.zw, uvs, _FlatCloudsParams.x);
//Lighting
float absorbtion = exp2(-1 * (density * _FlatCloudsLightingParams.z));
float3 viewDir = normalize(worldPos - _WorldSpaceCameraPos);
// --- Shadows ---
float shadowTerm = SampleShadowUV(uv1.xy, uv1.zw);
//float absorbtion = exp2(-1 * (density * _FlatCloudsLightingParams.z));
float shadows = shadowTerm;
float3 viewDir = normalize(worldPos - _WorldSpaceCameraPos);
float inscatterAngle = dot(normalize(_FlatCloudsLightDirection), -viewDir);
float hg = HenryGreenstein(inscatterAngle, _FlatCloudsLightingParams.w) * 2 * absorbtion;
float lighting = density * (absorbtion + hg);
float3 lightColor = pow(_FlatCloudsLightColor, 2) * (_FlatCloudsLightingParams.x );
float hg = HenryGreenstein(inscatterAngle, _FlatCloudsLightingParams.w) * 2 * shadows;
// apply shadow to the direct light only
float lighting = density * (shadows + hg) * shadowTerm;
float3 lightColor = pow(_FlatCloudsLightColor, 2) * _FlatCloudsLightingParams.x;
col.rgb = lightColor * lighting;
col.rgb = col.rgb + (_FlatCloudsAmbientColor * _FlatCloudsLightingParams.y);
col.rgb += _FlatCloudsAmbientColor * _FlatCloudsLightingParams.y;
//Tonemapping
// if (_FlatCloudsParams.w == 1)
// col.rgb = tonemapACES(col.rgb, _CloudsExposure);
col.a = saturate(density * cloudExtinction);
if (uvs.y < 0)
col.a = 0;
return col;
}
float4 GetSkyColorSimple (float3 viewDir, float mieSize)
float4 GetSkyColorSimple (float3 viewDir, float mieSize, float depth = 1.0)
{
float cosTheta = smoothstep(-0.25,1.15,saturate(dot(-_SunDir.xyz, viewDir)));
float cosTheta = smoothstep(0.0,2.0,saturate(dot(-_SunDir.xyz, viewDir)));
// float cosTheta = smoothstep(-0.25,1.15,saturate(dot(-_SunDir.xyz, viewDir)));
half y = -viewDir.y / 0.02;
float3 frontBack1 = lerp(_FrontColor1.rgb,_BackColor1.rgb,cosTheta);
@@ -196,15 +228,15 @@ float4 GetSkyColorSimple (float3 viewDir, float mieSize)
float eyeCos2 = eyeCos * eyeCos;
float fade = saturate(dot(_SunDir.xyz, viewDir));
float mie = Mie(eyeCos, 0.7) * _MieScatteringIntensity * fade;
float mie = Mie(eyeCos, 0.7) * _MieScatteringIntensity * fade * depth;
skyColor.rgb += (mie * skyColor) * _SunColor.rgb;
return float4(skyColor * _SkyColorTint.rgb,1);
return float4(pow(skyColor * _SkyColorTint.rgb,_SkyColorExponent),1);
}
float4 GetSkyColor (float3 viewDir, float mieSize)
float4 GetSkyColor (float3 viewDir, float mieSize,float depth = 1.0)
{
float cosTheta = smoothstep(-0.25,1.15,saturate(dot(-_SunDir.xyz, viewDir)));
float cosTheta = smoothstep(0.0,2.0,saturate(dot(-_SunDir.xyz, viewDir)));
half y = -viewDir.y / 0.02;
float3 frontBack0 = lerp(_FrontColor0.rgb,_BackColor0.rgb,cosTheta);
@@ -232,10 +264,10 @@ float4 GetSkyColor (float3 viewDir, float mieSize)
float eyeCos2 = eyeCos * eyeCos;
float fade = saturate(dot(_SunDir.xyz, viewDir));
float mie = Mie(eyeCos, 0.7) * _MieScatteringIntensity * fade;
float mie = Mie(eyeCos, 0.7) * _MieScatteringIntensity * fade * depth;
skyColor.rgb += (mie * skyColor) * _SunColor.rgb;
return float4(skyColor * _SkyColorTint.rgb,1);
return float4(pow(skyColor * _SkyColorTint.rgb,_SkyColorExponent),1);
}

View File

@@ -28,6 +28,7 @@ uniform float _frontBackDistribution3;
uniform float _frontBackDistribution4;
uniform float _Intensity;
uniform float _SkyColorExponent;
uniform float _MieScatteringIntensity;
@@ -96,28 +97,15 @@ uniform float3 _FlatCloudsLightDirection;
uniform float3 _FlatCloudsLightColor;
uniform float3 _FlatCloudsAmbientColor;
uniform float4 _FlatCloudsLightingParams; // x = LightIntensity, y = AmbientIntensity, z = Absorbtion, w = HgPhase
uniform float4 _FlatCloudsParams; // x = Coverage, y = Density, z = Altitude, w = tonemapping
uniform float4 _FlatCloudsParams; // x = Coverage, y = Density, z = Altitude, w = shadowSteps
uniform float4 _FlatCloudsTiling; // x = Base, y = Detail
//uniform float _FlatCloudsExposure;
float HenryGreenstein(float cosTheta, float g)
{
float k = 3.0 / (8.0 * 3.1415926f) * (1.0 - g * g) / (2.0 + g * g);
return k * (1.0 + cosTheta * cosTheta) / pow(abs(1.0 + g * g - 2.0 * g * cosTheta), 1.5);
}
half3 tonemapACES(half3 color, float Exposure)
{
color *= Exposure;
// See https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/
const half a = 2.51;
const half b = 0.03;
const half c = 2.43;
const half d = 0.59;
const half e = 0.14;
return saturate((color * (a * color + b)) / (color * (c * color + d) + e));
}
float CalculateCloudDensity(float2 posBase, float2 posDetail,float3 worldPos, float coverage)
@@ -136,7 +124,32 @@ float CalculateCloudDensity(float2 posBase, float2 posDetail,float3 worldPos, fl
return density;
}
float SampleShadowUV(float2 baseUV, float2 detailUV)
{
// Direction in UV space, scaled by some small factor
// Direction in UV space
float2 dirUV = normalize(_FlatCloudsLightDirection.xz);
// Total shadow length in UV space (constant)
float totalShadowLength = 0.01;
// Per-step offset so total distance remains the same
float2 stepUV = dirUV * (totalShadowLength / _FlatCloudsParams.w);
float shadow = 1.0;
float stepFactor = _FlatCloudsLightingParams.z * 1 / _FlatCloudsParams.w;
for (int i = 1; i <= _FlatCloudsParams.w; i++)
{
float2 uvOffsetBase = baseUV - stepUV * i;
float2 uvOffsetDetail = detailUV - stepUV * i * (_FlatCloudsTiling.y/_FlatCloudsTiling.x);
float d = CalculateCloudDensity(uvOffsetBase, uvOffsetDetail, float3(0,0,0), _FlatCloudsParams.x);
shadow *= exp(-d * stepFactor);
}
return saturate(shadow);
}
float4 Clouds2D (float3 uvs, float3 worldPos)
{
@@ -150,29 +163,33 @@ float4 Clouds2D (float3 uvs, float3 worldPos)
float cloudExtinction = pow(uvs.y, 2);
float density = CalculateCloudDensity(uv1.xy, uv1.zw, uvs, _FlatCloudsParams.x);
//Lighting
float absorbtion = exp2(-1 * (density * _FlatCloudsLightingParams.z));
float3 viewDir = normalize(worldPos - _WorldSpaceCameraPos);
// --- Shadows ---
float shadowTerm = SampleShadowUV(uv1.xy, uv1.zw);
//float absorbtion = exp2(-1 * (density * _FlatCloudsLightingParams.z));
float shadows = shadowTerm;
float3 viewDir = normalize(worldPos - _WorldSpaceCameraPos);
float inscatterAngle = dot(normalize(_FlatCloudsLightDirection), -viewDir);
float hg = HenryGreenstein(inscatterAngle, _FlatCloudsLightingParams.w) * 2 * absorbtion;
float lighting = density * (absorbtion + hg);
float3 lightColor = pow(_FlatCloudsLightColor, 2) * (_FlatCloudsLightingParams.x );
float hg = HenryGreenstein(inscatterAngle, _FlatCloudsLightingParams.w) * 2 * shadows;
// apply shadow to the direct light only
float lighting = density * (shadows + hg) * shadowTerm;
float3 lightColor = pow(_FlatCloudsLightColor, 2) * _FlatCloudsLightingParams.x;
col.rgb = lightColor * lighting;
col.rgb = col.rgb + (_FlatCloudsAmbientColor * _FlatCloudsLightingParams.y);
col.rgb += _FlatCloudsAmbientColor * _FlatCloudsLightingParams.y;
//Tonemapping
// if (_FlatCloudsParams.w == 1)
// col.rgb = tonemapACES(col.rgb, _CloudsExposure);
col.a = saturate(density * cloudExtinction);
if (uvs.y < 0)
col.a = 0;
return col;
}
float4 GetSkyColorSimple (float3 viewDir, float mieSize)
float4 GetSkyColorSimple (float3 viewDir, float mieSize, float depth = 1.0)
{
float cosTheta = smoothstep(-0.25,1.15,saturate(dot(-_SunDir.xyz, viewDir)));
half y = -viewDir.y / 0.02;
@@ -195,13 +212,13 @@ float4 GetSkyColorSimple (float3 viewDir, float mieSize)
float eyeCos2 = eyeCos * eyeCos;
float fade = saturate(dot(_SunDir.xyz, viewDir));
float mie = Mie(eyeCos, 0.7) * _MieScatteringIntensity * fade;
float mie = Mie(eyeCos, 0.7) * _MieScatteringIntensity * fade * depth;
skyColor.rgb += (mie * skyColor) * _SunColor.rgb;
return float4(skyColor * _SkyColorTint.rgb,1);
}
float4 GetSkyColor (float3 viewDir, float mieSize)
float4 GetSkyColor (float3 viewDir, float mieSize, float depth = 1.0)
{
float cosTheta = smoothstep(-0.25,1.15,saturate(dot(-_SunDir.xyz, viewDir)));
half y = -viewDir.y / 0.02;
@@ -231,7 +248,7 @@ float4 GetSkyColor (float3 viewDir, float mieSize)
float eyeCos2 = eyeCos * eyeCos;
float fade = saturate(dot(_SunDir.xyz, viewDir));
float mie = Mie(eyeCos, 0.7) * _MieScatteringIntensity * fade;
float mie = Mie(eyeCos, 0.7) * _MieScatteringIntensity * fade * depth;
skyColor.rgb += (mie * skyColor) * _SunColor.rgb;

View File

@@ -1,3 +1,4 @@
#pragma multi_compile __ ENVIRO_SIMPLESKY
#if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED)
UNITY_DECLARE_TEX2DARRAY(_EnviroClouds);
@@ -8,18 +9,77 @@ sampler2D _EnviroClouds;
float3 _AmbientColor;
float3 _DirectLightColor;
float _AtmosphereColorSaturateDistance;
float4 _CloudsParameter;
float _SolarTime;
//float _AmbientDistanceScale;
float ComputeAmbient(float4 cloudsColor, float normalizedHeight)
{
float _AmbientDistanceScale = 0.25;
// Height influence: higher clouds receive more ambient sky light
// 0.7 base → 1.3 peak (keep within a modest range for realism)
float heightFactor = lerp(0.7, 1.3, normalizedHeight);
// Distance influence: nearby clouds look brighter, far clouds fade
// _AmbientDistanceScale lets you control falloff distance
float distFalloff = exp(-cloudsColor.g * _AmbientDistanceScale);
// Combine
float ambient = cloudsColor.a * heightFactor * distFalloff;
return saturate(ambient);
}
float4 GetCloudColor(float4 cloudsColor, float3 worldPos)
{
float3 viewDir = normalize(worldPos.xyz - _WorldSpaceCameraPos.xyz);
float3 sunColor = pow(_DirectLightColor.rgb,2) * 2;
float3 skyColor = float3(1,1,1);
#if ENVIRO_SIMPLESKY
skyColor = GetSkyColorSimple(viewDir, 0.005f);
#else
skyColor = GetSkyColor(viewDir, 0.005f);
#endif
float3 cloudsPos = _WorldSpaceCameraPos + viewDir * cloudsColor.g;
float normalizedHeight = saturate((cloudsPos.y - _CloudsParameter.x) / (_CloudsParameter.y - _CloudsParameter.x));
float ambient = ComputeAmbient(cloudsColor.a, normalizedHeight);
float4 finalColor = float4(cloudsColor.r * sunColor + _AmbientColor * ambient, cloudsColor.a);
float p = smoothstep(0.55, 0.60, _SolarTime);
float dayNightModifier = lerp(1.5, 0.1, p);
float baseDist = _AtmosphereColorSaturateDistance;
float kShadowRatio = dayNightModifier;
static const float kMidRatio = 1.0;
static const float kHighlightRatio = 2.0;
float3 brightness = saturate(finalColor.rgb);
float luminance = dot(brightness, float3(0.299,0.587,0.114));
// Blend distance mapping with dynamic base
float distLow = lerp(baseDist * kShadowRatio, baseDist * kMidRatio,saturate(luminance * 2.0));
float blendDist = lerp(distLow, baseDist * kHighlightRatio,saturate((luminance - 0.5) * 2.0));
// Final factor
// float atmosphericBlendFactor = saturate(exp(-cloudsColor.g / _AtmosphereColorSaturateDistance));
float atmosphericBlendFactor = saturate(exp(-cloudsColor.g / blendDist));
finalColor.rgb = lerp(skyColor, finalColor.rgb, atmosphericBlendFactor);
return finalColor;
}
float3 ApplyClouds(float3 sceneColor, float2 uv, float3 worldPos)
{
float3 viewDir = normalize(worldPos.xyz - _WorldSpaceCameraPos);
{
float4 cloudsColor = UNITY_SAMPLE_SCREENSPACE_TEXTURE(_EnviroClouds, uv);
float3 sunColor = pow(_DirectLightColor.rgb,2) * 2.0f;
float3 skyColor = GetSkyColor(viewDir,0.005f);
float4 finalColor = float4(cloudsColor.r * sunColor + _AmbientColor, cloudsColor.a);
float4 finalColor = GetCloudColor(cloudsColor,worldPos);
//return sceneColor.rgb * saturate(1 - finalColor.a) + finalColor.rgb * finalColor.a;
float atmosphericBlendFactor = saturate(exp(-cloudsColor.g / _AtmosphereColorSaturateDistance));
finalColor.rgb = lerp(skyColor, finalColor.rgb, atmosphericBlendFactor);
return sceneColor.rgb * saturate(1 - finalColor.a) + finalColor.rgb * finalColor.a;
float a = saturate(finalColor.a);
float3 c = lerp(sceneColor.rgb, finalColor.rgb, a);
return sceneColor.rgb * (1 - a) + c * a;
}

View File

@@ -1,22 +1,80 @@
#ifndef ENVIRO_SIMPLESKY_KEYWORD
#define ENVIRO_SIMPLESKY_KEYWORD
#pragma multi_compile __ ENVIRO_SIMPLESKY
#endif
TEXTURE2D_X(_EnviroClouds);
SAMPLER(sampler_EnviroClouds);
float3 _AmbientColor;
float3 _DirectLightColor;
float _AtmosphereColorSaturateDistance;
float4 _CloudsParameter;
float _SolarTime;
float ComputeAmbient(float4 cloudsColor, float normalizedHeight)
{
float _AmbientDistanceScale = 0.25;
// Height influence: higher clouds receive more ambient sky light
// 0.7 base → 1.3 peak (keep within a modest range for realism)
float heightFactor = lerp(0.7, 1.3, normalizedHeight);
// Distance influence: nearby clouds look brighter, far clouds fade
// _AmbientDistanceScale lets you control falloff distance
float distFalloff = exp(-cloudsColor.g * _AmbientDistanceScale);
// Combine
float ambient = cloudsColor.a * heightFactor * distFalloff;
return saturate(ambient);
}
float4 GetCloudColor(float4 cloudsColor, float3 worldPos)
{
float3 viewDir = normalize(worldPos.xyz - _WorldSpaceCameraPos.xyz);
float3 sunColor = pow(_DirectLightColor.rgb,2) * 2;
float3 skyColor = float3(1,1,1);
#if ENVIRO_SIMPLESKY
skyColor = GetSkyColorSimple(viewDir, 0.005f);
#else
skyColor = GetSkyColor(viewDir, 0.005f);
#endif
float3 cloudsPos = _WorldSpaceCameraPos + viewDir * cloudsColor.g;
float normalizedHeight = saturate((cloudsPos.y - _CloudsParameter.x) / (_CloudsParameter.y - _CloudsParameter.x));
float ambient = ComputeAmbient(cloudsColor.a, normalizedHeight);
float4 finalColor = float4(cloudsColor.r * sunColor + _AmbientColor * ambient, cloudsColor.a);
float p = smoothstep(0.55, 0.60, _SolarTime);
float dayNightModifier = lerp(1.5, 0.1, p);
float baseDist = _AtmosphereColorSaturateDistance;
float kShadowRatio = dayNightModifier;
static const float kMidRatio = 1.0;
static const float kHighlightRatio = 2.0;
float3 brightness = saturate(finalColor.rgb);
float luminance = dot(brightness, float3(0.299,0.587,0.114));
// Blend distance mapping with dynamic base
float distLow = lerp(baseDist * kShadowRatio, baseDist * kMidRatio,saturate(luminance * 2.0));
float blendDist = lerp(distLow, baseDist * kHighlightRatio,saturate((luminance - 0.5) * 2.0));
// Final factor
float atmosphericBlendFactor = saturate(exp(-cloudsColor.g / blendDist));
finalColor.rgb = lerp(skyColor, finalColor.rgb, atmosphericBlendFactor);
return finalColor;
}
float3 ApplyClouds(float3 sceneColor, float2 uv, float3 worldPos)
{
float3 viewDir = normalize(worldPos.xyz - _WorldSpaceCameraPos);
float4 cloudsColor = SAMPLE_TEXTURE2D_X(_EnviroClouds, sampler_EnviroClouds, uv);
float3 sunColor = pow(_DirectLightColor.rgb,2) * 2.0f;
float3 skyColor = GetSkyColor(viewDir,0.005f);
float4 finalColor = float4(cloudsColor.r * sunColor + _AmbientColor, cloudsColor.a);
float atmosphericBlendFactor = saturate(exp(-cloudsColor.g / _AtmosphereColorSaturateDistance));
finalColor.rgb = lerp(skyColor, finalColor.rgb, atmosphericBlendFactor);
{
float4 cloudsColor = SAMPLE_TEXTURE2D_X(_EnviroClouds,sampler_EnviroClouds, uv);
float4 finalColor = GetCloudColor(cloudsColor,worldPos);
return sceneColor.rgb * saturate(1 - finalColor.a) + finalColor.rgb * finalColor.a;
//return lerp(sceneColor, finalColor.rgb, cloudsColor.a);
}

View File

@@ -2,13 +2,15 @@ Shader "Enviro3/Lightning" {
Properties {
_MainTex ("Texture", 2D) = "white" {}
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
_Intensity("Brightness", float) = 250
}
_BrightnessMod("Brightness Mod ", float) = 250
_Brightness("Brightness ", float) = 250
}
Category {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" }
Blend One One
ColorMask RGB
ColorMask RGBA
Cull Off Lighting Off ZWrite Off
SubShader {
@@ -17,27 +19,32 @@ Category {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#pragma target 3.0
#pragma multi_compile_particles
#pragma multi_compile_fog
#pragma exclude_renderers gles
#include "UnityCG.cginc"
#include "../Includes/FogInclude.cginc"
sampler2D _MainTex;
float4 _TintColor;
float _Intensity;
float _Brightness = 1;
float _BrightnessMod = 1;
struct appdata_t
{
float4 vertex : POSITION;
float2 texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f {
float4 vertex : SV_POSITION;
float2 texcoord : TEXCOORD0;
float4 wpos : TEXCOORD1;
float4 screenPos : TEXCOORD2;
UNITY_VERTEX_OUTPUT_STEREO
};
@@ -50,20 +57,30 @@ Category {
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
float3 viewVector = mul(unity_CameraInvProjection, float4(v.texcoord.xy * 5 - 1, 0, 1));
o.wpos = mul(unity_CameraToWorld, float4(viewVector, 0));
o.screenPos = ComputeScreenPos(v.vertex);
return o;
}
fixed4 frag (v2f i) : SV_Target
float4 frag (v2f i) : SV_Target
{
half4 col = tex2D(_MainTex, i.texcoord) * _TintColor;
col.rgb *= _Intensity;
col.rgb *= col.a;
float3 worldPos = i.wpos.xyz;
float2 screenPos = (i.screenPos.xy/i.screenPos.w);
float depth = i.screenPos.w;
float4 col = tex2D(_MainTex, i.texcoord) * _TintColor;
col.rgb *= _Brightness * _BrightnessMod;
//col.rgb = ApplyFogAndVolumetricLights(col.rgb,screenPos,worldPos,depth);
col.rgb *= col.a;
return col;
}
ENDCG
}
}
}
Fallback "Legacy Shaders/Transparent/Diffuse"
}

View File

@@ -17,7 +17,7 @@
"m_Dropdowns": [],
"m_CategoryData": [
{
"m_Id": "670988c17c874a878b350644d6378362"
"m_Id": "e8457477d85f47cdbd5760f6714ed40f"
}
],
"m_Nodes": [
@@ -318,8 +318,8 @@
],
"m_VertexContext": {
"m_Position": {
"x": 604.0000610351563,
"y": -36.000003814697269
"x": 668.9999389648438,
"y": -106.00000762939453
},
"m_Blocks": [
{
@@ -370,7 +370,7 @@
"preventRotation": false
},
"m_Path": "Shader Graphs",
"m_GraphPrecision": 1,
"m_GraphPrecision": 0,
"m_PreviewMode": 2,
"m_OutputNode": {
"m_Id": ""
@@ -385,9 +385,6 @@
},
{
"m_Id": "3c3d238a9dcd4aaface18f3ba60c283a"
},
{
"m_Id": "f727480299e649e0b4bebebe51b6edcb"
}
]
}
@@ -897,8 +894,8 @@
"m_GuidSerialized": "82c665ae-b686-446a-adbf-ca374b47522f"
},
"m_Name": "EnviroLightIntensity",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "EnviroLightIntensity",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "_EnviroLightIntensity",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": false,
@@ -1056,20 +1053,20 @@
"m_Id": "527f4520dc014ac08695cb5de879aa46"
},
"m_AllowMaterialOverride": false,
"m_SurfaceType": 0,
"m_SurfaceType": 1,
"m_ZTestMode": 4,
"m_ZWriteControl": 0,
"m_AlphaMode": 0,
"m_RenderFace": 2,
"m_AlphaClip": false,
"m_CastShadows": true,
"m_ReceiveShadows": true,
"m_CastShadows": false,
"m_ReceiveShadows": false,
"m_DisableTint": false,
"m_AdditionalMotionVectorMode": 0,
"m_AlembicMotionVectors": false,
"m_SupportsLODCrossFade": false,
"m_CustomEditorGUI": "",
"m_SupportVFX": false
"m_SupportVFX": true
}
{
@@ -1080,8 +1077,8 @@
"m_GuidSerialized": "c877e2e3-9ac8-4c27-9b50-d4b1cd04f9eb"
},
"m_Name": "Main",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "Main",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "_Main",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
@@ -1349,24 +1346,6 @@
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
"m_ObjectId": "670988c17c874a878b350644d6378362",
"m_Name": "",
"m_ChildObjectList": [
{
"m_Id": "8e125d129f7f4fb8895db2c5cf03f80e"
},
{
"m_Id": "4193b7b5ee0a40c5af601a05eae76808"
},
{
"m_Id": "339d365b60bd4eb08953556bc3b8d53f"
}
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
@@ -1589,8 +1568,8 @@
"m_GuidSerialized": "8e1a91ad-b6c6-43b5-9e4f-57fcd25da05b"
},
"m_Name": "Color",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "Color",
"m_DefaultRefNameVersion": 0,
"m_RefNameGeneratedByDisplayName": "",
"m_DefaultReferenceName": "_Color",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
@@ -2212,6 +2191,24 @@
"m_SerializedDescriptor": "VertexDescription.Position"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
"m_ObjectId": "e8457477d85f47cdbd5760f6714ed40f",
"m_Name": "",
"m_ChildObjectList": [
{
"m_Id": "8e125d129f7f4fb8895db2c5cf03f80e"
},
{
"m_Id": "4193b7b5ee0a40c5af601a05eae76808"
},
{
"m_Id": "339d365b60bd4eb08953556bc3b8d53f"
}
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.MultiplyNode",
@@ -2500,14 +2497,6 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.VFXTarget",
"m_ObjectId": "f727480299e649e0b4bebebe51b6edcb",
"m_Lit": false,
"m_AlphaTest": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",

View File

@@ -52,11 +52,12 @@ Shader "Enviro/Skybox"
uniform float4x4 _StarsMatrix;
uniform float4x4 _StarsTwinklingMatrix;
uniform float _StarsTwinkling;
//uniform samplerCUBE _CubeTex;
//uniform float _CubeIntensity;
//uniform float _CubeBlend;
struct VertexInput
{
float4 vertex : POSITION;
@@ -67,7 +68,7 @@ Shader "Enviro/Skybox"
struct v2f {
float4 position : POSITION;
float4 position : SV_POSITION;
float4 sunAndMoonPos : TEXCOORD0;
float3 starPos : TEXCOORD1;
float3 texcoord : TEXCOORD2;
@@ -112,7 +113,7 @@ Shader "Enviro/Skybox"
{
o.flatCoords = normalize(v.vertex).xyz;
float3 flatCoords = normalize(o.flatCoords + float3(0,1,0));
o.flatCoords.y *= 1 - dot(flatCoords.y + 200, float3(0,-0.1,0));
o.flatCoords.y *= 1 - dot(flatCoords.y + 200 * _FlatCloudsParams.z, float3(0,-0.1,0));
}
return o;
@@ -152,7 +153,8 @@ Shader "Enviro/Skybox"
return alpha;
}
float3 ScreenSpaceDither(float2 vScreenPos, float3 clr)
{
float _DitheringIntensity = 0.05;
@@ -233,7 +235,7 @@ Shader "Enviro/Skybox"
//Cube
//float4 cubeMap = texCUBE(_CubeTex, i.texcoord.xyz);
//skyColor.rgb = skyColor.rgb * (1 - cubeMap.a) + (cubeMap.rgb * _CubeIntensity) * cubeMap.a;
//skyColor.rgb = skyColor.rgb * (1 - cubeMap.a * _CubeBlend) + (cubeMap.rgb * _CubeIntensity) * cubeMap.a * _CubeBlend;
//Dithering
#ifndef ENVIRO_SIMPLESKY
@@ -253,7 +255,7 @@ Shader "Enviro/Skybox"
float4 clouds = Clouds2D(i.flatCoords, i.worldPos);
skyColor.rgb = skyColor.rgb * (1 - clouds.a) + clouds.rgb * clouds.a;
}
#if defined(UNITY_COLORSPACE_GAMMA)
skyColor.rgb = LinearToGammaSpace(skyColor.rgb);
#endif

View File

@@ -217,7 +217,7 @@ Shader "Enviro/HDRP/Sky"
if(_FlatClouds > 0.0)
{
float3 flatCloudsUV = wpos;
flatCloudsUV.y *= 1 - dot(cloudsDir.y + 200, float3(0,-0.1,0));
flatCloudsUV.y *= 1 - dot(cloudsDir.y + 200 * _FlatCloudsParams.z, float3(0,-0.1,0));
float4 clouds = Clouds2D(flatCloudsUV, wpos);
skyColor.rgb = skyColor.rgb * (1 - clouds.a) + clouds.rgb * clouds.a;
}

View File

@@ -69,7 +69,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7a34fa72bd4185749832024e9c8010bf, type: 3}
m_Name: ScreenSpaceReflections
m_EditorClassIdentifier:
active: 1
active: 0
enabled:
overrideState: 1
value: 1
@@ -112,19 +112,19 @@ MonoBehaviour:
value: 1
intensity:
overrideState: 1
value: 5
value: 2
threshold:
overrideState: 1
value: 1.5
value: 1
softKnee:
overrideState: 1
value: 0.39
value: 0.27
clamp:
overrideState: 0
value: 65472
diffusion:
overrideState: 1
value: 6.02
value: 5.91
anamorphicRatio:
overrideState: 0
value: 0
@@ -206,12 +206,12 @@ MonoBehaviour:
value: 0
saturation:
overrideState: 0
value: 2
value: 0
brightness:
overrideState: 0
value: 0
postExposure:
overrideState: 0
overrideState: 1
value: 0
contrast:
overrideState: 0
@@ -1479,7 +1479,7 @@ MonoBehaviour:
value: {x: 0.5, y: 0.5}
intensity:
overrideState: 1
value: 0.29
value: 0.428
smoothness:
overrideState: 0
value: 0.2
@@ -1593,16 +1593,16 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c1cb7e9e120078f43bce4f0b1be547a7, type: 3}
m_Name: AmbientOcclusion
m_EditorClassIdentifier:
active: 1
active: 0
enabled:
overrideState: 1
value: 1
mode:
overrideState: 1
value: 0
value: 1
intensity:
overrideState: 1
value: 0.89
value: 2.95
color:
overrideState: 1
value: {r: 0, g: 0, b: 0, a: 1}
@@ -1619,8 +1619,8 @@ MonoBehaviour:
overrideState: 0
value: -12
thicknessModifier:
overrideState: 0
value: 4.17
overrideState: 1
value: 5.17
directLightingStrength:
overrideState: 0
value: 0

View File

@@ -29,9 +29,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046432783962026}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
@@ -124,9 +124,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046432700118398}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
@@ -219,10 +219,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046432656040400}
m_Father: {fileID: 2413046433726484091}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -304,14 +304,15 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2413046432404320608}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 2705.1064, y: 1790.4824, z: -21.099854}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046433323012120}
- {fileID: 2413046433077684165}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2413046432404320610
MonoBehaviour:
@@ -362,9 +363,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433220840190}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
@@ -437,9 +438,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046432878995273}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0.2}
@@ -510,10 +511,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046433410472108}
m_Father: {fileID: 2413046434230398114}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
@@ -548,9 +549,9 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433225790058}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -626,12 +627,12 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046434103400238}
- {fileID: 2413046434375944620}
- {fileID: 2413046433330052911}
m_Father: {fileID: 2413046432656040400}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
@@ -714,9 +715,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046434090177541}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -787,10 +788,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046432518749822}
m_Father: {fileID: 2413046432356812255}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
@@ -825,10 +826,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046433927416005}
m_Father: {fileID: 2413046434439145684}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
@@ -901,16 +902,16 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046432326762962}
- {fileID: 2413046433831738525}
- {fileID: 2413046433220840190}
m_Father: {fileID: 2413046434209632658}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: -450}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 392, y: 150}
m_Pivot: {x: 0, y: 1}
--- !u!222 &2413046432700118384
@@ -979,9 +980,9 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433225790058}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -1058,16 +1059,16 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046432320517305}
- {fileID: 2413046434002816022}
- {fileID: 2413046433937540630}
m_Father: {fileID: 2413046434209632658}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: -150}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 392, y: 150}
m_Pivot: {x: 0, y: 1}
--- !u!222 &2413046432783962028
@@ -1136,9 +1137,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433714667663}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -1215,9 +1216,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433220840190}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1292,10 +1293,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046432480722797}
m_Father: {fileID: 2413046433982456924}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -1330,9 +1331,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046434152851855}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
@@ -1405,9 +1406,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433417118859}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -1477,12 +1478,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2413046433077684164}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -2705.1064, y: -1790.4824, z: 21.099854}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046432404320609}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2413046433077684167
MonoBehaviour:
@@ -1511,6 +1513,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_SendPointerHoverToParent: 1
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
@@ -1547,10 +1550,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046433636003837}
m_Father: {fileID: 2413046433195166800}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -1673,12 +1676,12 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046434386710856}
- {fileID: 2413046433098440721}
- {fileID: 2413046433533292854}
m_Father: {fileID: 2413046433323012120}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
@@ -1782,12 +1785,12 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046432878216077}
- {fileID: 2413046432405474972}
- {fileID: 2413046433726484091}
m_Father: {fileID: 2413046432700118398}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -1935,9 +1938,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433714667663}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -2014,6 +2017,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046434231952557}
- {fileID: 2413046434439145684}
@@ -2021,10 +2025,9 @@ RectTransform:
- {fileID: 2413046434152851855}
- {fileID: 2413046432502363467}
m_Father: {fileID: 2413046434209632658}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 392, y: 150}
m_Pivot: {x: 0, y: 1}
@@ -2094,9 +2097,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046434209632658}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
@@ -2170,10 +2173,10 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046433195166800}
m_Father: {fileID: 2413046432404320609}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -2197,7 +2200,9 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 0
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
@@ -2269,9 +2274,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046432518749822}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -2349,10 +2354,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046433830393473}
m_Father: {fileID: 2413046433726484091}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -2474,9 +2479,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433714667663}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -2553,9 +2558,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433937540630}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -2633,9 +2638,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433714667663}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
@@ -2730,11 +2735,11 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046434230398114}
- {fileID: 2413046433982456924}
m_Father: {fileID: 2413046433937540630}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -2836,12 +2841,12 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046433694626509}
- {fileID: 2413046433678368696}
- {fileID: 2413046433443356002}
m_Father: {fileID: 2413046432482645914}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
@@ -2922,10 +2927,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046432953283687}
m_Father: {fileID: 2413046434152851855}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -2960,9 +2965,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433410472108}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -3040,10 +3045,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046434129888576}
m_Father: {fileID: 2413046433195166800}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -3163,10 +3168,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046433905832037}
m_Father: {fileID: 2413046433098440721}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -3201,9 +3206,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433410472108}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
@@ -3276,9 +3281,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433410472108}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -3351,6 +3356,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046433383219459}
- {fileID: 2413046432864905582}
@@ -3358,11 +3364,10 @@ RectTransform:
- {fileID: 2413046433341565250}
- {fileID: 2413046433221625785}
m_Father: {fileID: 2413046434209632658}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: -300}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 392, y: 150}
m_Pivot: {x: 0, y: 1}
--- !u!222 &2413046433714667649
@@ -3432,11 +3437,11 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046432356812255}
- {fileID: 2413046433337177102}
m_Father: {fileID: 2413046433220840190}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
@@ -3537,10 +3542,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046434207794518}
m_Father: {fileID: 2413046433337177102}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -3575,9 +3580,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046432700118398}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -3654,9 +3659,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433636003837}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -3729,9 +3734,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046432660358772}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -3805,12 +3810,12 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046433347431816}
- {fileID: 2413046434357690813}
- {fileID: 2413046433393691147}
m_Father: {fileID: 2413046432783962026}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -3910,13 +3915,17 @@ MonoBehaviour:
m_Image: {fileID: 0}
- m_Text: Cloudy 2
m_Image: {fileID: 0}
- m_Text: Cloudy 3
m_Image: {fileID: 0}
- m_Text: Cloudy 4
m_Image: {fileID: 0}
- m_Text: Foggy
m_Image: {fileID: 0}
- m_Text: Rain
m_Image: {fileID: 0}
- m_Text: Snow
m_Image: {fileID: 0}
- m_Text: Cloudy 3
- m_Text: Storm
m_Image: {fileID: 0}
m_OnValueChanged:
m_PersistentCalls:
@@ -3963,10 +3972,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046432878995273}
m_Father: {fileID: 2413046433393691147}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -4088,9 +4097,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046432783962026}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -4167,9 +4176,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046434439145684}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -4244,10 +4253,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046432652000327}
m_Father: {fileID: 2413046434152851855}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
@@ -4282,9 +4291,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046432518749822}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -4355,10 +4364,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046434298647222}
m_Father: {fileID: 2413046433533292854}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -4392,12 +4401,12 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046432929531029}
- {fileID: 2413046434090177541}
- {fileID: 2413046433417118859}
m_Father: {fileID: 2413046433225790058}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -4495,9 +4504,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433830393473}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0.2}
@@ -4569,6 +4578,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046433276485461}
- {fileID: 2413046433225790058}
@@ -4576,11 +4586,10 @@ RectTransform:
- {fileID: 2413046433714667663}
- {fileID: 2413046432700118398}
m_Father: {fileID: 2413046434386710856}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: -0.000012636185}
m_SizeDelta: {x: 0, y: 150}
m_Pivot: {x: 0, y: 1}
--- !u!114 &2413046434209632659
@@ -4638,10 +4647,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046432482645914}
m_Father: {fileID: 2413046433393691147}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -4728,9 +4737,9 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433225790058}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
@@ -4822,9 +4831,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433714667663}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
@@ -4901,9 +4910,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046434129888576}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -4976,9 +4985,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046433937540630}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
@@ -5051,9 +5060,9 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2413046432518749822}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
@@ -5127,10 +5136,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046434209632658}
m_Father: {fileID: 2413046433195166800}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -5215,11 +5224,11 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2413046432660358772}
- {fileID: 2413046434058588829}
m_Father: {fileID: 2413046433225790058}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -46,7 +46,7 @@ namespace Enviro
EnviroManager.instance.OnZoneWeatherChanged += (EnviroWeatherType w, EnviroZone z) =>
{
// Debug.Log("Weather changed to: " + w.name.ToString() + " in zone:" + z.name);
Debug.Log("Weather changed to: " + w.name.ToString() + " in zone:" + z.name);
};

View File

@@ -0,0 +1,82 @@
using UnityEngine;
[RequireComponent(typeof(Camera))]
public class SimpleFlyController : MonoBehaviour
{
[Header("Mouse Look Settings")]
public float lookSensitivity = 2f;
public float lookSmoothing = 5f;
public float maxPitch = 89f;
[Header("Movement Settings")]
public float moveSpeed = 10f;
public float fastMultiplier = 3f;
float yaw;
float pitch;
Vector2 smoothLook;
bool cursorLocked = true;
void Start()
{
Vector3 euler = transform.eulerAngles;
yaw = euler.y;
pitch = euler.x;
LockCursor(true);
}
void Update()
{
HandleCursorToggle();
if (cursorLocked)
{
HandleMouseLook();
HandleMovement();
}
}
void HandleCursorToggle()
{
if (Input.GetKeyDown(KeyCode.Escape))
LockCursor(!cursorLocked);
}
void LockCursor(bool locked)
{
cursorLocked = locked;
Cursor.lockState = locked ? CursorLockMode.Locked : CursorLockMode.None;
Cursor.visible = !locked;
}
void HandleMouseLook()
{
Vector2 mouseInput = new Vector2(
Input.GetAxis("Mouse X"),
Input.GetAxis("Mouse Y")
);
// Smooth mouse movement (optional)
smoothLook = Vector2.Lerp(smoothLook, mouseInput, Time.deltaTime * lookSmoothing);
yaw += smoothLook.x * lookSensitivity;
pitch -= smoothLook.y * lookSensitivity;
pitch = Mathf.Clamp(pitch, -maxPitch, maxPitch);
transform.rotation = Quaternion.Euler(pitch, yaw, 0);
}
void HandleMovement()
{
float moveX = Input.GetAxisRaw("Horizontal"); // A/D
float moveY = 0f;
float moveZ = Input.GetAxisRaw("Vertical"); // W/S
if (Input.GetKey(KeyCode.E)) moveY += 1f; // Up
if (Input.GetKey(KeyCode.Q)) moveY -= 1f; // Down
Vector3 move = new Vector3(moveX, moveY, moveZ).normalized;
float speed = moveSpeed * (Input.GetKey(KeyCode.LeftShift) ? fastMultiplier : 1f);
transform.position += transform.TransformDirection(move) * speed * Time.deltaTime;
}
}

View File

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

View File

@@ -17,8 +17,7 @@
#pragma surface surf Standard fullforwardshadows alpha finalcolor:ApplyFog
#pragma target 3.0
sampler2D _MainTex;
sampler2D _CameraDepthTexture;

View File

@@ -4,9 +4,10 @@ using UnityEngine;
using UnityEditor;
using System;
using System.Linq;
using UnityEditor.Build;
public class EnviroBaseInspector : Editor
{
{
public SerializedObject serializedObj;
public GUIStyle boxStyle;
public GUIStyle boxStyleModified;
@@ -16,14 +17,14 @@ public class EnviroBaseInspector : Editor
public GUIStyle headerFoldout;
public GUIStyle popUpStyle;
public GUIStyle integrationBox;
public GUIStyle helpButton;
public GUIStyle helpButton;
public bool showHelpBox;
public Color baseModuleColor = new Color(0.0f,0.0f,0.5f,1f);
public Color categoryModuleColor = new Color(0.5f,0.5f,0.0f,1f);
public Color thirdPartyModuleColor = new Color(0.0f,0.5f,0.5f,1f);
public Color baseModuleColor = new Color(0.0f, 0.0f, 0.5f, 1f);
public Color categoryModuleColor = new Color(0.5f, 0.5f, 0.0f, 1f);
public Color thirdPartyModuleColor = new Color(0.0f, 0.5f, 0.5f, 1f);
public void SetupGUIStyles ()
public void SetupGUIStyles()
{
if (boxStyle == null)
{
@@ -88,7 +89,7 @@ public class EnviroBaseInspector : Editor
{
helpButton = new GUIStyle(EditorStyles.miniButtonRight);
//helpButton.alignment = TextAnchor.UpperRight;
helpButton.margin = new RectOffset(100,0,0,0);
helpButton.margin = new RectOffset(100, 0, 0, 0);
}
}
@@ -98,9 +99,9 @@ public class EnviroBaseInspector : Editor
//Help Box Button
EditorGUILayout.BeginHorizontal();
GUILayout.FlexibleSpace();
if(GUILayout.Button("?", EditorStyles.miniButton,GUILayout.Width(20), GUILayout.Height(20)))
if (GUILayout.Button("?", EditorStyles.miniButton, GUILayout.Width(20), GUILayout.Height(20)))
{
if(showHelpBox)
if (showHelpBox)
showHelpBox = false;
else
showHelpBox = true;
@@ -111,104 +112,122 @@ public class EnviroBaseInspector : Editor
public void RenderHelpBox(string content)
{
// GUILayout.BeginVertical("",EditorStyles.helpBox);
GUILayout.Label(content,EditorStyles.helpBox);
// GUILayout.BeginVertical("",EditorStyles.helpBox);
GUILayout.Label(content, EditorStyles.helpBox);
}
public void RenderIntegrationTextBox(string content)
public void RenderIntegrationTextBox(string content)
{
// GUILayout.BeginVertical("",EditorStyles.helpBox);
GUILayout.Label(content,integrationBox);
// GUILayout.BeginVertical("",EditorStyles.helpBox);
GUILayout.Label(content, integrationBox);
}
public void RenderDisableInputBox()
{
if(Enviro.EnviroManager.instance != null)
{
if (Enviro.EnviroManager.instance != null)
{
if (Enviro.EnviroManager.instance.Weather != null && Enviro.EnviroManager.instance.Quality != null)
{
//both
GUILayout.Label("Some settings are controlled from weather and quality modules!",EditorStyles.helpBox);
}
else if(Enviro.EnviroManager.instance.Weather != null && Enviro.EnviroManager.instance.Quality == null)
{
//Weather Only
GUILayout.Label("Some settings are controlled from weather modules!",EditorStyles.helpBox);
}
else if(Enviro.EnviroManager.instance.Weather == null && Enviro.EnviroManager.instance.Quality != null)
{
// Quality Only
GUILayout.Label("Some settings are controlled from quality modules!",EditorStyles.helpBox);
}
else
{
//Show Nothing
}
if (Enviro.EnviroManager.instance.Weather != null && Enviro.EnviroManager.instance.Quality != null)
{
//both
GUILayout.Label("Some settings are controlled from weather and quality modules!", EditorStyles.helpBox);
}
else if (Enviro.EnviroManager.instance.Weather != null && Enviro.EnviroManager.instance.Quality == null)
{
//Weather Only
GUILayout.Label("Some settings are controlled from weather modules!", EditorStyles.helpBox);
}
else if (Enviro.EnviroManager.instance.Weather == null && Enviro.EnviroManager.instance.Quality != null)
{
// Quality Only
GUILayout.Label("Some settings are controlled from quality modules!", EditorStyles.helpBox);
}
else
{
//Show Nothing
}
}
}
public void ApplyChanges ()
{
if (EditorGUI.EndChangeCheck ()) {
serializedObj.ApplyModifiedProperties ();
}
}
public void ApplyChanges()
{
if (EditorGUI.EndChangeCheck())
{
serializedObj.ApplyModifiedProperties();
}
}
public void AddDefineSymbol(string symbol)
public static void AddDefineSymbol(string symbol)
{
var targets = Enum.GetValues(typeof(BuildTargetGroup))
.Cast<BuildTargetGroup>()
.Where(x => x != BuildTargetGroup.Unknown)
.Where(x => !IsObsolete(x));
.Cast<BuildTargetGroup>()
.Where(x => x != BuildTargetGroup.Unknown)
.Where(x => !IsObsolete(x));
foreach (var target in targets)
{
#if UNITY_6000_0_OR_NEWER
var namedTarget = NamedBuildTarget.FromBuildTargetGroup(target);
var defines = PlayerSettings.GetScriptingDefineSymbols(namedTarget).Trim();
#else
var defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(target).Trim();
#endif
var list = defines.Split(';', ' ')
.Where(x => !string.IsNullOrEmpty(x))
var list = defines.Split(new[] { ';', ' ' }, StringSplitOptions.RemoveEmptyEntries)
.ToList();
if (list.Contains(symbol))
continue;
list.Add(symbol);
defines = list.Aggregate((a, b) => a + ";" + b);
defines = string.Join(";", list);
#if UNITY_6000_0_OR_NEWER
PlayerSettings.SetScriptingDefineSymbols(namedTarget, defines);
#else
PlayerSettings.SetScriptingDefineSymbolsForGroup(target, defines);
#endif
}
}
bool IsObsolete(BuildTargetGroup group)
private static bool IsObsolete(BuildTargetGroup group)
{
var attrs = typeof(BuildTargetGroup)
.GetField(group.ToString())
.GetCustomAttributes(typeof(ObsoleteAttribute), false);
var field = typeof(BuildTargetGroup).GetField(group.ToString());
if (field == null)
return false;
var attrs = field.GetCustomAttributes(typeof(ObsoleteAttribute), false);
return attrs != null && attrs.Length > 0;
}
public void RemoveDefineSymbol(string symbol)
public static void RemoveDefineSymbol(string symbol)
{
string symbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
var targets = Enum.GetValues(typeof(BuildTargetGroup))
.Cast<BuildTargetGroup>()
.Where(x => x != BuildTargetGroup.Unknown)
.Where(x => !IsObsolete(x));
.Cast<BuildTargetGroup>()
.Where(x => x != BuildTargetGroup.Unknown)
.Where(x => !IsObsolete(x));
foreach (var target in targets)
{
#if UNITY_6000_0_OR_NEWER
var namedTarget = NamedBuildTarget.FromBuildTargetGroup(target);
var defines = PlayerSettings.GetScriptingDefineSymbols(namedTarget).Trim();
#else
var defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(target).Trim();
#endif
var list = defines.Split(new[] { ';', ' ' }, StringSplitOptions.RemoveEmptyEntries)
.ToList();
if (defines.Contains(symbol))
if (list.Contains(symbol))
{
defines = defines.Replace(symbol + "; ", "");
defines = defines.Replace(symbol, "");
list.RemoveAll(s => s == symbol);
defines = string.Join(";", list);
#if UNITY_6000_0_OR_NEWER
PlayerSettings.SetScriptingDefineSymbols(namedTarget, defines);
#else
PlayerSettings.SetScriptingDefineSymbolsForGroup(target, defines);
#endif
}
}
}

View File

@@ -1,6 +1,7 @@
using System;
using System.Linq;
using UnityEditor;
using UnityEditor.Build;
[InitializeOnLoad]
sealed class EnviroDefineSymbol
@@ -8,29 +9,37 @@ sealed class EnviroDefineSymbol
const string k_Define = "ENVIRO_3";
static EnviroDefineSymbol()
{
var targets = Enum.GetValues(typeof(BuildTargetGroup))
.Cast<BuildTargetGroup>()
.Where(x => x != BuildTargetGroup.Unknown)
.Where(x => !IsObsolete(x));
foreach (var target in targets)
{
var targets = Enum.GetValues(typeof(BuildTargetGroup))
.Cast<BuildTargetGroup>()
.Where(x => x != BuildTargetGroup.Unknown)
.Where(x => !IsObsolete(x));
#if UNITY_6000_0_OR_NEWER
var namedTarget = NamedBuildTarget.FromBuildTargetGroup(target);
var defines = PlayerSettings.GetScriptingDefineSymbols(namedTarget).Trim();
#else
var defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(target).Trim();
#endif
foreach (var target in targets)
{
var defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(target).Trim();
var list = defines.Split(new[] { ';', ' ' }, StringSplitOptions.RemoveEmptyEntries)
.ToList();
var list = defines.Split(';', ' ')
.Where(x => !string.IsNullOrEmpty(x))
.ToList();
if (list.Contains(k_Define))
continue;
if (list.Contains(k_Define))
continue;
list.Add(k_Define);
defines = string.Join(";", list);
list.Add(k_Define);
defines = list.Aggregate((a, b) => a + ";" + b);
PlayerSettings.SetScriptingDefineSymbolsForGroup(target, defines);
}
#if UNITY_6000_0_OR_NEWER
PlayerSettings.SetScriptingDefineSymbols(namedTarget, defines);
#else
PlayerSettings.SetScriptingDefineSymbolsForGroup(target, defines);
#endif
}
}
static bool IsObsolete(BuildTargetGroup group)
{

View File

@@ -42,12 +42,12 @@ namespace Enviro{
public override void OnInspectorGUI()
{
SetupGUIStyles();
SetupGUIStyles();
GUILayout.BeginVertical("", boxStyle);
GUILayout.Label("Enviro - Sky and Weather Manager",headerStyleMid);
GUILayout.Space(5);
GUILayout.Label("Version: 3.2.1", headerStyleMid);
GUILayout.Label("Version: " + myTarget.version, headerStyleMid);
//Help Box Button
@@ -159,6 +159,14 @@ namespace Enviro{
serializedObj.Update();
}
}
else if (myTarget.version != myTarget.configuration.version)
{
EditorGUILayout.PropertyField(configuration);
if(GUILayout.Button("Update Configuration!"))
{
myTarget.UpdateConfiguration(myTarget.configuration.version);
}
}
else
{
GUILayout.BeginVertical("", boxStyleModified);
@@ -310,12 +318,10 @@ namespace Enviro{
{
if(currentTimeModuleEditor == null)
currentTimeModuleEditor = Editor.CreateEditor(myTarget.Time);
currentTimeModuleEditor.OnInspectorGUI();
}
else
{
GUI.backgroundColor = baseModuleColor;
GUILayout.BeginVertical("",boxStyleModified);
GUI.backgroundColor = Color.white;
@@ -325,8 +331,8 @@ namespace Enviro{
if(myTarget.showNonTimeControls)
{
EditorGUILayout.LabelField("This module will control your sun and moon position when no time module is used.");
serializedObj.UpdateIfRequiredOrScript ();
EditorGUI.BeginChangeCheck();
//serializedObj.UpdateIfRequiredOrScript ();
//EditorGUI.BeginChangeCheck();
GUI.backgroundColor = categoryModuleColor;
GUILayout.BeginVertical("",boxStyleModified);
GUI.backgroundColor = Color.white;
@@ -479,8 +485,9 @@ namespace Enviro{
GUILayout.BeginVertical("",boxStyle);
myTarget.showThirdParty = GUILayout.Toggle(myTarget.showThirdParty, "Third Party Support", headerFoldout);
if(myTarget.showThirdParty)
if (myTarget.showThirdParty)
{
GUILayout.Space(5);
//WAPI
@@ -558,11 +565,9 @@ namespace Enviro{
}
#endif
GUILayout.EndVertical();
//////////
}
GUILayout.EndVertical();
ApplyChanges();
GUILayout.EndVertical();
}
}
}

View File

@@ -15,7 +15,7 @@ namespace Enviro
//Properties 2D
private SerializedProperty useFlatClouds, flatCloudsBaseTex, flatCloudsDetailTex, flatCloudsLightColor, flatCloudsAmbientColor, flatCloudsLightIntensity, flatCloudsAmbientIntensity,
flatCloudsAbsorbtion, flatCloudsHGPhase, flatCloudsCoverage, flatCloudsDensity, flatCloudsAltitude, flatCloudsTonemapping, flatCloudsBaseTiling, flatCloudsDetailTiling, flatCloudsWindIntensity,flatCloudsDetailWindIntensity;
flatCloudsShadowIntensity, flatCloudsHGPhase, flatCloudsCoverage, flatCloudsDensity, flatCloudsAltitude, flatCloudsShadowSteps, flatCloudsBaseTiling, flatCloudsDetailTiling, flatCloudsWindIntensity,flatCloudsDetailWindIntensity;
//On Enable
public override void OnEnable()
@@ -45,12 +45,12 @@ namespace Enviro
flatCloudsAmbientColor = serializedObj.FindProperty("settings.flatCloudsAmbientColor");
flatCloudsLightIntensity = serializedObj.FindProperty("settings.flatCloudsLightIntensity");
flatCloudsAmbientIntensity = serializedObj.FindProperty("settings.flatCloudsAmbientIntensity");
flatCloudsAbsorbtion = serializedObj.FindProperty("settings.flatCloudsAbsorbtion");
flatCloudsShadowIntensity = serializedObj.FindProperty("settings.flatCloudsShadowIntensity");
flatCloudsHGPhase = serializedObj.FindProperty("settings.flatCloudsHGPhase");
flatCloudsCoverage = serializedObj.FindProperty("settings.flatCloudsCoverage");
flatCloudsDensity = serializedObj.FindProperty("settings.flatCloudsDensity");
flatCloudsAltitude = serializedObj.FindProperty("settings.flatCloudsAltitude");
flatCloudsTonemapping = serializedObj.FindProperty("settings.flatCloudsTonemapping");
flatCloudsShadowSteps = serializedObj.FindProperty("settings.flatCloudsShadowSteps");
flatCloudsBaseTiling = serializedObj.FindProperty("settings.flatCloudsBaseTiling");
flatCloudsDetailTiling = serializedObj.FindProperty("settings.flatCloudsDetailTiling");
flatCloudsWindIntensity = serializedObj.FindProperty("settings.flatCloudsWindIntensity");
@@ -137,17 +137,20 @@ namespace Enviro
DisableInputEnd();
EditorGUILayout.PropertyField(flatCloudsAmbientColor);
DisableInputStart();
EditorGUILayout.PropertyField(flatCloudsAmbientIntensity);
EditorGUILayout.PropertyField(flatCloudsAbsorbtion);
DisableInputEnd();
EditorGUILayout.PropertyField(flatCloudsAmbientIntensity);
GUILayout.Space(5);
EditorGUILayout.PropertyField(flatCloudsShadowIntensity);
DisableInputEnd();
DisableInputStartQuality();
EditorGUILayout.PropertyField(flatCloudsShadowSteps);
DisableInputEndQuality();
EditorGUILayout.PropertyField(flatCloudsHGPhase);
GUILayout.Space(5);
DisableInputStart();
EditorGUILayout.PropertyField(flatCloudsCoverage);
EditorGUILayout.PropertyField(flatCloudsDensity);
DisableInputEnd();
EditorGUILayout.PropertyField(flatCloudsAltitude);
EditorGUILayout.PropertyField(flatCloudsTonemapping);
EditorGUILayout.PropertyField(flatCloudsAltitude);
GUILayout.Space(5);
EditorGUILayout.PropertyField(flatCloudsWindIntensity);
EditorGUILayout.PropertyField(flatCloudsDetailWindIntensity);

View File

@@ -12,7 +12,7 @@ namespace Enviro
//Properties
private SerializedProperty fog, volumetrics, ditheringTex, quality, steps, scattering,scatteringMultiplier, extinction, anistropy, maxRange,maxRangePointSpot, noiseIntensity, noiseScale, windDirection, noise;
private SerializedProperty fogQualityMode,globalFogHeight, fogDensity, fogHeightFalloff, fogHeight, fogDensity2, fogHeightFalloff2, fogHeight2, fogMaxOpacity, startDistance, fogColorBlend,fogColorMod,ambientColorGradient;
private SerializedProperty fogQualityMode,globalFogHeight, fogDensity, fogHeightFalloff, fogHeight, fogDensity2, fogHeightFalloff2, fogHeight2, fogMaxOpacity, startDistance, fogColorBlend,fogColorMod,ambientColorGradient,blockScattering;
private SerializedProperty unityFog, unityFogDensity, unityFogColor, unityFogMode, unityFogStartDistance, unityFogEndDistance;
#if ENVIRO_HDRP
@@ -59,6 +59,7 @@ namespace Enviro
fogColorBlend = serializedObj.FindProperty("Settings.fogColorBlend");
ambientColorGradient = serializedObj.FindProperty("Settings.ambientColorGradient");
fogColorMod = serializedObj.FindProperty("Settings.fogColorMod");
blockScattering = serializedObj.FindProperty("Settings.blockScattering");
//HDRP
#if ENVIRO_HDRP
@@ -154,10 +155,11 @@ namespace Enviro
GUILayout.Space(5);
EditorGUILayout.PropertyField(fogMaxOpacity);
EditorGUILayout.PropertyField(startDistance);
GUILayout.Space(10);
DisableInputStart();
GUILayout.Space(10);
EditorGUILayout.LabelField("Color",headerStyle);
GUILayout.Space(5);
GUILayout.Space(5);
EditorGUILayout.PropertyField(blockScattering);
DisableInputStart();
EditorGUILayout.PropertyField(fogColorBlend);
EditorGUILayout.PropertyField(fogColorMod);
DisableInputEnd();

View File

@@ -17,7 +17,7 @@ namespace Enviro
private SerializedProperty shadowIntensity, ambientIntensityModifier,ambientMode, ambientUpdateIntervall,ambientUpdateEveryFrame, ambientSkyColorGradient, ambientEquatorColorGradient, ambientGroundColorGradient, ambientIntensityCurve;
#if ENVIRO_HDRP
private SerializedProperty sunIntensityCurveHDRP, moonIntensityCurveHDRP, lightColorTemperatureHDRP, lightColorTintHDRP,ambientColorTintHDRP, controlExposure, sceneExposure, controlIndirectLighting, diffuseIndirectIntensity, reflectionIndirectIntensity;
private SerializedProperty lightIntensityHDRP ,lightColorTemperatureHDRP,ambientColorTintHDRP, controlExposure, sceneExposure, controlIndirectLighting, diffuseIndirectIntensity, reflectionIndirectIntensity;
#endif
//On Enable
public override void OnEnable()
@@ -50,10 +50,8 @@ namespace Enviro
ambientUpdateIntervall = serializedObj.FindProperty("Settings.ambientUpdateIntervall");
ambientUpdateEveryFrame = serializedObj.FindProperty("Settings.ambientUpdateEveryFrame");
#if ENVIRO_HDRP
sunIntensityCurveHDRP = serializedObj.FindProperty("Settings.sunIntensityCurveHDRP");
moonIntensityCurveHDRP = serializedObj.FindProperty("Settings.moonIntensityCurveHDRP");
lightIntensityHDRP = serializedObj.FindProperty("Settings.lightIntensityHDRP");
lightColorTemperatureHDRP = serializedObj.FindProperty("Settings.lightColorTemperatureHDRP");
lightColorTintHDRP = serializedObj.FindProperty("Settings.lightColorTintHDRP");
ambientColorTintHDRP = serializedObj.FindProperty("Settings.ambientColorTintHDRP");
controlExposure = serializedObj.FindProperty("Settings.controlExposure");
sceneExposure = serializedObj.FindProperty("Settings.sceneExposure");
@@ -113,12 +111,11 @@ namespace Enviro
EditorGUILayout.PropertyField(updateIntervallFrames);
GUILayout.Space(5);
EditorGUILayout.LabelField("Light Intensity",headerStyle);
#if !ENVIRO_HDRP
EditorGUILayout.PropertyField(sunIntensityCurve);
EditorGUILayout.PropertyField(moonIntensityCurve);
#else
EditorGUILayout.PropertyField(sunIntensityCurveHDRP);
EditorGUILayout.PropertyField(moonIntensityCurveHDRP);
#if ENVIRO_HDRP
EditorGUILayout.PropertyField(lightIntensityHDRP);
#endif
DisableInputStart();
EditorGUILayout.PropertyField(directLightIntensityModifier);
@@ -126,11 +123,11 @@ namespace Enviro
DisableInputEnd();
GUILayout.Space(10);
EditorGUILayout.LabelField("Light Color",headerStyle);
#if !ENVIRO_HDRP
EditorGUILayout.PropertyField(sunColorGradient);
EditorGUILayout.PropertyField(moonColorGradient);
#else
EditorGUILayout.PropertyField(lightColorTintHDRP);
#if ENVIRO_HDRP
EditorGUILayout.PropertyField(lightColorTemperatureHDRP);
#endif
#if ENVIRO_HDRP
@@ -213,11 +210,10 @@ namespace Enviro
EditorGUILayout.PropertyField(reflectionIndirectIntensity);
}
GUILayout.Space(5);
if(EnviroManager.instance.Sky != null)
{
EditorGUILayout.LabelField("Indirect Color",headerStyle);
EditorGUILayout.PropertyField(ambientColorTintHDRP);
}
#endif
EditorGUILayout.EndToggleGroup();

View File

@@ -11,7 +11,7 @@ namespace Enviro
private EnviroLightningModule myTarget;
//Properties
private SerializedProperty prefab, lightningStorm,randomLightingDelay, randomSpawnRange, randomTargetRange;
private SerializedProperty prefab, lightningStorm,randomLightingDelay, randomSpawnRange, randomTargetRange,cloudsLightningRadius ,cloudsLightningDuration;
//On Enable
@@ -29,7 +29,9 @@ namespace Enviro
lightningStorm = serializedObj.FindProperty("Settings.lightningStorm");
randomLightingDelay = serializedObj.FindProperty("Settings.randomLightingDelay");
randomSpawnRange = serializedObj.FindProperty("Settings.randomSpawnRange");
randomTargetRange = serializedObj.FindProperty("Settings.randomTargetRange");
randomTargetRange = serializedObj.FindProperty("Settings.randomTargetRange");
cloudsLightningRadius = serializedObj.FindProperty("Settings.cloudsLightningRadius");
cloudsLightningDuration = serializedObj.FindProperty("Settings.cloudsLightningDuration");
}
public override void OnInspectorGUI()
@@ -81,6 +83,11 @@ namespace Enviro
DisableInputEnd();
EditorGUILayout.PropertyField(randomSpawnRange);
EditorGUILayout.PropertyField(randomTargetRange);
GUILayout.Space(5);
EditorGUILayout.LabelField("Volumetric Clouds", headerStyle);
EditorGUILayout.PropertyField(cloudsLightningRadius);
EditorGUILayout.PropertyField(cloudsLightningDuration);
}
GUILayout.EndVertical();

View File

@@ -147,15 +147,15 @@ namespace Enviro
{
Undo.RecordObject(quality, "Quality Clouds Changed");
quality.volumetricCloudsOverride.volumetricClouds = EditorGUILayout.Toggle("Volumetric Clouds", quality.volumetricCloudsOverride.volumetricClouds);
quality.volumetricCloudsOverride.dualLayer = EditorGUILayout.Toggle("Dual Layer", quality.volumetricCloudsOverride.dualLayer);
GUILayout.Space(5);
quality.volumetricCloudsOverride.downsampling = EditorGUILayout.IntSlider("Downsampling", quality.volumetricCloudsOverride.downsampling, 1,6);
quality.volumetricCloudsOverride.stepsLayer1 = EditorGUILayout.IntSlider("Steps Layer 1", quality.volumetricCloudsOverride.stepsLayer1, 32,256);
quality.volumetricCloudsOverride.stepsLayer2 = EditorGUILayout.IntSlider("Steps Layer 2", quality.volumetricCloudsOverride.stepsLayer2, 32,256);
GUILayout.Space(5);
quality.volumetricCloudsOverride.blueNoiseIntensity = EditorGUILayout.Slider("Blue Noise Intensity", quality.volumetricCloudsOverride.blueNoiseIntensity, 0f,2f);
quality.volumetricCloudsOverride.reprojectionBlendTime = EditorGUILayout.Slider("Reprojection Blending", quality.volumetricCloudsOverride.reprojectionBlendTime, 0f,10f);
quality.volumetricCloudsOverride.lodDistance = EditorGUILayout.Slider("LOD", quality.volumetricCloudsOverride.lodDistance, 0f,1f);
GUILayout.Space(5);
quality.volumetricCloudsOverride.lightningSupport = EditorGUILayout.Toggle("Lightning Support", quality.volumetricCloudsOverride.lightningSupport);
quality.volumetricCloudsOverride.variableBottomNoise = EditorGUILayout.Toggle("Variable Bottom Noise", quality.volumetricCloudsOverride.variableBottomNoise);
}
GUILayout.EndVertical();
@@ -183,6 +183,7 @@ namespace Enviro
{
Undo.RecordObject(quality, "Quality FlatClouds Changed");
quality.flatCloudsOverride.flatClouds = EditorGUILayout.Toggle("Flat Clouds", quality.flatCloudsOverride.flatClouds);
quality.flatCloudsOverride.flatCloudsShadowSteps = EditorGUILayout.IntSlider("Flat Clouds Shadow Steps", quality.flatCloudsOverride.flatCloudsShadowSteps,1,12);
quality.flatCloudsOverride.cirrusClouds = EditorGUILayout.Toggle("Cirrus Clouds", quality.flatCloudsOverride.cirrusClouds);
}
GUILayout.EndVertical();

View File

@@ -86,15 +86,24 @@ namespace Enviro
EditorGUILayout.PropertyField(globalReflectionLayers);
EditorGUILayout.PropertyField(globalReflectionsScale);
#if !ENVIRO_HDRP
#if ENVIRO_URP
EditorGUILayout.PropertyField(updateDefaultEnvironmentReflections);
GUILayout.Space(5);
EditorGUILayout.PropertyField(globalReflectionTimeSlicingMode);
#else
GUILayout.Space(5);
EditorGUILayout.PropertyField(updateDefaultEnvironmentReflections);
GUILayout.Space(5);
EditorGUILayout.PropertyField(customRendering);
if(myTarget.Settings.customRendering)
EditorGUILayout.PropertyField(customRenderingTimeSlicing);
if (myTarget.Settings.customRendering)
EditorGUILayout.PropertyField(customRenderingTimeSlicing);
else
EditorGUILayout.PropertyField(globalReflectionTimeSlicingMode);
EditorGUILayout.PropertyField(globalReflectionTimeSlicingMode);
#endif
#endif
GUILayout.Space(10);
EditorGUILayout.PropertyField(globalReflectionsUpdateOnGameTime);
if(myTarget.Settings.globalReflectionsUpdateOnGameTime)

View File

@@ -15,7 +15,7 @@ namespace Enviro
private SerializedProperty frontColorGradient0,frontColorGradient1,frontColorGradient2,frontColorGradient3,frontColorGradient4,frontColorGradient5;
private SerializedProperty frontColor0,frontColor1,frontColor2,frontColor3,frontColor4,frontColor5;
private SerializedProperty sunDiscColorGradient, moonColorGradient, moonGlowColorGradient;
private SerializedProperty sunDiscColor, moonColor, moonGlowColor, skyColorTint;
private SerializedProperty sunDiscColor, moonColor, moonGlowColor, skyColorTint,skyColorExponent,mieScatteringMultiplier;
private SerializedProperty backColorGradient0,backColorGradient1,backColorGradient2,backColorGradient3,backColorGradient4,backColorGradient5;
private SerializedProperty backColor0,backColor1,backColor2,backColor3,backColor4,backColor5;
private SerializedProperty distribution0,distribution1,distribution2,distribution3;
@@ -56,6 +56,8 @@ namespace Enviro
backColorGradient5 = serializedObj.FindProperty("Settings.backColorGradient5");
skyColorTint = serializedObj.FindProperty("Settings.skyColorTint");
skyColorExponent = serializedObj.FindProperty("Settings.skyColorTint");
mieScatteringMultiplier = serializedObj.FindProperty("Settings.mieScatteringMultiplier");
//Sund and Moon Colors
sunDiscColorGradient = serializedObj.FindProperty("Settings.sunDiscColorGradient");
@@ -176,9 +178,15 @@ namespace Enviro
GUILayout.Space(5);
EditorGUILayout.LabelField("Intensity",headerStyle);
EditorGUILayout.PropertyField(intensity);
EditorGUILayout.PropertyField(intensityCurve);
GUILayout.Space(5);
EditorGUILayout.PropertyField(intensityCurve);
DisableInputStart();
EditorGUILayout.PropertyField(skyColorExponent);
DisableInputEnd();
GUILayout.Space(5);
EditorGUILayout.PropertyField(mieScatteringIntensityCurve);
DisableInputStart();
EditorGUILayout.PropertyField(mieScatteringMultiplier);
DisableInputEnd();
#if ENVIRO_HDRP
GUILayout.Space(5);
EditorGUILayout.LabelField("HDRP Settings",headerStyle);

View File

@@ -3,31 +3,26 @@ using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
namespace Enviro
namespace Enviro
{
[CustomEditor(typeof(EnviroVolumetricCloudsModule))]
public class EnviroCloudsModuleEditor : EnviroModuleEditor
{
private EnviroVolumetricCloudsModule myTarget;
private SerializedProperty dualLayer,customWeatherMap,depthBlending,depthTest,sunLightColorGradient,moonLightColorGradient, ambientColorGradient,ambientLighIntensity,cloudShadows, cloudShadowsIntensity,
private SerializedProperty customWeatherMap,depthBlending,depthTest,sunLightColorGradient,moonLightColorGradient, ambientColorGradient,ambientLighIntensity,cloudShadows, cloudShadowsIntensity,
noise, detailNoise, curlTex, blueNoise, cloudsWorldScale,maxRenderDistance, atmosphereColorSaturateDistance, cloudsTravelSpeed;
noise, detailNoise, curlTex, blueNoise,bottomsOffsetNoise, cloudsWorldScale,maxRenderDistance, atmosphereColorSaturateDistance, cloudsTravelSpeed;
//Properties Layer 1
private SerializedProperty bottomCloudsHeightLayer1,topCloudsHeightLayer1,densityLayer1,densitySmoothnessLayer1, coverageLayer1,worleyFreq1Layer1, worleyFreq2Layer1, dilateCoverageLayer1, dilateTypeLayer1,cloudsTypeModifierLayer1, locationOffsetLayer1,
scatteringIntensityLayer1, silverLiningSpreadLayer1, powderIntensityLayer1,
curlIntensityLayer1, lightStepModifierLayer1, lightAbsorbtionLayer1,baseNoiseUVLayer1, detailNoiseUVLayer1,
baseErosionIntensityLayer1, detailErosionIntensityLayer1, multiScatteringALayer1, multiScatteringBLayer1,multiScatteringCLayer1,anvilBiasLayer1;
scatteringIntensityLayer1, silverLiningSpreadLayer1, lightningIntensity,exposure, baseNoiseMultiplierLayer1,detailNoiseMultiplierLayer1,
curlIntensityLayer1, lightStepModifierLayer1, lightAbsorbtionLayer1,baseNoiseUVLayer1, detailNoiseUVLayer1,rampShapeLayer1,edgeHighlightStrength,
baseErosionIntensityLayer1, detailErosionIntensityLayer1, multiScatterStrengthLayer1, multiScatterFalloffLayer1,ambientFloorLayer1,cloudTypeShapingLayer1, bottomShapeLayer1,midShapeLayer1,topShapeLayer1,topLayerLayer1,silverLiningIntensityLayer1;
//Properties Layer 2
private SerializedProperty bottomCloudsHeightLayer2,topCloudsHeightLayer2,densityLayer2,densitySmoothnessLayer2, coverageLayer2,worleyFreq1Layer2, worleyFreq2Layer2, dilateCoverageLayer2, dilateTypeLayer2,cloudsTypeModifierLayer2, locationOffsetLayer2,
scatteringIntensityLayer2, silverLiningSpreadLayer2, powderIntensityLayer2,
curlIntensityLayer2, lightStepModifierLayer2, lightAbsorbtionLayer2, baseNoiseUVLayer2, detailNoiseUVLayer2,
baseErosionIntensityLayer2, detailErosionIntensityLayer2, multiScatteringALayer2, multiScatteringBLayer2,multiScatteringCLayer2, anvilBiasLayer2;
//Properties Quality
private SerializedProperty volumetricClouds, downsampling, stepsLayer1, stepsLayer2, blueNoiseIntensity, reprojectionBlendTime, lodDistance;
private SerializedProperty volumetricClouds,lightningSupport,variableBottomNoise, downsampling, stepsLayer1, blueNoiseIntensity, reprojectionBlendTime, lodDistance;
private SerializedProperty windSpeedModifierLayer1, windUpwardsLayer1, cloudsWindDirectionXModifierLayer1, cloudsWindDirectionYModifierLayer1;
private SerializedProperty windSpeedModifierLayer2, windUpwardsLayer2, cloudsWindDirectionXModifierLayer2, cloudsWindDirectionYModifierLayer2;
//On Enable
public override void OnEnable()
{
@@ -44,12 +39,12 @@ namespace Enviro
moonLightColorGradient = serializedObj.FindProperty("settingsGlobal.moonLightColorGradient");
depthBlending = serializedObj.FindProperty("settingsGlobal.depthBlending");
depthTest = serializedObj.FindProperty("settingsGlobal.depthTest");
dualLayer = serializedObj.FindProperty("settingsGlobal.dualLayer");
cloudShadows = serializedObj.FindProperty("settingsGlobal.cloudShadows");
cloudShadowsIntensity = serializedObj.FindProperty("settingsGlobal.cloudShadowsIntensity");
noise = serializedObj.FindProperty("settingsGlobal.noise");
detailNoise = serializedObj.FindProperty("settingsGlobal.detailNoise");
curlTex = serializedObj.FindProperty("settingsGlobal.curlTex");
bottomsOffsetNoise = serializedObj.FindProperty("settingsGlobal.bottomsOffsetNoise");
blueNoise = serializedObj.FindProperty("settingsGlobal.blueNoise");
cloudsWorldScale = serializedObj.FindProperty("settingsGlobal.cloudsWorldScale");
maxRenderDistance = serializedObj.FindProperty("settingsGlobal.maxRenderDistance");
@@ -59,76 +54,55 @@ namespace Enviro
//Quality
volumetricClouds = serializedObj.FindProperty("settingsQuality.volumetricClouds");
lightningSupport = serializedObj.FindProperty("settingsQuality.lightningSupport");
variableBottomNoise = serializedObj.FindProperty("settingsQuality.variableBottomNoise");
downsampling = serializedObj.FindProperty("settingsQuality.downsampling");
stepsLayer1 = serializedObj.FindProperty("settingsQuality.stepsLayer1");
stepsLayer2 = serializedObj.FindProperty("settingsQuality.stepsLayer2");
blueNoiseIntensity = serializedObj.FindProperty("settingsQuality.blueNoiseIntensity");
reprojectionBlendTime = serializedObj.FindProperty("settingsQuality.reprojectionBlendTime");
lodDistance = serializedObj.FindProperty("settingsQuality.lodDistance");
//Layer 1
bottomCloudsHeightLayer1 = serializedObj.FindProperty("settingsLayer1.bottomCloudsHeight");
topCloudsHeightLayer1 = serializedObj.FindProperty("settingsLayer1.topCloudsHeight");
coverageLayer1 = serializedObj.FindProperty("settingsLayer1.coverage");
worleyFreq1Layer1 = serializedObj.FindProperty("settingsLayer1.worleyFreq1");
worleyFreq2Layer1 = serializedObj.FindProperty("settingsLayer1.worleyFreq2");
dilateCoverageLayer1 = serializedObj.FindProperty("settingsLayer1.dilateCoverage");
dilateTypeLayer1 = serializedObj.FindProperty("settingsLayer1.dilateType");
cloudsTypeModifierLayer1 = serializedObj.FindProperty("settingsLayer1.cloudsTypeModifier");
locationOffsetLayer1 = serializedObj.FindProperty("settingsLayer1.locationOffset");
densityLayer1 = serializedObj.FindProperty("settingsLayer1.density");
densitySmoothnessLayer1 = serializedObj.FindProperty("settingsLayer1.densitySmoothness");
scatteringIntensityLayer1 = serializedObj.FindProperty("settingsLayer1.scatteringIntensity");
silverLiningSpreadLayer1 = serializedObj.FindProperty("settingsLayer1.silverLiningSpread");
powderIntensityLayer1 = serializedObj.FindProperty("settingsLayer1.powderIntensity");
curlIntensityLayer1 = serializedObj.FindProperty("settingsLayer1.curlIntensity");
lightStepModifierLayer1 = serializedObj.FindProperty("settingsLayer1.lightStepModifier");
lightAbsorbtionLayer1 = serializedObj.FindProperty("settingsLayer1.lightAbsorbtion");
baseNoiseUVLayer1 = serializedObj.FindProperty("settingsLayer1.baseNoiseUV");
detailNoiseUVLayer1 = serializedObj.FindProperty("settingsLayer1.detailNoiseUV");
baseErosionIntensityLayer1 = serializedObj.FindProperty("settingsLayer1.baseErosionIntensity");
detailErosionIntensityLayer1 = serializedObj.FindProperty("settingsLayer1.detailErosionIntensity");
multiScatteringALayer1 = serializedObj.FindProperty("settingsLayer1.multiScatteringA");
multiScatteringBLayer1 = serializedObj.FindProperty("settingsLayer1.multiScatteringB");
multiScatteringCLayer1 = serializedObj.FindProperty("settingsLayer1.multiScatteringC");
anvilBiasLayer1 = serializedObj.FindProperty("settingsLayer1.anvilBias");
windSpeedModifierLayer1 = serializedObj.FindProperty("settingsLayer1.windSpeedModifier");
windUpwardsLayer1 = serializedObj.FindProperty("settingsLayer1.windUpwards");
cloudsWindDirectionXModifierLayer1 = serializedObj.FindProperty("settingsLayer1.cloudsWindDirectionXModifier");
cloudsWindDirectionYModifierLayer1 = serializedObj.FindProperty("settingsLayer1.cloudsWindDirectionYModifier");
//Layer 2
bottomCloudsHeightLayer2= serializedObj.FindProperty("settingsLayer2.bottomCloudsHeight");
topCloudsHeightLayer2= serializedObj.FindProperty("settingsLayer2.topCloudsHeight");
coverageLayer2 = serializedObj.FindProperty("settingsLayer2.coverage");
worleyFreq1Layer2 = serializedObj.FindProperty("settingsLayer2.worleyFreq1");
worleyFreq2Layer2 = serializedObj.FindProperty("settingsLayer2.worleyFreq2");
dilateCoverageLayer2 = serializedObj.FindProperty("settingsLayer2.dilateCoverage");
dilateTypeLayer2 = serializedObj.FindProperty("settingsLayer2.dilateType");
cloudsTypeModifierLayer2 = serializedObj.FindProperty("settingsLayer2.cloudsTypeModifier");
locationOffsetLayer2 = serializedObj.FindProperty("settingsLayer2.locationOffset");
densityLayer2 = serializedObj.FindProperty("settingsLayer2.density");
densitySmoothnessLayer2 = serializedObj.FindProperty("settingsLayer2.densitySmoothness");
scatteringIntensityLayer2 = serializedObj.FindProperty("settingsLayer2.scatteringIntensity");
silverLiningSpreadLayer2 = serializedObj.FindProperty("settingsLayer2.silverLiningSpread");
powderIntensityLayer2 = serializedObj.FindProperty("settingsLayer2.powderIntensity");
curlIntensityLayer2 = serializedObj.FindProperty("settingsLayer2.curlIntensity");
lightStepModifierLayer2 = serializedObj.FindProperty("settingsLayer2.lightStepModifier");
lightAbsorbtionLayer2 = serializedObj.FindProperty("settingsLayer2.lightAbsorbtion");
baseNoiseUVLayer2 = serializedObj.FindProperty("settingsLayer2.baseNoiseUV");
detailNoiseUVLayer2 = serializedObj.FindProperty("settingsLayer2.detailNoiseUV");
baseErosionIntensityLayer2 = serializedObj.FindProperty("settingsLayer2.baseErosionIntensity");
detailErosionIntensityLayer2 = serializedObj.FindProperty("settingsLayer2.detailErosionIntensity");
multiScatteringALayer2 = serializedObj.FindProperty("settingsLayer2.multiScatteringA");
multiScatteringBLayer2 = serializedObj.FindProperty("settingsLayer2.multiScatteringB");
multiScatteringCLayer2 = serializedObj.FindProperty("settingsLayer2.multiScatteringC");
anvilBiasLayer2 = serializedObj.FindProperty("settingsLayer2.anvilBias");
windSpeedModifierLayer2 = serializedObj.FindProperty("settingsLayer2.windSpeedModifier");
windUpwardsLayer2 = serializedObj.FindProperty("settingsLayer2.windUpwards");
cloudsWindDirectionXModifierLayer2 = serializedObj.FindProperty("settingsLayer2.cloudsWindDirectionXModifier");
cloudsWindDirectionYModifierLayer2 = serializedObj.FindProperty("settingsLayer2.cloudsWindDirectionYModifier");
bottomCloudsHeightLayer1 = serializedObj.FindProperty("settingsVolume.bottomCloudsHeight");
topCloudsHeightLayer1 = serializedObj.FindProperty("settingsVolume.topCloudsHeight");
coverageLayer1 = serializedObj.FindProperty("settingsVolume.coverage");
worleyFreq1Layer1 = serializedObj.FindProperty("settingsVolume.worleyFreq1");
worleyFreq2Layer1 = serializedObj.FindProperty("settingsVolume.worleyFreq2");
dilateCoverageLayer1 = serializedObj.FindProperty("settingsVolume.dilateCoverage");
dilateTypeLayer1 = serializedObj.FindProperty("settingsVolume.dilateType");
cloudsTypeModifierLayer1 = serializedObj.FindProperty("settingsVolume.cloudsTypeModifier");
locationOffsetLayer1 = serializedObj.FindProperty("settingsVolume.locationOffset");
densityLayer1 = serializedObj.FindProperty("settingsVolume.density");
rampShapeLayer1 = serializedObj.FindProperty("settingsVolume.rampShape");
densitySmoothnessLayer1 = serializedObj.FindProperty("settingsVolume.densitySmoothness");
scatteringIntensityLayer1 = serializedObj.FindProperty("settingsVolume.scatteringIntensity");
silverLiningSpreadLayer1 = serializedObj.FindProperty("settingsVolume.silverLiningSpread");
silverLiningIntensityLayer1 = serializedObj.FindProperty("settingsVolume.silverLiningIntensity");
edgeHighlightStrength = serializedObj.FindProperty("settingsVolume.edgeHighlightStrength");
baseNoiseMultiplierLayer1 = serializedObj.FindProperty("settingsVolume.baseNoiseMultiplier");
detailNoiseMultiplierLayer1= serializedObj.FindProperty("settingsVolume.detailNoiseMultiplier");
lightningIntensity = serializedObj.FindProperty("settingsVolume.lightningIntensity");
exposure = serializedObj.FindProperty("settingsVolume.exposure");
curlIntensityLayer1 = serializedObj.FindProperty("settingsVolume.curlIntensity");
lightStepModifierLayer1 = serializedObj.FindProperty("settingsVolume.lightStepModifier");
lightAbsorbtionLayer1 = serializedObj.FindProperty("settingsVolume.absorbtion");
baseNoiseUVLayer1 = serializedObj.FindProperty("settingsVolume.baseNoiseUV");
detailNoiseUVLayer1 = serializedObj.FindProperty("settingsVolume.detailNoiseUV");
baseErosionIntensityLayer1 = serializedObj.FindProperty("settingsVolume.baseErosionIntensity");
detailErosionIntensityLayer1 = serializedObj.FindProperty("settingsVolume.detailErosionIntensity");
multiScatterStrengthLayer1 = serializedObj.FindProperty("settingsVolume.multiScatterStrength");
multiScatterFalloffLayer1 = serializedObj.FindProperty("settingsVolume.multiScatterFalloff");
ambientFloorLayer1 = serializedObj.FindProperty("settingsVolume.ambientFloor");
cloudTypeShapingLayer1 = serializedObj.FindProperty("settingsVolume.cloudTypeShaping");
bottomShapeLayer1 = serializedObj.FindProperty("settingsVolume.bottomShape");
midShapeLayer1 = serializedObj.FindProperty("settingsVolume.midShape");
topShapeLayer1 = serializedObj.FindProperty("settingsVolume.topShape");
topLayerLayer1 = serializedObj.FindProperty("settingsVolume.topLayer");
windSpeedModifierLayer1 = serializedObj.FindProperty("settingsVolume.windSpeedModifier");
windUpwardsLayer1 = serializedObj.FindProperty("settingsVolume.windUpwards");
cloudsWindDirectionXModifierLayer1 = serializedObj.FindProperty("settingsVolume.cloudsWindDirectionXModifier");
cloudsWindDirectionYModifierLayer1 = serializedObj.FindProperty("settingsVolume.cloudsWindDirectionYModifier");
}
public override void OnInspectorGUI()
@@ -173,17 +147,18 @@ namespace Enviro
GUILayout.Label("Quality", headerStyle);
DisableInputStartQuality();
EditorGUILayout.PropertyField(volumetricClouds);
GUILayout.Space(5);
EditorGUILayout.PropertyField(lightningSupport);
EditorGUILayout.PropertyField(variableBottomNoise);
DisableInputEndQuality();
EditorGUILayout.PropertyField(depthBlending);
if(!myTarget.settingsGlobal.depthBlending)
EditorGUILayout.PropertyField(depthTest);
DisableInputStartQuality();
GUILayout.Space(5);
EditorGUILayout.PropertyField(downsampling);
EditorGUILayout.PropertyField(dualLayer);
EditorGUILayout.PropertyField(downsampling);
GUILayout.Space(5);
EditorGUILayout.PropertyField(stepsLayer1);
EditorGUILayout.PropertyField(stepsLayer2);
GUILayout.Space(5);
EditorGUILayout.PropertyField(blueNoiseIntensity);
EditorGUILayout.PropertyField(reprojectionBlendTime);
@@ -198,6 +173,7 @@ namespace Enviro
EditorGUILayout.PropertyField(noise);
EditorGUILayout.PropertyField(detailNoise);
EditorGUILayout.PropertyField(curlTex);
EditorGUILayout.PropertyField(bottomsOffsetNoise);
EditorGUILayout.PropertyField(blueNoise);
GUILayout.Space(10);
GUILayout.Label("Lighting", headerStyle);
@@ -223,8 +199,8 @@ namespace Enviro
GUI.backgroundColor = categoryModuleColor;
GUILayout.BeginVertical("",boxStyleModified);
GUI.backgroundColor = Color.white;
myTarget.showLayer1Controls = GUILayout.Toggle(myTarget.showLayer1Controls, "Settings: Layer 1", headerFoldout);
if(myTarget.showLayer1Controls)
myTarget.showVolumeSettings = GUILayout.Toggle(myTarget.showVolumeSettings, "Volume Settings", headerFoldout);
if(myTarget.showVolumeSettings)
{
//Coverage
GUILayout.BeginVertical("",boxStyleModified);
@@ -244,9 +220,15 @@ namespace Enviro
DisableInputStart();
EditorGUILayout.PropertyField(dilateCoverageLayer1);
EditorGUILayout.PropertyField(dilateTypeLayer1);
EditorGUILayout.PropertyField(cloudsTypeModifierLayer1);
EditorGUILayout.PropertyField(anvilBiasLayer1);
DisableInputEnd();
EditorGUILayout.PropertyField(cloudsTypeModifierLayer1);
EditorGUILayout.PropertyField(cloudTypeShapingLayer1);
EditorGUILayout.PropertyField(bottomShapeLayer1);
EditorGUILayout.PropertyField(midShapeLayer1);
EditorGUILayout.PropertyField(topShapeLayer1);
EditorGUILayout.PropertyField(rampShapeLayer1);
EditorGUILayout.PropertyField(topLayerLayer1);
DisableInputEnd();
EditorGUILayout.PropertyField(locationOffsetLayer1);
}
GUILayout.EndVertical();
@@ -258,14 +240,18 @@ namespace Enviro
if(myTarget.showLightingControls)
{
DisableInputStart();
EditorGUILayout.PropertyField(scatteringIntensityLayer1);
EditorGUILayout.PropertyField(multiScatteringALayer1);
EditorGUILayout.PropertyField(multiScatteringBLayer1);
EditorGUILayout.PropertyField(multiScatteringCLayer1);
EditorGUILayout.PropertyField(exposure);
GUILayout.Space(5);
EditorGUILayout.PropertyField(scatteringIntensityLayer1);
EditorGUILayout.PropertyField(multiScatterStrengthLayer1);
EditorGUILayout.PropertyField(multiScatterFalloffLayer1);
EditorGUILayout.PropertyField(ambientFloorLayer1);
GUILayout.Space(10);
EditorGUILayout.PropertyField(silverLiningSpreadLayer1);
EditorGUILayout.PropertyField(powderIntensityLayer1);
EditorGUILayout.PropertyField(silverLiningIntensityLayer1);
EditorGUILayout.PropertyField(silverLiningSpreadLayer1);
EditorGUILayout.PropertyField(edgeHighlightStrength);
EditorGUILayout.PropertyField(lightningIntensity);
GUILayout.Space(10);
EditorGUILayout.PropertyField(lightAbsorbtionLayer1);
DisableInputEnd();
@@ -286,8 +272,10 @@ namespace Enviro
EditorGUILayout.PropertyField(baseNoiseUVLayer1);
EditorGUILayout.PropertyField(detailNoiseUVLayer1);
DisableInputStart();
EditorGUILayout.PropertyField(baseErosionIntensityLayer1);
EditorGUILayout.PropertyField(baseErosionIntensityLayer1);
EditorGUILayout.PropertyField(baseNoiseMultiplierLayer1);
EditorGUILayout.PropertyField(detailErosionIntensityLayer1);
EditorGUILayout.PropertyField(detailNoiseMultiplierLayer1);
EditorGUILayout.PropertyField(curlIntensityLayer1);
DisableInputEnd();
}
@@ -308,100 +296,9 @@ namespace Enviro
GUILayout.EndVertical();
}
GUILayout.EndVertical();
//Layer 1 End
//Layer End
if(myTarget.settingsGlobal.dualLayer) {
//Layer 2
GUI.backgroundColor = categoryModuleColor;
GUILayout.BeginVertical("",boxStyleModified);
GUI.backgroundColor = Color.white;
myTarget.showLayer2Controls = GUILayout.Toggle(myTarget.showLayer2Controls, "Settings: Layer 2", headerFoldout);
if(myTarget.showLayer2Controls)
{
//Coverage
GUILayout.BeginVertical("",boxStyleModified);
myTarget.showCoverageControls = GUILayout.Toggle(myTarget.showCoverageControls, "Coverage", headerFoldout);
if(myTarget.showCoverageControls)
{
EditorGUILayout.PropertyField(bottomCloudsHeightLayer2);
EditorGUILayout.PropertyField(topCloudsHeightLayer2);
GUILayout.Space(10);
DisableInputStart();
EditorGUILayout.PropertyField(coverageLayer2);
DisableInputEnd();
EditorGUILayout.PropertyField(worleyFreq1Layer2);
EditorGUILayout.PropertyField(worleyFreq2Layer2);
DisableInputStart();
EditorGUILayout.PropertyField(dilateCoverageLayer2);
EditorGUILayout.PropertyField(dilateTypeLayer2);
EditorGUILayout.PropertyField(cloudsTypeModifierLayer2);
EditorGUILayout.PropertyField(anvilBiasLayer2);
DisableInputEnd();
EditorGUILayout.PropertyField(locationOffsetLayer2);
}
GUILayout.EndVertical();
//Lighting
GUILayout.BeginVertical("",boxStyleModified);
myTarget.showLightingControls = GUILayout.Toggle(myTarget.showLightingControls, "Lighting", headerFoldout);
if(myTarget.showLightingControls)
{
DisableInputStart();
EditorGUILayout.PropertyField(scatteringIntensityLayer2);
EditorGUILayout.PropertyField(multiScatteringALayer2);
EditorGUILayout.PropertyField(multiScatteringBLayer2);
EditorGUILayout.PropertyField(multiScatteringCLayer2);
GUILayout.Space(10);
EditorGUILayout.PropertyField(silverLiningSpreadLayer2);
EditorGUILayout.PropertyField(powderIntensityLayer2);
GUILayout.Space(10);
EditorGUILayout.PropertyField(lightAbsorbtionLayer2);
DisableInputEnd();
EditorGUILayout.PropertyField(lightStepModifierLayer2);
}
GUILayout.EndVertical();
//Density
GUILayout.BeginVertical("",boxStyleModified);
myTarget.showDensityControls = GUILayout.Toggle(myTarget.showDensityControls, "Density", headerFoldout);
if(myTarget.showDensityControls)
{
DisableInputStart();
EditorGUILayout.PropertyField(densityLayer2);
EditorGUILayout.PropertyField(densitySmoothnessLayer2);
DisableInputEnd();
EditorGUILayout.PropertyField(baseNoiseUVLayer2);
EditorGUILayout.PropertyField(detailNoiseUVLayer2);
DisableInputStart();
EditorGUILayout.PropertyField(baseErosionIntensityLayer2);
EditorGUILayout.PropertyField(detailErosionIntensityLayer2);
EditorGUILayout.PropertyField(curlIntensityLayer2);
DisableInputEnd();
}
GUILayout.EndVertical();
//Wind
GUILayout.BeginVertical("",boxStyleModified);
myTarget.showWindControls = GUILayout.Toggle(myTarget.showWindControls, "Wind", headerFoldout);
if(myTarget.showWindControls)
{
EditorGUILayout.PropertyField(windSpeedModifierLayer2);
EditorGUILayout.PropertyField(windUpwardsLayer2);
GUILayout.Space(5);
EditorGUILayout.PropertyField(cloudsWindDirectionXModifierLayer2);
EditorGUILayout.PropertyField(cloudsWindDirectionYModifierLayer2);
}
GUILayout.EndVertical();
}
GUILayout.EndVertical();
//Layer 2 End
}
/// Save Load
GUI.backgroundColor = categoryModuleColor;
GUILayout.BeginVertical("",boxStyleModified);

View File

@@ -178,10 +178,13 @@ namespace Enviro
{
GUILayout.Space(5);
GUIContent colorTitle = new GUIContent();
colorTitle.text = "Sky Color Tint";
colorTitle.text = "Color Tint";
colorTitle.tooltip = "Sets a color tint for skybox";
//curWT.skyOverride.intensity = EditorGUILayout.FloatField("Direct Light Intensity", curWT.lightingOverride.directLightIntensityModifier,0f,2f);
curWT.skyOverride.skyColorTint = EditorGUILayout.ColorField(colorTitle, curWT.skyOverride.skyColorTint,true,false,true);
curWT.skyOverride.skyColorTint = EditorGUILayout.ColorField(colorTitle, curWT.skyOverride.skyColorTint,true,false,true);
curWT.skyOverride.skyColorExponent = EditorGUILayout.Slider("Color Exponent", curWT.skyOverride.skyColorExponent,0f,2f);
curWT.skyOverride.mieScatteringMultiplier = EditorGUILayout.Slider("Mie Scattering Multiplier", curWT.skyOverride.mieScatteringMultiplier,0f,2f);
}
GUILayout.EndVertical();
}
@@ -195,63 +198,56 @@ namespace Enviro
{
GUILayout.Space(5);
GUILayout.BeginVertical ("", boxStyleModified);
curWT.cloudsOverride.showLayer1 = GUILayout.Toggle(curWT.cloudsOverride.showLayer1, "Layer 1", headerFoldout);
if(curWT.cloudsOverride.showLayer1)
{
curWT.cloudsOverride.coverageLayer1 = EditorGUILayout.Slider("Coverage", curWT.cloudsOverride.coverageLayer1,-1f,1f);
curWT.cloudsOverride.dilateCoverageLayer1 = EditorGUILayout.Slider("Dilate Coverage", curWT.cloudsOverride.dilateCoverageLayer1,0f,1f);
curWT.cloudsOverride.dilateTypeLayer1 = EditorGUILayout.Slider("Dilate Type", curWT.cloudsOverride.dilateTypeLayer1,0f,1f);
curWT.cloudsOverride.typeModifierLayer1 = EditorGUILayout.Slider("Type Modifier", curWT.cloudsOverride.typeModifierLayer1,0f,1f);
curWT.cloudsOverride.anvilBiasLayer1 = EditorGUILayout.Slider("Anvil Bias", curWT.cloudsOverride.anvilBiasLayer1,0f,1f);
GUILayout.Space(10);
curWT.cloudsOverride.scatteringIntensityLayer1 = EditorGUILayout.Slider("Scattering Intensity", curWT.cloudsOverride.scatteringIntensityLayer1,0f,2f);
curWT.cloudsOverride.multiScatteringALayer1 = EditorGUILayout.Slider("Multi Scattering A", curWT.cloudsOverride.multiScatteringALayer1,0f,1f);
curWT.cloudsOverride.multiScatteringBLayer1 = EditorGUILayout.Slider("Multi Scattering B", curWT.cloudsOverride.multiScatteringBLayer1,0f,1f);
curWT.cloudsOverride.multiScatteringCLayer1 = EditorGUILayout.Slider("Multi Scattering C", curWT.cloudsOverride.multiScatteringCLayer1,0f,1f);
curWT.cloudsOverride.powderIntensityLayer1 = EditorGUILayout.Slider("Powder Intensity", curWT.cloudsOverride.powderIntensityLayer1,0f,1f);
curWT.cloudsOverride.silverLiningSpreadLayer1 = EditorGUILayout.Slider("Silver Lining Spread", curWT.cloudsOverride.silverLiningSpreadLayer1,0f,1f);
curWT.cloudsOverride.ligthAbsorbtionLayer1 = EditorGUILayout.Slider("Light Absorbtion", curWT.cloudsOverride.ligthAbsorbtionLayer1,0f,2f);
curWT.cloudsOverride.ambientLightIntensity = EditorGUILayout.Slider("Ambient Light Intensity", curWT.cloudsOverride.ambientLightIntensity,0f,2f);
GUILayout.Space(10);
curWT.cloudsOverride.densityLayer1 = EditorGUILayout.Slider("Density", curWT.cloudsOverride.densityLayer1,0f,2f);
curWT.cloudsOverride.densitySmoothnessLayer1 = EditorGUILayout.Slider("Density Smoothness", curWT.cloudsOverride.densitySmoothnessLayer1,0f,2f);
curWT.cloudsOverride.baseErosionIntensityLayer1 = EditorGUILayout.Slider("Base Erosion Intensity", curWT.cloudsOverride.baseErosionIntensityLayer1,0f,1f);
curWT.cloudsOverride.detailErosionIntensityLayer1 = EditorGUILayout.Slider("Detail Erosion Intensity", curWT.cloudsOverride.detailErosionIntensityLayer1,0f,1f);
curWT.cloudsOverride.curlIntensityLayer1 = EditorGUILayout.Slider("Curl Intensity", curWT.cloudsOverride.curlIntensityLayer1,0f,1f);
GUILayout.Space(10);
}
GUILayout.EndVertical();
if(EnviroManager.instance == null || EnviroManager.instance.VolumetricClouds.settingsGlobal.dualLayer)
{
GUILayout.BeginVertical ("", boxStyleModified);
curWT.cloudsOverride.showLayer2 = GUILayout.Toggle(curWT.cloudsOverride.showLayer2, "Layer 2", headerFoldout);
if(curWT.cloudsOverride.showLayer2)
{
curWT.cloudsOverride.coverageLayer2 = EditorGUILayout.Slider("Coverage", curWT.cloudsOverride.coverageLayer2,-1f,1f);
curWT.cloudsOverride.dilateCoverageLayer2 = EditorGUILayout.Slider("Dilate Coverage", curWT.cloudsOverride.dilateCoverageLayer2,0f,1f);
curWT.cloudsOverride.dilateTypeLayer2 = EditorGUILayout.Slider("Dilate Type", curWT.cloudsOverride.dilateTypeLayer2,0f,1f);
curWT.cloudsOverride.typeModifierLayer2 = EditorGUILayout.Slider("Type Modifier", curWT.cloudsOverride.typeModifierLayer2,0f,1f);
curWT.cloudsOverride.anvilBiasLayer2 = EditorGUILayout.Slider("Anvil Bias", curWT.cloudsOverride.anvilBiasLayer2,0f,1f);
GUILayout.Space(10);
curWT.cloudsOverride.scatteringIntensityLayer2 = EditorGUILayout.Slider("Scattering Intensity", curWT.cloudsOverride.scatteringIntensityLayer2,0f,2f);
curWT.cloudsOverride.multiScatteringALayer2 = EditorGUILayout.Slider("Multi Scattering A", curWT.cloudsOverride.multiScatteringALayer2,0f,1f);
curWT.cloudsOverride.multiScatteringBLayer2 = EditorGUILayout.Slider("Multi Scattering B", curWT.cloudsOverride.multiScatteringBLayer2,0f,1f);
curWT.cloudsOverride.multiScatteringCLayer2 = EditorGUILayout.Slider("Multi Scattering C", curWT.cloudsOverride.multiScatteringCLayer2,0f,1f);
curWT.cloudsOverride.powderIntensityLayer2 = EditorGUILayout.Slider("Powder Intensity", curWT.cloudsOverride.powderIntensityLayer2,0f,1f);
curWT.cloudsOverride.silverLiningSpreadLayer2 = EditorGUILayout.Slider("Silver Lining Spread", curWT.cloudsOverride.silverLiningSpreadLayer2,0f,1f);
curWT.cloudsOverride.ligthAbsorbtionLayer2 = EditorGUILayout.Slider("Light Absorbtion", curWT.cloudsOverride.ligthAbsorbtionLayer2,0f,2f);
curWT.cloudsOverride.ambientLightIntensity = EditorGUILayout.Slider("Ambient Light Intensity", curWT.cloudsOverride.ambientLightIntensity,0f,2f);
GUILayout.Space(10);
curWT.cloudsOverride.densityLayer2 = EditorGUILayout.Slider("Density", curWT.cloudsOverride.densityLayer2,0f,2f);
curWT.cloudsOverride.densitySmoothnessLayer2 = EditorGUILayout.Slider("Density Smoothness", curWT.cloudsOverride.densitySmoothnessLayer2,0f,2f);
curWT.cloudsOverride.baseErosionIntensityLayer2 = EditorGUILayout.Slider("Base Erosion Intensity", curWT.cloudsOverride.baseErosionIntensityLayer2,0f,1f);
curWT.cloudsOverride.detailErosionIntensityLayer2 = EditorGUILayout.Slider("Detail Erosion Intensity", curWT.cloudsOverride.detailErosionIntensityLayer2,0f,1f);
curWT.cloudsOverride.curlIntensityLayer2 = EditorGUILayout.Slider("Curl Intensity", curWT.cloudsOverride.curlIntensityLayer2,0f,1f);
}
GUILayout.EndVertical();
}
EditorGUILayout.LabelField("Coverage", headerStyle);
curWT.cloudsOverride.coverage = EditorGUILayout.Slider("Coverage", curWT.cloudsOverride.coverage,-1f,1f);
curWT.cloudsOverride.dilateCoverage = EditorGUILayout.Slider("Dilate Coverage", curWT.cloudsOverride.dilateCoverage,0f,1f);
GUILayout.Space(10);
EditorGUILayout.LabelField("Type Shaping", headerStyle);
curWT.cloudsOverride.dilateType = EditorGUILayout.Slider("Dilate Type", curWT.cloudsOverride.dilateType,0f,1f);
curWT.cloudsOverride.typeModifier = EditorGUILayout.Slider("Type Modifier", curWT.cloudsOverride.typeModifier,0f,1f);
curWT.cloudsOverride.cloudTypeShaping = EditorGUILayout.Slider("Type Influence", curWT.cloudsOverride.cloudTypeShaping,0f,1f);
GUILayout.Space(10);
EditorGUILayout.LabelField("Segment Shaping", headerStyle);
curWT.cloudsOverride.bottomShape = EditorGUILayout.Slider("Bottom Shape", curWT.cloudsOverride.bottomShape,-5f,5f);
curWT.cloudsOverride.midShape = EditorGUILayout.Slider("Mid Shape", curWT.cloudsOverride.midShape,-5f,5f);
curWT.cloudsOverride.topShape = EditorGUILayout.Slider("Top Shape", curWT.cloudsOverride.topShape,-5f,5f);
curWT.cloudsOverride.rampShape = EditorGUILayout.Slider("Ramp Shape", curWT.cloudsOverride.rampShape,0f,2f);
GUILayout.Space(5);
curWT.cloudsOverride.topLayer = EditorGUILayout.Slider("Top Layer", curWT.cloudsOverride.topLayer,0f,2f);
GUILayout.Space(10);
EditorGUILayout.LabelField("Lighting", headerStyle);
curWT.cloudsOverride.exposure = EditorGUILayout.Slider("Exposure", curWT.cloudsOverride.exposure,0.0f,2f);
GUILayout.Space(5);
curWT.cloudsOverride.scatteringIntensity = EditorGUILayout.Slider("Scattering Intensity", curWT.cloudsOverride.scatteringIntensity,0f,10f);
curWT.cloudsOverride.multiScatterStrength = EditorGUILayout.Slider("Multi Scattering Strength", curWT.cloudsOverride.multiScatterStrength,0f,1f);
curWT.cloudsOverride.multiScatterFalloff = EditorGUILayout.Slider("Multi Scattering Falloff", curWT.cloudsOverride.multiScatterFalloff,0f,0.5f);
curWT.cloudsOverride.ambientFloor = EditorGUILayout.Slider("Ambient Floor", curWT.cloudsOverride.ambientFloor,0f,1f);
GUILayout.Space(5);
curWT.cloudsOverride.silverLiningIntensity = EditorGUILayout.Slider("Silver Lining Intensity", curWT.cloudsOverride.silverLiningIntensity,0f,2f);
curWT.cloudsOverride.silverLiningSpread = EditorGUILayout.Slider("Silver Lining Spread", curWT.cloudsOverride.silverLiningSpread,0f,1f);
curWT.cloudsOverride.edgeHighlightStrength = EditorGUILayout.Slider("Edge Highlights", curWT.cloudsOverride.edgeHighlightStrength,0f,1f);
GUILayout.Space(5);
curWT.cloudsOverride.ligthAbsorbtion = EditorGUILayout.Slider("Light Absorbtion", curWT.cloudsOverride.ligthAbsorbtion,0f,2.0f);
curWT.cloudsOverride.ambientLightIntensity = EditorGUILayout.Slider("Ambient Light Intensity", curWT.cloudsOverride.ambientLightIntensity, 0f, 2f);
GUILayout.Space(5);
curWT.cloudsOverride.lightningIntensity = EditorGUILayout.Slider("Lightning Intensity", curWT.cloudsOverride.lightningIntensity,0.0f,2f);
GUILayout.Space(10);
EditorGUILayout.LabelField("Density", headerStyle);
curWT.cloudsOverride.density = EditorGUILayout.Slider("Density", curWT.cloudsOverride.density,0f,2f);
curWT.cloudsOverride.densitySmoothness = EditorGUILayout.Slider("Density Smoothness", curWT.cloudsOverride.densitySmoothness,0f,2f);
GUILayout.Space(10);
EditorGUILayout.LabelField("Noise Shaping", headerStyle);
curWT.cloudsOverride.baseNoiseUVMultiplier = EditorGUILayout.Slider("Base Noise UV Multiplier", curWT.cloudsOverride.baseNoiseUVMultiplier,0f,2f);
curWT.cloudsOverride.baseErosionIntensity = EditorGUILayout.Slider("Base Erosion Intensity", curWT.cloudsOverride.baseErosionIntensity,0f,1f);
curWT.cloudsOverride.baseNoiseMultiplier = EditorGUILayout.Slider("Base Noise Multiplier", curWT.cloudsOverride.baseNoiseMultiplier,0f,2f);
GUILayout.Space(5);
curWT.cloudsOverride.detailNoiseUVMultiplier = EditorGUILayout.Slider("Detail Noise UV Multiplier", curWT.cloudsOverride.detailNoiseUVMultiplier,0f,2f);
curWT.cloudsOverride.detailErosionIntensity = EditorGUILayout.Slider("Detail Erosion Intensity", curWT.cloudsOverride.detailErosionIntensity,0f,1f);
curWT.cloudsOverride.detailNoiseMultiplier = EditorGUILayout.Slider("Detail Noise Multiplier", curWT.cloudsOverride.detailNoiseMultiplier,0f,2f);
curWT.cloudsOverride.curlIntensity = EditorGUILayout.Slider("Curl Intensity", curWT.cloudsOverride.curlIntensity,0f,1f);
GUILayout.Space(10);
GUILayout.EndVertical();
}
GUILayout.EndVertical();
}
@@ -274,9 +270,8 @@ namespace Enviro
curWT.flatCloudsOverride.flatCloudsCoverage = EditorGUILayout.Slider("Flat Clouds Coverage", curWT.flatCloudsOverride.flatCloudsCoverage,0f,2f);
curWT.flatCloudsOverride.flatCloudsLightIntensity = EditorGUILayout.Slider("Flat Clouds Light Intensity", curWT.flatCloudsOverride.flatCloudsLightIntensity,0f,2f);
curWT.flatCloudsOverride.flatCloudsAmbientIntensity = EditorGUILayout.Slider("Flat Clouds Ambient Intensity", curWT.flatCloudsOverride.flatCloudsAmbientIntensity,0f,2f);
curWT.flatCloudsOverride.flatCloudsDensity =EditorGUILayout.Slider("Flat Clouds Density", curWT.flatCloudsOverride.flatCloudsDensity,0f,2f);
curWT.flatCloudsOverride.flatCloudsAbsorbtion = EditorGUILayout.Slider("Flat Clouds Light Absorbtion", curWT.flatCloudsOverride.flatCloudsAbsorbtion,0f,2f);
curWT.flatCloudsOverride.flatCloudsDensity =EditorGUILayout.Slider("Flat Clouds Density", curWT.flatCloudsOverride.flatCloudsDensity,0f,2f);
curWT.flatCloudsOverride.flatCloudsShadowIntensity = EditorGUILayout.Slider("Flat Clouds Shadow Intensity", curWT.flatCloudsOverride.flatCloudsShadowIntensity,0f,2f);
}
GUILayout.EndVertical();
}
@@ -325,7 +320,7 @@ namespace Enviro
curWT.fogOverride.anistropy = EditorGUILayout.Slider("Anistropy", curWT.fogOverride.anistropy,0f,1.0f);
#else
EditorGUILayout.LabelField("HDRP Fog", headerStyle);
curWT.fogOverride.fogAttenuationDistance = EditorGUILayout.Slider("Attenuation Distance", curWT.fogOverride.fogAttenuationDistance,0f,400f);
curWT.fogOverride.fogAttenuationDistance = EditorGUILayout.Slider("Attenuation Distance", curWT.fogOverride.fogAttenuationDistance,0f,4000f);
curWT.fogOverride.baseHeight = EditorGUILayout.FloatField("Base Height", curWT.fogOverride.baseHeight);
curWT.fogOverride.maxHeight = EditorGUILayout.FloatField("Max Height", curWT.fogOverride.maxHeight);
GUILayout.Space(10);

View File

@@ -6,6 +6,7 @@ namespace Enviro
{
public class EnviroConfiguration : ScriptableObject
{
public string version = "";
public EnviroTimeModule timeModule;
public EnviroLightingModule lightingModule;
public EnviroReflectionsModule reflectionsModule;
@@ -30,6 +31,7 @@ namespace Enviro
public static EnviroConfiguration CreateMyAsset()
{
EnviroConfiguration config = ScriptableObject.CreateInstance<EnviroConfiguration>();
config.version = "3.3.0";
#if UNITY_EDITOR
// Create and save the new profile with unique name
string path = UnityEditor.AssetDatabase.GetAssetPath (UnityEditor.Selection.activeObject);

View File

@@ -16,14 +16,14 @@ namespace Enviro
public Mode type;
[Range(-10f, 0f)]
public float density = 0.0f;
public float density = -10.0f;
public float radius = 1.0f;
public float stretch = 2.0f;
[Range(0, 1)]
public float feather = 0.7f;
public Vector3 size;
public Vector3 size = Vector3.one * 10;
void OnEnable()
{

View File

@@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace Enviro
@@ -51,6 +52,20 @@ namespace Enviro
return (value - from1) / (to1 - from1) * (to2 - from2) + from2;
}
public static void DestroyExtended (Object obj)
{
if(Application.isPlaying)
{
MonoBehaviour.Destroy(obj);
}
else
{
MonoBehaviour.DestroyImmediate(obj);
}
}
// Checks if Enviro Effects should render on this camera for URP/HDRP
public static bool CanRenderOnCamera (Camera cam)
{
@@ -261,6 +276,25 @@ namespace Enviro
return null;
}
//Find the default profile. .y
public static EnviroConfiguration GetConfig(string name)
{
#if UNITY_EDITOR
string[] assets = UnityEditor.AssetDatabase.FindAssets(name, null);
for (int idx = 0; idx < assets.Length; idx++)
{
string path = UnityEditor.AssetDatabase.GUIDToAssetPath(assets[idx]);
if (path.Contains(".asset"))
{
return UnityEditor.AssetDatabase.LoadAssetAtPath<EnviroConfiguration>(path);
}
}
#endif
return null;
}
#if ENVIRO_HDRP
public static UnityEngine.Rendering.VolumeProfile GetDefaultSkyAndFogProfile(string name)
{

View File

@@ -172,7 +172,7 @@ namespace Enviro
{
Events.onWeatherChangedActions.Invoke();
}
private void SeasonsChangedInvoke()
private void SeasonsChangedInvoke()
{
Events.onSeasonChangedActions.Invoke();
}
@@ -197,6 +197,7 @@ namespace Enviro
#if ENVIRO_HDRP
public UnityEngine.Rendering.Volume volumeHDRP;
public UnityEngine.Rendering.VolumeProfile volumeProfileHDRP;
public UnityEngine.Rendering.HighDefinition.CustomPassVolume customPassVolumeHDRP;
#endif
//////
@@ -225,7 +226,15 @@ namespace Enviro
#endif
EventInit();
SetSRPKeywords ();
SetSRPKeywords();
if (isNight)
NotifyIsNight();
else
NotifyIsDay();
}
void OnDisable()
@@ -498,6 +507,34 @@ namespace Enviro
{
volumeHDRP.sharedProfile = volumeProfileHDRP;
}
if(customPassVolumeHDRP == null)
{
GameObject volume = new GameObject();
volume.name = "Enviro Custom Pass";
volume.transform.SetParent(transform);
volume.transform.localPosition = Vector3.zero;
customPassVolumeHDRP = volume.AddComponent<UnityEngine.Rendering.HighDefinition.CustomPassVolume>();
customPassVolumeHDRP.isGlobal = true;
customPassVolumeHDRP.injectionPoint = UnityEngine.Rendering.HighDefinition.CustomPassInjectionPoint.AfterOpaqueAndSky;
customPassVolumeHDRP.AddPassOfType<EnviroHDRPCustomPass>();
}
else
{
// Check if a pass of type EnviroHDRPCustomPass already exists
bool hasPass = false;
foreach (var pass in customPassVolumeHDRP.customPasses)
{
if (pass is EnviroHDRPCustomPass)
{
hasPass = true;
break;
}
}
if(!hasPass)
customPassVolumeHDRP.AddPassOfType<EnviroHDRPCustomPass>();
}
#endif
}

View File

@@ -30,6 +30,9 @@ namespace Enviro
public class EnviroManagerBase : MonoBehaviour
{
public string version => "3.3.1";
private string defaultConfig => "Default Enviro Configuration 3_3_1";
//Modules
public EnviroConfiguration configuration;
@@ -1206,6 +1209,53 @@ namespace Enviro
}
}
public void UpdateConfiguration (string fromVersion)
{
EnviroConfiguration defaults = EnviroHelper.GetConfig(defaultConfig);
if(defaults != null)
{
if(fromVersion != version)
{
if (fromVersion == "")
{
if (configuration.volumetricCloudModule != null)
{
configuration.volumetricCloudModule.settingsGlobal.noise = defaults.volumetricCloudModule.settingsGlobal.noise;
configuration.volumetricCloudModule.settingsGlobal.detailNoise = defaults.volumetricCloudModule.settingsGlobal.detailNoise;
configuration.volumetricCloudModule.settingsGlobal.curlTex = defaults.volumetricCloudModule.settingsGlobal.curlTex;
configuration.volumetricCloudModule.settingsGlobal.bottomsOffsetNoise = defaults.volumetricCloudModule.settingsGlobal.bottomsOffsetNoise;
configuration.volumetricCloudModule.settingsGlobal.atmosphereColorSaturateDistance = defaults.volumetricCloudModule.settingsGlobal.atmosphereColorSaturateDistance;
configuration.volumetricCloudModule.settingsVolume.worleyFreq1 = defaults.volumetricCloudModule.settingsVolume.worleyFreq1;
configuration.volumetricCloudModule.settingsVolume.worleyFreq2 = defaults.volumetricCloudModule.settingsVolume.worleyFreq2;
configuration.volumetricCloudModule.settingsVolume.baseNoiseUV = defaults.volumetricCloudModule.settingsVolume.baseNoiseUV;
configuration.volumetricCloudModule.settingsVolume.detailNoiseUV = defaults.volumetricCloudModule.settingsVolume.detailNoiseUV;
configuration.volumetricCloudModule.settingsVolume.windSpeedModifier = defaults.volumetricCloudModule.settingsVolume.windSpeedModifier;
configuration.volumetricCloudModule.settingsVolume.windUpwards = defaults.volumetricCloudModule.settingsVolume.windUpwards;
configuration.lightingModule.Settings.sceneExposure = defaults.lightingModule.Settings.sceneExposure;
configuration.Sky.Settings.skyExposureHDRP = defaults.Sky.Settings.skyExposureHDRP;
}
}
else if (fromVersion == "3.3.0")
{
configuration.volumetricCloudModule.settingsGlobal.atmosphereColorSaturateDistance = defaults.volumetricCloudModule.settingsGlobal.atmosphereColorSaturateDistance;
configuration.volumetricCloudModule.settingsGlobal.curlTex = defaults.volumetricCloudModule.settingsGlobal.curlTex;
configuration.volumetricCloudModule.settingsVolume.baseNoiseUV = defaults.volumetricCloudModule.settingsVolume.baseNoiseUV;
configuration.volumetricCloudModule.settingsVolume.detailNoiseUV = defaults.volumetricCloudModule.settingsVolume.detailNoiseUV;
}
configuration.version = version;
#if UNITY_EDITOR
UnityEditor.EditorUtility.SetDirty(configuration);
#endif
}
}
else
{
Debug.LogError("Could not find default config asset: " + defaultConfig);
}
}
}
}

View File

@@ -0,0 +1,285 @@
#if ENVIRO_HDRP
using UnityEngine;
using System.Collections.Generic;
using UnityEngine.Rendering.HighDefinition;
using UnityEngine.Rendering;
using UnityEngine.Experimental.Rendering;
namespace Enviro
{
class EnviroHDRPCustomPass : CustomPass
{
private Material blitTrough;
private List<EnviroVolumetricCloudRenderer> volumetricCloudsRender = new List<EnviroVolumetricCloudRenderer>();
private Vector3 floatingPointOriginMod = Vector3.zero;
private RTHandle sourceHandle;
private RTHandle temp1Handle;
private RTHandle temp2Handle;
protected override void Setup(ScriptableRenderContext renderContext, CommandBuffer cmd)
{
if (blitTrough == null)
blitTrough = new Material(Shader.Find("Hidden/Enviro/BlitTroughHDRP"));
// We allocate persistent RTHandles dynamically when Execute runs for the first time
sourceHandle = null;
temp1Handle = null;
temp2Handle = null;
}
public RTHandle ReallocateIfNeeded(RTHandle handle, RenderTextureDescriptor desc, string name)
{
bool needsRealloc = handle == null || handle.rt == null;
if (!needsRealloc)
{
var hDesc = handle.rt.descriptor;
// Compare only the format & dimension
if (hDesc.graphicsFormat != desc.graphicsFormat ||
hDesc.dimension != desc.dimension)
{
needsRealloc = true;
}
}
if (needsRealloc)
{
if (handle != null)
RTHandles.Release(handle);
// Allocate with scale = 1, dynamic scaling will adjust automatically
handle = RTHandles.Alloc(
Vector2.one,
colorFormat: desc.graphicsFormat,
dimension: desc.dimension,
enableRandomWrite: false,
useMipMap: desc.useMipMap,
name: name,
useDynamicScale: true
);
}
return handle;
}
protected override void Execute(CustomPassContext ctx)
{
HDCamera camera = ctx.hdCamera;
if (ctx.cameraColorBuffer == null || ctx.cameraColorBuffer.rt == null ||
camera.camera.cameraType == CameraType.Preview ||
!EnviroHelper.CanRenderOnCamera(camera.camera) || EnviroManager.instance == null && EnviroManager.instance.configuration != null)
return;
var desc = ctx.cameraColorBuffer.rt.descriptor;
// Reallocate only if needed
sourceHandle = ReallocateIfNeeded(sourceHandle, desc, "Enviro Source");
temp1Handle = ReallocateIfNeeded(temp1Handle, desc, "Enviro Temp1");
if (EnviroManager.instance.VolumetricClouds != null && EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows)
temp2Handle = ReallocateIfNeeded(temp2Handle, desc, "Enviro Temp2");
// Copy camera buffer to persistent source
HDUtils.BlitCameraTexture(ctx.cmd, ctx.cameraColorBuffer, sourceHandle);
// Get quality and flags
EnviroQuality myQuality = EnviroHelper.GetQualityForCamera(camera.camera);
bool renderVolumetricClouds = EnviroManager.instance.VolumetricClouds != null && myQuality.volumetricCloudsOverride.volumetricClouds;
bool renderFog = EnviroManager.instance.Fog != null && myQuality.fogOverride.fog;
floatingPointOriginMod = EnviroManager.instance.Objects?.worldAnchor != null
? EnviroManager.instance.Objects.worldAnchor.transform.position
: Vector3.zero;
// Ensure clouds renderer exists
if (renderVolumetricClouds && GetCloudsRenderer(camera.camera) == null)
CreateCloudsRenderer(camera.camera);
SetMatrix(camera.camera);
EnviroVolumetricCloudRenderer renderer = GetCloudsRenderer(camera.camera);
// ----- Depth-aware render logic -----
if (renderVolumetricClouds && renderFog)
{
if (camera.camera.transform.position.y - floatingPointOriginMod.y < EnviroManager.instance.VolumetricClouds.settingsVolume.bottomCloudsHeight)
{
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsHDRP(camera.camera, ctx.cmd, sourceHandle, temp1Handle, renderer, myQuality);
if (EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows &&
camera.camera.cameraType != CameraType.Reflection)
{
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsHDRP(camera.camera, ctx.cmd, temp1Handle, temp2Handle, renderer);
EnviroManager.instance.Fog.RenderHeightFogHDRP(camera.camera, ctx.cmd, temp2Handle, ctx.cameraColorBuffer);
}
else
{
EnviroManager.instance.Fog.RenderHeightFogHDRP(camera.camera, ctx.cmd, temp1Handle, ctx.cameraColorBuffer);
}
}
else
{
EnviroManager.instance.Fog.RenderHeightFogHDRP(camera.camera, ctx.cmd, sourceHandle, temp1Handle);
if (EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows &&
camera.camera.cameraType != CameraType.Reflection)
{
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsHDRP(camera.camera, ctx.cmd, temp1Handle, temp2Handle, renderer);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsHDRP(camera.camera, ctx.cmd, temp2Handle, ctx.cameraColorBuffer, renderer, myQuality);
}
else
{
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsHDRP(camera.camera, ctx.cmd, temp1Handle, ctx.cameraColorBuffer, renderer, myQuality);
}
}
}
else if (renderVolumetricClouds)
{
if (EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows &&
camera.camera.cameraType != CameraType.Reflection)
{
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsHDRP(camera.camera, ctx.cmd, sourceHandle, temp1Handle, renderer);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsHDRP(camera.camera, ctx.cmd, temp1Handle, ctx.cameraColorBuffer, renderer, myQuality);
}
else
{
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsHDRP(camera.camera, ctx.cmd, sourceHandle, ctx.cameraColorBuffer, renderer, myQuality);
}
}
else if (renderFog)
{
EnviroManager.instance.Fog.RenderHeightFogHDRP(camera.camera, ctx.cmd, sourceHandle, ctx.cameraColorBuffer);
}
else
{
// blitTrough.SetTexture("_InputTexture", sourceHandle);
// CoreUtils.SetRenderTarget(ctx.cmd, ctx.cameraColorBuffer, ctx.cameraDepthBuffer, ClearFlag.None);
// HDUtils.DrawFullScreen(ctx.cmd, blitTrough);
}
if (!renderVolumetricClouds)
Shader.SetGlobalTexture("_EnviroClouds", Texture2D.blackTexture);
}
protected override void Cleanup()
{
if (blitTrough != null) CoreUtils.Destroy(blitTrough);
if (sourceHandle != null) RTHandles.Release(sourceHandle);
if (temp1Handle != null) RTHandles.Release(temp1Handle);
if (temp2Handle != null) RTHandles.Release(temp2Handle);
for (int i = 0; i < volumetricCloudsRender.Count; i++)
CleanCloudsRenderer(volumetricCloudsRender[i]);
}
// ---- Cloud renderer helpers -----
private EnviroVolumetricCloudRenderer CreateCloudsRenderer(Camera cam)
{
EnviroVolumetricCloudRenderer r = new EnviroVolumetricCloudRenderer();
r.camera = cam;
volumetricCloudsRender.Add(r);
return r;
}
private void CleanCloudsRenderer(EnviroVolumetricCloudRenderer renderer)
{
if (renderer.fullBuffer != null)
foreach (var b in renderer.fullBuffer) if (b != null) CoreUtils.Destroy(b);
if (renderer.undersampleBuffer != null) CoreUtils.Destroy(renderer.undersampleBuffer);
if (renderer.downsampledDepth != null) CoreUtils.Destroy(renderer.downsampledDepth);
if (renderer.raymarchMat != null) CoreUtils.Destroy(renderer.raymarchMat);
if (renderer.reprojectMat != null) CoreUtils.Destroy(renderer.reprojectMat);
if (renderer.blendAndLightingMat != null) CoreUtils.Destroy(renderer.blendAndLightingMat);
if (renderer.depthMat != null) CoreUtils.Destroy(renderer.depthMat);
if (renderer.shadowMat != null) CoreUtils.Destroy(renderer.shadowMat);
}
private EnviroVolumetricCloudRenderer GetCloudsRenderer(Camera cam)
{
foreach (var r in volumetricCloudsRender)
if (r.camera == cam) return r;
return CreateCloudsRenderer(cam);
}
private void SetMatrix(Camera myCam)
{
#if ENABLE_VR && ENABLE_XR_MODULE
if (UnityEngine.XR.XRSettings.enabled && UnityEngine.XR.XRSettings.stereoRenderingMode == UnityEngine.XR.XRSettings.StereoRenderingMode.SinglePassInstanced)
{
// Both stereo eye inverse view matrices
Matrix4x4 left_world_from_view = myCam.GetStereoViewMatrix(Camera.StereoscopicEye.Left).inverse;
Matrix4x4 right_world_from_view = myCam.GetStereoViewMatrix(Camera.StereoscopicEye.Right).inverse;
// Both stereo eye inverse projection matrices, plumbed through GetGPUProjectionMatrix to compensate for render texture
Matrix4x4 left_screen_from_view = myCam.GetStereoProjectionMatrix(Camera.StereoscopicEye.Left);
Matrix4x4 right_screen_from_view = myCam.GetStereoProjectionMatrix(Camera.StereoscopicEye.Right);
Matrix4x4 left_view_from_screen = GL.GetGPUProjectionMatrix(left_screen_from_view, true).inverse;
Matrix4x4 right_view_from_screen = GL.GetGPUProjectionMatrix(right_screen_from_view, true).inverse;
// Negate [1,1] to reflect Unity's CBuffer state
if (SystemInfo.graphicsDeviceType != UnityEngine.Rendering.GraphicsDeviceType.OpenGLCore && SystemInfo.graphicsDeviceType != UnityEngine.Rendering.GraphicsDeviceType.OpenGLES3)
{
left_view_from_screen[1, 1] *= -1;
right_view_from_screen[1, 1] *= -1;
}
Shader.SetGlobalMatrix("_LeftWorldFromView", left_world_from_view);
Shader.SetGlobalMatrix("_RightWorldFromView", right_world_from_view);
Shader.SetGlobalMatrix("_LeftViewFromScreen", left_view_from_screen);
Shader.SetGlobalMatrix("_RightViewFromScreen", right_view_from_screen);
}
else
{
// Main eye inverse view matrix
Matrix4x4 left_world_from_view = myCam.cameraToWorldMatrix;
// Inverse projection matrices, plumbed through GetGPUProjectionMatrix to compensate for render texture
Matrix4x4 screen_from_view = myCam.projectionMatrix;
Matrix4x4 left_view_from_screen = GL.GetGPUProjectionMatrix(screen_from_view, true).inverse;
// Negate [1,1] to reflect Unity's CBuffer state
if (SystemInfo.graphicsDeviceType != UnityEngine.Rendering.GraphicsDeviceType.OpenGLCore && SystemInfo.graphicsDeviceType != UnityEngine.Rendering.GraphicsDeviceType.OpenGLES3)
left_view_from_screen[1, 1] *= -1;
Shader.SetGlobalMatrix("_LeftWorldFromView", left_world_from_view);
Shader.SetGlobalMatrix("_LeftViewFromScreen", left_view_from_screen);
}
#else
// Main eye inverse view matrix
Matrix4x4 left_world_from_view = myCam.cameraToWorldMatrix;
// Inverse projection matrices, plumbed through GetGPUProjectionMatrix to compensate for render texture
Matrix4x4 screen_from_view = myCam.projectionMatrix;
Matrix4x4 left_view_from_screen = GL.GetGPUProjectionMatrix(screen_from_view, true).inverse;
// Negate [1,1] to reflect Unity's CBuffer state
if (SystemInfo.graphicsDeviceType != UnityEngine.Rendering.GraphicsDeviceType.OpenGLCore && SystemInfo.graphicsDeviceType != UnityEngine.Rendering.GraphicsDeviceType.OpenGLES3)
left_view_from_screen[1, 1] *= -1;
Shader.SetGlobalMatrix("_LeftWorldFromView", left_world_from_view);
Shader.SetGlobalMatrix("_LeftViewFromScreen", left_view_from_screen);
#endif
}
}
}
#endif

View File

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

View File

@@ -1,3 +1,6 @@
//Deprecated since 3.3. Please use the custom pass system now!
/*
#if ENVIRO_HDRP
using UnityEngine;
using UnityEngine.Rendering;
@@ -7,7 +10,7 @@ using System.Collections.Generic;
namespace Enviro
{
[Serializable, VolumeComponentMenu("Post-processing/Enviro/Effects Renderer")]
[Serializable, VolumeComponentMenu("Post-processing/Enviro/Effects Renderer (DEPRECATED)")]
public class EnviroHDRPRenderer : CustomPostProcessVolumeComponent, IPostProcessComponent
{
public bool IsActive() => EnviroManager.instance != null;
@@ -85,6 +88,8 @@ namespace Enviro
}
//Set some global matrixes used for all the enviro effects.
SetMatrix(camera.camera);
//Clouds
if(EnviroManager.instance.Fog != null && EnviroManager.instance.VolumetricClouds != null && renderVolumetricClouds && renderFog)
@@ -92,7 +97,7 @@ namespace Enviro
RenderTexture temp1 = RenderTexture.GetTemporary(source.rt.descriptor);
RTHandle temp1Handle = RTHandles.Alloc(temp1);
if(camera.camera.transform.position.y - floatingPointOriginMod.y < EnviroManager.instance.VolumetricClouds.settingsLayer1.bottomCloudsHeight)
if(camera.camera.transform.position.y - floatingPointOriginMod.y < EnviroManager.instance.VolumetricClouds.settingsVolume.bottomCloudsHeight)
{
EnviroVolumetricCloudRenderer renderer = GetCloudsRenderer(camera.camera);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsHDRP(camera.camera,cmd, source, temp1Handle, renderer, myQuality);
@@ -120,8 +125,8 @@ namespace Enviro
{
RenderTexture temp2 = RenderTexture.GetTemporary(source.rt.descriptor);
RTHandle temp2Handle = RTHandles.Alloc(temp2);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsHDRP(camera.camera,cmd, temp1Handle, temp2Handle, renderer, myQuality);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsHDRP(camera.camera,cmd,temp2Handle,destination,renderer);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsHDRP(camera.camera,cmd,temp1Handle,temp2Handle,renderer);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsHDRP(camera.camera,cmd, temp2Handle, destination, renderer, myQuality);
RenderTexture.ReleaseTemporary(temp2);
}
else
@@ -142,8 +147,8 @@ namespace Enviro
{
RenderTexture temp1 = RenderTexture.GetTemporary(source.rt.descriptor);
RTHandle temp1Handle = RTHandles.Alloc(temp1);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsHDRP(camera.camera,cmd, source, temp1Handle, renderer, myQuality);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsHDRP(camera.camera,cmd,temp1Handle,destination,renderer);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsHDRP(camera.camera,cmd,source,temp1Handle,renderer);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsHDRP(camera.camera,cmd, temp1Handle, destination, renderer, myQuality);
RenderTexture.ReleaseTemporary(temp1);
//temp1Handle.Release();
}
@@ -287,4 +292,5 @@ namespace Enviro
}
}
}
#endif
#endif
*/

View File

@@ -172,7 +172,7 @@ namespace Enviro
RenderTexture temp2 = RenderTexture.GetTemporary(src.descriptor);
if(myCam.transform.position.y - floatingPointOriginMod.y < EnviroManager.instance.VolumetricClouds.settingsLayer1.bottomCloudsHeight)
if(myCam.transform.position.y - floatingPointOriginMod.y < EnviroManager.instance.VolumetricClouds.settingsVolume.bottomCloudsHeight)
{
EnviroManager.instance.VolumetricClouds.RenderVolumetricClouds(myCam, src, temp, volumetricCloudsRender, myQuality);
@@ -192,8 +192,8 @@ namespace Enviro
if(EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows && myCam.cameraType != CameraType.Reflection)
{
EnviroManager.instance.VolumetricClouds.RenderVolumetricClouds(myCam,temp,temp2,volumetricCloudsRender,myQuality);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadows(temp2,dest,volumetricCloudsRender);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadows(temp,temp2,volumetricCloudsRender);
EnviroManager.instance.VolumetricClouds.RenderVolumetricClouds(myCam,temp2,dest,volumetricCloudsRender,myQuality);
}
else
{
@@ -209,8 +209,8 @@ namespace Enviro
if(EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows && myCam.cameraType != CameraType.Reflection)
{
RenderTexture temp = RenderTexture.GetTemporary(src.descriptor);
EnviroManager.instance.VolumetricClouds.RenderVolumetricClouds(myCam,src,temp,volumetricCloudsRender, myQuality);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadows(temp,dest,volumetricCloudsRender);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadows(src,temp,volumetricCloudsRender);
EnviroManager.instance.VolumetricClouds.RenderVolumetricClouds(myCam,temp,dest,volumetricCloudsRender, myQuality);
RenderTexture.ReleaseTemporary(temp);
}
else

View File

@@ -291,7 +291,7 @@ namespace Enviro {
{
TextureHandle temp1 = UniversalRenderer.CreateRenderGraphTexture(renderGraph, desc, "Temp1", false);
if(cameraData.camera.transform.position.y - floatingPointOriginMod.y < EnviroManager.instance.VolumetricClouds.settingsLayer1.bottomCloudsHeight)
if(cameraData.camera.transform.position.y - floatingPointOriginMod.y < EnviroManager.instance.VolumetricClouds.settingsVolume.bottomCloudsHeight)
{
EnviroVolumetricCloudRenderer renderer = GetCloudsRenderer(cameraData.camera);
@@ -317,8 +317,9 @@ namespace Enviro {
if(EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows && cameraData.camera.cameraType != CameraType.Reflection)
{
TextureHandle temp2 = UniversalRenderer.CreateRenderGraphTexture(renderGraph, desc, "Temp2", false);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(this,renderGraph, resourceData, cameraData,temp1,temp2, renderer, myQuality);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsURP(this,renderGraph, resourceData, cameraData,temp2,resourceData.activeColorTexture, renderer);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsURP(this,renderGraph, resourceData, cameraData,temp1,temp2, renderer);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(this,renderGraph, resourceData, cameraData,temp2,resourceData.activeColorTexture, renderer, myQuality);
}
else
{
@@ -333,8 +334,9 @@ namespace Enviro {
if(EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows && cameraData.camera.cameraType != CameraType.Reflection)
{
TextureHandle temp1 = UniversalRenderer.CreateRenderGraphTexture(renderGraph, desc, "Temp1", false);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(this,renderGraph, resourceData, cameraData,source,temp1, renderer, myQuality);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsURP(this,renderGraph, resourceData, cameraData,temp1,resourceData.activeColorTexture, renderer);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsURP(this,renderGraph, resourceData, cameraData,source,temp1, renderer);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(this,renderGraph, resourceData, cameraData,temp1,resourceData.activeColorTexture, renderer, myQuality);
}
else
{

View File

@@ -227,7 +227,7 @@ namespace Enviro
{
RenderTexture temp1 = RenderTexture.GetTemporary(renderingData.cameraData.cameraTargetDescriptor);
if(renderingData.cameraData.camera.transform.position.y - floatingPointOriginMod.y < EnviroManager.instance.VolumetricClouds.settingsLayer1.bottomCloudsHeight)
if(renderingData.cameraData.camera.transform.position.y - floatingPointOriginMod.y < EnviroManager.instance.VolumetricClouds.settingsVolume.bottomCloudsHeight)
{
EnviroVolumetricCloudRenderer renderer = GetCloudsRenderer(renderingData.cameraData.camera);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(renderingData,this,cmd, sourceTemp, temp1, renderer, myQuality);
@@ -253,8 +253,8 @@ namespace Enviro
if(EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows && renderingData.cameraData.camera.cameraType != CameraType.Reflection)
{
RenderTexture temp2 = RenderTexture.GetTemporary(renderingData.cameraData.cameraTargetDescriptor);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(renderingData,this,cmd, temp1, temp2, renderer, myQuality);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsURP(this,renderingData.cameraData.camera,cmd,temp2,cameraColorTarget,renderer);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsURP(this,renderingData.cameraData.camera,cmd,temp1,temp2,renderer);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(renderingData,this,cmd, temp2, cameraColorTarget, renderer, myQuality);
RenderTexture.ReleaseTemporary(temp2);
}
else
@@ -273,8 +273,8 @@ namespace Enviro
if(EnviroManager.instance.VolumetricClouds.settingsGlobal.cloudShadows && renderingData.cameraData.camera.cameraType != CameraType.Reflection)
{
RenderTexture temp1 = RenderTexture.GetTemporary(renderingData.cameraData.cameraTargetDescriptor);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(renderingData,this,cmd, sourceTemp, temp1, renderer, myQuality);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsURP(this,renderingData.cameraData.camera,cmd,temp1,cameraColorTarget,renderer);
EnviroManager.instance.VolumetricClouds.RenderCloudsShadowsURP(this,renderingData.cameraData.camera,cmd,sourceTemp,temp1,renderer);
EnviroManager.instance.VolumetricClouds.RenderVolumetricCloudsURP(renderingData,this,cmd, temp1, cameraColorTarget, renderer, myQuality);
RenderTexture.ReleaseTemporary(temp1);
}
else

View File

@@ -77,7 +77,7 @@ namespace Enviro
return;
if(EnviroManager.instance.Objects.audio != null)
DestroyImmediate(EnviroManager.instance.Objects.audio);
EnviroHelper.DestroyExtended(EnviroManager.instance.Objects.audio);
}
@@ -92,12 +92,17 @@ namespace Enviro
public void CreateAudio()
{
if(EnviroManager.instance.Objects.audio != null)
DestroyImmediate(EnviroManager.instance.Objects.audio);
{
EnviroHelper.DestroyExtended(EnviroManager.instance.Objects.audio);
EnviroManager.instance.Objects.audio = null;
}
if(EnviroManager.instance.Objects.audio == null)
{
EnviroManager.instance.Objects.audio = new GameObject();
EnviroManager.instance.Objects.audio.hideFlags = HideFlags.DontSave;
EnviroManager.instance.Objects.audio.name = "Audio";
EnviroManager.instance.Objects.audio.transform.SetParent(EnviroManager.instance.transform);
EnviroManager.instance.Objects.audio.transform.localPosition = Vector3.zero;
@@ -107,7 +112,7 @@ namespace Enviro
for(int i = 0; i < Settings.ambientClips.Count; i++)
{
if(Settings.ambientClips[i].myAudioSource != null)
DestroyImmediate(Settings.ambientClips[i].myAudioSource.gameObject);
EnviroHelper.DestroyExtended(Settings.ambientClips[i].myAudioSource.gameObject);
GameObject sys;
@@ -128,7 +133,7 @@ namespace Enviro
for(int i = 0; i < Settings.weatherClips.Count; i++)
{
if(Settings.weatherClips[i].myAudioSource != null)
DestroyImmediate(Settings.weatherClips[i].myAudioSource.gameObject);
EnviroHelper.DestroyExtended(Settings.weatherClips[i].myAudioSource.gameObject);
GameObject sys;
@@ -149,7 +154,7 @@ namespace Enviro
for(int i = 0; i < Settings.thunderClips.Count; i++)
{
if(Settings.thunderClips[i].myAudioSource != null)
DestroyImmediate(Settings.thunderClips[i].myAudioSource.gameObject);
EnviroHelper.DestroyExtended(Settings.thunderClips[i].myAudioSource.gameObject);
GameObject sys;
@@ -200,7 +205,7 @@ namespace Enviro
if(!Application.isPlaying)
{
clip.myAudioSource.Stop();
return;
return;
}
clip.myAudioSource.loop = clip.loop;

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