diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LocalAmbientOcclusionNoisy.asset b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LocalAmbientOcclusionNoisy.asset index cc33c97869b..d090fa99e34 100644 --- a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LocalAmbientOcclusionNoisy.asset +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/AmbientOcclusionData/LocalAmbientOcclusionNoisy.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 59b6606ef2548734bb6d11b9d160bc7e, type: 3} m_Name: HDRISky m_EditorClassIdentifier: - active: 0 + active: 1 m_AdvancedMode: 0 rotation: m_OverrideState: 0 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.meta new file mode 100644 index 00000000000..2d2b7d97b1d --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22ed54d594144d04f88aef373a4a8a27 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity new file mode 100644 index 00000000000..4f4276a9bae --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity @@ -0,0 +1,329 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 1149913020} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1001 &452585676 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalPosition.x + value: -0.44 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalPosition.y + value: 0.28999972 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalPosition.z + value: -13.38 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.x + value: -0.15503997 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.w + value: 0.98790824 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -17.838 + objectReference: {fileID: 0} + - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_ClearFlags + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_BackGroundColor.r + value: 0.4705882 + objectReference: {fileID: 0} + - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_BackGroundColor.g + value: 0.4705882 + objectReference: {fileID: 0} + - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_BackGroundColor.b + value: 0.4705882 + objectReference: {fileID: 0} + - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: far clip plane + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: field of view + value: 30 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_Version + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_RenderingPathCustomFrameSettings.bitDatas.data1 + value: 70005818916701 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: clearColorMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: ImageComparisonSettings.TargetWidth + value: 640 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} +--- !u!1 &840375756 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 840375759} + - component: {fileID: 840375758} + m_Layer: 0 + m_Name: Scene Settings + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &840375758 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 840375756} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + isGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: 3c92a6b444bd8a749b685664884c5a36, type: 2} +--- !u!4 &840375759 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 840375756} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!850595691 &1149913020 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Settings.lighting + serializedVersion: 2 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 1 + m_BakeBackend: 1 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_TextureCompression: 1 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 2 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRRussianRouletteStartBounce: 2 + m_PVREnvironmentMIS: 1 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity.meta new file mode 100644 index 00000000000..6bb6eaf9d9f --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 602816355ed2fb94383bb6396823e77e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer/Scene Settings Profile.asset b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer/Scene Settings Profile.asset new file mode 100644 index 00000000000..583f7bba85c --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer/Scene Settings Profile.asset @@ -0,0 +1,327 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-3155368813038754222 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59b6606ef2548734bb6d11b9d160bc7e, type: 3} + m_Name: HDRISky + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + rotation: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + skyIntensityMode: + m_OverrideState: 0 + m_Value: 0 + exposure: + m_OverrideState: 0 + m_Value: 0 + multiplier: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxValue: + m_OverrideState: 0 + m_Value: 0.46607345 + min: 0 + upperHemisphereLuxColor: + m_OverrideState: 0 + m_Value: {x: 0.18750395, y: 0.2918189, z: 0.5} + desiredLuxValue: + m_OverrideState: 0 + m_Value: 20000 + updateMode: + m_OverrideState: 0 + m_Value: 0 + updatePeriod: + m_OverrideState: 0 + m_Value: 0 + min: 0 + includeSunInBaking: + m_OverrideState: 0 + m_Value: 0 + hdriSky: + m_OverrideState: 1 + m_Value: {fileID: 8900000, guid: 8253d41e6e8b11a4cbe77a4f8f82934d, type: 3} + enableDistortion: + m_OverrideState: 0 + m_Value: 0 + procedural: + m_OverrideState: 0 + m_Value: 1 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + scrollDirection: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + scrollSpeed: + m_OverrideState: 0 + m_Value: 2 + min: 0 + enableBackplate: + m_OverrideState: 0 + m_Value: 0 + backplateType: + m_OverrideState: 0 + m_Value: 0 + groundLevel: + m_OverrideState: 0 + m_Value: 0 + scale: + m_OverrideState: 0 + m_Value: {x: 32, y: 32} + projectionDistance: + m_OverrideState: 0 + m_Value: 16 + min: 0.0000001 + plateRotation: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + plateTexRotation: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + plateTexOffset: + m_OverrideState: 0 + m_Value: {x: 0, y: 0} + blendAmount: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 100 + shadowTint: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + pointLightShadow: + m_OverrideState: 0 + m_Value: 0 + dirLightShadow: + m_OverrideState: 0 + m_Value: 0 + rectLightShadow: + m_OverrideState: 0 + m_Value: 0 +--- !u!114 &-1065974624950405951 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4df53429744a4174ca20efaba13fe1e0, type: 3} + m_Name: CloudLayer + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + enabled: + m_OverrideState: 1 + m_Value: 1 + cloudMap: + m_OverrideState: 1 + m_Value: {fileID: 2800000, guid: 556e9bc309995094c87d3c02677f230d, type: 3} + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + tint: + m_OverrideState: 1 + m_Value: {r: 0.5647059, g: 0.5764706, b: 0.5568628, a: 1} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + intensityMultiplier: + m_OverrideState: 1 + m_Value: 1.02 + min: 0 + enableDistortion: + m_OverrideState: 0 + m_Value: 0 + procedural: + m_OverrideState: 0 + m_Value: 1 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + scrollDirection: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + scrollSpeed: + m_OverrideState: 0 + m_Value: 2 + min: 0 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: Scene Settings Profile + m_EditorClassIdentifier: + components: + - {fileID: 3479482973930658046} + - {fileID: -3155368813038754222} + - {fileID: -1065974624950405951} +--- !u!114 &3479482973930658046 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0d7593b3a9277ac4696b20006c21dde2, type: 3} + m_Name: VisualEnvironment + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + skyType: + m_OverrideState: 1 + m_Value: 1 + skyAmbientMode: + m_OverrideState: 0 + m_Value: 0 + fogType: + m_OverrideState: 0 + m_Value: 0 +--- !u!114 &4845244889253265832 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6d31fa107c795994496a3089be99149a, type: 3} + m_Name: PhysicallyBasedSkySettings + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + rotation: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + skyIntensityMode: + m_OverrideState: 0 + m_Value: 0 + exposure: + m_OverrideState: 0 + m_Value: 0 + multiplier: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxValue: + m_OverrideState: 0 + m_Value: 1 + min: 0 + desiredLuxValue: + m_OverrideState: 0 + m_Value: 20000 + updateMode: + m_OverrideState: 0 + m_Value: 0 + updatePeriod: + m_OverrideState: 0 + m_Value: 0 + min: 0 + includeSunInBaking: + m_OverrideState: 0 + m_Value: 0 + planetaryRadius: + m_OverrideState: 0 + m_Value: 6378.759 + min: 0 + planetCenterPosition: + m_OverrideState: 0 + m_Value: {x: 0, y: -6378.759, z: 0} + airAttenuationDistance: + m_OverrideState: 0 + m_Value: {r: 0.17241378, g: 0.074074075, b: 0.030211482, a: 1} + hdr: 1 + showAlpha: 0 + showEyeDropper: 0 + airAlbedo: + m_OverrideState: 0 + m_Value: {r: 0.9, g: 0.9, b: 1, a: 1} + hdr: 0 + showAlpha: 0 + showEyeDropper: 0 + airMaxAltitude: + m_OverrideState: 0 + m_Value: 58.3 + min: 0 + aerosolAttenuationDistance: + m_OverrideState: 0 + m_Value: 0.5 + min: 0 + aerosolAlbedo: + m_OverrideState: 0 + m_Value: 0.9 + min: 0 + max: 1 + aerosolMaxAltitude: + m_OverrideState: 0 + m_Value: 8.3 + min: 0 + aerosolAnisotropy: + m_OverrideState: 0 + m_Value: 0 + min: -1 + max: 1 + numBounces: + m_OverrideState: 0 + m_Value: 8 + min: 1 + max: 10 + groundColor: + m_OverrideState: 1 + m_Value: {r: 0.17254902, g: 0.227451, b: 0.3137255, a: 1} + hdr: 0 + showAlpha: 0 + showEyeDropper: 0 + groundAlbedoTexture: + m_OverrideState: 1 + m_Value: {fileID: 8900000, guid: 703a4570dfe8b8e41aff24d2320bd405, type: 3} + groundEmissionTexture: + m_OverrideState: 1 + m_Value: {fileID: 8900000, guid: ec98521838f4e7f4a839280309cb08ab, type: 3} + planetRotation: + m_OverrideState: 1 + m_Value: {x: 180, y: -50, z: 170} + spaceEmissionTexture: + m_OverrideState: 1 + m_Value: {fileID: 8900000, guid: b0c5cbf24c773cd449436a2060083b10, type: 3} + spaceRotation: + m_OverrideState: 1 + m_Value: {x: 15, y: 30, z: 45} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer/Scene Settings Profile.asset.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer/Scene Settings Profile.asset.meta new file mode 100644 index 00000000000..4d0fc8e59e2 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer/Scene Settings Profile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3c92a6b444bd8a749b685664884c5a36 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer/clouds.png b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer/clouds.png new file mode 100644 index 00000000000..d0b9985b2c1 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer/clouds.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5f4f77e643c755598e9c59f45839fe3818aead9859d098461708d10dcc5cf74 +size 744889 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer/clouds.png.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer/clouds.png.meta new file mode 100644 index 00000000000..5983659864a --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer/clouds.png.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: 556e9bc309995094c87d3c02677f230d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 2 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/2308_Microshadows.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/2308_Microshadows.png index dbaf85a924d..445b08af3e2 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/2308_Microshadows.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/2308_Microshadows.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad5de5f57059f24c8fb887dee29262460d8f0f56573543620da0fce8b2c38163 -size 42603 +oid sha256:bdc4a6e895ae21def889dce2f30f45930ffd7574a2a64560b8c393a79599ea8d +size 24518 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/2601_SSAO_HalfRes.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/2601_SSAO_HalfRes.png index f1f44e94791..cbc420ff548 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/2601_SSAO_HalfRes.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/2601_SSAO_HalfRes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e5043b5f9b4797f4fc343e76567cb3e4c010734852e933cf25ec66e34cf67c60 -size 39316 +oid sha256:de492d6a865aeca799913e81c20e39bf816e80d38901d9a6511671245c128623 +size 28074 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/2602_SSAO_FullRes.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/2602_SSAO_FullRes.png index ec6b26b12bb..8cfeacd02df 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/2602_SSAO_FullRes.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/2602_SSAO_FullRes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9bcc3e2df703d67353afae90d2694a7169da8bc18d18a8f7027f824fd129306d -size 46697 +oid sha256:f5a5e0f42edba600d28ef25819c2e3ac39220eeb95b5c4d3b64aefb59f758dbb +size 36058 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/5010_CloudLayer.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/5010_CloudLayer.png new file mode 100644 index 00000000000..524f5b419d8 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/5010_CloudLayer.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:727618937f30f812f35c3a26ec7b4935d78788a1e46d952a4b86e1bccefcdda9 +size 194309 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2308_Microshadows.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2308_Microshadows.png index 29d86606f8e..33852130210 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2308_Microshadows.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2308_Microshadows.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:85ecc946d04931d4bb63e40a9bfcd072798ddeac84717c211604147c94978db6 -size 37455 +oid sha256:5afd74fc3ccf86a344d3cc59adca94372ee9af9b145eb2b4ec9bb607f10688ba +size 26991 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2601_SSAO_HalfRes.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2601_SSAO_HalfRes.png index 2fe16ac91fe..59a48506086 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2601_SSAO_HalfRes.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2601_SSAO_HalfRes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e1e6eb40c3373e31bba6660b726a274b6b01ad788e9b3ca4ab3f9ea36856834 -size 138495 +oid sha256:3afa43c5da5b997db0674ceb7273a49c462c501c0ffd88882006bac65a022cf7 +size 125393 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2602_SSAO_FullRes.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2602_SSAO_FullRes.png index 6f15097f7a6..e82e1b46a40 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2602_SSAO_FullRes.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/2602_SSAO_FullRes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a2f02786220bcb04807619067b3e50c24dcde08eac1d578954ef18153cfc20a -size 161721 +oid sha256:959b4db54a3dcf8cf7be850f19945e6943e65469e728840c7411684d6c267a86 +size 145807 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/5010_CloudLayer.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/5010_CloudLayer.png new file mode 100644 index 00000000000..b6905fbd255 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/5010_CloudLayer.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c141c8eaec873e0ce1f0289dd16035d05f5e43c0127256e26465944ea36995e +size 166413 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/5010_CloudLayer.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/5010_CloudLayer.png.meta new file mode 100644 index 00000000000..57e7e7f7b14 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/5010_CloudLayer.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: cb32c186acc7493478a9c553e3602883 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2308_Microshadows.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2308_Microshadows.png index bbaba4fbb94..9b59051bb20 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2308_Microshadows.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2308_Microshadows.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eee60c6908da777a9d4275f787426cbc03fd4249060bfd8aaf45d56cacb6b0e7 -size 37485 +oid sha256:9b5f95212d2065405d112551de5a63c4cf438380b6a3dcd5f7eaede2e193c32d +size 24542 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2601_SSAO_HalfRes.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2601_SSAO_HalfRes.png index 2fe16ac91fe..7d216bd0482 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2601_SSAO_HalfRes.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2601_SSAO_HalfRes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e1e6eb40c3373e31bba6660b726a274b6b01ad788e9b3ca4ab3f9ea36856834 -size 138495 +oid sha256:bc17c857e0e7f12eca807fff68388fcbcc15d045606067ed25ee1adfa16868bd +size 118682 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2602_SSAO_FullRes.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2602_SSAO_FullRes.png index 6f15097f7a6..ebb30d828f6 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2602_SSAO_FullRes.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/2602_SSAO_FullRes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a2f02786220bcb04807619067b3e50c24dcde08eac1d578954ef18153cfc20a -size 161721 +oid sha256:3bc21975c8972b085c8b55c098a9765425df667cebf1e44cf7d37ed288f4a135 +size 139587 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/5010_CloudLayer.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/5010_CloudLayer.png new file mode 100644 index 00000000000..b6905fbd255 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/5010_CloudLayer.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c141c8eaec873e0ce1f0289dd16035d05f5e43c0127256e26465944ea36995e +size 166413 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/5010_CloudLayer.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/5010_CloudLayer.png.meta new file mode 100644 index 00000000000..5397f17976c --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/5010_CloudLayer.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 138f3f330ef4c2441a8ed225fe022058 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2308_Microshadows.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2308_Microshadows.png index d78609bb3c6..9b59051bb20 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2308_Microshadows.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2308_Microshadows.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68e343374594055f5366449f8ba419fb752c00ad6cfca827fba99e4e785b7798 -size 42655 +oid sha256:9b5f95212d2065405d112551de5a63c4cf438380b6a3dcd5f7eaede2e193c32d +size 24542 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2601_SSAO_HalfRes.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2601_SSAO_HalfRes.png index 8f1716ca16d..7d216bd0482 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2601_SSAO_HalfRes.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2601_SSAO_HalfRes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:528ff653ea85a5c9e0964c0333b51dc0c5152c46301d457daf528d19285911cd -size 138363 +oid sha256:bc17c857e0e7f12eca807fff68388fcbcc15d045606067ed25ee1adfa16868bd +size 118682 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2602_SSAO_FullRes.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2602_SSAO_FullRes.png index 1b98d3b8e93..ebb30d828f6 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2602_SSAO_FullRes.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/2602_SSAO_FullRes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2e404a0757452da69f850e0ffcb159c9f5ef59341df1270f7bc2d26d04b0d230 -size 161886 +oid sha256:3bc21975c8972b085c8b55c098a9765425df667cebf1e44cf7d37ed288f4a135 +size 139587 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5010_CloudLayer.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5010_CloudLayer.png new file mode 100644 index 00000000000..b6905fbd255 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5010_CloudLayer.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c141c8eaec873e0ce1f0289dd16035d05f5e43c0127256e26465944ea36995e +size 166413 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5010_CloudLayer.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5010_CloudLayer.png.meta new file mode 100644 index 00000000000..58c07d3a597 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5010_CloudLayer.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: b4526db69dbb8cf49880762253e0d3be +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2308_Microshadows.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2308_Microshadows.png index 75475877dc5..9b59051bb20 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2308_Microshadows.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2308_Microshadows.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9fe27184a0fa7221b2aedbf2ec3e8f072e4643086896af221c4d7fe59bcaae4b -size 42602 +oid sha256:9b5f95212d2065405d112551de5a63c4cf438380b6a3dcd5f7eaede2e193c32d +size 24542 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2601_SSAO_HalfRes.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2601_SSAO_HalfRes.png index f12d26d2f43..7d216bd0482 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2601_SSAO_HalfRes.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2601_SSAO_HalfRes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:86b9c5bd30255e4a3e450c10e6a9183fd2242e4c1b2f25d6baf8832ba491e4a9 -size 138277 +oid sha256:bc17c857e0e7f12eca807fff68388fcbcc15d045606067ed25ee1adfa16868bd +size 118682 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2602_SSAO_FullRes.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2602_SSAO_FullRes.png index dea191a3b69..ebb30d828f6 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2602_SSAO_FullRes.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/2602_SSAO_FullRes.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c8ad25f24b2df583eefa218bc44fe0225e36346feb4892d6e7d6b8783f8f8af -size 161708 +oid sha256:3bc21975c8972b085c8b55c098a9765425df667cebf1e44cf7d37ed288f4a135 +size 139587 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/5010_CloudLayer.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/5010_CloudLayer.png new file mode 100644 index 00000000000..b6905fbd255 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/5010_CloudLayer.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c141c8eaec873e0ce1f0289dd16035d05f5e43c0127256e26465944ea36995e +size 166413 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/5010_CloudLayer.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/5010_CloudLayer.png.meta new file mode 100644 index 00000000000..0daf2cab9f1 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/5010_CloudLayer.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 2eb5894d0b40c5c4687accde81393255 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/5010_CloudLayer.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/5010_CloudLayer.png new file mode 100644 index 00000000000..b6905fbd255 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/5010_CloudLayer.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c141c8eaec873e0ce1f0289dd16035d05f5e43c0127256e26465944ea36995e +size 166413 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/5010_CloudLayer.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/5010_CloudLayer.png.meta new file mode 100644 index 00000000000..cfae3e3dadf --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/5010_CloudLayer.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 7b0def33545ea0e47b1b9fffd8371015 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/ProjectSettings/EditorBuildSettings.asset b/TestProjects/HDRP_Tests/ProjectSettings/EditorBuildSettings.asset index 172d3eba1e4..97318f89ab5 100644 --- a/TestProjects/HDRP_Tests/ProjectSettings/EditorBuildSettings.asset +++ b/TestProjects/HDRP_Tests/ProjectSettings/EditorBuildSettings.asset @@ -443,6 +443,9 @@ EditorBuildSettings: - enabled: 1 path: Assets/GraphicTests/Scenes/5x_SkyAndFog/5009_HDRI_Sky_Flow.unity guid: f2fd7a28087b7634e94c49cb78704e74 + - enabled: 1 + path: Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity + guid: 602816355ed2fb94383bb6396823e77e - enabled: 1 path: Assets/GraphicTests/Scenes/8x_ShaderGraph/8101_Opaque.unity guid: 3f9e911b4dbc9464e85add595c37cb89 diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index bc4970d2d4d..b643a5f3075 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -142,6 +142,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added procedural metering mask that can follow an object - Added presets quality settings for RTAO and RTGI. - Added an override for the shadow culling that allows better directional shadow maps in ray tracing effects (RTR, RTGI, RTSSS and RR). +- Added a Cloud Layer volume override. ### Fixed - Fix when rescale probe all direction below zero (1219246) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Creating-a-Custom-Sky.md b/com.unity.render-pipelines.high-definition/Documentation~/Creating-a-Custom-Sky.md index 58efdb653bb..ed9489378ef 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Creating-a-Custom-Sky.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Creating-a-Custom-Sky.md @@ -122,6 +122,14 @@ class NewSkyRenderer : SkyRenderer private static int m_RenderCubemapID = 0; // FragBaking private static int m_RenderFullscreenSkyID = 1; // FragRender + + public NewSkyRenderer() + { + // These booleans tell the sky system if the sky needs to be recomputed + // when the sun light or the cloud layer changes + SupportDynamicSunLight = true; + SupportCloudLayer = true; + } public override void Build() { @@ -159,6 +167,9 @@ class NewSkyRenderer : SkyRenderer m_PropertyBlock.SetVector(_SkyParam, new Vector4(intensity, 0.0f, Mathf.Cos(phi), Mathf.Sin(phi))); m_PropertyBlock.SetMatrix(_PixelCoordToViewDirWS, builtinParams.pixelCoordToViewDirMatrix); + if (SupportCloudLayer) + CloudLayer.Apply(builtinParams.cloudLayer, m_NewSkyMaterial); + CoreUtils.DrawFullScreen(builtinParams.commandBuffer, m_NewSkyMaterial, m_PropertyBlock, passID); } } @@ -187,10 +198,13 @@ Shader "Hidden/HDRP/Sky/NewSky" #pragma target 4.5 #pragma only_renderers d3d11 playstation xboxone vulkan metal switch + #pragma multi_compile_local _ USE_CLOUD_MAP + #pragma multi_compile_local _ USE_CLOUD_MOTION #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonLighting.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUtils.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.hlsl" TEXTURECUBE(_Cubemap); SAMPLER(sampler_Cubemap); @@ -235,6 +249,7 @@ Shader "Hidden/HDRP/Sky/NewSky" { dir = RotationUp(dir, cos_sin); float3 skyColor = SAMPLE_TEXTURECUBE_LOD(_Cubemap, sampler_Cubemap, dir, 0).rgb * _Intensity * exposure; + skyColor = ApplyCloudLayer(dir, skyColor); skyColor = ClampToFloat16Max(skyColor); return float4(skyColor, 1.0); @@ -296,4 +311,4 @@ Shader "Hidden/HDRP/Sky/NewSky" } ``` -**Note**: The NewSky example uses two passes, one that uses a Depth Test for rendering the sky in the background (so that geometry occludes it correctly), and the other that does not use a Depth Test and renders the sky into the reflection cubemap. \ No newline at end of file +**Note**: The NewSky example uses two passes, one that uses a Depth Test for rendering the sky in the background (so that geometry occludes it correctly), and the other that does not use a Depth Test and renders the sky into the reflection cubemap. diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Environment-Lighting.md b/com.unity.render-pipelines.high-definition/Documentation~/Environment-Lighting.md index 107fef2bdb6..94cac8a04c4 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Environment-Lighting.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Environment-Lighting.md @@ -45,7 +45,7 @@ The **Environment (HDRP)** section is at the top and has two settings that you c | **Setting** | **Description** | | ----------------------- | ------------------------------------------------------------ | | **Profile** | A [Volume Profile](Volume-Profile.html) for the sky. This Volume Profile must include at least one Sky Volume override. | -| **Static Lighting Sky** | The sky to use for the Global Illumination simulation. The drop-down only contains sky types that the **Profile** includes. For example, if the **Profile** includes a **Gradient Sky** Volume override, you can select **Gradient Sky** from this drop-down.
You can only edit this setting if you assign a Volume Profile to the **Profile** field. | +| **Static Lighting Sky** | The sky to use for the Global Illumination simulation. The drop-down only contains sky types included and activated in the **Profile**. For example, if the **Profile** has an active **Gradient Sky** Volume override, you can select **Gradient Sky** from this drop-down.
If the **Profile** includes an active **Cloud Layer** Volume override, it will contribute to Global Illumination.
You can only edit this setting if you assign a Volume Profile to the **Profile** field and that **Profile** contains at least one active Sky Volume Override. | You can assign the same Volume Profile to both the **Static Lighting Sky** field and a Volume in your Scene. If you do this, and use the same sky settings for the baked lighting and the visual background in the Volume, the baked lighting accurately matches the background at runtime. If you want to control the light baking for the environment lighting separately to the visual background in your Scene, you can assign a different Volume Profile for each process. diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/Override-CloudLayer.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/Override-CloudLayer.png new file mode 100644 index 00000000000..b729b6268c4 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Images/Override-CloudLayer.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58f1c0836b097b52457650cc996d13154eaea7ccf939d4cfc8175a66aa17c822 +size 12864 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Override-Cloud-Layer.md b/com.unity.render-pipelines.high-definition/Documentation~/Override-Cloud-Layer.md new file mode 100644 index 00000000000..700ccbb2743 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Override-Cloud-Layer.md @@ -0,0 +1,44 @@ +# Cloud Layer + +The **Cloud Layer** Volume component override controls an optional cloud layer you can add on top of any Sky. The cloud layer is a 2D texture blended with the sky that can be animated using a flowmap. + +## Using Cloud Layer + +The **Cloud Layer** uses the [Volume](Volumes.html) framework, so to enable and modify **Cloud Layer** properties, you must add a **Cloud Layer** override to a [Volume](Volumes.html) in your Scene. To add **Cloud Layer** to a Volume: + +1. In the Scene or Hierarchy view, select a GameObject that contains a Volume component to view it in the Inspector. +2. In the Inspector, navigate to **Add Override > Sky** and click on **Cloud Layer**. + +After you add a **Cloud Layer** override, you must enable it in the override itself. In the override, Check the **Enable** property. HDRP now renders **Cloud Layer** for any Camera this Volume affects. + + + +## Customizing the Cloud Map + +The Cloud Map is a 2D texture in LatLong layout (sometimes called Cylindrical or Equirectangular) that contains cloud color in the RGB channel and cloud coverage in the alpha channel. +If **Upper Hemisphere Only** is checked, the map is interpreted as being the upper half of a LatLong texture. +In that case, it is recommended to set the **Wrap Mode** to **Clamp** in the texture import settings to avoid artifacts above the horizon. + + + +## Customizing the Flowmap + +The Flowmap must have the same layout as the cloud map, and is also subject to the **Upper Hemisphere Only** property. +Only the red and green channel are used and they represent respectively horizontal and vertical displacement. For each of these channels, a value of `0.5` means no displacement, a value of `0` means a negative displacement and a value of `1` means a positive displacement. + +## Properties + +![](Images/Override-CloudLayer.png) + +| Property | Description | +| ----------------------------- | ------------------------------------------------------------ | +| **Enable** | Enables the cloud layer. | +| **Cloud Map* | Assign a Texture that HDRP uses to render the cloud layer. Refer to the section [Customizing the Cloud Map](#CustomizingCloudMap) for more details. | +| **Upper Hemisphere Only** | Check the box to display the cloud layer above the horizon only. | +| **Tint** | Specifies a color that HDRP uses to tint the Cloud Layer. | +| **Intensity Multiplier** | Set the multiplier by which HDRP multiplies the Cloud Layer color.
Note: If the **Cloud Layer** is applied on top of a **Physically Based Sky**, the multiplier may need to be quite big. | +| **Enable Distortion** | Enable or disable cloud motion using UV distortion. | +| - **Distortion Mode** | Use the drop-down to select the method that HDRP uses to calculate the cloud distortion.
• **Procedural**: HDRP distorts the clouds using a uniform wind direction.
• **Flowmap**: HDRP distorts the clouds with a user provided flowmap. | +| -- **Flowmap** | Assign a flowmap, in LatLong layout, that HDRP uses to distort UVs when rendering the clouds. Refer to the section [Customizing the Flowmap](#CustomizingFlowmap) for more details.
This property only appears when you select **Flowmap** from the **Distortion Mode** drop-down. | +| - **Scroll direction** | Use the slider to set the scrolling direction for the distortion. | +| - **Scroll speed** | Modify the speed at which HDRP scrolls the distortion texture. | diff --git a/com.unity.render-pipelines.high-definition/Editor/Sky/CloudLayer.meta b/com.unity.render-pipelines.high-definition/Editor/Sky/CloudLayer.meta new file mode 100644 index 00000000000..04dd5970562 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Editor/Sky/CloudLayer.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d54106328eb9dec478d3593c76dda4ad +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Editor/Sky/CloudLayer/CloudLayerEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Sky/CloudLayer/CloudLayerEditor.cs new file mode 100644 index 00000000000..98de2b923f6 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Editor/Sky/CloudLayer/CloudLayerEditor.cs @@ -0,0 +1,95 @@ +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering.HighDefinition; + +namespace UnityEditor.Rendering.HighDefinition +{ + [CanEditMultipleObjects] + [VolumeComponentEditor(typeof(CloudLayer))] + class CloudLayerEditor : VolumeComponentEditor + { + SerializedDataParameter m_Enabled; + + SerializedDataParameter m_CloudMap; + SerializedDataParameter m_UpperHemisphereOnly; + SerializedDataParameter m_Tint; + SerializedDataParameter m_IntensityMultiplier; + + SerializedDataParameter m_EnableDistortion; + SerializedDataParameter m_Procedural; + SerializedDataParameter m_Flowmap; + SerializedDataParameter m_ScrollDirection; + SerializedDataParameter m_ScrollSpeed; + + GUIContent[] m_DistortionModes = { new GUIContent("Procedural"), new GUIContent("Flowmap") }; + int[] m_DistortionModeValues = { 1, 0 }; + + public override void OnEnable() + { + var o = new PropertyFetcher(serializedObject); + + m_Enabled = Unpack(o.Find(x => x.enabled)); + + m_CloudMap = Unpack(o.Find(x => x.cloudMap)); + m_UpperHemisphereOnly = Unpack(o.Find(x => x.upperHemisphereOnly)); + m_Tint = Unpack(o.Find(x => x.tint)); + m_IntensityMultiplier = Unpack(o.Find(x => x.intensityMultiplier)); + + m_EnableDistortion = Unpack(o.Find(x => x.enableDistortion)); + m_Procedural = Unpack(o.Find(x => x.procedural)); + m_Flowmap = Unpack(o.Find(x => x.flowmap)); + m_ScrollDirection = Unpack(o.Find(x => x.scrollDirection)); + m_ScrollSpeed = Unpack(o.Find(x => x.scrollSpeed)); + } + + bool IsMapFormatInvalid(SerializedDataParameter map) + { + if (!map.overrideState.boolValue || map.value.objectReferenceValue == null) + return false; + var tex = map.value.objectReferenceValue; + if (tex.GetType() == typeof(RenderTexture)) + return (tex as RenderTexture).dimension != TextureDimension.Tex2D; + return tex.GetType() != typeof(Texture2D); + } + + public override void OnInspectorGUI() + { + PropertyField(m_Enabled, new GUIContent("Enable")); + + PropertyField(m_CloudMap); + if (IsMapFormatInvalid(m_CloudMap)) + EditorGUILayout.HelpBox("The cloud map needs to be a 2D Texture in LatLong layout.", MessageType.Info); + + PropertyField(m_UpperHemisphereOnly); + PropertyField(m_Tint); + PropertyField(m_IntensityMultiplier); + + PropertyField(m_EnableDistortion); + if (m_EnableDistortion.value.boolValue) + { + EditorGUI.indentLevel++; + + using (new EditorGUILayout.HorizontalScope()) + { + DrawOverrideCheckbox(m_Procedural); + using (new EditorGUI.DisabledScope(!m_Procedural.overrideState.boolValue)) + m_Procedural.value.boolValue = EditorGUILayout.IntPopup(new GUIContent("Distortion Mode"), (int)m_Procedural.value.intValue, m_DistortionModes, m_DistortionModeValues) == 1; + } + + if (!m_Procedural.value.boolValue) + { + EditorGUI.indentLevel++; + PropertyField(m_Flowmap); + if (IsMapFormatInvalid(m_Flowmap)) + EditorGUILayout.HelpBox("The flowmap needs to be a 2D Texture in LatLong layout.", MessageType.Info); + EditorGUI.indentLevel--; + } + + PropertyField(m_ScrollDirection); + PropertyField(m_ScrollSpeed); + EditorGUI.indentLevel--; + } + } + } +} diff --git a/com.unity.render-pipelines.high-definition/Editor/Sky/CloudLayer/CloudLayerEditor.cs.meta b/com.unity.render-pipelines.high-definition/Editor/Sky/CloudLayer/CloudLayerEditor.cs.meta new file mode 100644 index 00000000000..56e845e992d --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Editor/Sky/CloudLayer/CloudLayerEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e6ca009210e85204d928e065bde4db48 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Editor/Sky/HDLightingWindowEnvironmentSection.cs b/com.unity.render-pipelines.high-definition/Editor/Sky/HDLightingWindowEnvironmentSection.cs index 682cba36804..009c168b822 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Sky/HDLightingWindowEnvironmentSection.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Sky/HDLightingWindowEnvironmentSection.cs @@ -207,7 +207,7 @@ void UpdateSkyIntPopupData() foreach (KeyValuePair kvp in skyTypesDict) { - if (profile.Has(kvp.Value)) + if (profile.TryGet(kvp.Value, out VolumeComponent comp) && comp.active) { m_SkyClassNames.Add(new GUIContent(kvp.Value.Name.ToString())); m_SkyUniqueIDs.Add(kvp.Key); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs index 0952898dc03..c14e096b4e0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Camera/HDCamera.cs @@ -795,6 +795,7 @@ internal void UpdateCurrentSky(SkyManager skyManager) skyAmbientMode = volumeStack.GetComponent().skyAmbientMode.value; visualSky.skySettings = SkyManager.GetSkySetting(volumeStack); + visualSky.cloudLayer = volumeStack.GetComponent(); // Now, see if we have a lighting override // Update needs to happen before testing if the component is active other internal data structure are not properly updated yet. diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs index 3ea1f6489de..b8c4858fec1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs @@ -379,6 +379,10 @@ static class HDShaderIDs public static readonly int _Flowmap = Shader.PropertyToID("_Flowmap"); public static readonly int _FlowmapParam = Shader.PropertyToID("_FlowmapParam"); + public static readonly int _CloudMap = Shader.PropertyToID("_CloudMap"); + public static readonly int _CloudFlowmap = Shader.PropertyToID("_CloudFlowmap"); + public static readonly int _CloudParam = Shader.PropertyToID("_CloudParam"); + public static readonly int _CloudParam2 = Shader.PropertyToID("_CloudParam2"); public static readonly int _Size = Shader.PropertyToID("_Size"); public static readonly int _Source = Shader.PropertyToID("_Source"); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer.meta b/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer.meta new file mode 100644 index 00000000000..9a4378f4bc9 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c2aa30fadfa3cfc40a2283f98aa5be6f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.cs new file mode 100644 index 00000000000..a9ab4b590ce --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.cs @@ -0,0 +1,150 @@ +using System; + +namespace UnityEngine.Rendering.HighDefinition +{ + /// + /// Cloud Layer Volume Component. + /// This component setups the cloud layer for rendering. + /// + [VolumeComponentMenu("Sky/Cloud Layer (Preview)")] + public class CloudLayer : VolumeComponent + { + /// Enable fog. + [Tooltip("Check to have a cloud layer in the sky.")] + public BoolParameter enabled = new BoolParameter(false); + + /// Texture used to render the clouds. + [Tooltip("Specify the texture HDRP uses to render the clouds (in LatLong layout).")] + public TextureParameter cloudMap = new TextureParameter(null); + /// Enable to cover only the upper part of the sky. + [Tooltip("Check this box if the cloud layer covers only the upper part of the sky.")] + public BoolParameter upperHemisphereOnly = new BoolParameter(true); + /// Color multiplier of the clouds. + [Tooltip("Specifies the color that HDRP uses to tint the clouds.")] + public ColorParameter tint = new ColorParameter(Color.white); + /// Intensity multipler of the clouds. + [Tooltip("Sets the intensity multiplier for the clouds.")] + public MinFloatParameter intensityMultiplier = new MinFloatParameter(1.0f, 0.0f); + + /// Enable to have cloud distortion. + [Tooltip("Enable or disable cloud distortion.")] + public BoolParameter enableDistortion = new BoolParameter(false); + /// Enable to have a simple, procedural distorsion. + [Tooltip("If enabled, the clouds will be distorted by a constant wind.")] + public BoolParameter procedural = new BoolParameter(true); + /// Texture used to distort the UVs for the cloud layer. + [Tooltip("Specify the flowmap HDRP uses for cloud distortion (in LatLong layout).")] + public TextureParameter flowmap = new TextureParameter(null); + /// Direction of the distortion. + [Tooltip("Sets the rotation of the distortion (in degrees).")] + public ClampedFloatParameter scrollDirection = new ClampedFloatParameter(0.0f, 0.0f, 360.0f); + /// Speed of the distortion. + [Tooltip("Sets the cloud scrolling speed. The higher the value, the faster the clouds will move.")] + public MinFloatParameter scrollSpeed = new MinFloatParameter(2.0f, 0.0f); + + + private float scrollFactor = 0.0f, lastTime = 0.0f; + + CloudLayer() + { + displayName = "CloudLayer (Preview)"; + + } + + /// + /// Returns the shader parameters of the cloud layer. + /// + /// The shader parameters of the cloud layer. + public Vector4 GetParameters() + { + scrollFactor += scrollSpeed.value * (Time.time - lastTime) * 0.01f; + lastTime = Time.time; + + float rot = -Mathf.Deg2Rad*scrollDirection.value; + return new Vector4(upperHemisphereOnly.value ? 1.0f : 0.0f, scrollFactor, Mathf.Cos(rot), Mathf.Sin(rot)); + } + + /// Sets keywords and parameters on a sky material to render the cloud layer. + /// The cloud layer to apply. + /// The sky material to change. + public static void Apply(CloudLayer layer, Material skyMaterial) + { + if (layer != null && layer.enabled.value == true) + { + Vector4 cloudParam = layer.GetParameters(); + Vector4 cloudParam2 = layer.tint.value; + cloudParam2.w = layer.intensityMultiplier.value; + + skyMaterial.EnableKeyword("USE_CLOUD_MAP"); + skyMaterial.SetTexture(HDShaderIDs._CloudMap, layer.cloudMap.value); + skyMaterial.SetVector(HDShaderIDs._CloudParam, cloudParam); + skyMaterial.SetVector(HDShaderIDs._CloudParam2, cloudParam2); + + if (layer.enableDistortion.value == true) + { + skyMaterial.EnableKeyword("USE_CLOUD_MOTION"); + if (layer.procedural.value == true) + skyMaterial.DisableKeyword("USE_CLOUD_MAP"); + else + skyMaterial.SetTexture(HDShaderIDs._CloudFlowmap, layer.flowmap.value); + } + else + skyMaterial.DisableKeyword("USE_CLOUD_MOTION"); + } + else + { + skyMaterial.DisableKeyword("USE_CLOUD_MAP"); + skyMaterial.DisableKeyword("USE_CLOUD_MOTION"); + } + } + + /// + /// Returns the hash code of the HDRI sky parameters. + /// + /// The hash code of the HDRI sky parameters. + public override int GetHashCode() + { + int hash = base.GetHashCode(); + + unchecked + { +#if UNITY_2019_3 // In 2019.3, when we call GetHashCode on a VolumeParameter it generate garbage (due to the boxing of the generic parameter) + hash = cloudMap.value != null ? hash * 23 + cloudMap.value.GetHashCode() : hash; + hash = flowmap.value != null ? hash * 23 + flowmap.value.GetHashCode() : hash; + hash = hash * 23 + enabled.value.GetHashCode(); + hash = hash * 23 + upperHemisphereOnly.value.GetHashCode(); + hash = hash * 23 + tint.value.GetHashCode(); + hash = hash * 23 + intensityMultiplier.value.GetHashCode(); + hash = hash * 23 + enableDistortion.value.GetHashCode(); + hash = hash * 23 + procedural.value.GetHashCode(); + hash = hash * 23 + scrollDirection.value.GetHashCode(); + hash = hash * 23 + scrollSpeed.value.GetHashCode(); + + hash = cloudMap.value != null ? hash * 23 + cloudMap.overrideState.GetHashCode() : hash; + hash = flowmap.value != null ? hash * 23 + flowmap.overrideState.GetHashCode() : hash; + hash = hash * 23 + enabled.overrideState.GetHashCode(); + hash = hash * 23 + upperHemisphereOnly.overrideState.GetHashCode(); + hash = hash * 23 + tint.overrideState.GetHashCode(); + hash = hash * 23 + intensityMultiplier.overrideState.GetHashCode(); + hash = hash * 23 + enableDistortion.overrideState.GetHashCode(); + hash = hash * 23 + procedural.overrideState.GetHashCode(); + hash = hash * 23 + scrollDirection.overrideState.GetHashCode(); + hash = hash * 23 + scrollSpeed.overrideState.GetHashCode(); +#else + hash = cloudMap.value != null ? hash * 23 + cloudMap.GetHashCode() : hash; + hash = flowmap.value != null ? hash * 23 + flowmap.GetHashCode() : hash; + hash = hash * 23 + enabled.GetHashCode(); + hash = hash * 23 + upperHemisphereOnly.GetHashCode(); + hash = hash * 23 + tint.GetHashCode(); + hash = hash * 23 + intensityMultiplier.GetHashCode(); + hash = hash * 23 + enableDistortion.GetHashCode(); + hash = hash * 23 + procedural.GetHashCode(); + hash = hash * 23 + scrollDirection.GetHashCode(); + hash = hash * 23 + scrollSpeed.GetHashCode(); +#endif + } + + return hash; + } + } +} diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.cs.meta b/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.cs.meta new file mode 100644 index 00000000000..26c9804e9e1 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4df53429744a4174ca20efaba13fe1e0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.hlsl new file mode 100644 index 00000000000..0db21de3237 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.hlsl @@ -0,0 +1,88 @@ +#ifndef __CLOUDLAYER_H__ +#define __CLOUDLAYER_H__ + +TEXTURE2D(_CloudMap); +SAMPLER(sampler_CloudMap); + +TEXTURE2D(_CloudFlowmap); +SAMPLER(sampler_CloudFlowmap); + +float4 _CloudParam; // x upper hemisphere only, y scroll factor, zw scroll direction (cosPhi and sinPhi) +float4 _CloudParam2; // xyz tint, w intensity + +#define _CloudUpperHemisphere _CloudParam.x +#define _CloudScrollFactor _CloudParam.y +#define _CloudScrollDirection _CloudParam.zw +#define _CloudTint _CloudParam2.xyz +#define _CloudIntensity _CloudParam2.w + +#define USE_CLOUD_LAYER defined(USE_CLOUD_MAP) || (!defined(USE_CLOUD_MAP) && defined(USE_CLOUD_MOTION)) + +float3 sampleCloud(float3 dir, float3 sky) +{ + float4 cloudLayerColor = SAMPLE_TEXTURE2D_LOD(_CloudMap, sampler_CloudMap, GetLatLongCoords(dir, _CloudUpperHemisphere), 0); + return lerp(sky, sky + cloudLayerColor.rgb * _CloudTint * _CloudIntensity, cloudLayerColor.a); +} + +float3 CloudRotationUp(float3 p, float2 cos_sin) +{ + float3 rotDirX = float3(cos_sin.x, 0, -cos_sin.y); + float3 rotDirY = float3(cos_sin.y, 0, cos_sin.x); + + return float3(dot(rotDirX, p), p.y, dot(rotDirY, p)); +} + +float3 GetDistordedCloudColor(float3 dir, float3 sky) +{ +#if USE_CLOUD_MOTION + if (dir.y >= 0 || !_CloudUpperHemisphere) + { + float2 alpha = frac(float2(_CloudScrollFactor, _CloudScrollFactor + 0.5)) - 0.5; + +#ifdef USE_CLOUD_MAP + float3 tangent = normalize(cross(dir, float3(0.0, 1.0, 0.0))); + float3 bitangent = cross(tangent, dir); + + float3 windDir = CloudRotationUp(dir, _CloudScrollDirection); + float2 flow = SAMPLE_TEXTURE2D_LOD(_CloudFlowmap, sampler_CloudFlowmap, GetLatLongCoords(windDir, _CloudUpperHemisphere), 0).rg * 2.0 - 1.0; + + float3 dd = flow.x * tangent + flow.y * bitangent; +#else + float3 windDir = CloudRotationUp(float3(0, 0, 1), _CloudScrollDirection); + windDir.x *= -1.0; + float3 dd = windDir*sin(dir.y*PI*0.5); +#endif + + // Sample twice + float3 color1 = sampleCloud(normalize(dir - alpha.x * dd), sky); + float3 color2 = sampleCloud(normalize(dir - alpha.y * dd), sky); + + // Blend color samples + return lerp(color1, color2, abs(2.0 * alpha.x)); + } +#else + sky = sampleCloud(dir, sky); +#endif + + return sky; +} + +float3 ApplyCloudLayer(float3 dir, float3 sky) +{ +#if USE_CLOUD_LAYER + if (dir.y >= 0 || !_CloudUpperHemisphere) + sky = GetDistordedCloudColor(dir, sky); +#endif + + return sky; +} + +#undef _CloudUpperHemisphere +#undef _CloudScrollFactor +#undef _CloudScrollDirection +#undef _CloudTint +#undef _CloudIntensity + +#undef USE_CLOUD_LAYER + +#endif // __CLOUDLAYER_H__ diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.hlsl.meta b/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.hlsl.meta new file mode 100644 index 00000000000..864ea5444f8 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.hlsl.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6ed84b23a96bc804c8c32740c6fa7ed7 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/GradientSky/GradientSky.shader b/com.unity.render-pipelines.high-definition/Runtime/Sky/GradientSky/GradientSky.shader index 6c9f6999425..fd1c1c7907d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/GradientSky/GradientSky.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/GradientSky/GradientSky.shader @@ -8,11 +8,15 @@ Shader "Hidden/HDRP/Sky/GradientSky" #pragma target 4.5 #pragma only_renderers d3d11 playstation xboxone vulkan metal switch + #pragma multi_compile_local _ USE_CLOUD_MAP + #pragma multi_compile_local _ USE_CLOUD_MOTION + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonLighting.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUtils.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.hlsl" float4 _GradientBottom; float4 _GradientMiddle; @@ -48,8 +52,9 @@ Shader "Hidden/HDRP/Sky/GradientSky" float topLerpFactor = saturate(-verticalGradient); float bottomLerpFactor = saturate(verticalGradient); float3 color = lerp(_GradientMiddle.xyz, _GradientBottom.xyz, bottomLerpFactor); - color = lerp(color, _GradientTop.xyz, topLerpFactor) * _SkyIntensity; - return float4(color, 1.0); + color = lerp(color, _GradientTop.xyz, topLerpFactor); + color = ApplyCloudLayer(-viewDirWS, color); + return float4(color * _SkyIntensity, 1.0); } float4 FragBaking(Varyings input) : SV_Target diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/GradientSky/GradientSkyRenderer.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/GradientSky/GradientSkyRenderer.cs index 79cdda8c34f..0ca6941d630 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/GradientSky/GradientSkyRenderer.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/GradientSky/GradientSkyRenderer.cs @@ -12,6 +12,7 @@ class GradientSkyRenderer : SkyRenderer public GradientSkyRenderer() { + SupportDynamicSunLight = false; } public override void Build() @@ -34,6 +35,8 @@ public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderFo m_GradientSkyMaterial.SetFloat(_GradientDiffusion, gradientSky.gradientDiffusion.value); m_GradientSkyMaterial.SetFloat(HDShaderIDs._SkyIntensity, GetSkyIntensity(gradientSky, builtinParams.debugSettings)); + CloudLayer.Apply(builtinParams.cloudLayer, m_GradientSkyMaterial); + // This matrix needs to be updated at the draw call frequency. m_PropertyBlock.SetMatrix(HDShaderIDs._PixelCoordToViewDirWS, builtinParams.pixelCoordToViewDirMatrix); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISky.shader b/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISky.shader index 3f111e14588..6e7af9a23c7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISky.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISky.shader @@ -13,6 +13,9 @@ Shader "Hidden/HDRP/Sky/HDRISky" #pragma multi_compile_local _ SKY_MOTION #pragma multi_compile_local _ USE_FLOWMAP + #pragma multi_compile_local _ USE_CLOUD_MAP + #pragma multi_compile_local _ USE_CLOUD_MOTION + #pragma multi_compile _ DEBUG_DISPLAY #pragma multi_compile SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH @@ -34,6 +37,7 @@ Shader "Hidden/HDRP/Sky/HDRISky" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonLighting.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUtils.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/SDF2D.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" @@ -218,7 +222,8 @@ Shader "Hidden/HDRP/Sky/HDRISky" float3 GetSkyColor(float3 dir) { - return GetDistordedSkyColor(dir); + float3 sky = GetDistordedSkyColor(dir); + return ApplyCloudLayer(dir, sky); } float4 GetColorWithRotation(float3 dir, float exposure, float2 cos_sin) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISkyRenderer.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISkyRenderer.cs index 3e62b4498d3..5b274165cdc 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISkyRenderer.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/HDRISky/HDRISkyRenderer.cs @@ -16,6 +16,7 @@ class HDRISkyRenderer : SkyRenderer public HDRISkyRenderer() { + SupportDynamicSunLight = false; } public override void Build() @@ -169,6 +170,8 @@ public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderFo shadowFilter |= unchecked((uint)LightFeatureFlags.Area); m_SkyHDRIMaterial.SetInt(HDShaderIDs._BackplateShadowFilter, unchecked((int)shadowFilter)); + CloudLayer.Apply(builtinParams.cloudLayer, m_SkyHDRIMaterial); + // This matrix needs to be updated at the draw call frequency. m_PropertyBlock.SetMatrix(HDShaderIDs._PixelCoordToViewDirWS, builtinParams.pixelCoordToViewDirMatrix); CoreUtils.DrawFullScreen(builtinParams.commandBuffer, m_SkyHDRIMaterial, m_PropertyBlock, passID); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.shader b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.shader index 299b583f8c1..96c0c2e12ad 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.shader +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSky.shader @@ -9,12 +9,16 @@ Shader "Hidden/HDRP/Sky/PbrSky" #pragma target 4.5 #pragma only_renderers d3d11 playstation xboxone vulkan metal switch + #pragma multi_compile_local _ USE_CLOUD_MAP + #pragma multi_compile_local _ USE_CLOUD_MOTION + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightDefinition.cs.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyCommon.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUtils.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudLayer/CloudLayer.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/AtmosphericScattering/AtmosphericScattering.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/CookieSampling.hlsl" @@ -221,6 +225,7 @@ Shader "Hidden/HDRP/Sky/PbrSky" } skyColor += radiance * (1 - skyOpacity); + skyColor = ApplyCloudLayer(-V, skyColor); skyColor *= _IntensityMultiplier; return float4(skyColor, 1.0); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs index 826465dff74..cb55197192f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/PhysicallyBasedSky/PhysicallyBasedSkyRenderer.cs @@ -554,6 +554,8 @@ public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderFo int pass = (renderForCubemap ? 0 : 2) + (isPbrSkyActive ? 0 : 1); + CloudLayer.Apply(builtinParams.cloudLayer, m_PbrSkyMaterial); + CoreUtils.DrawFullScreen(builtinParams.commandBuffer, m_PbrSkyMaterial, s_PbrSkyMaterialProperties, pass); } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs index e3de933f06e..06d54830607 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs @@ -65,6 +65,8 @@ public class BuiltinSkyParameters public int frameIndex; /// Current sky settings. public SkySettings skySettings; + /// Current cloud layer. + public CloudLayer cloudLayer; /// Current debug dsplay settings. public DebugDisplaySettings debugSettings; /// Null color buffer render target identifier. @@ -664,9 +666,13 @@ bool IsCachedContextValid(SkyUpdateContext skyContext) int ComputeSkyHash(HDCamera camera, SkyUpdateContext skyContext, Light sunLight, SkyAmbientMode ambientMode, bool staticSky = false) { int sunHash = 0; - if (sunLight != null) + if (sunLight != null && skyContext.skyRenderer.SupportDynamicSunLight) sunHash = GetSunLightHashCode(sunLight); + int cloudHash = 0; + if (skyContext.cloudLayer != null && skyContext.skyRenderer.SupportCloudLayer) + cloudHash = skyContext.cloudLayer.GetHashCode(); + // For planar reflections we want to use the parent position for hash. Camera cameraForHash = camera.camera; if (camera.camera.cameraType == CameraType.Reflection && camera.parentCamera != null) @@ -675,6 +681,7 @@ int ComputeSkyHash(HDCamera camera, SkyUpdateContext skyContext, Light sunLight, } int skyHash = sunHash * 23 + skyContext.skySettings.GetHashCode(cameraForHash); + skyHash = skyHash * 23 + cloudHash; skyHash = skyHash * 23 + (staticSky ? 1 : 0); skyHash = skyHash * 23 + (ambientMode == SkyAmbientMode.Static ? 1 : 0); return skyHash; @@ -726,6 +733,7 @@ public void UpdateEnvironment( HDCamera hdCamera, m_BuiltinParameters.debugSettings = null; // We don't want any debug when updating the environment. m_BuiltinParameters.frameIndex = frameIndex; m_BuiltinParameters.skySettings = skyContext.skySettings; + m_BuiltinParameters.cloudLayer = skyContext.cloudLayer; int skyHash = ComputeSkyHash(hdCamera, skyContext, sunLight, ambientMode, staticSky); bool forceUpdate = updateRequired; @@ -787,7 +795,7 @@ public void UpdateEnvironment( HDCamera hdCamera, #if UNITY_EDITOR // In the editor when we change the sky we want to make the GI dirty so when baking again the new sky is taken into account. // Changing the hash of the rendertarget allow to say that GI is dirty - renderingContext.skyboxCubemapRT.rt.imageContentsHash = new Hash128((uint)skyContext.skySettings.GetHashCode(hdCamera.camera), 0, 0, 0); + renderingContext.skyboxCubemapRT.rt.imageContentsHash = new Hash128((uint)skyHash, 0, 0, 0); #endif } } @@ -816,13 +824,14 @@ public void UpdateEnvironment(HDCamera hdCamera, ScriptableRenderContext renderC #if UNITY_EDITOR // In the editor, we might need the static sky ready for baking lightmaps/lightprobes regardless of the current ambient mode so we force it to update in this case if it's not been computed yet.. // We don't test if the hash of the static sky has changed here because it depends on the sun direction and in the case of LookDev, sun will be different from the main rendering so it will induce improper recomputation. - forceStaticUpdate = staticLightingSky != null && m_StaticLightingSky.skyParametersHash == -1; ; + forceStaticUpdate = staticLightingSky != null && m_StaticLightingSky.skyParametersHash == -1; #endif if ((ambientMode == SkyAmbientMode.Static || forceStaticUpdate) && hdCamera.camera.cameraType != CameraType.Preview) { if (staticLightingSky != null) { m_StaticLightingSky.skySettings = staticLightingSky.skySettings; + m_StaticLightingSky.cloudLayer = staticLightingSky.cloudLayer; UpdateEnvironment(hdCamera, renderContext, m_StaticLightingSky, sunLight, m_StaticSkyUpdateRequired, true, true, SkyAmbientMode.Static, frameIndex, cmd); m_StaticSkyUpdateRequired = false; } @@ -850,6 +859,7 @@ internal void UpdateBuiltinParameters(SkyUpdateContext skyContext, HDCamera hdCa m_BuiltinParameters.debugSettings = debugSettings; m_BuiltinParameters.frameIndex = frameIndex; m_BuiltinParameters.skySettings = skyContext.skySettings; + m_BuiltinParameters.cloudLayer = skyContext.cloudLayer; } public void PreRenderSky(HDCamera hdCamera, Light sunLight, RTHandle colorBuffer, RTHandle normalBuffer, RTHandle depthBuffer, DebugDisplaySettings debugSettings, int frameIndex, CommandBuffer cmd) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyRenderer.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyRenderer.cs index 9d532585631..64d226a480b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyRenderer.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyRenderer.cs @@ -7,6 +7,11 @@ public abstract class SkyRenderer { int m_LastFrameUpdate = -1; + /// Determines if the sky should be rendered when the sun light changes. + public bool SupportDynamicSunLight = true; + /// Determines if the sky should be rendered when the cloud layer changes. + public bool SupportCloudLayer = true; + /// /// Called on startup. Create resources used by the renderer (shaders, materials, etc). /// diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUpdateContext.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUpdateContext.cs index 9127a4824f0..3f5fe859b87 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUpdateContext.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyUpdateContext.cs @@ -5,6 +5,7 @@ namespace UnityEngine.Rendering.HighDefinition internal class SkyUpdateContext { SkySettings m_SkySettings; + CloudLayer m_CloudLayer; public SkyRenderer skyRenderer { get; private set; } public int cachedSkyRenderingContextId = -1; @@ -41,6 +42,19 @@ public SkySettings skySettings } } + public CloudLayer cloudLayer + { + get { return m_CloudLayer; } + set + { + if (m_CloudLayer == value) + return; + + skyParametersHash = -1; + m_CloudLayer = value; + } + } + public void Cleanup() { if (skyRenderer != null) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs index 16729facca7..1dd04ac73e0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/StaticLightingSky.cs @@ -16,7 +16,7 @@ public class StaticLightingSky : MonoBehaviour VolumeProfile m_Profile; [SerializeField, FormerlySerializedAs("m_BakingSkyUniqueID")] int m_StaticLightingSkyUniqueID = 0; - int m_LastComputedHash; + int m_LastComputedHash, m_LastComputedCloudHash; bool m_NeedUpdateStaticLightingSky; SkySettings m_SkySettings; // This one contain only property values from overridden properties in the original profile component @@ -35,7 +35,7 @@ internal SkySettings skySettings } else { - Reset(); + ResetSky(); } return m_SkySettings; } @@ -43,6 +43,29 @@ internal SkySettings skySettings List m_VolumeSkyList = new List(); + + CloudLayer m_CloudLayer; // This one contain only property values from overridden properties in the original profile component + CloudLayer m_CloudLayerFromProfile; + + internal CloudLayer cloudLayer + { + get + { + GetCloudFromVolume(m_Profile, out var cloudFromProfile); + if (cloudFromProfile != null) + { + int newHash = cloudFromProfile.GetHashCode(); + if (m_LastComputedCloudHash != newHash) + UpdateCurrentStaticLightingCloud(); + } + else + { + ResetCloud(); + } + return m_CloudLayer; + } + } + /// /// Volume profile where the sky settings used for static lighting will be fetched. /// @@ -100,7 +123,7 @@ void GetSkyFromIDAndVolume(int skyUniqueID, VolumeProfile profile, out SkySettin { foreach (var sky in m_VolumeSkyList) { - if (skyUniqueID == SkySettings.GetUniqueID(sky.GetType())) + if (skyUniqueID == SkySettings.GetUniqueID(sky.GetType()) && sky.active) { skyType = sky.GetType(); skySetting = sky; @@ -162,6 +185,68 @@ void UpdateCurrentStaticLightingSky() } } + void GetCloudFromVolume(VolumeProfile profile, out CloudLayer cloudLayer) + { + if (profile != null) + { + profile.TryGet(out cloudLayer); + if (cloudLayer != null && !cloudLayer.active) + cloudLayer = null; + } + else + cloudLayer = null; + } + + void UpdateCurrentStaticLightingCloud() + { + // First, grab the cloud layer of the right type in the profile. + CoreUtils.Destroy(m_CloudLayer); + m_CloudLayer = null; + m_LastComputedCloudHash = 0; + GetCloudFromVolume(m_Profile, out m_CloudLayerFromProfile); + + if (m_CloudLayerFromProfile != null) + { + // The static lighting sky is a Volume Component that lives outside of the volume system (we just grab a component from a profile) + // As such, it may contain values that are not actually overridden + // For example, user overrides a value, change it, and disable overrides. In this case the volume still contains the old overridden value + // In this case, we want to use values only if they are still overridden, so we create a volume component with default values and then copy the overridden values from the profile. + // Also, a default profile might be set in the HDRP project settings, this volume is applied by default to all the scene so it should also be taken into account here. + + // Create an instance with default values + m_CloudLayer = ScriptableObject.CreateInstance(); + var newCloudParameters = m_CloudLayer.parameters; + var profileCloudParameters = m_CloudLayerFromProfile.parameters; + + var defaultVolume = HDRenderPipeline.GetOrCreateDefaultVolume(); + defaultVolume.sharedProfile.TryGet(out CloudLayer defaultCloud); + var defaultCloudParameters = defaultCloud != null ? defaultCloud.parameters : null; // Can be null if the profile does not contain the component. + + // Seems to inexplicably happen sometimes on domain reload. + if (profileCloudParameters == null) + return; + + int parameterCount = m_CloudLayer.parameters.Count; + // Copy overridden parameters. + for (int i = 0; i < parameterCount; ++i) + { + if (profileCloudParameters[i].overrideState == true) + { + newCloudParameters[i].SetValue(profileCloudParameters[i]); + } + // Fallback to the default profile if values are overridden in there. + else if (defaultCloudParameters != null && defaultCloudParameters[i].overrideState == true) + { + newCloudParameters[i].SetValue(defaultCloudParameters[i]); + } + } + + m_LastComputedCloudHash = m_CloudLayerFromProfile.GetHashCode(); + } + } + + + // All actions done in this method are because Editor won't go through setters so we need to manually check consistency of our data. void OnValidate() { @@ -201,7 +286,8 @@ void OnDisable() if (m_Profile != null) SkyManager.UnRegisterStaticLightingSky(this); - Reset(); + ResetSky(); + ResetCloud(); } void Update() @@ -213,12 +299,20 @@ void Update() } } - void Reset() + void ResetSky() { CoreUtils.Destroy(m_SkySettings); m_SkySettings = null; m_SkySettingsFromProfile = null; m_LastComputedHash = 0; } + + void ResetCloud() + { + CoreUtils.Destroy(m_CloudLayer); + m_CloudLayer = null; + m_CloudLayerFromProfile = null; + m_LastComputedCloudHash = 0; + } } }