From e2461a2a40c5b776c78f8c70550edc38cd020dc3 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Fri, 5 Feb 2021 01:05:43 +0100 Subject: [PATCH 1/6] Merge Hd/bugfix #3313 --- .../Assets/Scenes/002-HDMaterials.unity | 1239 +++++++++-------- .../002-HDMaterials/AnimatedDecal 1.mat | 19 + .../002-HDMaterials/AnimatedDecal 2.mat | 19 + .../002-HDMaterials/AnimatedDecal 3.mat | 19 + .../002-HDMaterials/AnimatedDecal 4.mat | 19 + .../Scenes/002-HDMaterials/AnimatedDecal.mat | 19 + .../002-HDMaterials/AnimatedMeshDecal.mat | 27 + .../CHANGELOG.md | 61 +- .../Documentation~/Anti-Aliasing.md | 6 + .../Documentation~/Layered-Lit-Shader.md | 2 +- .../FBXMaterialDescriptionPostprocessor.cs | 29 +- .../AssetProcessors/MaterialPostProcessor.cs | 8 + .../Editor/Lighting/HDLightUI.cs | 4 +- .../Volume/InfluenceVolumeUI.Drawers.cs | 4 +- .../Decal/DecalProjectorEditor.Skin.cs | 2 +- .../Material/Eye/ShaderGraph/EyeSubTarget.cs | 2 +- .../Fabric/ShaderGraph/FabricSubTarget.cs | 2 +- .../Lit/ShaderGraph/HDLitSubTarget.cs | 2 +- .../Material/ShaderGraph/HDShaderPasses.cs | 6 +- .../StackLit/ShaderGraph/StackLitSubTarget.cs | 2 +- .../Material/UIBlocks/MaterialUIBlockList.cs | 7 +- .../Runtime/Debug/DebugDisplay.cs | 28 +- .../Lighting/Light/HDAdditionalLightData.cs | 16 +- .../AmbientOcclusion.RenderGraph.cs | 12 +- .../Lighting/Shadow/HDShadowManager.cs | 1 + .../Runtime/Lighting/Shadow/HDShadowUtils.cs | 29 +- .../Runtime/RenderPipeline/Camera/HDCamera.cs | 5 +- .../HDRenderPipeline.LightLoop.cs | 4 +- .../Runtime/RenderPipeline/Utility/HDUtils.cs | 58 +- 29 files changed, 920 insertions(+), 731 deletions(-) diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials.unity b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials.unity index 6d033a666be..396038ad989 100644 --- a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials.unity +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials.unity @@ -180,6 +180,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -277,6 +278,7 @@ MeshRenderer: m_CastShadows: 0 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -405,6 +407,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -486,6 +489,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -653,10 +657,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f19d9143a39eb3b46bc4563e9889cfbd, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 2 m_Material: {fileID: 2100000, guid: 3a41e48b5aaa0b94cbd0859d37b44a49, type: 2} m_DrawDistance: 1000 m_FadeScale: 0.9 + m_StartAngleFade: 180 + m_EndAngleFade: 180 m_UVScale: {x: 1, y: 1} m_UVBias: {x: 0, y: 0} m_AffectsTransparency: 0 @@ -664,6 +669,7 @@ MonoBehaviour: m_Offset: {x: 0, y: 0, z: 0.5} m_Size: {x: 2, y: 2, z: 2} m_FadeFactor: 1 + m_Version: 2 --- !u!1 &194169588 GameObject: m_ObjectHideFlags: 0 @@ -708,101 +714,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0ef8dc2c2eabfa4e8cb77be57a837c0, type: 3} m_Name: m_EditorClassIdentifier: - m_HDProbeVersion: 3 - m_ObsoleteInfiniteProjection: 1 - m_ObsoleteInfluenceVolume: - m_EditorAdvancedModeBlendDistancePositive: {x: 0, y: 0, z: 0} - m_EditorAdvancedModeBlendDistanceNegative: {x: 0, y: 0, z: 0} - m_EditorSimplifiedModeBlendDistance: 0 - m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} - m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} - m_EditorSimplifiedModeBlendNormalDistance: 0 - m_EditorAdvancedModeEnabled: 0 - m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} - m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} - m_Version: 1 - m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} - m_ObsoleteOffset: {x: 0, y: 0, z: 0} - m_Shape: 0 - m_BoxSize: {x: 10, y: 10, z: 10} - m_BoxBlendDistancePositive: {x: 1, y: 1, z: 1} - m_BoxBlendDistanceNegative: {x: 1, y: 1, z: 1} - m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} - m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} - m_BoxSideFadePositive: {x: 1, y: 1, z: 1} - m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} - m_SphereRadius: 3 - m_SphereBlendDistance: 0 - m_SphereBlendNormalDistance: 0 - m_ObsoleteFrameSettings: - overrides: 0 - enableShadow: 0 - enableContactShadows: 0 - enableShadowMask: 0 - enableSSR: 0 - enableSSAO: 0 - enableSubsurfaceScattering: 0 - enableTransmission: 0 - enableAtmosphericScattering: 0 - enableVolumetrics: 0 - enableReprojectionForVolumetrics: 0 - enableLightLayers: 0 - enableExposureControl: 1 - diffuseGlobalDimmer: 0 - specularGlobalDimmer: 0 - shaderLitMode: 0 - enableDepthPrepassWithDeferredRendering: 0 - enableTransparentPrepass: 0 - enableMotionVectors: 0 - enableObjectMotionVectors: 0 - enableDecals: 0 - enableRoughRefraction: 0 - enableTransparentPostpass: 0 - enableDistortion: 0 - enablePostprocess: 0 - enableOpaqueObjects: 0 - enableTransparentObjects: 0 - enableRealtimePlanarReflection: 0 - enableMSAA: 0 - enableAsyncCompute: 0 - runLightListAsync: 0 - runSSRAsync: 0 - runSSAOAsync: 0 - runContactShadowsAsync: 0 - runVolumeVoxelizationAsync: 0 - lightLoopSettings: - overrides: 0 - enableDeferredTileAndCluster: 0 - enableComputeLightEvaluation: 0 - enableComputeLightVariants: 0 - enableComputeMaterialVariants: 0 - enableFptlForForwardOpaque: 0 - enableBigTilePrepass: 0 - isFptlEnabled: 0 - m_ObsoleteMultiplier: 1 - m_ObsoleteWeight: 1 - m_ObsoleteMode: 0 - m_ObsoleteLightLayers: 1 - m_ObsoleteCaptureSettings: - overrides: 0 - clearColorMode: 0 - backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} - clearDepth: 1 - cullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - useOcclusionCulling: 1 - volumeLayerMask: - serializedVersion: 2 - m_Bits: 1 - volumeAnchorOverride: {fileID: 0} - projection: 0 - nearClipPlane: 0.3 - farClipPlane: 1000 - fieldOfView: 90 - orthographicSize: 5 - renderingPath: 0 - shadowDistance: 100 m_ProbeSettings: frustum: fieldOfViewMode: 1 @@ -819,6 +730,17 @@ MonoBehaviour: fadeDistance: 10000 rangeCompressionFactor: 1 influence: + m_Shape: 0 + m_BoxSize: {x: 5.56, y: 2.4, z: 2} + m_BoxBlendDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 m_EditorAdvancedModeBlendDistancePositive: {x: 1, y: 1, z: 1} m_EditorAdvancedModeBlendDistanceNegative: {x: 1, y: 1, z: 1} m_EditorSimplifiedModeBlendDistance: 0 @@ -831,30 +753,23 @@ MonoBehaviour: m_Version: 1 m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} m_ObsoleteOffset: {x: 0, y: 0, z: 0} - m_Shape: 0 - m_BoxSize: {x: 5.56, y: 2.4, z: 2} - m_BoxBlendDistancePositive: {x: 0, y: 0, z: 0} - m_BoxBlendDistanceNegative: {x: 0, y: 0, z: 0} - m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} - m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} - m_BoxSideFadePositive: {x: 1, y: 1, z: 1} - m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} - m_SphereRadius: 3 - m_SphereBlendDistance: 0 - m_SphereBlendNormalDistance: 0 proxy: - m_CSVersion: 1 - m_ObsoleteSphereInfiniteProjection: 0 - m_ObsoleteBoxInfiniteProjection: 0 m_Shape: 0 m_BoxSize: {x: 1, y: 1, z: 1} m_SphereRadius: 1 + m_CSVersion: 1 + m_ObsoleteSphereInfiniteProjection: 0 + m_ObsoleteBoxInfiniteProjection: 0 proxySettings: useInfluenceVolumeAsProxyVolume: 0 capturePositionProxySpace: {x: 0, y: 0, z: 0} captureRotationProxySpace: {x: 0, y: 0, z: 0, w: 1} mirrorPositionProxySpace: {x: 0, y: 0, z: 0} mirrorRotationProxySpace: {x: 0, y: 0, z: 0, w: 0} + resolutionScalable: + m_Override: 512 + m_UseOverride: 0 + m_Level: 0 resolution: 512 cameraSettings: customRenderingSettings: 0 @@ -966,6 +881,8 @@ MonoBehaviour: enableFptlForForwardOpaque: 0 enableBigTilePrepass: 0 isFptlEnabled: 0 + roughReflections: 1 + distanceBasedRoughness: 0 m_ProbeSettingsOverride: probe: 0 camera: @@ -1051,7 +968,101 @@ MonoBehaviour: m_CaptureRotation: {x: 0, y: 0, z: 0, w: 0} m_FieldOfView: 0 m_Aspect: 0 - m_EditorOnlyData: 0 + m_HDProbeVersion: 3 + m_ObsoleteInfiniteProjection: 1 + m_ObsoleteInfluenceVolume: + m_Shape: 0 + m_BoxSize: {x: 10, y: 10, z: 10} + m_BoxBlendDistancePositive: {x: 1, y: 1, z: 1} + m_BoxBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 + m_EditorAdvancedModeBlendDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendDistance: 0 + m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendNormalDistance: 0 + m_EditorAdvancedModeEnabled: 0 + m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} + m_Version: 1 + m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} + m_ObsoleteOffset: {x: 0, y: 0, z: 0} + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 + m_ObsoleteMultiplier: 1 + m_ObsoleteWeight: 1 + m_ObsoleteMode: 0 + m_ObsoleteLightLayers: 1 + m_ObsoleteCaptureSettings: + overrides: 0 + clearColorMode: 0 + backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} + clearDepth: 1 + cullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + useOcclusionCulling: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + volumeAnchorOverride: {fileID: 0} + projection: 0 + nearClipPlane: 0.3 + farClipPlane: 1000 + fieldOfView: 90 + orthographicSize: 5 + renderingPath: 0 + shadowDistance: 100 m_ReflectionProbeVersion: 9 m_ObsoleteInfluenceShape: 0 m_ObsoleteInfluenceSphereRadius: 3 @@ -1229,7 +1240,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e1fbb15bf92b84f40a1eb030765b5afe, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 2 parameters: albedo: {r: 0, g: 0.020182133, b: 1, a: 1} meanFreePath: 3 @@ -1247,8 +1257,9 @@ MonoBehaviour: invertFade: 0 distanceFadeStart: 10000 distanceFadeEnd: 10000 - textureIndex: 0 textureOffset: {x: -0, y: -0, z: 0} + falloffMode: 0 + m_Version: 2 --- !u!4 &289937389 Transform: m_ObjectHideFlags: 0 @@ -1322,6 +1333,7 @@ MeshRenderer: m_CastShadows: 0 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1417,6 +1429,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1499,14 +1512,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 11 - m_ObsoleteShadowResolutionTier: 1 - m_ObsoleteUseShadowQualitySettings: 0 - m_ObsoleteCustomShadowResolution: 512 - m_ObsoleteContactShadows: 0 - m_PointlightHDType: 0 - m_SpotLightShape: 1 - m_AreaLightShape: 0 m_Intensity: 6000000 m_EnableSpotReflector: 0 m_LuxAtDistance: 1 @@ -1516,6 +1521,7 @@ MonoBehaviour: m_VolumetricDimmer: 1 m_LightUnit: 0 m_FadeDistance: 10000 + m_VolumetricFadeDistance: 10000 m_AffectDiffuse: 1 m_AffectSpecular: 1 m_NonLightmappedOnly: 0 @@ -1532,6 +1538,7 @@ MonoBehaviour: m_AreaLightCookie: {fileID: 0} m_IESPoint: {fileID: 0} m_IESSpot: {fileID: 0} + m_IncludeForRayTracing: 1 m_AreaLightShadowCone: 120 m_UseScreenSpaceShadows: 0 m_InteractsWithSky: 1 @@ -1581,6 +1588,10 @@ MonoBehaviour: m_NormalBias: 0.75 m_SlopeBias: 0.5 m_ShadowUpdateMode: 0 + m_AlwaysDrawDynamicShadows: 0 + m_UpdateShadowOnLightMovement: 0 + m_CachedShadowTranslationThreshold: 0.01 + m_CachedShadowAngularThreshold: 0.5 m_BarnDoorAngle: 90 m_BarnDoorLength: 0.05 m_preserveCachedShadow: 0 @@ -1599,10 +1610,17 @@ MonoBehaviour: useOldInspector: 0 useVolumetric: 1 featuresFoldout: 1 - showAdditionalSettings: 0 m_AreaLightEmissiveMeshShadowCastingMode: 0 m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 m_AreaLightEmissiveMeshLayer: -1 + m_Version: 11 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 1 + m_AreaLightShape: 0 --- !u!108 &487714770 Light: m_ObjectHideFlags: 0 @@ -1757,6 +1775,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1938,10 +1957,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f19d9143a39eb3b46bc4563e9889cfbd, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 2 m_Material: {fileID: 2100000, guid: e8a8b3f6e35ec8e4892674d7b96893f3, type: 2} m_DrawDistance: 1000 m_FadeScale: 0.9 + m_StartAngleFade: 180 + m_EndAngleFade: 180 m_UVScale: {x: 1, y: 1} m_UVBias: {x: 0, y: 0} m_AffectsTransparency: 0 @@ -1949,6 +1969,7 @@ MonoBehaviour: m_Offset: {x: 0, y: 0, z: 0.5} m_Size: {x: 2, y: 2, z: 2} m_FadeFactor: 1 + m_Version: 2 --- !u!1 &677872766 GameObject: m_ObjectHideFlags: 0 @@ -2006,6 +2027,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -2101,6 +2123,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -2196,6 +2219,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -2291,6 +2315,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -2419,6 +2444,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -2500,10 +2526,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f19d9143a39eb3b46bc4563e9889cfbd, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 2 m_Material: {fileID: 2100000, guid: c0bc8fa10fe3fc14e96772ee9dd9ac54, type: 2} m_DrawDistance: 1000 m_FadeScale: 0.9 + m_StartAngleFade: 180 + m_EndAngleFade: 180 m_UVScale: {x: 1, y: 1} m_UVBias: {x: 0, y: 0} m_AffectsTransparency: 0 @@ -2511,6 +2538,7 @@ MonoBehaviour: m_Offset: {x: 0, y: 0, z: 0.5} m_Size: {x: 2, y: 2, z: 2} m_FadeFactor: 1 + m_Version: 2 --- !u!1 &822258320 GameObject: m_ObjectHideFlags: 0 @@ -2568,6 +2596,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -2664,6 +2693,7 @@ MeshRenderer: m_CastShadows: 0 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -2798,6 +2828,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -2945,6 +2976,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -3091,14 +3123,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 11 - m_ObsoleteShadowResolutionTier: 1 - m_ObsoleteUseShadowQualitySettings: 0 - m_ObsoleteCustomShadowResolution: 512 - m_ObsoleteContactShadows: 0 - m_PointlightHDType: 1 - m_SpotLightShape: 0 - m_AreaLightShape: 0 m_Intensity: 20000 m_EnableSpotReflector: 0 m_LuxAtDistance: 1 @@ -3108,6 +3132,7 @@ MonoBehaviour: m_VolumetricDimmer: 1 m_LightUnit: 0 m_FadeDistance: 10000 + m_VolumetricFadeDistance: 10000 m_AffectDiffuse: 1 m_AffectSpecular: 1 m_NonLightmappedOnly: 0 @@ -3124,6 +3149,7 @@ MonoBehaviour: m_AreaLightCookie: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_IESPoint: {fileID: 0} m_IESSpot: {fileID: 0} + m_IncludeForRayTracing: 1 m_AreaLightShadowCone: 120 m_UseScreenSpaceShadows: 0 m_InteractsWithSky: 1 @@ -3173,6 +3199,10 @@ MonoBehaviour: m_NormalBias: 0.75 m_SlopeBias: 0.5 m_ShadowUpdateMode: 0 + m_AlwaysDrawDynamicShadows: 0 + m_UpdateShadowOnLightMovement: 0 + m_CachedShadowTranslationThreshold: 0.01 + m_CachedShadowAngularThreshold: 0.5 m_BarnDoorAngle: 90 m_BarnDoorLength: 0.05 m_preserveCachedShadow: 0 @@ -3191,16 +3221,23 @@ MonoBehaviour: useOldInspector: 0 useVolumetric: 1 featuresFoldout: 1 - showAdditionalSettings: 0 m_AreaLightEmissiveMeshShadowCastingMode: 0 m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 m_AreaLightEmissiveMeshLayer: -1 ---- !u!108 &958494548 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} + m_Version: 11 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 1 + m_SpotLightShape: 0 + m_AreaLightShape: 0 +--- !u!108 &958494548 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 958494545} m_Enabled: 1 serializedVersion: 10 @@ -3314,6 +3351,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -3382,101 +3420,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0ef8dc2c2eabfa4e8cb77be57a837c0, type: 3} m_Name: m_EditorClassIdentifier: - m_HDProbeVersion: 3 - m_ObsoleteInfiniteProjection: 1 - m_ObsoleteInfluenceVolume: - m_EditorAdvancedModeBlendDistancePositive: {x: 0, y: 0, z: 0} - m_EditorAdvancedModeBlendDistanceNegative: {x: 0, y: 0, z: 0} - m_EditorSimplifiedModeBlendDistance: 0 - m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} - m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} - m_EditorSimplifiedModeBlendNormalDistance: 0 - m_EditorAdvancedModeEnabled: 0 - m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} - m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} - m_Version: 1 - m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} - m_ObsoleteOffset: {x: 0, y: 0, z: 0} - m_Shape: 0 - m_BoxSize: {x: 10, y: 10, z: 10} - m_BoxBlendDistancePositive: {x: 1, y: 1, z: 1} - m_BoxBlendDistanceNegative: {x: 1, y: 1, z: 1} - m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} - m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} - m_BoxSideFadePositive: {x: 1, y: 1, z: 1} - m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} - m_SphereRadius: 3 - m_SphereBlendDistance: 0 - m_SphereBlendNormalDistance: 0 - m_ObsoleteFrameSettings: - overrides: 0 - enableShadow: 0 - enableContactShadows: 0 - enableShadowMask: 0 - enableSSR: 0 - enableSSAO: 0 - enableSubsurfaceScattering: 0 - enableTransmission: 0 - enableAtmosphericScattering: 0 - enableVolumetrics: 0 - enableReprojectionForVolumetrics: 0 - enableLightLayers: 0 - enableExposureControl: 1 - diffuseGlobalDimmer: 0 - specularGlobalDimmer: 0 - shaderLitMode: 0 - enableDepthPrepassWithDeferredRendering: 0 - enableTransparentPrepass: 0 - enableMotionVectors: 0 - enableObjectMotionVectors: 0 - enableDecals: 0 - enableRoughRefraction: 0 - enableTransparentPostpass: 0 - enableDistortion: 0 - enablePostprocess: 0 - enableOpaqueObjects: 0 - enableTransparentObjects: 0 - enableRealtimePlanarReflection: 0 - enableMSAA: 0 - enableAsyncCompute: 0 - runLightListAsync: 0 - runSSRAsync: 0 - runSSAOAsync: 0 - runContactShadowsAsync: 0 - runVolumeVoxelizationAsync: 0 - lightLoopSettings: - overrides: 0 - enableDeferredTileAndCluster: 0 - enableComputeLightEvaluation: 0 - enableComputeLightVariants: 0 - enableComputeMaterialVariants: 0 - enableFptlForForwardOpaque: 0 - enableBigTilePrepass: 0 - isFptlEnabled: 0 - m_ObsoleteMultiplier: 1 - m_ObsoleteWeight: 1 - m_ObsoleteMode: 0 - m_ObsoleteLightLayers: 1 - m_ObsoleteCaptureSettings: - overrides: 0 - clearColorMode: 0 - backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} - clearDepth: 1 - cullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - useOcclusionCulling: 1 - volumeLayerMask: - serializedVersion: 2 - m_Bits: 1 - volumeAnchorOverride: {fileID: 0} - projection: 0 - nearClipPlane: 0.3 - farClipPlane: 1000 - fieldOfView: 90 - orthographicSize: 5 - renderingPath: 0 - shadowDistance: 100 m_ProbeSettings: frustum: fieldOfViewMode: 1 @@ -3493,6 +3436,17 @@ MonoBehaviour: fadeDistance: 10000 rangeCompressionFactor: 1 influence: + m_Shape: 0 + m_BoxSize: {x: 20, y: 20, z: 20} + m_BoxBlendDistancePositive: {x: 1, y: 1, z: 1} + m_BoxBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 m_EditorAdvancedModeBlendDistancePositive: {x: 1, y: 1, z: 1} m_EditorAdvancedModeBlendDistanceNegative: {x: 1, y: 1, z: 1} m_EditorSimplifiedModeBlendDistance: 1 @@ -3505,30 +3459,23 @@ MonoBehaviour: m_Version: 1 m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} m_ObsoleteOffset: {x: 0, y: 0, z: 0} - m_Shape: 0 - m_BoxSize: {x: 20, y: 20, z: 20} - m_BoxBlendDistancePositive: {x: 1, y: 1, z: 1} - m_BoxBlendDistanceNegative: {x: 1, y: 1, z: 1} - m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} - m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} - m_BoxSideFadePositive: {x: 1, y: 1, z: 1} - m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} - m_SphereRadius: 3 - m_SphereBlendDistance: 0 - m_SphereBlendNormalDistance: 0 proxy: - m_CSVersion: 1 - m_ObsoleteSphereInfiniteProjection: 0 - m_ObsoleteBoxInfiniteProjection: 0 m_Shape: 0 m_BoxSize: {x: 1, y: 1, z: 1} m_SphereRadius: 1 + m_CSVersion: 1 + m_ObsoleteSphereInfiniteProjection: 0 + m_ObsoleteBoxInfiniteProjection: 0 proxySettings: useInfluenceVolumeAsProxyVolume: 0 capturePositionProxySpace: {x: 0, y: 0, z: 0} captureRotationProxySpace: {x: 0, y: 0, z: 0, w: 1} mirrorPositionProxySpace: {x: 0, y: 0, z: 0} mirrorRotationProxySpace: {x: 0, y: 0, z: 0, w: 0} + resolutionScalable: + m_Override: 512 + m_UseOverride: 0 + m_Level: 0 resolution: 512 cameraSettings: customRenderingSettings: 1 @@ -3640,6 +3587,8 @@ MonoBehaviour: enableFptlForForwardOpaque: 0 enableBigTilePrepass: 0 isFptlEnabled: 0 + roughReflections: 1 + distanceBasedRoughness: 0 m_ProbeSettingsOverride: probe: 0 camera: @@ -3725,7 +3674,101 @@ MonoBehaviour: m_CaptureRotation: {x: 0, y: 0, z: 0, w: 0} m_FieldOfView: 0 m_Aspect: 0 - m_EditorOnlyData: 0 + m_HDProbeVersion: 3 + m_ObsoleteInfiniteProjection: 1 + m_ObsoleteInfluenceVolume: + m_Shape: 0 + m_BoxSize: {x: 10, y: 10, z: 10} + m_BoxBlendDistancePositive: {x: 1, y: 1, z: 1} + m_BoxBlendDistanceNegative: {x: 1, y: 1, z: 1} + m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 + m_EditorAdvancedModeBlendDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendDistance: 0 + m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendNormalDistance: 0 + m_EditorAdvancedModeEnabled: 0 + m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} + m_Version: 1 + m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} + m_ObsoleteOffset: {x: 0, y: 0, z: 0} + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 + m_ObsoleteMultiplier: 1 + m_ObsoleteWeight: 1 + m_ObsoleteMode: 0 + m_ObsoleteLightLayers: 1 + m_ObsoleteCaptureSettings: + overrides: 0 + clearColorMode: 0 + backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} + clearDepth: 1 + cullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + useOcclusionCulling: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + volumeAnchorOverride: {fileID: 0} + projection: 0 + nearClipPlane: 0.3 + farClipPlane: 1000 + fieldOfView: 90 + orthographicSize: 5 + renderingPath: 0 + shadowDistance: 100 m_ReflectionProbeVersion: 9 m_ObsoleteInfluenceShape: 0 m_ObsoleteInfluenceSphereRadius: 3 @@ -3764,7 +3807,7 @@ ReflectionProbe: m_BlendDistance: 0 m_HDR: 1 m_BoxProjection: 0 - m_RenderDynamicObjects: 0 + m_RenderDynamicObjects: 1 m_UseOcclusionCulling: 1 m_Importance: 1 m_CustomBakedTexture: {fileID: 0} @@ -3825,10 +3868,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f19d9143a39eb3b46bc4563e9889cfbd, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 2 m_Material: {fileID: 2100000, guid: 017961ca5e12d1b47931ea75f6dac854, type: 2} m_DrawDistance: 1000 m_FadeScale: 0.9 + m_StartAngleFade: 180 + m_EndAngleFade: 180 m_UVScale: {x: 1, y: 1} m_UVBias: {x: 0, y: 0} m_AffectsTransparency: 0 @@ -3836,6 +3880,7 @@ MonoBehaviour: m_Offset: {x: 0, y: 0, z: 0.5} m_Size: {x: 2, y: 2, z: 2} m_FadeFactor: 1 + m_Version: 2 --- !u!1 &1182347498 GameObject: m_ObjectHideFlags: 0 @@ -3894,6 +3939,7 @@ MeshRenderer: m_CastShadows: 0 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -3989,6 +4035,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -4063,18 +4110,22 @@ MonoBehaviour: TargetWidth: 1920 TargetHeight: 1080 PerPixelCorrectnessThreshold: 0.0015 + PerPixelGammaThreshold: 0.003921569 + PerPixelAlphaThreshold: 0.003921569 AverageCorrectnessThreshold: 0.0015 + IncorrectPixelsThreshold: 0.0000038146973 UseHDR: 0 UseBackBuffer: 0 ImageResolution: 0 + ActiveImageTests: 1 + ActivePixelTests: 7 doBeforeTest: m_PersistentCalls: m_Calls: [] captureFramerate: 60 - waitFrames: 8 + waitFrames: 101 xrCompatible: 1 xrThresholdMultiplier: 1 - renderGraphCompatible: 1 checkMemoryAllocation: 0 renderPipelineAsset: {fileID: 11400000, guid: a2b3940bdd38ca54880a3ae1fe6be80f, type: 2} @@ -4090,53 +4141,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 7 - m_ObsoleteRenderingPath: 0 - m_ObsoleteFrameSettings: - overrides: 0 - enableShadow: 0 - enableContactShadows: 0 - enableShadowMask: 0 - enableSSR: 0 - enableSSAO: 0 - enableSubsurfaceScattering: 0 - enableTransmission: 0 - enableAtmosphericScattering: 0 - enableVolumetrics: 0 - enableReprojectionForVolumetrics: 0 - enableLightLayers: 0 - enableExposureControl: 1 - diffuseGlobalDimmer: 0 - specularGlobalDimmer: 0 - shaderLitMode: 0 - enableDepthPrepassWithDeferredRendering: 0 - enableTransparentPrepass: 0 - enableMotionVectors: 0 - enableObjectMotionVectors: 0 - enableDecals: 0 - enableRoughRefraction: 0 - enableTransparentPostpass: 0 - enableDistortion: 0 - enablePostprocess: 0 - enableOpaqueObjects: 0 - enableTransparentObjects: 0 - enableRealtimePlanarReflection: 0 - enableMSAA: 0 - enableAsyncCompute: 0 - runLightListAsync: 0 - runSSRAsync: 0 - runSSAOAsync: 0 - runContactShadowsAsync: 0 - runVolumeVoxelizationAsync: 0 - lightLoopSettings: - overrides: 0 - enableDeferredTileAndCluster: 0 - enableComputeLightEvaluation: 0 - enableComputeLightVariants: 0 - enableComputeMaterialVariants: 0 - enableFptlForForwardOpaque: 0 - enableBigTilePrepass: 0 - isFptlEnabled: 0 clearColorMode: 0 backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} clearDepth: 1 @@ -4192,6 +4196,53 @@ MonoBehaviour: data1: 2147483649 data2: 0 defaultFrameSettings: 0 + m_Version: 7 + m_ObsoleteRenderingPath: 0 + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 --- !u!20 &1229154922 Camera: m_ObjectHideFlags: 0 @@ -4327,6 +4378,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -4408,10 +4460,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f19d9143a39eb3b46bc4563e9889cfbd, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 2 m_Material: {fileID: 2100000, guid: 3a41e48b5aaa0b94cbd0859d37b44a49, type: 2} m_DrawDistance: 1000 m_FadeScale: 0.9 + m_StartAngleFade: 180 + m_EndAngleFade: 180 m_UVScale: {x: 1, y: 1} m_UVBias: {x: 0, y: 0} m_AffectsTransparency: 1 @@ -4419,6 +4472,7 @@ MonoBehaviour: m_Offset: {x: 0, y: 0, z: 0.5} m_Size: {x: 2, y: 2, z: 2} m_FadeFactor: 0.5 + m_Version: 2 --- !u!1 &1256852538 GameObject: m_ObjectHideFlags: 0 @@ -4519,6 +4573,7 @@ MeshRenderer: m_CastShadows: 0 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -4595,20 +4650,12 @@ MonoBehaviour: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1319017569} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Version: 11 - m_ObsoleteShadowResolutionTier: 1 - m_ObsoleteUseShadowQualitySettings: 0 - m_ObsoleteCustomShadowResolution: 512 - m_ObsoleteContactShadows: 0 - m_PointlightHDType: 0 - m_SpotLightShape: 0 - m_AreaLightShape: 0 + m_GameObject: {fileID: 1319017569} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} + m_Name: + m_EditorClassIdentifier: m_Intensity: 6000000 m_EnableSpotReflector: 0 m_LuxAtDistance: 1 @@ -4618,6 +4665,7 @@ MonoBehaviour: m_VolumetricDimmer: 1 m_LightUnit: 0 m_FadeDistance: 10000 + m_VolumetricFadeDistance: 10000 m_AffectDiffuse: 1 m_AffectSpecular: 1 m_NonLightmappedOnly: 0 @@ -4634,6 +4682,7 @@ MonoBehaviour: m_AreaLightCookie: {fileID: 0} m_IESPoint: {fileID: 0} m_IESSpot: {fileID: 0} + m_IncludeForRayTracing: 1 m_AreaLightShadowCone: 120 m_UseScreenSpaceShadows: 0 m_InteractsWithSky: 1 @@ -4683,6 +4732,10 @@ MonoBehaviour: m_NormalBias: 0.75 m_SlopeBias: 0.5 m_ShadowUpdateMode: 0 + m_AlwaysDrawDynamicShadows: 0 + m_UpdateShadowOnLightMovement: 0 + m_CachedShadowTranslationThreshold: 0.01 + m_CachedShadowAngularThreshold: 0.5 m_BarnDoorAngle: 90 m_BarnDoorLength: 0.05 m_preserveCachedShadow: 0 @@ -4701,10 +4754,17 @@ MonoBehaviour: useOldInspector: 0 useVolumetric: 1 featuresFoldout: 1 - showAdditionalSettings: 0 m_AreaLightEmissiveMeshShadowCastingMode: 0 m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 m_AreaLightEmissiveMeshLayer: -1 + m_Version: 11 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 0 + m_AreaLightShape: 0 --- !u!108 &1319017572 Light: m_ObjectHideFlags: 0 @@ -4824,6 +4884,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -4919,6 +4980,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -5001,14 +5063,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 11 - m_ObsoleteShadowResolutionTier: 1 - m_ObsoleteUseShadowQualitySettings: 0 - m_ObsoleteCustomShadowResolution: 512 - m_ObsoleteContactShadows: 0 - m_PointlightHDType: 0 - m_SpotLightShape: 2 - m_AreaLightShape: 0 m_Intensity: 60000 m_EnableSpotReflector: 0 m_LuxAtDistance: 1 @@ -5018,6 +5072,7 @@ MonoBehaviour: m_VolumetricDimmer: 1 m_LightUnit: 2 m_FadeDistance: 10000 + m_VolumetricFadeDistance: 10000 m_AffectDiffuse: 1 m_AffectSpecular: 1 m_NonLightmappedOnly: 0 @@ -5034,6 +5089,7 @@ MonoBehaviour: m_AreaLightCookie: {fileID: 0} m_IESPoint: {fileID: 0} m_IESSpot: {fileID: 0} + m_IncludeForRayTracing: 1 m_AreaLightShadowCone: 120 m_UseScreenSpaceShadows: 0 m_InteractsWithSky: 1 @@ -5083,6 +5139,10 @@ MonoBehaviour: m_NormalBias: 0.75 m_SlopeBias: 0.5 m_ShadowUpdateMode: 0 + m_AlwaysDrawDynamicShadows: 0 + m_UpdateShadowOnLightMovement: 0 + m_CachedShadowTranslationThreshold: 0.01 + m_CachedShadowAngularThreshold: 0.5 m_BarnDoorAngle: 90 m_BarnDoorLength: 0.05 m_preserveCachedShadow: 0 @@ -5101,10 +5161,17 @@ MonoBehaviour: useOldInspector: 0 useVolumetric: 1 featuresFoldout: 1 - showAdditionalSettings: 0 m_AreaLightEmissiveMeshShadowCastingMode: 0 m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 m_AreaLightEmissiveMeshLayer: -1 + m_Version: 11 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 2 + m_AreaLightShape: 0 --- !u!108 &1389449676 Light: m_ObjectHideFlags: 0 @@ -5211,53 +5278,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 7 - m_ObsoleteRenderingPath: 0 - m_ObsoleteFrameSettings: - overrides: 0 - enableShadow: 0 - enableContactShadows: 0 - enableShadowMask: 0 - enableSSR: 0 - enableSSAO: 0 - enableSubsurfaceScattering: 0 - enableTransmission: 0 - enableAtmosphericScattering: 0 - enableVolumetrics: 0 - enableReprojectionForVolumetrics: 0 - enableLightLayers: 0 - enableExposureControl: 1 - diffuseGlobalDimmer: 0 - specularGlobalDimmer: 0 - shaderLitMode: 0 - enableDepthPrepassWithDeferredRendering: 0 - enableTransparentPrepass: 0 - enableMotionVectors: 0 - enableObjectMotionVectors: 0 - enableDecals: 0 - enableRoughRefraction: 0 - enableTransparentPostpass: 0 - enableDistortion: 0 - enablePostprocess: 0 - enableOpaqueObjects: 0 - enableTransparentObjects: 0 - enableRealtimePlanarReflection: 0 - enableMSAA: 0 - enableAsyncCompute: 0 - runLightListAsync: 0 - runSSRAsync: 0 - runSSAOAsync: 0 - runContactShadowsAsync: 0 - runVolumeVoxelizationAsync: 0 - lightLoopSettings: - overrides: 0 - enableDeferredTileAndCluster: 0 - enableComputeLightEvaluation: 0 - enableComputeLightVariants: 0 - enableComputeMaterialVariants: 0 - enableFptlForForwardOpaque: 0 - enableBigTilePrepass: 0 - isFptlEnabled: 0 clearColorMode: 0 backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} clearDepth: 1 @@ -5313,6 +5333,53 @@ MonoBehaviour: data1: 1 data2: 0 defaultFrameSettings: 0 + m_Version: 7 + m_ObsoleteRenderingPath: 0 + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 --- !u!20 &1406067718 Camera: m_ObjectHideFlags: 0 @@ -5413,6 +5480,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -5556,6 +5624,7 @@ MeshRenderer: m_CastShadows: 0 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -5651,6 +5720,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -5746,6 +5816,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -5827,6 +5898,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -6046,14 +6118,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 11 - m_ObsoleteShadowResolutionTier: 1 - m_ObsoleteUseShadowQualitySettings: 0 - m_ObsoleteCustomShadowResolution: 512 - m_ObsoleteContactShadows: 0 - m_PointlightHDType: 0 - m_SpotLightShape: 0 - m_AreaLightShape: 0 m_Intensity: 5000 m_EnableSpotReflector: 0 m_LuxAtDistance: 1 @@ -6063,6 +6127,7 @@ MonoBehaviour: m_VolumetricDimmer: 1 m_LightUnit: 2 m_FadeDistance: 10000 + m_VolumetricFadeDistance: 10000 m_AffectDiffuse: 1 m_AffectSpecular: 1 m_NonLightmappedOnly: 0 @@ -6079,6 +6144,7 @@ MonoBehaviour: m_AreaLightCookie: {fileID: 0} m_IESPoint: {fileID: 0} m_IESSpot: {fileID: 0} + m_IncludeForRayTracing: 1 m_AreaLightShadowCone: 120 m_UseScreenSpaceShadows: 0 m_InteractsWithSky: 1 @@ -6128,6 +6194,10 @@ MonoBehaviour: m_NormalBias: 1.36 m_SlopeBias: 0.5 m_ShadowUpdateMode: 0 + m_AlwaysDrawDynamicShadows: 0 + m_UpdateShadowOnLightMovement: 0 + m_CachedShadowTranslationThreshold: 0.01 + m_CachedShadowAngularThreshold: 0.5 m_BarnDoorAngle: 90 m_BarnDoorLength: 0.05 m_preserveCachedShadow: 0 @@ -6146,10 +6216,17 @@ MonoBehaviour: useOldInspector: 0 useVolumetric: 1 featuresFoldout: 1 - showAdditionalSettings: 8 m_AreaLightEmissiveMeshShadowCastingMode: 0 m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 m_AreaLightEmissiveMeshLayer: -1 + m_Version: 11 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 0 + m_AreaLightShape: 0 --- !u!1 &1529630566 GameObject: m_ObjectHideFlags: 0 @@ -6207,6 +6284,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -6438,10 +6516,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f19d9143a39eb3b46bc4563e9889cfbd, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 2 m_Material: {fileID: 2100000, guid: 8c5238ad69968ff48af7d2af0f79129f, type: 2} m_DrawDistance: 1000 m_FadeScale: 0.9 + m_StartAngleFade: 180 + m_EndAngleFade: 180 m_UVScale: {x: 1, y: 1} m_UVBias: {x: 0, y: 0} m_AffectsTransparency: 0 @@ -6449,6 +6528,7 @@ MonoBehaviour: m_Offset: {x: 0, y: 0, z: 0.5} m_Size: {x: 2, y: 2, z: 2} m_FadeFactor: 1 + m_Version: 2 --- !u!1 &1673073998 GameObject: m_ObjectHideFlags: 0 @@ -6506,6 +6586,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -6589,120 +6670,25 @@ GameObject: - component: {fileID: 1748455731} - component: {fileID: 1748455730} - component: {fileID: 1748455729} - m_Layer: 0 - m_Name: Plane - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1748455729 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1748455728} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a4ee7c3a3b205a14a94094d01ff91d6b, type: 3} - m_Name: - m_EditorClassIdentifier: - m_HDProbeVersion: 3 - m_ObsoleteInfiniteProjection: 1 - m_ObsoleteInfluenceVolume: - m_EditorAdvancedModeBlendDistancePositive: {x: 0, y: 0, z: 0} - m_EditorAdvancedModeBlendDistanceNegative: {x: 0, y: 0, z: 0} - m_EditorSimplifiedModeBlendDistance: 0 - m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} - m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} - m_EditorSimplifiedModeBlendNormalDistance: 0 - m_EditorAdvancedModeEnabled: 0 - m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} - m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} - m_Version: 1 - m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} - m_ObsoleteOffset: {x: 0, y: 0, z: 0} - m_Shape: 0 - m_BoxSize: {x: 10, y: 10, z: 10} - m_BoxBlendDistancePositive: {x: 0, y: 0, z: 0} - m_BoxBlendDistanceNegative: {x: 0, y: 0, z: 0} - m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} - m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} - m_BoxSideFadePositive: {x: 1, y: 1, z: 1} - m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} - m_SphereRadius: 3 - m_SphereBlendDistance: 0 - m_SphereBlendNormalDistance: 0 - m_ObsoleteFrameSettings: - overrides: 0 - enableShadow: 0 - enableContactShadows: 0 - enableShadowMask: 0 - enableSSR: 0 - enableSSAO: 0 - enableSubsurfaceScattering: 0 - enableTransmission: 0 - enableAtmosphericScattering: 0 - enableVolumetrics: 0 - enableReprojectionForVolumetrics: 0 - enableLightLayers: 0 - enableExposureControl: 1 - diffuseGlobalDimmer: 0 - specularGlobalDimmer: 0 - shaderLitMode: 0 - enableDepthPrepassWithDeferredRendering: 0 - enableTransparentPrepass: 0 - enableMotionVectors: 0 - enableObjectMotionVectors: 0 - enableDecals: 0 - enableRoughRefraction: 0 - enableTransparentPostpass: 0 - enableDistortion: 0 - enablePostprocess: 0 - enableOpaqueObjects: 0 - enableTransparentObjects: 0 - enableRealtimePlanarReflection: 0 - enableMSAA: 0 - enableAsyncCompute: 0 - runLightListAsync: 0 - runSSRAsync: 0 - runSSAOAsync: 0 - runContactShadowsAsync: 0 - runVolumeVoxelizationAsync: 0 - lightLoopSettings: - overrides: 0 - enableDeferredTileAndCluster: 0 - enableComputeLightEvaluation: 0 - enableComputeLightVariants: 0 - enableComputeMaterialVariants: 0 - enableFptlForForwardOpaque: 0 - enableBigTilePrepass: 0 - isFptlEnabled: 0 - m_ObsoleteMultiplier: 1 - m_ObsoleteWeight: 1 - m_ObsoleteMode: 0 - m_ObsoleteLightLayers: 1 - m_ObsoleteCaptureSettings: - overrides: 0 - clearColorMode: 0 - backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} - clearDepth: 1 - cullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - useOcclusionCulling: 1 - volumeLayerMask: - serializedVersion: 2 - m_Bits: 1 - volumeAnchorOverride: {fileID: 0} - projection: 0 - nearClipPlane: 0.3 - farClipPlane: 1000 - fieldOfView: 90 - orthographicSize: 5 - renderingPath: 0 - shadowDistance: 100 + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1748455729 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1748455728} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a4ee7c3a3b205a14a94094d01ff91d6b, type: 3} + m_Name: + m_EditorClassIdentifier: m_ProbeSettings: frustum: fieldOfViewMode: 1 @@ -6719,6 +6705,17 @@ MonoBehaviour: fadeDistance: 10000 rangeCompressionFactor: 1 influence: + m_Shape: 0 + m_BoxSize: {x: 18.77, y: 0.01, z: 13.99} + m_BoxBlendDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 m_EditorAdvancedModeBlendDistancePositive: {x: 0, y: 0, z: 0} m_EditorAdvancedModeBlendDistanceNegative: {x: 0, y: 0, z: 0} m_EditorSimplifiedModeBlendDistance: 0 @@ -6731,30 +6728,23 @@ MonoBehaviour: m_Version: 1 m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} m_ObsoleteOffset: {x: 0, y: 0, z: 0} - m_Shape: 0 - m_BoxSize: {x: 18.77, y: 0.01, z: 13.99} - m_BoxBlendDistancePositive: {x: 0, y: 0, z: 0} - m_BoxBlendDistanceNegative: {x: 0, y: 0, z: 0} - m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} - m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} - m_BoxSideFadePositive: {x: 1, y: 1, z: 1} - m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} - m_SphereRadius: 3 - m_SphereBlendDistance: 0 - m_SphereBlendNormalDistance: 0 proxy: - m_CSVersion: 1 - m_ObsoleteSphereInfiniteProjection: 0 - m_ObsoleteBoxInfiniteProjection: 0 m_Shape: 0 m_BoxSize: {x: 1, y: 1, z: 1} m_SphereRadius: 1 + m_CSVersion: 1 + m_ObsoleteSphereInfiniteProjection: 0 + m_ObsoleteBoxInfiniteProjection: 0 proxySettings: useInfluenceVolumeAsProxyVolume: 0 capturePositionProxySpace: {x: 0, y: 0, z: 0} captureRotationProxySpace: {x: 0, y: 0, z: 0, w: 1} mirrorPositionProxySpace: {x: 0, y: 0, z: 0} mirrorRotationProxySpace: {x: -0.70710677, y: 0, z: 0, w: 0.70710677} + resolutionScalable: + m_Override: 1024 + m_UseOverride: 1 + m_Level: 0 resolution: 1024 cameraSettings: customRenderingSettings: 1 @@ -6866,6 +6856,8 @@ MonoBehaviour: enableFptlForForwardOpaque: 0 enableBigTilePrepass: 0 isFptlEnabled: 0 + roughReflections: 1 + distanceBasedRoughness: 0 m_ProbeSettingsOverride: probe: 0 camera: @@ -6951,13 +6943,107 @@ MonoBehaviour: m_CaptureRotation: {x: 0, y: 0, z: 0, w: 0} m_FieldOfView: 0 m_Aspect: 0 - m_EditorOnlyData: 0 - m_PlanarProbeVersion: 6 + m_HDProbeVersion: 3 + m_ObsoleteInfiniteProjection: 1 + m_ObsoleteInfluenceVolume: + m_Shape: 0 + m_BoxSize: {x: 10, y: 10, z: 10} + m_BoxBlendDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_BoxBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_BoxSideFadePositive: {x: 1, y: 1, z: 1} + m_BoxSideFadeNegative: {x: 1, y: 1, z: 1} + m_SphereRadius: 3 + m_SphereBlendDistance: 0 + m_SphereBlendNormalDistance: 0 + m_EditorAdvancedModeBlendDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendDistance: 0 + m_EditorAdvancedModeBlendNormalDistancePositive: {x: 0, y: 0, z: 0} + m_EditorAdvancedModeBlendNormalDistanceNegative: {x: 0, y: 0, z: 0} + m_EditorSimplifiedModeBlendNormalDistance: 0 + m_EditorAdvancedModeEnabled: 0 + m_EditorAdvancedModeFaceFadePositive: {x: 1, y: 1, z: 1} + m_EditorAdvancedModeFaceFadeNegative: {x: 1, y: 1, z: 1} + m_Version: 1 + m_ObsoleteSphereBaseOffset: {x: 0, y: 0, z: 0} + m_ObsoleteOffset: {x: 0, y: 0, z: 0} + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 + m_ObsoleteMultiplier: 1 + m_ObsoleteWeight: 1 + m_ObsoleteMode: 0 + m_ObsoleteLightLayers: 1 + m_ObsoleteCaptureSettings: + overrides: 0 + clearColorMode: 0 + backgroundColorHDR: {r: 0.023529412, g: 0.07058824, b: 0.1882353, a: 0} + clearDepth: 1 + cullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + useOcclusionCulling: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + volumeAnchorOverride: {fileID: 0} + projection: 0 + nearClipPlane: 0.3 + farClipPlane: 1000 + fieldOfView: 90 + orthographicSize: 5 + renderingPath: 0 + shadowDistance: 100 + m_LocalReferencePosition: {x: 0, y: 0.99999994, z: 0.000000059604645} + m_PlanarProbeVersion: 7 m_ObsoleteCaptureNearPlane: 0.3 m_ObsoleteCaptureFarPlane: 1000 m_ObsoleteOverrideFieldOfView: 0 m_ObsoleteFieldOfViewOverride: 90 - m_LocalReferencePosition: {x: 0, y: 0.99999994, z: 0.000000059604645} --- !u!23 &1748455730 MeshRenderer: m_ObjectHideFlags: 0 @@ -6969,6 +7055,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -7092,6 +7179,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -7174,53 +7262,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 7 - m_ObsoleteRenderingPath: 0 - m_ObsoleteFrameSettings: - overrides: 0 - enableShadow: 0 - enableContactShadows: 0 - enableShadowMask: 0 - enableSSR: 0 - enableSSAO: 0 - enableSubsurfaceScattering: 0 - enableTransmission: 0 - enableAtmosphericScattering: 0 - enableVolumetrics: 0 - enableReprojectionForVolumetrics: 0 - enableLightLayers: 0 - enableExposureControl: 1 - diffuseGlobalDimmer: 0 - specularGlobalDimmer: 0 - shaderLitMode: 0 - enableDepthPrepassWithDeferredRendering: 0 - enableTransparentPrepass: 0 - enableMotionVectors: 0 - enableObjectMotionVectors: 0 - enableDecals: 0 - enableRoughRefraction: 0 - enableTransparentPostpass: 0 - enableDistortion: 0 - enablePostprocess: 0 - enableOpaqueObjects: 0 - enableTransparentObjects: 0 - enableRealtimePlanarReflection: 0 - enableMSAA: 0 - enableAsyncCompute: 0 - runLightListAsync: 0 - runSSRAsync: 0 - runSSAOAsync: 0 - runContactShadowsAsync: 0 - runVolumeVoxelizationAsync: 0 - lightLoopSettings: - overrides: 0 - enableDeferredTileAndCluster: 0 - enableComputeLightEvaluation: 0 - enableComputeLightVariants: 0 - enableComputeMaterialVariants: 0 - enableFptlForForwardOpaque: 0 - enableBigTilePrepass: 0 - isFptlEnabled: 0 clearColorMode: 0 backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} clearDepth: 1 @@ -7276,6 +7317,53 @@ MonoBehaviour: data1: 2147483649 data2: 4539628424389459968 defaultFrameSettings: 0 + m_Version: 7 + m_ObsoleteRenderingPath: 0 + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 --- !u!20 &1823370824 Camera: m_ObjectHideFlags: 0 @@ -7376,6 +7464,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -7471,6 +7560,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -7639,14 +7729,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 11 - m_ObsoleteShadowResolutionTier: 1 - m_ObsoleteUseShadowQualitySettings: 0 - m_ObsoleteCustomShadowResolution: 512 - m_ObsoleteContactShadows: 0 - m_PointlightHDType: 0 - m_SpotLightShape: 0 - m_AreaLightShape: 0 m_Intensity: 600000 m_EnableSpotReflector: 0 m_LuxAtDistance: 1 @@ -7656,6 +7738,7 @@ MonoBehaviour: m_VolumetricDimmer: 1 m_LightUnit: 0 m_FadeDistance: 10000 + m_VolumetricFadeDistance: 10000 m_AffectDiffuse: 1 m_AffectSpecular: 1 m_NonLightmappedOnly: 0 @@ -7672,6 +7755,7 @@ MonoBehaviour: m_AreaLightCookie: {fileID: 0} m_IESPoint: {fileID: 0} m_IESSpot: {fileID: 0} + m_IncludeForRayTracing: 1 m_AreaLightShadowCone: 120 m_UseScreenSpaceShadows: 0 m_InteractsWithSky: 1 @@ -7721,6 +7805,10 @@ MonoBehaviour: m_NormalBias: 0.75 m_SlopeBias: 0.5 m_ShadowUpdateMode: 0 + m_AlwaysDrawDynamicShadows: 0 + m_UpdateShadowOnLightMovement: 0 + m_CachedShadowTranslationThreshold: 0.01 + m_CachedShadowAngularThreshold: 0.5 m_BarnDoorAngle: 90 m_BarnDoorLength: 0.05 m_preserveCachedShadow: 0 @@ -7739,10 +7827,17 @@ MonoBehaviour: useOldInspector: 0 useVolumetric: 1 featuresFoldout: 1 - showAdditionalSettings: 0 m_AreaLightEmissiveMeshShadowCastingMode: 0 m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 m_AreaLightEmissiveMeshLayer: -1 + m_Version: 11 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 0 + m_AreaLightShape: 0 --- !u!108 &1923445992 Light: m_ObjectHideFlags: 0 @@ -7862,10 +7957,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f19d9143a39eb3b46bc4563e9889cfbd, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 2 m_Material: {fileID: 2100000, guid: 526f22e3a13fdb04faa878c4b6f780b5, type: 2} m_DrawDistance: 1000 m_FadeScale: 0.9 + m_StartAngleFade: 180 + m_EndAngleFade: 180 m_UVScale: {x: 1, y: 1} m_UVBias: {x: 0, y: 0} m_AffectsTransparency: 0 @@ -7873,6 +7969,7 @@ MonoBehaviour: m_Offset: {x: 0, y: 0, z: 0.5} m_Size: {x: 2, y: 2, z: 2} m_FadeFactor: 1 + m_Version: 2 --- !u!1 &2012672002 GameObject: m_ObjectHideFlags: 0 @@ -7931,6 +8028,7 @@ MeshRenderer: m_CastShadows: 0 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -8027,6 +8125,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 1.mat b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 1.mat index 383d5c17ad0..95c99f276bf 100644 --- a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 1.mat +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 1.mat @@ -37,6 +37,10 @@ Material: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTexture2D_52555058f421518fa1159536b0ef5770_Texture_1: + m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTexture2D_5837ea117a574c30b83a120690f269a8_Texture_1: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} @@ -57,6 +61,19 @@ Material: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - _AffectAO: 1 - _AffectAlbedo: 1 @@ -69,7 +86,9 @@ Material: - _DecalColorMask1: 15 - _DecalColorMask2: 15 - _DecalColorMask3: 12 + - _DecalMeshBiasType: 0 - _DecalMeshDepthBias: 0 + - _DecalMeshViewBias: 0 - _DecalStencilRef: 16 - _DecalStencilWriteMask: 16 - _DrawOrder: -2 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 2.mat b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 2.mat index fd84565fb4f..4e22760c27d 100644 --- a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 2.mat +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 2.mat @@ -37,6 +37,10 @@ Material: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTexture2D_52555058f421518fa1159536b0ef5770_Texture_1: + m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTexture2D_5837ea117a574c30b83a120690f269a8_Texture_1: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} @@ -57,6 +61,19 @@ Material: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - _AffectAO: 1 - _AffectAlbedo: 1 @@ -69,7 +86,9 @@ Material: - _DecalColorMask1: 15 - _DecalColorMask2: 15 - _DecalColorMask3: 12 + - _DecalMeshBiasType: 0 - _DecalMeshDepthBias: 0 + - _DecalMeshViewBias: 0 - _DecalStencilRef: 16 - _DecalStencilWriteMask: 16 - _DrawOrder: 3 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 3.mat b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 3.mat index 5f2b24d2d11..2694cc342d4 100644 --- a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 3.mat +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 3.mat @@ -37,6 +37,10 @@ Material: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTexture2D_52555058f421518fa1159536b0ef5770_Texture_1: + m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTexture2D_5837ea117a574c30b83a120690f269a8_Texture_1: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} @@ -57,6 +61,19 @@ Material: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - _AffectAO: 1 - _AffectAlbedo: 1 @@ -69,7 +86,9 @@ Material: - _DecalColorMask1: 15 - _DecalColorMask2: 15 - _DecalColorMask3: 12 + - _DecalMeshBiasType: 0 - _DecalMeshDepthBias: 0 + - _DecalMeshViewBias: 0 - _DecalStencilRef: 16 - _DecalStencilWriteMask: 16 - _DrawOrder: 2 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 4.mat b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 4.mat index ad11e6b21e7..17aea42d526 100644 --- a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 4.mat +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal 4.mat @@ -37,6 +37,10 @@ Material: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTexture2D_52555058f421518fa1159536b0ef5770_Texture_1: + m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTexture2D_5837ea117a574c30b83a120690f269a8_Texture_1: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} @@ -57,6 +61,19 @@ Material: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - _AffectAO: 1 - _AffectAlbedo: 1 @@ -69,7 +86,9 @@ Material: - _DecalColorMask1: 15 - _DecalColorMask2: 15 - _DecalColorMask3: 12 + - _DecalMeshBiasType: 0 - _DecalMeshDepthBias: 0 + - _DecalMeshViewBias: 0 - _DecalStencilRef: 16 - _DecalStencilWriteMask: 16 - _DrawOrder: -2 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal.mat b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal.mat index 2448f84c843..63d0c8950a1 100644 --- a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal.mat +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedDecal.mat @@ -37,6 +37,10 @@ Material: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTexture2D_52555058f421518fa1159536b0ef5770_Texture_1: + m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTexture2D_5837ea117a574c30b83a120690f269a8_Texture_1: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} @@ -57,6 +61,19 @@ Material: m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - _AffectAO: 1 - _AffectAlbedo: 1 @@ -69,7 +86,9 @@ Material: - _DecalColorMask1: 15 - _DecalColorMask2: 15 - _DecalColorMask3: 12 + - _DecalMeshBiasType: 0 - _DecalMeshDepthBias: 0 + - _DecalMeshViewBias: 0 - _DecalStencilRef: 16 - _DecalStencilWriteMask: 16 - _DrawOrder: -1 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedMeshDecal.mat b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedMeshDecal.mat index 9f7a0d20395..81787ba431f 100644 --- a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedMeshDecal.mat +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/002-HDMaterials/AnimatedMeshDecal.mat @@ -41,6 +41,10 @@ Material: m_Texture: {fileID: 2800000, guid: 9f19737ffbb4a694caf1778274c346ab, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTexture2D_22ab0c98da19fa8cb25fd19a0aeeb31b_Texture_1: + m_Texture: {fileID: 2800000, guid: 9afbfdeb6447dc74089f286f49995089, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTexture2D_234b653769274d599f16c88325d2e6ae_Texture_1: m_Texture: {fileID: 2800000, guid: 9f19737ffbb4a694caf1778274c346ab, type: 3} m_Scale: {x: 1, y: 1} @@ -69,6 +73,10 @@ Material: m_Texture: {fileID: 2800000, guid: f23830c1beb532d4a8bf9a720ef56e25, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTexture2D_922ed2f15209728c934f7ad08e8df067_Texture_1: + m_Texture: {fileID: 2800000, guid: 9f19737ffbb4a694caf1778274c346ab, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTexture2D_998a067d9ebe483eaf2b10434380d263_Texture_1: m_Texture: {fileID: 2800000, guid: 9f19737ffbb4a694caf1778274c346ab, type: 3} m_Scale: {x: 1, y: 1} @@ -77,6 +85,10 @@ Material: m_Texture: {fileID: 2800000, guid: 9f19737ffbb4a694caf1778274c346ab, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SampleTexture2D_b38e27eec0c6198ab3dec7c4cf4437e3_Texture_1: + m_Texture: {fileID: 2800000, guid: f23830c1beb532d4a8bf9a720ef56e25, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _SampleTexture2D_b4b43955db0f4c4b8749459e55a590f4_Texture_1: m_Texture: {fileID: 2800000, guid: 9afbfdeb6447dc74089f286f49995089, type: 3} m_Scale: {x: 1, y: 1} @@ -105,6 +117,19 @@ Material: m_Texture: {fileID: 2800000, guid: 9f19737ffbb4a694caf1778274c346ab, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - _AffectAO: 1 - _AffectAlbedo: 1 @@ -117,7 +142,9 @@ Material: - _DecalColorMask1: 15 - _DecalColorMask2: 15 - _DecalColorMask3: 12 + - _DecalMeshBiasType: 0 - _DecalMeshDepthBias: 0 + - _DecalMeshViewBias: 0 - _DecalStencilRef: 16 - _DecalStencilWriteMask: 16 - _DrawOrder: 0 diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index a4a9eba171c..726bb4bc886 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -4,55 +4,7 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -<<<<<<< HEAD ## [11.0.0] - 2020-12-02 -======= -## [12.0.0] - 2021-01-11 - -### Added -- Added support for the PlayStation 5 platform. - -### Fixed -- Fixed GC allocations from XR occlusion mesh when using multipass. -- Fixed XR depth copy when using MSAA. -- Fixed register spilling on FXC in light list shaders. -- Fixed after post process custom pass scale issue when dynamic resolution is enabled (case 1299194). -- Fixed an issue with light intensity prefab override application not visible in the inspector (case 1299563). -- Fixed Undo/Redo instability of light temperature. -- Fixed label style in pbr sky editor. -- Fixed side effect on styles during compositor rendering. -- Fixed size and spacing of compositor info boxes (case 1305652). -- Fixed spacing of UI widgets in the Graphics Compositor (case 1305638). -- Fixed undo-redo on layered lit editor. -- Fixed tesselation culling, big triangles using lit tesselation shader would dissapear when camera is too close to them (case 1299116) -- Fixed issue with compositor related custom passes still active after disabling the compositor (case 1305330) -- Fixed some render texture leaks. -- Fixed regression in Wizard that not fix runtime ressource anymore (case 1287627) -- Fixed error in Depth Of Field near radius blur calculation (case 1306228). -- Fixed a reload bug when using objects from the scene in the lookdev (case 1300916). -- Fixed light gizmo showing shadow near plane when shadows are disabled. -- Fixed path tracing alpha channel support (case 1304187). -- Fixed shadow matte not working with ambient occlusion when MSAA is enabled -- Fixed issues with compositor's undo (cases 1305633, 1307170). -- Fixed wrong shader / properties assignement to materials created from 3DsMax 2021 Physical Material. (case 1293576) -- Fixed Emissive color property from Autodesk Interactive materials not editable in Inspector. (case 1307234) -- Fixed exception when changing the current render pipeline to from HDRP to universal (case 1306291). -- Fixed an issue in shadergraph when switch from a RenderingPass (case 1307653) -- Fixed LookDev environment library assignement after leaving playmode. -- Fixed a locale issue with the diffusion profile property values in ShaderGraph on PC where comma is the decimal separator. -- Fixed error in the RTHandle scale of Depth Of Field when TAA is enabled. -- Fixed Quality Level set to the last one of the list after a Build (case 1307450) -- Fixed XR depth copy (case 1286908). -- Fixed Warnings about "SceneIdMap" missing script in eye material sample scene - -### Changed -- Change the source value for the ray tracing frame index iterator from m_FrameCount to the camera frame count (case 1301356). -- Change some light unit slider value ranges to better reflect the lighting scenario. -- Transparent materials created by the Model Importer are set to not cast shadows. ( case 1295747) -- Change the tooltip for color shadows and semi-transparent shadows (case 1307704). - -## [11.0.0] - 2020-10-21 ->>>>>>> 39aa6247e5... [HDRP] Update eye sample scene (#3227) ### Added - Added a new API to bake HDRP probes from C# (case 1276360) @@ -126,7 +78,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed Emissive color property from Autodesk Interactive materials not editable in Inspector. (case 1307234) - Fixed Warnings about "SceneIdMap" missing script in eye material sample scene - Fixed resize IES when already baked in the Atlas 1299233 - +- Fixed an exception when opening the color picker in the material UI (case 1307143). +- Fixed lights shadow frustum near and far planes. +- Fixed various issues with non-temporal SSAO and rendergraph. +- Fixed white flashes on camera cuts on volumetric fog. +- Fixed light layer issue when performing editing on multiple lights. +- Fixed an issue where selection in a debug panel would reset when cycling through enum items. +- Fixed material keywords with fbx importer. +- Fixed lightmaps not working properly with shader graphs in ray traced reflections (case 1305335). +- Fixed skybox for ortho cameras. +- Fixed issue when debug full screen 'Transparent Screen Space Reflection' do not take in consideration debug exposure + ### Changed - Removed the material pass probe volumes evaluation mode. - Volume parameter of type Cubemap can now accept Cubemap render textures and custom render textures. @@ -148,6 +110,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Removed backplate from rendering of lighting cubemap as it did not really work conceptually and caused artefacts. - Change some light unit slider value ranges to better reflect the lighting scenario. - Transparent materials created by the Model Importer are set to not cast shadows. ( case 1295747) +- Updated the tooltip for the Decal Angle Fade property (requires to enable Decal Layers in both HDRP asset and Frame settings) (case 1308048). ## [10.3.0] - 2020-12-01 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Anti-Aliasing.md b/com.unity.render-pipelines.high-definition/Documentation~/Anti-Aliasing.md index 3685e3aa559..6ef5cbefc91 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Anti-Aliasing.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Anti-Aliasing.md @@ -43,6 +43,12 @@ To select TAA for a Camera: 1. Select the Camera in the Scene view or Hierarchy and view it in the Inspector. 2. In the General section, select Temporal Anti-aliasing (TAA) from the Anti-aliasing drop-down. +When using the same Camera GameObject for multiple Game Views TAA may not work as expected due to limitations of the history buffer system. Multiple game views using different Cameras will however work as expected. + +### Limitations +In the Editor, if multiple Game views use the same Camera, TAA may not work as expected due to limitations of the history buffer system. However, if you use multiple Game views, where each Game view uses a unique Camera, TAA works as expected. + + ## Subpixel morphological anti-aliasing (SMAA) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Layered-Lit-Shader.md b/com.unity.render-pipelines.high-definition/Documentation~/Layered-Lit-Shader.md index e8350d48bb8..0e967b1f262 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Layered-Lit-Shader.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Layered-Lit-Shader.md @@ -40,7 +40,7 @@ To create a new Layered Lit Material, navigate to your Project's Asset window, r | **Property** | **Description** | | -------------------------------------------- | ------------------------------------------------------------ | | **Layer Count** | Use the slider to set the number of layers this Material uses. You can set up to four layers. | -| **Layer Mask** | Assign a Texture to the field to manage the visibility of each layer. If you do not assign a Texture, the Material uses the maximum value for every channel.
• Alpha channel for the **Main Layer**.
• Red channel for **Layer 1**.
• Green channel for **Layer 2**.
• Blue channel for **Layer** | +| **Layer Mask** | Assign a Texture to the field to manage the visibility of each layer. If you do not assign a Texture, the Material uses the maximum value for every channel.
• Alpha channel for the **Main Layer**.
• Red channel for **Layer 1**.
• Green channel for **Layer 2**.
• Blue channel for **Layer 3**. | | **BlendMask UV Mapping** | Use the drop-down to select the type of UV mapping that HDRP uses to map the **Layer Mask**.
• Unity manages four UV channels for a vertex: **UV0**, **UV1**, **UV2**, and **UV3**.
• **Planar:** A planar projection from top to bottom.
• **Triplanar**: A planar projection in three directions:X-axis: Left to rightY-axis: Top to bottomZ-axis: Front to back Unity blends these three projections together to produce the final result. | | **World Scale** | Set the world-space size of the Texture in meters. If you set this to **1**, then HDRP maps the Texture to 1 meter in world space.If you set this to **2**, then HDRP maps the Texture to 0.5 meters in world space.This property only appears when you select **Planar** or **Triplanar** from the **BlendMask UV Mapping** drop-down. | | **Tiling** | Set an **X** and **Y** tile rate for the **Layer Mask** UV. HDRP uses the **X** and **Y** values to tile the Texture assigned to the **Layer Mask** across the Material’s surface, in object space. | diff --git a/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/FBXMaterialDescriptionPostprocessor.cs b/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/FBXMaterialDescriptionPostprocessor.cs index 31cef13722b..a08dbb0bc68 100644 --- a/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/FBXMaterialDescriptionPostprocessor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/FBXMaterialDescriptionPostprocessor.cs @@ -42,12 +42,6 @@ public void OnPreprocessMaterialDescription(MaterialDescription description, Mat material.shader = shader; - material.SetShaderPassEnabled("DistortionVectors", false); - material.SetShaderPassEnabled("TransparentDepthPrepass", false); - material.SetShaderPassEnabled("TransparentDepthPostpass", false); - material.SetShaderPassEnabled("TransparentBackface", false); - material.SetShaderPassEnabled("MOTIONVECTORS", false); - Vector4 vectorProperty; float floatProperty; TexturePropertyDescription textureProperty; @@ -78,17 +72,10 @@ public void OnPreprocessMaterialDescription(MaterialDescription description, Mat if (isTransparent) { - material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One); - material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha); - material.SetInt("_ZWrite", 0); material.SetFloat("_BlendMode", (float)BlendMode.Alpha); material.SetFloat("_EnableBlendModePreserveSpecularLighting", 1.0f); - material.EnableKeyword("_ALPHAPREMULTIPLY_ON"); - material.EnableKeyword("_SURFACE_TYPE_TRANSPARENT"); - material.EnableKeyword("_ENABLE_FOG_ON_TRANSPARENT"); - material.EnableKeyword("_ALPHATEST_ON"); material.renderQueue = (int)UnityEngine.Rendering.RenderQueue.Transparent; - material.SetFloat("_SurfaceType", 1.0f); + material.SetFloat("_SurfaceType", (float)SurfaceType.Transparent); material.SetFloat("_Cutoff", .0f); material.SetFloat("_AlphaCutoffEnable", 1.0f); material.SetFloat("_AlphaCutoff", .0f); @@ -97,12 +84,12 @@ public void OnPreprocessMaterialDescription(MaterialDescription description, Mat } else { - material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One); - material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.Zero); - material.SetInt("_ZWrite", 1); material.renderQueue = -1; } + if (description.TryGetProperty("ReflectionFactor", out floatProperty)) + material.SetFloat("_Metallic", floatProperty); + if (description.TryGetProperty("DiffuseColor", out textureProperty) && textureProperty.texture != null) { Color diffuseColor = new Color(1.0f, 1.0f, 1.0f, 1.0f); @@ -125,7 +112,6 @@ public void OnPreprocessMaterialDescription(MaterialDescription description, Mat if (description.TryGetProperty("Bump", out textureProperty) && textureProperty.texture != null) { SetMaterialTextureProperty("_BumpMap", material, textureProperty); - material.EnableKeyword("_NORMALMAP_TANGENT_SPACE"); if (description.TryGetProperty("BumpFactor", out floatProperty)) material.SetFloat("_BumpScale", floatProperty); @@ -133,15 +119,10 @@ public void OnPreprocessMaterialDescription(MaterialDescription description, Mat else if (description.TryGetProperty("NormalMap", out textureProperty) && textureProperty.texture != null) { SetMaterialTextureProperty("_BumpMap", material, textureProperty); - material.EnableKeyword("_NORMALMAP_TANGENT_SPACE"); if (description.TryGetProperty("BumpFactor", out floatProperty)) material.SetFloat("_BumpScale", floatProperty); } - else - { - material.DisableKeyword("_NORMALMAP"); - } if (description.TryGetProperty("EmissiveColor", out textureProperty)) { @@ -183,6 +164,8 @@ public void OnPreprocessMaterialDescription(MaterialDescription description, Mat RemapColorCurves(description, clips, "EmissiveColor", "_EmissionColor"); RemapColorCurves(description, clips, "EmissiveColor", "_EmissiveColor"); + + HDShaderUtils.ResetMaterialKeywords(material); } static void RemapTransparencyCurves(MaterialDescription description, AnimationClip[] clips) diff --git a/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/MaterialPostProcessor.cs b/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/MaterialPostProcessor.cs index 1e6b25a10ef..248af7e66fd 100644 --- a/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/MaterialPostProcessor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/AssetProcessors/MaterialPostProcessor.cs @@ -116,6 +116,14 @@ static internal void SaveAssetsToDisk() s_NeedsSavingAssets = false; } + void OnPostprocessMaterial(Material material) + { + if (!HDShaderUtils.IsHDRPShader(material.shader, upgradable: true)) + return; + + HDShaderUtils.ResetMaterialKeywords(material); + } + static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) { foreach (var asset in importedAssets) diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs index 173ef18cf70..3e3213b609d 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/HDLightUI.cs @@ -249,7 +249,7 @@ static void DrawGeneralAdvancedContent(SerializedHDLight serialized, Editor owne EditorGUILayout.PropertyField(serialized.lightlayersMask, s_Styles.lightLayer); // If we're not in decoupled mode for light layers, we sync light with shadow layers: - if (serialized.linkLightLayers.boolValue && change.changed) + if (serialized.linkLightLayers.boolValue && change.changed && !serialized.lightlayersMask.hasMultipleDifferentValues) SyncLightAndShadowLayers(serialized, owner); } } @@ -1214,7 +1214,7 @@ static void DrawShadowMapAdvancedContent(SerializedHDLight serialized, Editor ow if (change.changed) Undo.RecordObjects(owner.targets, "Undo Light Layers Changed"); } - if (!serialized.linkLightLayers.hasMultipleDifferentValues) + if (!serialized.linkLightLayers.hasMultipleDifferentValues && !serialized.lightlayersMask.hasMultipleDifferentValues) { using (new EditorGUI.DisabledGroupScope(serialized.linkLightLayers.boolValue)) { diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Drawers.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Drawers.cs index 15b7fbcc8fe..477850e08fa 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Drawers.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Drawers.cs @@ -108,9 +108,9 @@ static void Drawer_SectionShapeBox(SerializedInfluenceVolume serialized, Editor } else { - serialized.editorSimplifiedModeBlendDistance.floatValue = Mathf.Max(blendPositive.x, blendPositive.y, blendPositive.z, blendNegative.x, blendNegative.y, blendNegative.z); + serialized.editorSimplifiedModeBlendDistance.floatValue = Mathf.Min(blendPositive.x, blendPositive.y, blendPositive.z, blendNegative.x, blendNegative.y, blendNegative.z); serialized.boxBlendDistancePositive.vector3Value = serialized.boxBlendDistanceNegative.vector3Value = Vector3.one * serialized.editorSimplifiedModeBlendDistance.floatValue; - serialized.editorSimplifiedModeBlendNormalDistance.floatValue = Mathf.Max(blendNormalPositive.x, blendNormalPositive.y, blendNormalPositive.z, blendNormalNegative.x, blendNormalNegative.y, blendNormalNegative.z); + serialized.editorSimplifiedModeBlendNormalDistance.floatValue = Mathf.Min(blendNormalPositive.x, blendNormalPositive.y, blendNormalPositive.z, blendNormalNegative.x, blendNormalNegative.y, blendNormalNegative.z); serialized.boxBlendNormalDistancePositive.vector3Value = serialized.boxBlendNormalDistanceNegative.vector3Value = Vector3.one * serialized.editorSimplifiedModeBlendNormalDistance.floatValue; } } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.Skin.cs index 0c8adc52a43..46ce3ee125b 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Decal/DecalProjectorEditor.Skin.cs @@ -19,7 +19,7 @@ partial class DecalProjectorEditor static readonly GUIContent k_DecalLayerMaskContent = EditorGUIUtility.TrTextContent("Decal Layer", "Specify the decal layer mask to use for this projector. RenderingLayerMask of Mesh matching this value will receive the decal. Enable Layers in Decal section of HDRP settings to access it."); static readonly GUIContent k_DistanceContent = EditorGUIUtility.TrTextContent("Draw Distance", "Sets the distance from the Camera at which HDRP stop rendering the decal."); static readonly GUIContent k_FadeScaleContent = EditorGUIUtility.TrTextContent("Start Fade", "Controls the distance from the Camera at which this component begins to fade the decal out."); - static readonly GUIContent k_AngleFadeContent = EditorGUIUtility.TrTextContent("Angle Fade", "Controls the fade out range of the decal based on the angle between the Decal backward direction and the vertex normal of the receiving surface."); + static readonly GUIContent k_AngleFadeContent = EditorGUIUtility.TrTextContent("Angle Fade", "Controls the fade out range of the decal based on the angle between the Decal backward direction and the vertex normal of the receiving surface. Requires 'Decal Layers' to be enabled in the HDRP Asset and Frame Settings."); static readonly GUIContent k_UVScaleContent = EditorGUIUtility.TrTextContent("Tilling", "Sets the scale for the decal Material. Scales the decal along its UV axes."); static readonly GUIContent k_UVBiasContent = EditorGUIUtility.TrTextContent("Offset", "Sets the offset for the decal Material. Moves the decal along its UV axes."); static readonly GUIContent k_FadeFactorContent = EditorGUIUtility.TrTextContent("Fade Factor", "Controls the transparency of the decal."); diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeSubTarget.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeSubTarget.cs index bbfd38eba40..6574a8f33f3 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeSubTarget.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Eye/ShaderGraph/EyeSubTarget.cs @@ -56,7 +56,7 @@ protected override SubShaderDescriptor GetRaytracingSubShaderDescriptor() var descriptor = base.GetRaytracingSubShaderDescriptor(); if (eyeData.subsurfaceScattering) - descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface()); + descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface(true)); return descriptor; } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubTarget.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubTarget.cs index ee6800d55c6..f0c7d572b16 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubTarget.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Fabric/ShaderGraph/FabricSubTarget.cs @@ -56,7 +56,7 @@ protected override SubShaderDescriptor GetRaytracingSubShaderDescriptor() var descriptor = base.GetRaytracingSubShaderDescriptor(); if (fabricData.subsurfaceScattering) - descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface()); + descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface(true)); return descriptor; } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubTarget.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubTarget.cs index d0ad94188ab..4e7bd6c8287 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubTarget.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Lit/ShaderGraph/HDLitSubTarget.cs @@ -73,7 +73,7 @@ protected override SubShaderDescriptor GetRaytracingSubShaderDescriptor() var descriptor = base.GetRaytracingSubShaderDescriptor(); if (litData.materialType == HDLitData.MaterialType.SubsurfaceScattering) - descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface()); + descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface(true)); return descriptor; } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDShaderPasses.cs b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDShaderPasses.cs index 8d4bfbf6cda..d8ee3d1018d 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDShaderPasses.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/HDShaderPasses.cs @@ -860,6 +860,7 @@ public static PassDescriptor GenerateRaytracingIndirect(bool supportLighting) referenceName = "SHADERPASS_RAYTRACING_INDIRECT", lightMode = "IndirectDXR", useInPreview = false, + requiredFields = supportLighting ? CoreRequiredFields.LitMinimal : null, // Collections pragmas = CorePragmas.RaytracingBasic, @@ -972,6 +973,7 @@ public static PassDescriptor GenerateRaytracingForward(bool supportLighting) referenceName = "SHADERPASS_RAYTRACING_FORWARD", lightMode = "ForwardDXR", useInPreview = false, + requiredFields = supportLighting ? CoreRequiredFields.LitMinimal : null, // Port Mask // validVertexBlocks = CoreBlockMasks.Vertex, @@ -1037,6 +1039,7 @@ public static PassDescriptor GenerateRaytracingGBuffer(bool supportLighting) referenceName = "SHADERPASS_RAYTRACING_GBUFFER", lightMode = "GBufferDXR", useInPreview = false, + requiredFields = supportLighting ? CoreRequiredFields.LitMinimal : null, // Port Mask // validVertexBlocks = CoreBlockMasks.Vertex, @@ -1150,7 +1153,7 @@ IncludeCollection GenerateIncludes() #region Raytracing Subsurface - public static PassDescriptor GenerateRaytracingSubsurface() + public static PassDescriptor GenerateRaytracingSubsurface(bool supportLighting) { return new PassDescriptor { @@ -1159,6 +1162,7 @@ public static PassDescriptor GenerateRaytracingSubsurface() referenceName = "SHADERPASS_RAYTRACING_SUB_SURFACE", lightMode = "SubSurfaceDXR", useInPreview = false, + requiredFields = supportLighting ? CoreRequiredFields.LitMinimal : null, // Template // passTemplatePath = passTemplatePath, diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSubTarget.cs b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSubTarget.cs index b10b4b1c82b..b7417d5d0a1 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSubTarget.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSubTarget.cs @@ -122,7 +122,7 @@ protected override SubShaderDescriptor GetRaytracingSubShaderDescriptor() var descriptor = base.GetRaytracingSubShaderDescriptor(); if (stackLitData.subsurfaceScattering) - descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface()); + descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface(true)); return descriptor; } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/MaterialUIBlockList.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/MaterialUIBlockList.cs index 0675e21c9ad..a7df1e24779 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/MaterialUIBlockList.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/MaterialUIBlockList.cs @@ -61,9 +61,14 @@ public void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties) uiBlock.UpdateMaterialProperties(properties); uiBlock.OnGUI(); } + // Never catch ExitGUIException as they are used to handle color picker and object pickers. + catch (ExitGUIException) + { + throw; + } catch (Exception e) { - Debug.LogError(e); + Debug.LogException(e); } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs index ccad9869521..ede91a95c1f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -1017,10 +1017,6 @@ void RegisterMaterialDebug() void RefreshDisplayStatsDebug(DebugUI.Field field, T value) { UnregisterDebugItems(k_PanelDisplayStats, m_DebugDisplayStatsItems); - - if (DebugManager.instance.displayRuntimeUI) - DebugManager.instance.ReDrawOnScreenDebug(); - RegisterDisplayStatsDebug(); } @@ -1028,50 +1024,30 @@ void RefreshDisplayStatsDebug(DebugUI.Field field, T value) void RefreshLightingDebug(DebugUI.Field field, T value) { UnregisterDebugItems(k_PanelLighting, m_DebugLightingItems); - - if (DebugManager.instance.displayRuntimeUI) - DebugManager.instance.ReDrawOnScreenDebug(); - RegisterLightingDebug(); } void RefreshDecalsDebug(DebugUI.Field field, T value) { UnregisterDebugItems(k_PanelDecals, m_DebugDecalsAffectingTransparentItems); - - if (DebugManager.instance.displayRuntimeUI) - DebugManager.instance.ReDrawOnScreenDebug(); - RegisterDecalsDebug(); } void RefreshRenderingDebug(DebugUI.Field field, T value) { UnregisterDebugItems(k_PanelRendering, m_DebugRenderingItems); - - if (DebugManager.instance.displayRuntimeUI) - DebugManager.instance.ReDrawOnScreenDebug(); - RegisterRenderingDebug(); } void RefreshMaterialDebug(DebugUI.Field field, T value) { UnregisterDebugItems(k_PanelMaterials, m_DebugMaterialItems); - - if (DebugManager.instance.displayRuntimeUI) - DebugManager.instance.ReDrawOnScreenDebug(); - RegisterMaterialDebug(); } void RefreshVolumeDebug(DebugUI.Field field, T value) { UnregisterDebugItems(k_PanelVolume, m_DebugVolumeItems); - - if (DebugManager.instance.displayRuntimeUI) - DebugManager.instance.ReDrawOnScreenDebug(); - RegisterVolumeDebug(); } @@ -1991,13 +1967,11 @@ internal bool DebugNeedsExposure() { DebugLightingMode debugLighting = data.lightingDebugSettings.debugLightingMode; DebugViewGbuffer debugGBuffer = (DebugViewGbuffer)data.materialDebugSettings.debugViewGBuffer; - ProbeVolumeDebugMode debugProbeVolume = data.lightingDebugSettings.probeVolumeDebugMode; return (debugLighting == DebugLightingMode.DirectDiffuseLighting || debugLighting == DebugLightingMode.DirectSpecularLighting || debugLighting == DebugLightingMode.IndirectDiffuseLighting || debugLighting == DebugLightingMode.ReflectionLighting || debugLighting == DebugLightingMode.RefractionLighting || debugLighting == DebugLightingMode.EmissiveLighting || debugLighting == DebugLightingMode.DiffuseLighting || debugLighting == DebugLightingMode.SpecularLighting || debugLighting == DebugLightingMode.VisualizeCascade) || (data.lightingDebugSettings.overrideAlbedo || data.lightingDebugSettings.overrideNormal || data.lightingDebugSettings.overrideSmoothness || data.lightingDebugSettings.overrideSpecularColor || data.lightingDebugSettings.overrideEmissiveColor || data.lightingDebugSettings.overrideAmbientOcclusion) || (debugGBuffer == DebugViewGbuffer.BakeDiffuseLightingWithAlbedoPlusEmissive) || (data.lightingDebugSettings.debugLightFilterMode != DebugLightFilterMode.None) || - (data.fullScreenDebugMode == FullScreenDebugMode.PreRefractionColorPyramid || data.fullScreenDebugMode == FullScreenDebugMode.FinalColorPyramid || data.fullScreenDebugMode == FullScreenDebugMode.ScreenSpaceReflections || data.fullScreenDebugMode == FullScreenDebugMode.ScreenSpaceReflectionsPrev || data.fullScreenDebugMode == FullScreenDebugMode.ScreenSpaceReflectionsAccum || data.fullScreenDebugMode == FullScreenDebugMode.LightCluster || data.fullScreenDebugMode == FullScreenDebugMode.ScreenSpaceShadows || data.fullScreenDebugMode == FullScreenDebugMode.NanTracker || data.fullScreenDebugMode == FullScreenDebugMode.ColorLog) || data.fullScreenDebugMode == FullScreenDebugMode.ScreenSpaceGlobalIllumination || - (debugLighting == DebugLightingMode.ProbeVolume || debugProbeVolume == ProbeVolumeDebugMode.VisualizeAtlas); + (data.fullScreenDebugMode == FullScreenDebugMode.PreRefractionColorPyramid || data.fullScreenDebugMode == FullScreenDebugMode.FinalColorPyramid || data.fullScreenDebugMode == FullScreenDebugMode.TransparentScreenSpaceReflections || data.fullScreenDebugMode == FullScreenDebugMode.ScreenSpaceReflections || data.fullScreenDebugMode == FullScreenDebugMode.ScreenSpaceReflectionsPrev || data.fullScreenDebugMode == FullScreenDebugMode.ScreenSpaceReflectionsAccum || data.fullScreenDebugMode == FullScreenDebugMode.LightCluster || data.fullScreenDebugMode == FullScreenDebugMode.ScreenSpaceShadows || data.fullScreenDebugMode == FullScreenDebugMode.NanTracker || data.fullScreenDebugMode == FullScreenDebugMode.ColorLog) || data.fullScreenDebugMode == FullScreenDebugMode.ScreenSpaceGlobalIllumination; } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs index 599e79017f1..99504017493 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Light/HDAdditionalLightData.cs @@ -2085,8 +2085,8 @@ private void UpdateDirectionalShadowRequest(HDShadowManager manager, HDShadowSet HDShadowUtils.ExtractDirectionalLightData( visibleLight, viewportSize, (uint)requestIndex, shadowSettings.cascadeShadowSplitCount.value, shadowSettings.cascadeShadowSplits, nearPlaneOffset, cullResults, lightIndex, - out shadowRequest.view, out invViewProjection, out shadowRequest.deviceProjectionYFlip, - out shadowRequest.deviceProjection, out shadowRequest.splitData + out shadowRequest.view, out invViewProjection, out shadowRequest.projection, + out shadowRequest.deviceProjection, out shadowRequest.deviceProjectionYFlip, out shadowRequest.splitData ); cullingSphere = shadowRequest.splitData.cullingSphere; @@ -2116,8 +2116,8 @@ internal void UpdateShadowRequestData(HDCamera hdCamera, HDShadowManager manager HDShadowUtils.ExtractPointLightData( visibleLight, viewportSize, shadowNearPlane, normalBias, (uint)shadowIndex, filteringQuality, out shadowRequest.view, - out invViewProjection, out shadowRequest.deviceProjectionYFlip, - out shadowRequest.deviceProjection, out shadowRequest.splitData + out invViewProjection, out shadowRequest.projection, + out shadowRequest.deviceProjection, out shadowRequest.deviceProjectionYFlip, out shadowRequest.splitData ); break; case HDLightType.Spot: @@ -2125,8 +2125,8 @@ internal void UpdateShadowRequestData(HDCamera hdCamera, HDShadowManager manager HDShadowUtils.ExtractSpotLightData( spotLightShape, spotAngleForShadows, shadowNearPlane, aspectRatio, shapeWidth, shapeHeight, visibleLight, viewportSize, normalBias, filteringQuality, - out shadowRequest.view, out invViewProjection, out shadowRequest.deviceProjectionYFlip, - out shadowRequest.deviceProjection, out shadowRequest.splitData + out shadowRequest.view, out invViewProjection, out shadowRequest.projection, + out shadowRequest.deviceProjection, out shadowRequest.deviceProjectionYFlip, out shadowRequest.splitData ); break; case HDLightType.Directional: @@ -2140,7 +2140,7 @@ internal void UpdateShadowRequestData(HDCamera hdCamera, HDShadowManager manager float offset = GetAreaLightOffsetForShadows(shapeSize, areaLightShadowCone); Vector3 shadowOffset = offset * visibleLight.GetForward(); HDShadowUtils.ExtractRectangleAreaLightData(visibleLight, visibleLight.GetPosition() + shadowOffset, areaLightShadowCone, shadowNearPlane, shapeSize, viewportSize, normalBias, filteringQuality, - out shadowRequest.view, out invViewProjection, out shadowRequest.deviceProjectionYFlip, out shadowRequest.deviceProjection, out shadowRequest.splitData); + out shadowRequest.view, out invViewProjection, out shadowRequest.projection, out shadowRequest.deviceProjection, out shadowRequest.deviceProjectionYFlip, out shadowRequest.splitData); break; case AreaLightShape.Tube: //Tube do not cast shadow at the moment. @@ -2309,7 +2309,7 @@ void SetCommonShadowRequestSettings(HDShadowRequest shadowRequest, VisibleLight } // shadow clip planes (used for tessellation clipping) - GeometryUtility.CalculateFrustumPlanes(CoreMatrixUtils.MultiplyProjectionMatrix(shadowRequest.deviceProjectionYFlip, shadowRequest.view, hasOrthoMatrix), m_ShadowFrustumPlanes); + GeometryUtility.CalculateFrustumPlanes(CoreMatrixUtils.MultiplyProjectionMatrix(shadowRequest.projection, shadowRequest.view, hasOrthoMatrix), m_ShadowFrustumPlanes); if (shadowRequest.frustumPlanes?.Length != 6) shadowRequest.frustumPlanes = new Vector4[6]; // Left, right, top, bottom, near, far. diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.RenderGraph.cs index 0aa99566a7b..ade275f18c9 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.RenderGraph.cs @@ -46,6 +46,7 @@ public TextureHandle Render(RenderGraph renderGraph, HDCamera hdCamera, TextureH var packedData = RenderAO(renderGraph, aoParameters, depthPyramid, normalBuffer); result = DenoiseAO(renderGraph, aoParameters, depthPyramid, motionVectors, packedData, currentHistory, outputHistory); + result = UpsampleAO(renderGraph, aoParameters, result, depthPyramid); } } } @@ -107,6 +108,9 @@ TextureHandle DenoiseAO(RenderGraph renderGraph, TextureHandle currentHistory, TextureHandle outputHistory) { + if (!parameters.temporalAccumulation && !parameters.fullResolution) + return aoPackedData; + TextureHandle denoiseOutput; using (var builder = renderGraph.AddRenderPass("Denoise GTAO", out var passData)) @@ -147,11 +151,8 @@ TextureHandle DenoiseAO(RenderGraph renderGraph, ctx.cmd); }); - if (parameters.fullResolution) - return passData.denoiseOutput; + return passData.denoiseOutput; } - - return UpsampleAO(renderGraph, parameters, denoiseOutput, depthTexture); } class UpsampleAOPassData @@ -164,6 +165,9 @@ class UpsampleAOPassData TextureHandle UpsampleAO(RenderGraph renderGraph, in RenderAOParameters parameters, TextureHandle input, TextureHandle depthTexture) { + if (parameters.fullResolution) + return input; + using (var builder = renderGraph.AddRenderPass("Upsample GTAO", out var passData, ProfilingSampler.Get(HDProfileId.UpSampleSSAO))) { builder.EnableAsyncCompute(parameters.runAsync); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.cs index d2bc3ebba5d..b9c7de23480 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.cs @@ -91,6 +91,7 @@ class HDShadowRequest // Use the y flipped device projection matrix as light projection matrix public Matrix4x4 deviceProjectionYFlip; public Matrix4x4 deviceProjection; + public Matrix4x4 projection; public Matrix4x4 shadowToWorld; public Vector3 position; public Vector4 zBufferParam; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowUtils.cs index 47176b82d59..0f2771fabc4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowUtils.cs @@ -31,17 +31,17 @@ static float GetPunctualFilterWidthInTexels(HDShadowFilteringQuality quality) } public static void ExtractPointLightData(VisibleLight visibleLight, Vector2 viewportSize, float nearPlane, float normalBiasMax, uint faceIndex, HDShadowFilteringQuality filteringQuality, - out Matrix4x4 view, out Matrix4x4 invViewProjection, out Matrix4x4 projection, out Matrix4x4 deviceProjection, out ShadowSplitData splitData) + out Matrix4x4 view, out Matrix4x4 invViewProjection, out Matrix4x4 projection, out Matrix4x4 deviceProjection, out Matrix4x4 deviceProjectionYFlip, out ShadowSplitData splitData) { Vector4 lightDir; float guardAngle = CalcGuardAnglePerspective(90.0f, viewportSize.x, GetPunctualFilterWidthInTexels(filteringQuality), normalBiasMax, 79.0f); - ExtractPointLightMatrix(visibleLight, faceIndex, nearPlane, guardAngle, out view, out projection, out deviceProjection, out invViewProjection, out lightDir, out splitData); + ExtractPointLightMatrix(visibleLight, faceIndex, nearPlane, guardAngle, out view, out projection, out deviceProjection, out deviceProjectionYFlip, out invViewProjection, out lightDir, out splitData); } // TODO: box spot and pyramid spots with non 1 aspect ratios shadow are incorrectly culled, see when scriptable culling will be here public static void ExtractSpotLightData(SpotLightShape shape, float spotAngle, float nearPlane, float aspectRatio, float shapeWidth, float shapeHeight, VisibleLight visibleLight, Vector2 viewportSize, float normalBiasMax, HDShadowFilteringQuality filteringQuality, - out Matrix4x4 view, out Matrix4x4 invViewProjection, out Matrix4x4 projection, out Matrix4x4 deviceProjection, out ShadowSplitData splitData) + out Matrix4x4 view, out Matrix4x4 invViewProjection, out Matrix4x4 projection, out Matrix4x4 deviceProjection, out Matrix4x4 deviceProjectionYFlip, out ShadowSplitData splitData) { Vector4 lightDir; @@ -50,18 +50,19 @@ public static void ExtractSpotLightData(SpotLightShape shape, float spotAngle, f aspectRatio = 1.0f; float guardAngle = CalcGuardAnglePerspective(spotAngle, viewportSize.x, GetPunctualFilterWidthInTexels(filteringQuality), normalBiasMax, 180.0f - spotAngle); - ExtractSpotLightMatrix(visibleLight, spotAngle, nearPlane, guardAngle, aspectRatio, out view, out projection, out deviceProjection, out invViewProjection, out lightDir, out splitData); + ExtractSpotLightMatrix(visibleLight, spotAngle, nearPlane, guardAngle, aspectRatio, out view, out projection, out deviceProjection, out deviceProjectionYFlip, out invViewProjection, out lightDir, out splitData); if (shape == SpotLightShape.Box) { projection = ExtractBoxLightProjectionMatrix(visibleLight.range, shapeWidth, shapeHeight, nearPlane); deviceProjection = GL.GetGPUProjectionMatrix(projection, false); - projection = GL.GetGPUProjectionMatrix(projection, true); - InvertOrthographic(ref projection, ref view, out invViewProjection); + deviceProjectionYFlip = GL.GetGPUProjectionMatrix(projection, true); + InvertOrthographic(ref deviceProjectionYFlip, ref view, out invViewProjection); } } - public static void ExtractDirectionalLightData(VisibleLight visibleLight, Vector2 viewportSize, uint cascadeIndex, int cascadeCount, float[] cascadeRatios, float nearPlaneOffset, CullingResults cullResults, int lightIndex, out Matrix4x4 view, out Matrix4x4 invViewProjection, out Matrix4x4 projection, out Matrix4x4 deviceProjection, out ShadowSplitData splitData) + public static void ExtractDirectionalLightData(VisibleLight visibleLight, Vector2 viewportSize, uint cascadeIndex, int cascadeCount, float[] cascadeRatios, float nearPlaneOffset, CullingResults cullResults, int lightIndex, + out Matrix4x4 view, out Matrix4x4 invViewProjection, out Matrix4x4 projection, out Matrix4x4 deviceProjection, out Matrix4x4 deviceProjectionYFlip, out ShadowSplitData splitData) { Vector4 lightDir; @@ -84,13 +85,13 @@ public static void ExtractDirectionalLightData(VisibleLight visibleLight, Vector cullResults.ComputeDirectionalShadowMatricesAndCullingPrimitives(lightIndex, (int)cascadeIndex, cascadeCount, ratios, (int)viewportSize.x, nearPlaneOffset, out view, out projection, out splitData); // and the compound (deviceProjection will potentially inverse-Z) deviceProjection = GL.GetGPUProjectionMatrix(projection, false); - projection = GL.GetGPUProjectionMatrix(projection, true); + deviceProjectionYFlip = GL.GetGPUProjectionMatrix(projection, true); InvertOrthographic(ref deviceProjection, ref view, out invViewProjection); } // Currently area light shadows are not supported public static void ExtractRectangleAreaLightData(VisibleLight visibleLight, Vector3 shadowPosition, float areaLightShadowCone, float shadowNearPlane, Vector2 shapeSize, Vector2 viewportSize, float normalBiasMax, HDShadowFilteringQuality filteringQuality, - out Matrix4x4 view, out Matrix4x4 invViewProjection, out Matrix4x4 projection, out Matrix4x4 deviceProjection, out ShadowSplitData splitData) + out Matrix4x4 view, out Matrix4x4 invViewProjection, out Matrix4x4 projection, out Matrix4x4 deviceProjection, out Matrix4x4 deviceProjectionYFlip, out ShadowSplitData splitData) { Vector4 lightDir; float aspectRatio = shapeSize.x / shapeSize.y; @@ -98,7 +99,7 @@ public static void ExtractRectangleAreaLightData(VisibleLight visibleLight, Vect visibleLight.spotAngle = spotAngle; float guardAngle = CalcGuardAnglePerspective(visibleLight.spotAngle, viewportSize.x, GetPunctualFilterWidthInTexels(filteringQuality), normalBiasMax, 180.0f - visibleLight.spotAngle); - ExtractSpotLightMatrix(visibleLight, visibleLight.spotAngle, shadowNearPlane, guardAngle, aspectRatio, out view, out projection, out deviceProjection, out invViewProjection, out lightDir, out splitData); + ExtractSpotLightMatrix(visibleLight, visibleLight.spotAngle, shadowNearPlane, guardAngle, aspectRatio, out view, out projection, out deviceProjection, out deviceProjectionYFlip, out invViewProjection, out lightDir, out splitData); } // Cubemap faces with flipped z coordinate. @@ -245,7 +246,7 @@ public static Matrix4x4 ExtractBoxLightProjectionMatrix(float range, float width return Matrix4x4.Ortho(-width / 2, width / 2, -height / 2, height / 2, nearZ, range); } - static Matrix4x4 ExtractSpotLightMatrix(VisibleLight vl, float spotAngle, float nearPlane, float guardAngle, float aspectRatio, out Matrix4x4 view, out Matrix4x4 proj, out Matrix4x4 deviceProj, out Matrix4x4 vpinverse, out Vector4 lightDir, out ShadowSplitData splitData) + static Matrix4x4 ExtractSpotLightMatrix(VisibleLight vl, float spotAngle, float nearPlane, float guardAngle, float aspectRatio, out Matrix4x4 view, out Matrix4x4 proj, out Matrix4x4 deviceProj, out Matrix4x4 deviceProjYFlip, out Matrix4x4 vpinverse, out Vector4 lightDir, out ShadowSplitData splitData) { splitData = new ShadowSplitData(); splitData.cullingSphere.Set(0.0f, 0.0f, 0.0f, float.NegativeInfinity); @@ -263,12 +264,12 @@ static Matrix4x4 ExtractSpotLightMatrix(VisibleLight vl, float spotAngle, float proj = ExtractSpotLightProjectionMatrix(vl.range, spotAngle, nearPlane, aspectRatio, guardAngle); // and the compound (deviceProj will potentially inverse-Z) deviceProj = GL.GetGPUProjectionMatrix(proj, false); - proj = GL.GetGPUProjectionMatrix(proj, true); + deviceProjYFlip = GL.GetGPUProjectionMatrix(proj, true); InvertPerspective(ref deviceProj, ref view, out vpinverse); return CoreMatrixUtils.MultiplyPerspectiveMatrix(deviceProj, view); } - static Matrix4x4 ExtractPointLightMatrix(VisibleLight vl, uint faceIdx, float nearPlane, float guardAngle, out Matrix4x4 view, out Matrix4x4 proj, out Matrix4x4 deviceProj, out Matrix4x4 vpinverse, out Vector4 lightDir, out ShadowSplitData splitData) + static Matrix4x4 ExtractPointLightMatrix(VisibleLight vl, uint faceIdx, float nearPlane, float guardAngle, out Matrix4x4 view, out Matrix4x4 proj, out Matrix4x4 deviceProj, out Matrix4x4 deviceProjYFlip, out Matrix4x4 vpinverse, out Vector4 lightDir, out ShadowSplitData splitData) { if (faceIdx > (uint)CubemapFace.NegativeZ) Debug.LogError("Tried to extract cubemap face " + faceIdx + "."); @@ -288,7 +289,7 @@ static Matrix4x4 ExtractPointLightMatrix(VisibleLight vl, uint faceIdx, float ne proj = Matrix4x4.Perspective(90.0f + guardAngle, 1.0f, nearZ, vl.range); // and the compound (deviceProj will potentially inverse-Z) deviceProj = GL.GetGPUProjectionMatrix(proj, false); - proj = GL.GetGPUProjectionMatrix(proj, true); + deviceProjYFlip = GL.GetGPUProjectionMatrix(proj, true); InvertPerspective(ref deviceProj, ref view, out vpinverse); Matrix4x4 devProjView = CoreMatrixUtils.MultiplyPerspectiveMatrix(deviceProj, view); 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 12168a1bbda..a92817c8b0c 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 @@ -83,6 +83,8 @@ public struct ViewConstants /// Volumetric history buffer state. public bool volumetricHistoryIsValid = false; + internal int volumetricValidFrames = 0; + /// Width actually used for rendering after dynamic resolution and XR is applied. public int actualWidth { get; private set; } /// Height actually used for rendering after dynamic resolution and XR is applied. @@ -129,6 +131,7 @@ public void Reset() cameraFrameCount = 0; resetPostProcessingHistory = true; volumetricHistoryIsValid = false; + volumetricValidFrames = 0; colorPyramidHistoryIsValid = false; } @@ -1354,7 +1357,7 @@ Matrix4x4 ComputePixelCoordToWorldSpaceViewDirectionMatrix(ViewConstants viewCon } Vector2 lensShift = camera.GetGateFittedLensShift(); - return HDUtils.ComputePixelCoordToWorldSpaceViewDirectionMatrix(verticalFoV, lensShift, resolution, viewConstants.viewMatrix, false, aspect); + return HDUtils.ComputePixelCoordToWorldSpaceViewDirectionMatrix(verticalFoV, lensShift, resolution, viewConstants.viewMatrix, false, aspect, camera.orthographic); } void Dispose() diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs index 9d97b449c72..db7b21e1420 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs @@ -744,8 +744,10 @@ TextureHandle VolumetricLightingPass(RenderGraph renderGraph, HDCamera hdCamera, FilterVolumetricLighting(data.parameters, data.lightingBuffer, ctx.cmd); }); - if (parameters.enableReprojection) + if (parameters.enableReprojection && hdCamera.volumetricValidFrames > 1) hdCamera.volumetricHistoryIsValid = true; // For the next frame.. + else + hdCamera.volumetricValidFrames++; return passData.lightingBuffer; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs index dac5febf862..6c5a837bf78 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Utility/HDUtils.cs @@ -140,35 +140,49 @@ internal static int GetRuntimeDebugPanelWidth(HDCamera hdCamera) internal static float ProjectionMatrixAspect(in Matrix4x4 matrix) => - matrix.m11 / matrix.m00; - internal static Matrix4x4 ComputePixelCoordToWorldSpaceViewDirectionMatrix(float verticalFoV, Vector2 lensShift, Vector4 screenSize, Matrix4x4 worldToViewMatrix, bool renderToCubemap, float aspectRatio = -1) + internal static Matrix4x4 ComputePixelCoordToWorldSpaceViewDirectionMatrix(float verticalFoV, Vector2 lensShift, Vector4 screenSize, Matrix4x4 worldToViewMatrix, bool renderToCubemap, float aspectRatio = -1, bool isOrthographic = false) { - aspectRatio = aspectRatio < 0 ? screenSize.x * screenSize.w : aspectRatio; + Matrix4x4 viewSpaceRasterTransform; - // Compose the view space version first. - // V = -(X, Y, Z), s.t. Z = 1, - // X = (2x / resX - 1) * tan(vFoV / 2) * ar = x * [(2 / resX) * tan(vFoV / 2) * ar] + [-tan(vFoV / 2) * ar] = x * [-m00] + [-m20] - // Y = (2y / resY - 1) * tan(vFoV / 2) = y * [(2 / resY) * tan(vFoV / 2)] + [-tan(vFoV / 2)] = y * [-m11] + [-m21] + if (isOrthographic) + { + // For ortho cameras, project the skybox with no perspective + // the same way as builtin does (case 1264647) + viewSpaceRasterTransform = new Matrix4x4( + new Vector4(-2.0f * screenSize.z, 0.0f, 0.0f, 0.0f), + new Vector4(0.0f, -2.0f * screenSize.w, 0.0f, 0.0f), + new Vector4(1.0f, 1.0f, -1.0f, 0.0f), + new Vector4(0.0f, 0.0f, 0.0f, 0.0f)); + } + else + { + // Compose the view space version first. + // V = -(X, Y, Z), s.t. Z = 1, + // X = (2x / resX - 1) * tan(vFoV / 2) * ar = x * [(2 / resX) * tan(vFoV / 2) * ar] + [-tan(vFoV / 2) * ar] = x * [-m00] + [-m20] + // Y = (2y / resY - 1) * tan(vFoV / 2) = y * [(2 / resY) * tan(vFoV / 2)] + [-tan(vFoV / 2)] = y * [-m11] + [-m21] - float tanHalfVertFoV = Mathf.Tan(0.5f * verticalFoV); + aspectRatio = aspectRatio < 0 ? screenSize.x * screenSize.w : aspectRatio; + float tanHalfVertFoV = Mathf.Tan(0.5f * verticalFoV); - // Compose the matrix. - float m21 = (1.0f - 2.0f * lensShift.y) * tanHalfVertFoV; - float m11 = -2.0f * screenSize.w * tanHalfVertFoV; + // Compose the matrix. + float m21 = (1.0f - 2.0f * lensShift.y) * tanHalfVertFoV; + float m11 = -2.0f * screenSize.w * tanHalfVertFoV; - float m20 = (1.0f - 2.0f * lensShift.x) * tanHalfVertFoV * aspectRatio; - float m00 = -2.0f * screenSize.z * tanHalfVertFoV * aspectRatio; + float m20 = (1.0f - 2.0f * lensShift.x) * tanHalfVertFoV * aspectRatio; + float m00 = -2.0f * screenSize.z * tanHalfVertFoV * aspectRatio; - if (renderToCubemap) - { - // Flip Y. - m11 = -m11; - m21 = -m21; - } + if (renderToCubemap) + { + // Flip Y. + m11 = -m11; + m21 = -m21; + } - var viewSpaceRasterTransform = new Matrix4x4(new Vector4(m00, 0.0f, 0.0f, 0.0f), - new Vector4(0.0f, m11, 0.0f, 0.0f), - new Vector4(m20, m21, -1.0f, 0.0f), - new Vector4(0.0f, 0.0f, 0.0f, 1.0f)); + viewSpaceRasterTransform = new Matrix4x4(new Vector4(m00, 0.0f, 0.0f, 0.0f), + new Vector4(0.0f, m11, 0.0f, 0.0f), + new Vector4(m20, m21, -1.0f, 0.0f), + new Vector4(0.0f, 0.0f, 0.0f, 1.0f)); + } // Remove the translation component. var homogeneousZero = new Vector4(0, 0, 0, 1); From e26027015b007edbf0bae9a0ffca52641031979b Mon Sep 17 00:00:00 2001 From: Adrien de Tocqueville Date: Thu, 21 Jan 2021 16:56:21 +0100 Subject: [PATCH 2/6] Fix frame count in editor #3173 --- .../Reflection/HDBakedReflectionSystem.cs | 2 +- .../Runtime/Lighting/Reflection/HDProbe.cs | 7 +-- .../AmbientOcclusion.RenderGraph.cs | 6 +- .../ScreenSpaceLighting/AmbientOcclusion.cs | 3 +- .../VolumetricLighting/DensityVolume.cs | 9 ++- .../DensityVolumeManager.cs | 6 +- .../VolumetricLighting/VolumetricLighting.cs | 8 +-- .../PostProcessing/PostProcessSystem.cs | 2 +- .../Runtime/RenderPipeline/Camera/HDCamera.cs | 31 +++++++++- .../HDRenderPipeline.LightLoop.cs | 6 +- .../HDRenderPipeline.RenderGraph.cs | 14 ++--- .../RenderPipeline/HDRenderPipeline.cs | 60 +++++++++---------- ...DRaytracingAmbientOcclusion.RenderGraph.cs | 2 +- ...HDRaytracingIndirectDiffuse.RenderGraph.cs | 10 ++-- .../HDRaytracingReflection.RenderGraph.cs | 10 ++-- .../Runtime/Sky/HDRISky/HDRISkyRenderer.cs | 11 +--- .../Runtime/Sky/SkyManager.cs | 21 +++---- .../Runtime/Utilities/CameraCache.cs | 4 +- 18 files changed, 108 insertions(+), 104 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDBakedReflectionSystem.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDBakedReflectionSystem.cs index a07b3fd9edd..a90c253eb0c 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDBakedReflectionSystem.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDBakedReflectionSystem.cs @@ -440,7 +440,7 @@ public static bool BakeProbes(IEnumerable bakedProbes) // to update the texture. // updateCount is a transient data, so don't execute this code before the asset reload. { - UnityEngine.Random.InitState((int)(1000 * hdPipeline.GetTime())); + UnityEngine.Random.InitState((int)(1000 * EditorApplication.timeSinceStartup)); foreach (var probe in bakedProbes) { var c = UnityEngine.Random.Range(2, 10); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbe.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbe.cs index 186f0d007f3..539f8eafbde 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbe.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Reflection/HDProbe.cs @@ -196,7 +196,6 @@ internal bool HasValidRenderedData() } else { - bool hasEverRendered = lastRenderedFrame != int.MinValue; return hasEverRendered && hasValidTexture; } } @@ -520,16 +519,16 @@ internal Matrix4x4 proxyToWorld : influenceToWorld; internal bool wasRenderedAfterOnEnable { get; private set; } = false; - internal int lastRenderedFrame { get; private set; } = int.MinValue; + internal bool hasEverRendered { get; private set; } = false; - internal void SetIsRendered(int frame) + internal void SetIsRendered() { #if UNITY_EDITOR m_WasRenderedDuringAsyncCompilation = ShaderUtil.anythingCompiling; #endif m_WasRenderedSinceLastOnDemandRequest = true; wasRenderedAfterOnEnable = true; - lastRenderedFrame = frame; + hasEverRendered = true; } // API diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.RenderGraph.cs index ade275f18c9..7250f39734e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.RenderGraph.cs @@ -10,7 +10,7 @@ TextureHandle CreateAmbientOcclusionTexture(RenderGraph renderGraph) return renderGraph.CreateTexture(new TextureDesc(Vector2.one, true, true) { enableRandomWrite = true, colorFormat = GraphicsFormat.R8_UNorm, name = "Ambient Occlusion" }); } - public TextureHandle Render(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle depthPyramid, TextureHandle normalBuffer, TextureHandle motionVectors, int frameCount, in HDUtils.PackedMipChainInfo depthMipInfo, ShaderVariablesRaytracing shaderVariablesRaytracing, TextureHandle rayCountTexture) + public TextureHandle Render(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle depthPyramid, TextureHandle normalBuffer, TextureHandle motionVectors, in HDUtils.PackedMipChainInfo depthMipInfo, ShaderVariablesRaytracing shaderVariablesRaytracing, TextureHandle rayCountTexture) { var settings = hdCamera.volumeStack.GetComponent(); @@ -31,7 +31,7 @@ public TextureHandle Render(RenderGraph renderGraph, HDCamera hdCamera, TextureH hdCamera.AllocateAmbientOcclusionHistoryBuffer(scaleFactor); if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.RayTracing) && settings.rayTracing.value) - return m_RaytracingAmbientOcclusion.RenderRTAO(renderGraph, hdCamera, depthPyramid, normalBuffer, motionVectors, rayCountTexture, frameCount, shaderVariablesRaytracing); + return m_RaytracingAmbientOcclusion.RenderRTAO(renderGraph, hdCamera, depthPyramid, normalBuffer, motionVectors, rayCountTexture, shaderVariablesRaytracing); else { var historyRT = hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.AmbientOcclusion); @@ -42,7 +42,7 @@ public TextureHandle Render(RenderGraph renderGraph, HDCamera hdCamera, TextureH historyRT.referenceSize.y * historyRT.scaleFactor.y); var rtScaleForHistory = hdCamera.historyRTHandleProperties.rtHandleScale; - var aoParameters = PrepareRenderAOParameters(hdCamera, historySize * rtScaleForHistory, frameCount, depthMipInfo); + var aoParameters = PrepareRenderAOParameters(hdCamera, historySize * rtScaleForHistory, depthMipInfo); var packedData = RenderAO(renderGraph, aoParameters, depthPyramid, normalBuffer); result = DenoiseAO(renderGraph, aoParameters, depthPyramid, motionVectors, packedData, currentHistory, outputHistory); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.cs index b06843b77d2..44de820c7bd 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/AmbientOcclusion.cs @@ -282,7 +282,7 @@ struct RenderAOParameters public ShaderVariablesAmbientOcclusion cb; } - RenderAOParameters PrepareRenderAOParameters(HDCamera camera, Vector2 historySize, int frameCount, in HDUtils.PackedMipChainInfo depthMipInfo) + RenderAOParameters PrepareRenderAOParameters(HDCamera camera, Vector2 historySize, in HDUtils.PackedMipChainInfo depthMipInfo) { var parameters = new RenderAOParameters(); @@ -305,6 +305,7 @@ RenderAOParameters PrepareRenderAOParameters(HDCamera camera, Vector2 historySiz float invHalfTanFOV = -camera.mainViewConstants.projMatrix[1, 1]; float aspectRatio = parameters.runningRes.y / parameters.runningRes.x; + uint frameCount = camera.GetCameraFrameCount(); cb._AOParams0 = new Vector4( parameters.fullResolution ? 0.0f : 1.0f, diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/DensityVolume.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/DensityVolume.cs index 14519de5f4e..6ad5c6d5004 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/DensityVolume.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/DensityVolume.cs @@ -84,13 +84,12 @@ public DensityVolumeArtistParameters(Color color, float _meanFreePath, float _an m_EditorAdvancedFade = false; } - internal void Update(bool animate, float time) + internal void Update(float time) { //Update scrolling based on deltaTime if (volumeMask != null) { - float animationTime = animate ? time : 0.0f; - textureOffset = (textureScrollingSpeed * animationTime); + textureOffset = (textureScrollingSpeed * time); // Switch from right-handed to left-handed coordinate system. textureOffset.x = -textureOffset.x; textureOffset.y = -textureOffset.y; @@ -167,7 +166,7 @@ public partial class DensityVolume : MonoBehaviour /// Gather and Update any parameters that may have changed. - internal void PrepareParameters(bool animate, float time) + internal void PrepareParameters(float time) { //Texture has been updated notify the manager bool updated = previousVolumeMask != parameters.volumeMask; @@ -185,7 +184,7 @@ internal void PrepareParameters(bool animate, float time) #endif } - parameters.Update(animate, time); + parameters.Update(time); } private void NotifyUpdatedTexure() diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/DensityVolumeManager.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/DensityVolumeManager.cs index 0786c33445a..4312188ebf3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/DensityVolumeManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/DensityVolumeManager.cs @@ -67,13 +67,13 @@ public void DeRegisterVolume(DensityVolume volume) public bool ContainsVolume(DensityVolume volume) => volumes.Contains(volume); - public List PrepareDensityVolumeData(CommandBuffer cmd, HDCamera currentCam, float time) + public List PrepareDensityVolumeData(CommandBuffer cmd, HDCamera currentCam) { //Update volumes - bool animate = currentCam.animateMaterials; + float time = currentCam.time; foreach (DensityVolume volume in volumes) { - volume.PrepareParameters(animate, time); + volume.PrepareParameters(time); } if (atlasNeedsRefresh) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricLighting.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricLighting.cs index 592b5767990..2263fe69e16 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricLighting.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricLighting.cs @@ -704,8 +704,8 @@ void UpdateShaderVariablesGlobalVolumetrics(ref ShaderVariablesGlobal cb, HDCame // Get the interpolated anisotropy value. var fog = hdCamera.volumeStack.GetComponent(); - int frameIndex = m_FrameCount; - int currIdx = (frameIndex + 0) & 1; + uint frameIndex = hdCamera.GetCameraFrameCount(); + uint currIdx = (frameIndex + 0) & 1; var currParams = hdCamera.vBufferParams[currIdx]; @@ -729,7 +729,7 @@ void UpdateShaderVariablesGlobalVolumetrics(ref ShaderVariablesGlobal cb, HDCame cb._VBufferRcpInstancedViewCount = 1.0f / hdCamera.viewCount; } - DensityVolumeList PrepareVisibleDensityVolumeList(HDCamera hdCamera, CommandBuffer cmd, float time) + DensityVolumeList PrepareVisibleDensityVolumeList(HDCamera hdCamera, CommandBuffer cmd) { DensityVolumeList densityVolumes = new DensityVolumeList(); @@ -750,7 +750,7 @@ DensityVolumeList PrepareVisibleDensityVolumeList(HDCamera hdCamera, CommandBuff m_VisibleVolumeData.Clear(); // Collect all visible finite volume data, and upload it to the GPU. - var volumes = DensityVolumeManager.manager.PrepareDensityVolumeData(cmd, hdCamera, time); + var volumes = DensityVolumeManager.manager.PrepareDensityVolumeData(cmd, hdCamera); for (int i = 0; i < Math.Min(volumes.Count, k_MaxVisibleVolumeCount); i++) { diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs index db6cd63c7ca..8ffbd2bf174 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/PostProcessSystem.cs @@ -3421,7 +3421,7 @@ static void DoFinalPass(in FinalPassParameters parameters, #if HDRP_DEBUG_STATIC_POSTFX int textureId = 0; #else - int textureId = Time.frameCount % blueNoiseTexture.depth; + int textureId = (int)hdCamera.GetCameraFrameCount() % blueNoiseTexture.depth; #endif finalPassMaterial.EnableKeyword("DITHER"); 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 a92817c8b0c..3b48beb315f 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 @@ -249,6 +249,8 @@ internal struct HistoryEffectValidity // XR multipass and instanced views are supported (see XRSystem) internal XRPass xr { get; private set; } + internal float deltaTime => time - lastTime; + // Non oblique projection matrix (RHS) // TODO: this code is never used and not compatible with XR internal Matrix4x4 nonObliqueProjMatrix @@ -456,9 +458,24 @@ internal void Update(FrameSettings currentFrameSettings, HDRenderPipeline hdrp, // Different views/tabs may have different values of the "Animated Materials" setting. animateMaterials = CoreUtils.AreAnimatedMaterialsEnabled(aniCam); - - time = animateMaterials ? hdrp.GetTime() : 0; - lastTime = animateMaterials ? hdrp.GetLastTime() : 0; + if (animateMaterials) + { + float newTime, deltaTime; +#if UNITY_EDITOR + newTime = Application.isPlaying ? Time.time : Time.realtimeSinceStartup; + deltaTime = Application.isPlaying ? Time.deltaTime : 0.033f; +#else + newTime = Time.time; + deltaTime = Time.deltaTime; +#endif + time = newTime; + lastTime = newTime - deltaTime; + } + else + { + time = 0; + lastTime = 0; + } // Make sure that the shadow history identification array is allocated and is at the right size if (shadowHistoryUsage == null || shadowHistoryUsage.Length != hdrp.currentPlatformRenderPipelineSettings.hdShadowInitParams.maxScreenSpaceShadowSlots) @@ -677,6 +694,9 @@ internal static void ResetAllHistoryRTHandleSystems(int width, int height) } } + unsafe internal void UpdateShaderVariablesGlobalCB(ref ShaderVariablesGlobal cb) + => UpdateShaderVariablesGlobalCB(ref cb, (int)cameraFrameCount); + unsafe internal void UpdateShaderVariablesGlobalCB(ref ShaderVariablesGlobal cb, int frameCount) { bool taaEnabled = frameSettings.IsEnabled(FrameSettingsField.Postprocess) @@ -711,8 +731,13 @@ unsafe internal void UpdateShaderVariablesGlobalCB(ref ShaderVariablesGlobal cb, float ct = time; float pt = lastTime; +#if UNITY_EDITOR + float dt = time - lastTime; + float sdt = dt; +#else float dt = Time.deltaTime; float sdt = Time.smoothDeltaTime; +#endif cb._Time = new Vector4(ct * 0.05f, ct, ct * 2.0f, ct * 3.0f); cb._SinTime = new Vector4(Mathf.Sin(ct * 0.125f), Mathf.Sin(ct * 0.25f), Mathf.Sin(ct * 0.5f), Mathf.Sin(ct)); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs index db7b21e1420..e11be2585eb 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs @@ -227,7 +227,6 @@ BuildGPULightListOutput BuildGPULightList(RenderGraph render class PushGlobalCameraParamPassData { public HDCamera hdCamera; - public int frameCount; public ShaderVariablesGlobal globalCB; public ShaderVariablesXR xrCB; } @@ -237,14 +236,13 @@ void PushGlobalCameraParams(RenderGraph renderGraph, HDCamera hdCamera) using (var builder = renderGraph.AddRenderPass("Push Global Camera Parameters", out var passData)) { passData.hdCamera = hdCamera; - passData.frameCount = m_FrameCount; passData.globalCB = m_ShaderVariablesGlobalCB; passData.xrCB = m_ShaderVariablesXRCB; builder.SetRenderFunc( (PushGlobalCameraParamPassData data, RenderGraphContext context) => { - data.hdCamera.UpdateShaderVariablesGlobalCB(ref data.globalCB, data.frameCount); + data.hdCamera.UpdateShaderVariablesGlobalCB(ref data.globalCB); ConstantBuffer.PushGlobal(context.cmd, data.globalCB, HDShaderIDs._ShaderVariablesGlobal); data.hdCamera.UpdateShaderVariablesXRCB(ref data.xrCB); ConstantBuffer.PushGlobal(context.cmd, data.xrCB, HDShaderIDs._ShaderVariablesXR); @@ -442,7 +440,7 @@ TextureHandle RenderSSR(RenderGraph renderGraph, { result = RenderRayTracedReflections(renderGraph, hdCamera, prepassOutput.depthBuffer, prepassOutput.stencilBuffer, prepassOutput.normalBuffer, prepassOutput.resolvedMotionVectorsBuffer, clearCoatMask, skyTexture, rayCountTexture, - m_FrameCount, m_ShaderVariablesRayTracingCB, transparent); + m_ShaderVariablesRayTracingCB, transparent); } else { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs index d332b056932..e33220b0d3b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.RenderGraph.cs @@ -30,7 +30,7 @@ void ExecuteWithRenderGraph(RenderRequest renderRequest, { scriptableRenderContext = renderContext, commandBuffer = commandBuffer, - currentFrameIndex = GetFrameCount() + currentFrameIndex = m_FrameCount }; m_RenderGraph.Begin(renderGraphParams); @@ -104,7 +104,7 @@ void ExecuteWithRenderGraph(RenderRequest renderRequest, { gpuLightListOutput = BuildGPULightList(m_RenderGraph, hdCamera, m_TileAndClusterData, m_TotalLightCount, ref m_ShaderVariablesLightListCB, prepassOutput.depthBuffer, prepassOutput.stencilBuffer, prepassOutput.gbuffer); - lightingBuffers.ambientOcclusionBuffer = m_AmbientOcclusionSystem.Render(m_RenderGraph, hdCamera, prepassOutput.depthPyramidTexture, prepassOutput.resolvedNormalBuffer, prepassOutput.resolvedMotionVectorsBuffer, m_FrameCount, m_DepthBufferMipChainInfo, m_ShaderVariablesRayTracingCB, rayCountTexture); + lightingBuffers.ambientOcclusionBuffer = m_AmbientOcclusionSystem.Render(m_RenderGraph, hdCamera, prepassOutput.depthPyramidTexture, prepassOutput.resolvedNormalBuffer, prepassOutput.resolvedMotionVectorsBuffer, m_DepthBufferMipChainInfo, m_ShaderVariablesRayTracingCB, rayCountTexture); // Should probably be inside the AO render function but since it's a separate class it's currently not super clean to do. PushFullScreenDebugTexture(m_RenderGraph, lightingBuffers.ambientOcclusionBuffer, FullScreenDebugMode.ScreenSpaceAmbientOcclusion); @@ -135,7 +135,7 @@ void ExecuteWithRenderGraph(RenderRequest renderRequest, case IndirectDiffuseMode.Raytrace: lightingBuffers.ssgiLightingBuffer = RenderRayTracedIndirectDiffuse(m_RenderGraph, hdCamera, prepassOutput.depthBuffer, prepassOutput.stencilBuffer, prepassOutput.normalBuffer, prepassOutput.resolvedMotionVectorsBuffer, m_SkyManager.GetSkyReflection(hdCamera), rayCountTexture, - m_FrameCount, m_ShaderVariablesRayTracingCB); + m_ShaderVariablesRayTracingCB); break; default: lightingBuffers.ssgiLightingBuffer = m_RenderGraph.defaultResources.blackTextureXR; @@ -1121,7 +1121,6 @@ class PreRenderSkyPassData public TextureHandle normalBuffer; public DebugDisplaySettings debugDisplaySettings; public SkyManager skyManager; - public int frameCount; } void PreRenderSky(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle colorBuffer, TextureHandle depthStencilBuffer, TextureHandle normalbuffer) @@ -1141,12 +1140,11 @@ void PreRenderSky(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle colo passData.normalBuffer = builder.WriteTexture(normalbuffer); passData.debugDisplaySettings = m_CurrentDebugDisplaySettings; passData.skyManager = m_SkyManager; - passData.frameCount = m_FrameCount; builder.SetRenderFunc( (PreRenderSkyPassData data, RenderGraphContext context) => { - data.skyManager.PreRenderSky(data.hdCamera, data.sunLight, data.colorBuffer, data.normalBuffer, data.depthStencilBuffer, data.debugDisplaySettings, data.frameCount, context.cmd); + data.skyManager.PreRenderSky(data.hdCamera, data.sunLight, data.colorBuffer, data.normalBuffer, data.depthStencilBuffer, data.debugDisplaySettings, context.cmd); }); } } @@ -1163,7 +1161,6 @@ class RenderSkyPassData public TextureHandle intermediateBuffer; public DebugDisplaySettings debugDisplaySettings; public SkyManager skyManager; - public int frameCount; } void RenderSky(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle colorBuffer, TextureHandle volumetricLighting, TextureHandle depthStencilBuffer, TextureHandle depthTexture) @@ -1185,7 +1182,6 @@ void RenderSky(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle colorBu passData.intermediateBuffer = builder.CreateTransientTexture(colorBuffer); passData.debugDisplaySettings = m_CurrentDebugDisplaySettings; passData.skyManager = m_SkyManager; - passData.frameCount = m_FrameCount; builder.SetRenderFunc( (RenderSkyPassData data, RenderGraphContext context) => @@ -1193,7 +1189,7 @@ void RenderSky(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle colorBu // Necessary to perform dual-source (polychromatic alpha) blending which is not supported by Unity. // We load from the color buffer, perform blending manually, and store to the atmospheric scattering buffer. // Then we perform a copy from the atmospheric scattering buffer back to the color buffer. - data.skyManager.RenderSky(data.hdCamera, data.sunLight, data.colorBuffer, data.depthStencilBuffer, data.debugDisplaySettings, data.frameCount, context.cmd); + data.skyManager.RenderSky(data.hdCamera, data.sunLight, data.colorBuffer, data.depthStencilBuffer, data.debugDisplaySettings, context.cmd); if (Fog.IsFogEnabled(data.hdCamera) || Fog.IsPBRFogEnabled(data.hdCamera)) { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs index 336c4d25615..c7e7afbc0de 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs @@ -226,13 +226,8 @@ internal static Volume GetOrCreateDefaultVolume() // Keep track of the maximum number of XR instanced views int m_MaxViewCount = 1; - // Use to detect frame changes + // Use to detect frame changes (for accurate frame count in editor, consider using hdCamera.GetCameraFrameCount) int m_FrameCount; - float m_LastTime, m_Time; // Do NOT take the 'animateMaterials' setting into account. - - internal int GetFrameCount() { return m_FrameCount; } - internal float GetLastTime() { return m_LastTime; } - internal float GetTime() { return m_Time; } GraphicsFormat GetColorBufferFormat() => (GraphicsFormat)m_Asset.currentPlatformRenderPipelineSettings.colorBufferFormat; @@ -991,7 +986,7 @@ void UpdateGlobalConstantBuffers(HDCamera hdCamera, CommandBuffer cmd) void UpdateShaderVariablesGlobalCB(HDCamera hdCamera, CommandBuffer cmd) { - hdCamera.UpdateShaderVariablesGlobalCB(ref m_ShaderVariablesGlobalCB, m_FrameCount); + hdCamera.UpdateShaderVariablesGlobalCB(ref m_ShaderVariablesGlobalCB); Fog.UpdateShaderVariablesGlobalCB(ref m_ShaderVariablesGlobalCB, hdCamera); UpdateShaderVariablesGlobalSubsurface(ref m_ShaderVariablesGlobalCB, hdCamera); UpdateShaderVariablesGlobalDecal(ref m_ShaderVariablesGlobalCB, hdCamera); @@ -1249,24 +1244,29 @@ protected override void Render(ScriptableRenderContext renderContext, Camera[] c BeginContextRendering(renderContext, cameras); #else BeginFrameRendering(renderContext, cameras); - #endif // Check if we can speed up FrameSettings process by skiping history // or go in detail if debug is activated. Done once for all renderer. m_FrameSettingsHistoryEnabled = FrameSettingsHistory.enabled; - int newCount = Time.frameCount; - bool newFrame = newCount != m_FrameCount; - m_FrameCount = newCount; - - if (newFrame) +#if UNITY_EDITOR + int newCount = m_FrameCount; + foreach (var c in cameras) { - m_LastTime = m_Time; // Only update time once per frame. - m_Time = Time.time; // Does NOT take the 'animateMaterials' setting into account. - m_LastTime = Mathf.Min(m_Time, m_LastTime); // Guard against broken Unity behavior. Should not be necessary. - - m_ProbeCameraCache.ClearCamerasUnusedFor(2, m_FrameCount); + if (c.cameraType != CameraType.Preview) + { + newCount++; + break; + } + } +#else + int newCount = Time.frameCount; +#endif + if (newCount != m_FrameCount) + { + m_FrameCount = newCount; + m_ProbeCameraCache.ClearCamerasUnusedFor(2, Time.frameCount); HDCamera.CleanUnused(); } @@ -1468,7 +1468,7 @@ void AddVisibleProbeVisibleIndexIfUpdateIsRequired(HDProbe probe, int visibleInI // (see m_SkyManager.HasSetValidAmbientProbe in this function). // Also, we need to set the probe as rendered only if we'll actually render it and this won't happen if visibility is not > 0. if (m_FrameCount > 1 && visibility > 0.0f) - probe.SetIsRendered(m_FrameCount); + probe.SetIsRendered(); if (!renderRequestIndicesWhereTheProbeIsVisible.TryGetValue(probe, out var visibleInIndices)) { @@ -1623,7 +1623,7 @@ ref List renderDatas for (int j = 0; j < cameraSettings.Count; ++j) { - var camera = m_ProbeCameraCache.GetOrCreate((viewerTransform, visibleProbe, j), m_FrameCount, CameraType.Reflection); + var camera = m_ProbeCameraCache.GetOrCreate((viewerTransform, visibleProbe, j), Time.frameCount, CameraType.Reflection); var additionalCameraData = camera.GetComponent(); if (additionalCameraData == null) @@ -2081,7 +2081,7 @@ AOVRequestData aovRequest material.Bind(cmd); // Frustum cull density volumes on the CPU. Can be performed as soon as the camera is set up. - DensityVolumeList densityVolumes = PrepareVisibleDensityVolumeList(hdCamera, cmd, hdCamera.time); + DensityVolumeList densityVolumes = PrepareVisibleDensityVolumeList(hdCamera, cmd); // Frustum cull probe volumes on the CPU. Can be performed as soon as the camera is set up. ProbeVolumeList probeVolumes = PrepareVisibleProbeVolumeList(renderContext, hdCamera, cmd); @@ -2108,7 +2108,7 @@ AOVRequestData aovRequest // Caution: We require sun light here as some skies use the sun light to render, it means that UpdateSkyEnvironment must be called after PrepareLightsForGPU. // TODO: Try to arrange code so we can trigger this call earlier and use async compute here to run sky convolution during other passes (once we move convolution shader to compute). if (!m_CurrentDebugDisplaySettings.IsMatcapViewEnabled(hdCamera)) - UpdateSkyEnvironment(hdCamera, renderContext, m_FrameCount, cmd); + UpdateSkyEnvironment(hdCamera, renderContext, cmd); else cmd.SetGlobalTexture(HDShaderIDs._SkyTexture, CoreUtils.magentaCubeTextureArray); @@ -3042,9 +3042,9 @@ static void RenderFullScreenDebug(FullScreenDebugParameters parameters, } } - void UpdateSkyEnvironment(HDCamera hdCamera, ScriptableRenderContext renderContext, int frameIndex, CommandBuffer cmd) + void UpdateSkyEnvironment(HDCamera hdCamera, ScriptableRenderContext renderContext, CommandBuffer cmd) { - m_SkyManager.UpdateEnvironment(hdCamera, renderContext, GetCurrentSunLight(), frameIndex, cmd); + m_SkyManager.UpdateEnvironment(hdCamera, renderContext, GetCurrentSunLight(), cmd); } /// @@ -3668,9 +3668,6 @@ struct PostProcessParameters // After Postprocess public bool useDepthBuffer; - public float time; - public float lastTime; - public int frameCount; public RendererListDesc opaqueAfterPPDesc; public RendererListDesc transparentAfterPPDesc; } @@ -3687,9 +3684,6 @@ PostProcessParameters PreparePostProcess(CullingResults cullResults, HDCamera hd result.blueNoise = m_BlueNoise; result.useDepthBuffer = !hdCamera.IsTAAEnabled() && hdCamera.frameSettings.IsEnabled(FrameSettingsField.ZTestAfterPostProcessTAA); - result.time = m_Time; - result.lastTime = m_LastTime; - result.frameCount = m_FrameCount; result.opaqueAfterPPDesc = CreateOpaqueRendererListDesc(cullResults, hdCamera.camera, HDShaderPassNames.s_ForwardOnlyName, renderQueueRange: HDRenderQueue.k_RenderQueue_AfterPostProcessOpaque); result.transparentAfterPPDesc = CreateTransparentRendererListDesc(cullResults, hdCamera.camera, HDShaderPassNames.s_ForwardOnlyName, renderQueueRange: HDRenderQueue.k_RenderQueue_AfterPostProcessTransparent); @@ -3715,7 +3709,7 @@ static void RenderAfterPostProcess(PostProcessParameters parameters, // The issue is that the only available depth buffer is jittered so pixels would wobble around depth tested edges. // In order to avoid that we decide that objects rendered after Post processes while TAA is active will not benefit from the depth buffer so we disable it. parameters.hdCamera.UpdateAllViewConstants(false); - parameters.hdCamera.UpdateShaderVariablesGlobalCB(ref parameters.globalCB, parameters.frameCount); + parameters.hdCamera.UpdateShaderVariablesGlobalCB(ref parameters.globalCB); UpdateOffscreenRenderingConstants(ref parameters.globalCB, true, 1); ConstantBuffer.PushGlobal(cmd, parameters.globalCB, HDShaderIDs._ShaderVariablesGlobal); @@ -3907,7 +3901,7 @@ public OverrideCameraRendering(CommandBuffer cmd, Camera overrideCamera) overrideHDCamera.Update(overrideHDCamera.frameSettings, hdrp, hdrp.m_MSAASamples, hdrp.m_XRSystem.emptyPass, allocateHistoryBuffers: false); // Reset the reference size as it could have been changed by the override camera hdrp.m_CurrentHDCamera.SetReferenceSize(); - overrideHDCamera.UpdateShaderVariablesGlobalCB(ref hdrp.m_ShaderVariablesGlobalCB, hdrp.m_FrameCount); + overrideHDCamera.UpdateShaderVariablesGlobalCB(ref hdrp.m_ShaderVariablesGlobalCB); ConstantBuffer.PushGlobal(cmd, hdrp.m_ShaderVariablesGlobalCB, HDShaderIDs._ShaderVariablesGlobal); } @@ -3942,7 +3936,7 @@ void IDisposable.Dispose() var hdrp = HDRenderPipeline.currentPipeline; // Reset the reference size as it could have been changed by the override camera hdrp.m_CurrentHDCamera.SetReferenceSize(); - hdrp.m_CurrentHDCamera.UpdateShaderVariablesGlobalCB(ref hdrp.m_ShaderVariablesGlobalCB, hdrp.m_FrameCount); + hdrp.m_CurrentHDCamera.UpdateShaderVariablesGlobalCB(ref hdrp.m_ShaderVariablesGlobalCB); ConstantBuffer.PushGlobal(cmd, hdrp.m_ShaderVariablesGlobalCB, HDShaderIDs._ShaderVariablesGlobal); } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingAmbientOcclusion.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingAmbientOcclusion.RenderGraph.cs index ca0f6d88a72..4253425e7e6 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingAmbientOcclusion.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingAmbientOcclusion.RenderGraph.cs @@ -5,7 +5,7 @@ namespace UnityEngine.Rendering.HighDefinition { partial class HDRaytracingAmbientOcclusion { - public TextureHandle RenderRTAO(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle depthPyramid, TextureHandle normalBuffer, TextureHandle motionVectors, TextureHandle rayCountTexture, int frameCount, ShaderVariablesRaytracing shaderVariablesRaytracing) + public TextureHandle RenderRTAO(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle depthPyramid, TextureHandle normalBuffer, TextureHandle motionVectors, TextureHandle rayCountTexture, ShaderVariablesRaytracing shaderVariablesRaytracing) { var settings = hdCamera.volumeStack.GetComponent(); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingIndirectDiffuse.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingIndirectDiffuse.RenderGraph.cs index b950d096c32..90c2a9aea27 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingIndirectDiffuse.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingIndirectDiffuse.RenderGraph.cs @@ -121,7 +121,7 @@ static RTHandle RequestRayTracedIndirectDiffuseHistoryTexture(HDCamera hdCamera) TextureHandle RenderIndirectDiffusePerformance(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle depthPyramid, TextureHandle stencilBuffer, TextureHandle normalBuffer, TextureHandle motionVectors, TextureHandle rayCountTexture, Texture skyTexture, - int frameCount, ShaderVariablesRaytracing shaderVariablesRaytracing) + ShaderVariablesRaytracing shaderVariablesRaytracing) { // Pointer to the final result TextureHandle rtgiResult; @@ -188,7 +188,7 @@ TextureHandle QualityRTGI(RenderGraph renderGraph, in QualityRTIndirectDiffusePa TextureHandle RenderIndirectDiffuseQuality(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle depthPyramid, TextureHandle stencilBuffer, TextureHandle normalBuffer, TextureHandle motionVectors, TextureHandle rayCountTexture, Texture skyTexture, - int frameCount, ShaderVariablesRaytracing shaderVariablesRaytracing) + ShaderVariablesRaytracing shaderVariablesRaytracing) { var settings = hdCamera.volumeStack.GetComponent(); @@ -269,7 +269,7 @@ TextureHandle DenoiseRTGI(RenderGraph renderGraph, HDCamera hdCamera, TextureHan TextureHandle RenderRayTracedIndirectDiffuse(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle depthPyramid, TextureHandle stencilBuffer, TextureHandle normalBuffer, TextureHandle motionVectors, Texture skyTexture, TextureHandle rayCountTexture, - int frameCount, ShaderVariablesRaytracing shaderVariablesRaytracing) + ShaderVariablesRaytracing shaderVariablesRaytracing) { GlobalIllumination giSettings = hdCamera.volumeStack.GetComponent(); @@ -286,11 +286,11 @@ TextureHandle RenderRayTracedIndirectDiffuse(RenderGraph renderGraph, HDCamera h if (qualityMode) rtreflResult = RenderIndirectDiffuseQuality(renderGraph, hdCamera, depthPyramid, stencilBuffer, normalBuffer, motionVectors, rayCountTexture, skyTexture, - frameCount, shaderVariablesRaytracing); + shaderVariablesRaytracing); else rtreflResult = RenderIndirectDiffusePerformance(renderGraph, hdCamera, depthPyramid, stencilBuffer, normalBuffer, motionVectors, rayCountTexture, skyTexture, - frameCount, shaderVariablesRaytracing); + shaderVariablesRaytracing); return rtreflResult; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingReflection.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingReflection.RenderGraph.cs index 09e092fc288..871139c585e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingReflection.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingReflection.RenderGraph.cs @@ -146,7 +146,7 @@ static RTHandle RequestRayTracedReflectionsHistoryTexture(HDCamera hdCamera) TextureHandle RenderReflectionsPerformance(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle depthPyramid, TextureHandle stencilBuffer, TextureHandle normalBuffer, TextureHandle motionVectors, TextureHandle rayCountTexture, TextureHandle clearCoatTexture, Texture skyTexture, - int frameCount, ShaderVariablesRaytracing shaderVariablesRaytracing, bool transparent) + ShaderVariablesRaytracing shaderVariablesRaytracing, bool transparent) { // Pointer to the final result TextureHandle rtrResult; @@ -237,7 +237,7 @@ TextureHandle QualityRTR(RenderGraph renderGraph, in RTRQualityRenderingParamete TextureHandle RenderReflectionsQuality(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle depthPyramid, TextureHandle stencilBuffer, TextureHandle normalBuffer, TextureHandle motionVectors, TextureHandle rayCountTexture, TextureHandle clearCoatTexture, Texture skyTexture, - int frameCount, ShaderVariablesRaytracing shaderVariablesRaytracing, bool transparent) + ShaderVariablesRaytracing shaderVariablesRaytracing, bool transparent) { TextureHandle rtrResult; @@ -266,7 +266,7 @@ TextureHandle RenderReflectionsQuality(RenderGraph renderGraph, HDCamera hdCamer TextureHandle RenderRayTracedReflections(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle depthPyramid, TextureHandle stencilBuffer, TextureHandle normalBuffer, TextureHandle motionVectors, TextureHandle clearCoatTexture, Texture skyTexture, TextureHandle rayCountTexture, - int frameCount, ShaderVariablesRaytracing shaderVariablesRaytracing, bool transparent) + ShaderVariablesRaytracing shaderVariablesRaytracing, bool transparent) { ScreenSpaceReflection reflectionSettings = hdCamera.volumeStack.GetComponent(); @@ -283,11 +283,11 @@ TextureHandle RenderRayTracedReflections(RenderGraph renderGraph, HDCamera hdCam if (qualityMode) rtreflResult = RenderReflectionsQuality(renderGraph, hdCamera, depthPyramid, stencilBuffer, normalBuffer, motionVectors, rayCountTexture, clearCoatTexture, skyTexture, - frameCount, shaderVariablesRaytracing, transparent); + shaderVariablesRaytracing, transparent); else rtreflResult = RenderReflectionsPerformance(renderGraph, hdCamera, depthPyramid, stencilBuffer, normalBuffer, motionVectors, rayCountTexture, clearCoatTexture, skyTexture, - frameCount, shaderVariablesRaytracing, transparent); + shaderVariablesRaytracing, transparent); return rtreflResult; } 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 1f9e12328a6..7079e7e263f 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 @@ -146,20 +146,15 @@ public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderFo else m_SkyHDRIMaterial.DisableKeyword("USE_FLOWMAP"); + var hdCamera = builtinParams.hdCamera; float rot = -Mathf.Deg2Rad * hdriSky.scrollDirection.value; bool upperHemisphereOnly = hdriSky.upperHemisphereOnly.value || hdriSky.procedural.value; Vector4 flowmapParam = new Vector4(upperHemisphereOnly ? 1.0f : 0.0f, scrollFactor, Mathf.Cos(rot), Mathf.Sin(rot)); m_SkyHDRIMaterial.SetVector(HDShaderIDs._FlowmapParam, flowmapParam); -#if UNITY_EDITOR - // Time.time is not always updated in editor - float time = (float)EditorApplication.timeSinceStartup; -#else - float time = Time.time; -#endif - scrollFactor += hdriSky.scrollSpeed.value * (time - lastTime) * 0.01f; - lastTime = time; + scrollFactor += hdCamera.animateMaterials ? hdriSky.scrollSpeed.value * (hdCamera.time - lastTime) * 0.01f : 0.0f; + lastTime = hdCamera.time; } else m_SkyHDRIMaterial.DisableKeyword("SKY_MOTION"); 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 0f0a680b787..086d6759107 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/SkyManager.cs @@ -692,12 +692,11 @@ public void UpdateEnvironment(HDCamera hdCamera, bool updateAmbientProbe, bool staticSky, SkyAmbientMode ambientMode, - int frameIndex, CommandBuffer cmd) { if (skyContext.IsValid()) { - skyContext.currentUpdateTime += Time.deltaTime; // Consider using HDRenderPipeline.GetTime(). + skyContext.currentUpdateTime += hdCamera.deltaTime; m_BuiltinParameters.hdCamera = hdCamera; m_BuiltinParameters.commandBuffer = cmd; @@ -717,7 +716,7 @@ public void UpdateEnvironment(HDCamera hdCamera, m_BuiltinParameters.viewMatrix = hdCamera.mainViewConstants.viewMatrix; m_BuiltinParameters.screenSize = m_CubemapScreenSize; m_BuiltinParameters.debugSettings = null; // We don't want any debug when updating the environment. - m_BuiltinParameters.frameIndex = frameIndex; + m_BuiltinParameters.frameIndex = (int)hdCamera.GetCameraFrameCount(); m_BuiltinParameters.skySettings = skyContext.skySettings; // When update is not requested and the context is already valid (ie: already computed at least once), @@ -808,11 +807,11 @@ public void UpdateEnvironment(HDCamera hdCamera, } } - public void UpdateEnvironment(HDCamera hdCamera, ScriptableRenderContext renderContext, Light sunLight, int frameIndex, CommandBuffer cmd) + public void UpdateEnvironment(HDCamera hdCamera, ScriptableRenderContext renderContext, Light sunLight, CommandBuffer cmd) { SkyAmbientMode ambientMode = hdCamera.volumeStack.GetComponent().skyAmbientMode.value; - UpdateEnvironment(hdCamera, renderContext, hdCamera.lightingSky, sunLight, m_UpdateRequired, ambientMode == SkyAmbientMode.Dynamic, false, ambientMode, frameIndex, cmd); + UpdateEnvironment(hdCamera, renderContext, hdCamera.lightingSky, sunLight, m_UpdateRequired, ambientMode == SkyAmbientMode.Dynamic, false, ambientMode, cmd); // Preview camera will have a different sun, therefore the hash for the static lighting sky will change and force a recomputation // because we only maintain one static sky. Since we don't care that the static lighting may be a bit different in the preview we never recompute @@ -829,7 +828,7 @@ public void UpdateEnvironment(HDCamera hdCamera, ScriptableRenderContext renderC if ((ambientMode == SkyAmbientMode.Static || forceStaticUpdate) && hdCamera.camera.cameraType != CameraType.Preview) { m_StaticLightingSky.skySettings = staticLightingSky != null ? staticLightingSky.skySettings : null; - UpdateEnvironment(hdCamera, renderContext, m_StaticLightingSky, sunLight, m_StaticSkyUpdateRequired || m_UpdateRequired, true, true, SkyAmbientMode.Static, frameIndex, cmd); + UpdateEnvironment(hdCamera, renderContext, m_StaticLightingSky, sunLight, m_StaticSkyUpdateRequired || m_UpdateRequired, true, true, SkyAmbientMode.Static, cmd); m_StaticSkyUpdateRequired = false; } @@ -841,7 +840,7 @@ public void UpdateEnvironment(HDCamera hdCamera, ScriptableRenderContext renderC cmd.SetGlobalTexture(HDShaderIDs._SkyTexture, reflectionTexture); } - internal void UpdateBuiltinParameters(SkyUpdateContext skyContext, HDCamera hdCamera, Light sunLight, RTHandle colorBuffer, RTHandle depthBuffer, DebugDisplaySettings debugSettings, int frameIndex, CommandBuffer cmd) + internal void UpdateBuiltinParameters(SkyUpdateContext skyContext, HDCamera hdCamera, Light sunLight, RTHandle colorBuffer, RTHandle depthBuffer, DebugDisplaySettings debugSettings, CommandBuffer cmd) { m_BuiltinParameters.hdCamera = hdCamera; m_BuiltinParameters.commandBuffer = cmd; @@ -853,7 +852,7 @@ internal void UpdateBuiltinParameters(SkyUpdateContext skyContext, HDCamera hdCa m_BuiltinParameters.colorBuffer = colorBuffer; m_BuiltinParameters.depthBuffer = depthBuffer; m_BuiltinParameters.debugSettings = debugSettings; - m_BuiltinParameters.frameIndex = frameIndex; + m_BuiltinParameters.frameIndex = (int)hdCamera.GetCameraFrameCount(); m_BuiltinParameters.skySettings = skyContext.skySettings; } @@ -863,7 +862,7 @@ public bool RequiresPreRenderSky(HDCamera hdCamera) return skyContext.IsValid() && skyContext.skyRenderer.RequiresPreRenderSky(m_BuiltinParameters); } - public void PreRenderSky(HDCamera hdCamera, Light sunLight, RTHandle colorBuffer, RTHandle normalBuffer, RTHandle depthBuffer, DebugDisplaySettings debugSettings, int frameIndex, CommandBuffer cmd) + public void PreRenderSky(HDCamera hdCamera, Light sunLight, RTHandle colorBuffer, RTHandle normalBuffer, RTHandle depthBuffer, DebugDisplaySettings debugSettings, CommandBuffer cmd) { var skyContext = hdCamera.visualSky; if (skyContext.IsValid()) @@ -874,7 +873,6 @@ public void PreRenderSky(HDCamera hdCamera, Light sunLight, RTHandle colorBuffer colorBuffer, depthBuffer, debugSettings, - frameIndex, cmd); SkyAmbientMode ambientMode = hdCamera.volumeStack.GetComponent().skyAmbientMode.value; @@ -893,7 +891,7 @@ public void PreRenderSky(HDCamera hdCamera, Light sunLight, RTHandle colorBuffer } } - public void RenderSky(HDCamera hdCamera, Light sunLight, RTHandle colorBuffer, RTHandle depthBuffer, DebugDisplaySettings debugSettings, int frameIndex, CommandBuffer cmd) + public void RenderSky(HDCamera hdCamera, Light sunLight, RTHandle colorBuffer, RTHandle depthBuffer, DebugDisplaySettings debugSettings, CommandBuffer cmd) { var skyContext = hdCamera.visualSky; if (skyContext.IsValid() && hdCamera.clearColorMode == HDAdditionalCameraData.ClearColorMode.Sky) @@ -906,7 +904,6 @@ public void RenderSky(HDCamera hdCamera, Light sunLight, RTHandle colorBuffer, R colorBuffer, depthBuffer, debugSettings, - frameIndex, cmd); SkyAmbientMode ambientMode = hdCamera.volumeStack.GetComponent().skyAmbientMode.value; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Utilities/CameraCache.cs b/com.unity.render-pipelines.high-definition/Runtime/Utilities/CameraCache.cs index 3518e7217b0..94127ac2d81 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Utilities/CameraCache.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Utilities/CameraCache.cs @@ -41,7 +41,7 @@ public Camera GetOrCreate(K key, int frameCount, CameraType cameraType = CameraT } else { - camera.lastFrame = Time.frameCount; + camera.lastFrame = frameCount; m_Cache[key] = camera; } return camera.camera; @@ -65,7 +65,7 @@ public void ClearCamerasUnusedFor(int frameWindow, int frameCount) { if (m_Cache.TryGetValue(key, out var value)) { - if ((frameCount - value.lastFrame) > frameWindow) + if (Math.Abs(frameCount - value.lastFrame) > frameWindow) { if (value.camera != null) { From 9687c9cac9c59401dd45541f8c951d083028d398 Mon Sep 17 00:00:00 2001 From: alex-vazquez <76204843+alex-vazquez@users.noreply.github.com> Date: Fri, 5 Feb 2021 01:18:59 +0100 Subject: [PATCH 3/6] Fixed the display name of a Volume Parameter when is defined the attribute InspectorName #3348 --- com.unity.render-pipelines.core/CHANGELOG.md | 1 + .../Editor/Volume/VolumeComponentEditor.cs | 53 ++++++++++++------- .../Editor/Volumes/VolumeComponentTests.cs | 50 +++++++++++++++++ 3 files changed, 85 insertions(+), 19 deletions(-) diff --git a/com.unity.render-pipelines.core/CHANGELOG.md b/com.unity.render-pipelines.core/CHANGELOG.md index 3452762dd3d..8164b984d27 100644 --- a/com.unity.render-pipelines.core/CHANGELOG.md +++ b/com.unity.render-pipelines.core/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed the selection of the Additional properties from ALL/NONE when the option "Show additional properties" is disabled - Fixed ACES tonemaping for Nintendo Switch by forcing some shader color conversion functions to full float precision. - Fixed missing warning UI about Projector component being unsupported (case 1300327). +- Fixed the display name of a Volume Parameter when is defined the attribute InspectorName ## [10.2.0] - 2020-10-19 diff --git a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentEditor.cs b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentEditor.cs index 26d41bf4fab..12d4c41bb92 100644 --- a/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentEditor.cs +++ b/com.unity.render-pipelines.core/Editor/Volume/VolumeComponentEditor.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; +using UnityEditor.AnimatedValues; using UnityEngine; using UnityEngine.Assertions; using UnityEngine.Rendering; @@ -294,7 +295,7 @@ public virtual void OnInspectorGUI() // Display every field as-is foreach (var parameter in m_Parameters) { - if (parameter.displayName.text != "") + if (!string.IsNullOrEmpty(parameter.displayName.text)) PropertyField(parameter.param, parameter.displayName); else PropertyField(parameter.param); @@ -401,36 +402,50 @@ protected void PropertyField(SerializedDataParameter property) } /// - /// Draws a given in the editor using a custom label - /// and tooltip. + /// Handles unity built-in decorators (Space, Header, Tooltips, ...) from attributes /// - /// The property to draw in the editor. - /// A custom label and/or tooltip. - protected void PropertyField(SerializedDataParameter property, GUIContent title) + /// The property to obtain the attributes and handle the decorators + /// A custom label and/or tooltip that might be updated by and/or by + void HandleDecorators(SerializedDataParameter property, GUIContent title) { - // Handle unity built-in decorators (Space, Header, Tooltip etc) foreach (var attr in property.attributes) { - if (attr is PropertyAttribute) + if (!(attr is PropertyAttribute)) + continue; + + switch (attr) { - if (attr is SpaceAttribute) - { - EditorGUILayout.GetControlRect(false, (attr as SpaceAttribute).height); - } - else if (attr is HeaderAttribute) + case SpaceAttribute spaceAttribute: + EditorGUILayout.GetControlRect(false, spaceAttribute.height); + break; + case HeaderAttribute headerAttribute: { - var rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight); - rect.y += 0f; - rect = EditorGUI.IndentedRect(rect); - EditorGUI.LabelField(rect, (attr as HeaderAttribute).header, EditorStyles.miniLabel); + var rect = EditorGUI.IndentedRect(EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight)); + EditorGUI.LabelField(rect, headerAttribute.header, EditorStyles.miniLabel); + break; } - else if (attr is TooltipAttribute) + case TooltipAttribute tooltipAttribute: { if (string.IsNullOrEmpty(title.tooltip)) - title.tooltip = (attr as TooltipAttribute).tooltip; + title.tooltip = tooltipAttribute.tooltip; + break; } + case InspectorNameAttribute inspectorNameAttribute: + title.text = inspectorNameAttribute.displayName; + break; } } + } + + /// + /// Draws a given in the editor using a custom label + /// and tooltip. + /// + /// The property to draw in the editor. + /// A custom label and/or tooltip. + protected void PropertyField(SerializedDataParameter property, GUIContent title) + { + HandleDecorators(property, title); // Custom parameter drawer VolumeParameterDrawer drawer; diff --git a/com.unity.render-pipelines.core/Tests/Editor/Volumes/VolumeComponentTests.cs b/com.unity.render-pipelines.core/Tests/Editor/Volumes/VolumeComponentTests.cs index 78dd955dd1a..cbb097c39d2 100644 --- a/com.unity.render-pipelines.core/Tests/Editor/Volumes/VolumeComponentTests.cs +++ b/com.unity.render-pipelines.core/Tests/Editor/Volumes/VolumeComponentTests.cs @@ -105,5 +105,55 @@ public string[] AdditionalProperties(Type volumeComponentType) return fields; } + + #region Decorators Handling Test + + class VolumeComponentDecorators : VolumeComponent + { + [Tooltip("Increase to make the noise texture appear bigger and less")] + public FloatParameter _NoiseTileSize = new FloatParameter(25.0f); + + [InspectorName("Color")] + public ColorParameter _FogColor = new ColorParameter(Color.grey); + + [InspectorName("Size and occurrence"), Tooltip("Increase to make patches SMALLER, and frequent")] + public ClampedFloatParameter _HighNoiseSpaceFreq = new ClampedFloatParameter(0.1f, 0.1f, 1f); + } + + readonly (string displayName, string tooltip)[] k_ExpectedResults = + { + (string.Empty, "Increase to make the noise texture appear bigger and less"), + ("Color", string.Empty), + ("Size and occurrence", "Increase to make patches SMALLER, and frequent") + }; + + [Test] + public void TestHandleParameterDecorators() + { + var component = ScriptableObject.CreateInstance(); + var editor = (VolumeComponentEditor)Activator.CreateInstance(typeof(VolumeComponentEditor)); + editor.Invoke("Init", component, null); + + var parameters = + editor.GetField("m_Parameters") as List<(GUIContent displayName, int displayOrder, + SerializedDataParameter param)>; + + Assert.True(parameters != null && parameters.Count() == k_ExpectedResults.Count()); + + for (int i = 0; i < k_ExpectedResults.Count(); ++i) + { + var property = parameters[i].param; + var title = new GUIContent(parameters[i].displayName); + + editor.Invoke("HandleDecorators", property, title); + + Assert.True(k_ExpectedResults[i].displayName == title.text); + Assert.True(k_ExpectedResults[i].tooltip == title.tooltip); + } + + ScriptableObject.DestroyImmediate(component); + } + + #endregion } } From cc61473055704de80aebe7457a858f6a9a4c84a7 Mon Sep 17 00:00:00 2001 From: anisunity <42026998+anisunity@users.noreply.github.com> Date: Fri, 5 Feb 2021 10:33:38 +0100 Subject: [PATCH 4/6] Added the default quality settings to the HDRP asset for RTAO, RTR and RTGI (case 1304370). #3362 --- .../CHANGELOG.md | 1 + .../RenderPipeline/HDRenderPipelineUI.Skin.cs | 31 +++ .../RenderPipeline/HDRenderPipelineUI.cs | 240 +++++++++++++++--- .../SerializedLightingQualitySettings.cs | 52 ++++ .../GlobalLightingQualitySettings.cs | 2 - 5 files changed, 288 insertions(+), 38 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 726bb4bc886..9783e0f8f85 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - New function in GeometryTools.hlsl to calculate triangle edge and full triangle culling. - Added support for the PlayStation 5 platform. - Added support the XboxSeries platform. +- Added the default quality settings to the HDRP asset for RTAO, RTR and RTGI (case 1304370). ### Fixed - Fixed probe volumes debug views. diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs index 405e2e65e37..aee706e596e 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.Skin.cs @@ -62,6 +62,7 @@ public class GeneralSection public static readonly GUIContent dofPhysicallyBased = EditorGUIUtility.TrTextContent("Physically Based"); public static readonly GUIContent maxSamplesQuality = EditorGUIUtility.TrTextContent("Max Samples"); + // SSAO public static readonly GUIContent SSAOQualitySettingSubTitle = EditorGUIUtility.TrTextContent("Screen Space Ambient Occlusion"); public static readonly GUIContent AOStepCount = EditorGUIUtility.TrTextContent("Step Count"); public static readonly GUIContent AOFullRes = EditorGUIUtility.TrTextContent("Full Resolution"); @@ -69,12 +70,42 @@ public class GeneralSection public static readonly GUIContent AODirectionCount = EditorGUIUtility.TrTextContent("Direction Count"); public static readonly GUIContent AOBilateralUpsample = EditorGUIUtility.TrTextContent("Bilateral Upsample"); + // RTAO + public static readonly GUIContent RTAOQualitySettingSubTitle = EditorGUIUtility.TrTextContent("Ray Traced Ambient Occlusion"); + public static readonly GUIContent RTAORayLength = EditorGUIUtility.TrTextContent("Max Ray Length"); + public static readonly GUIContent RTAOSampleCount = EditorGUIUtility.TrTextContent("Sample Count"); + public static readonly GUIContent RTAODenoise = EditorGUIUtility.TrTextContent("Denoise"); + public static readonly GUIContent RTAODenoiserRadius = EditorGUIUtility.TrTextContent("Denoiser Radius"); + public static readonly GUIContent contactShadowsSettingsSubTitle = EditorGUIUtility.TrTextContent("Contact Shadows"); public static readonly GUIContent contactShadowsSampleCount = EditorGUIUtility.TrTextContent("Sample Count"); public static readonly GUIContent SSRSettingsSubTitle = EditorGUIUtility.TrTextContent("Screen Space Reflection"); public static readonly GUIContent SSRMaxRaySteps = EditorGUIUtility.TrTextContent("Max Ray Steps"); + // RTR + public static readonly GUIContent RTRSettingsSubTitle = EditorGUIUtility.TrTextContent("Ray Traced Reflections (Performance)"); + public static readonly GUIContent RTRMinSmoothness = EditorGUIUtility.TrTextContent("Minimum Smoothness"); + public static readonly GUIContent RTRSmoothnessFadeStart = EditorGUIUtility.TrTextContent("Smoothness Fade Start"); + public static readonly GUIContent RTRRayLength = EditorGUIUtility.TrTextContent("Max Ray Length"); + public static readonly GUIContent RTRClampValue = EditorGUIUtility.TrTextContent("Clamp Value"); + public static readonly GUIContent RTRFullResolution = EditorGUIUtility.TrTextContent("Full Resolution"); + public static readonly GUIContent RTRDenoise = EditorGUIUtility.TrTextContent("Denoise"); + public static readonly GUIContent RTRDenoiserRadius = EditorGUIUtility.TrTextContent("Denoiser Radius"); + public static readonly GUIContent RTRSmoothDenoising = EditorGUIUtility.TrTextContent("Affect Smooth Surfaces"); + + // RTGI + public static readonly GUIContent RTGISettingsSubTitle = EditorGUIUtility.TrTextContent("Ray Traced Global Illumination (Performance)"); + public static readonly GUIContent RTGIRayLength = EditorGUIUtility.TrTextContent("Max Ray Length"); + public static readonly GUIContent RTGIClampValue = EditorGUIUtility.TrTextContent("Clamp Value"); + public static readonly GUIContent RTGIFullResolution = EditorGUIUtility.TrTextContent("Full Resolution"); + public static readonly GUIContent RTGIUpScaleRadius = EditorGUIUtility.TrTextContent("Upscale Radius"); + public static readonly GUIContent RTGIDenoise = EditorGUIUtility.TrTextContent("Denoise"); + public static readonly GUIContent RTGIHalfResDenoise = EditorGUIUtility.TrTextContent("Half Resolution Denoiser"); + public static readonly GUIContent RTGIDenoiserRadius = EditorGUIUtility.TrTextContent("Denoiser Radius"); + public static readonly GUIContent RTGISecondDenoise = EditorGUIUtility.TrTextContent("Second Denoiser Pass"); + + // Fog public static readonly GUIContent FogSettingsSubTitle = EditorGUIUtility.TrTextContent("Volumetric Fog"); public static readonly GUIContent FogSettingsBudget = EditorGUIUtility.TrTextContent("Volumetric Fog Budget"); public static readonly GUIContent FogSettingsRatio = EditorGUIUtility.TrTextContent("Volumetric Fog Ratio"); diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs index 5f63412e448..397a63df1a1 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -41,7 +41,12 @@ enum Expandable LightingQuality = 1 << 25, SSRQuality = 1 << 26, VirtualTexturing = 1 << 27, - FogQuality = 1 << 28 + FogQuality = 1 << 28, + Volumetric = 1 << 29, + ProbeVolume = 1 << 30, + RTAOQuality = 1 << 31, + RTRQuality = 1 << 32, + RTGIQuality = 1 << 33 } static readonly ExpandedState k_ExpandedState = new ExpandedState(Expandable.CameraFrameSettings | Expandable.General, "HDRP"); @@ -88,9 +93,12 @@ static HDRenderPipelineUI() ), CED.FoldoutGroup(Styles.lightingQualitySettings, Expandable.LightingQuality, k_ExpandedState, CED.FoldoutGroup(Styles.SSAOQualitySettingSubTitle, Expandable.SSAOQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionSSAOQualitySettings), + CED.FoldoutGroup(Styles.RTAOQualitySettingSubTitle, Expandable.RTAOQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionRTAOQualitySettings), CED.FoldoutGroup(Styles.contactShadowsSettingsSubTitle, Expandable.ContactShadowQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionContactShadowQualitySettings), CED.FoldoutGroup(Styles.SSRSettingsSubTitle, Expandable.SSRQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionSSRQualitySettings), - CED.FoldoutGroup(Styles.FogSettingsSubTitle, Expandable.FogQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionFogQualitySettings) + CED.FoldoutGroup(Styles.RTRSettingsSubTitle, Expandable.RTRQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionRTRQualitySettings), + CED.FoldoutGroup(Styles.FogSettingsSubTitle, Expandable.FogQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionFogQualitySettings), + CED.FoldoutGroup(Styles.RTGISettingsSubTitle, Expandable.RTGIQuality, k_ExpandedState, FoldoutOption.Indent | FoldoutOption.SubFoldout | FoldoutOption.NoSpaceAtEnd, Drawer_SectionRTGIQualitySettings) ), CED.FoldoutGroup(Styles.materialSectionTitle, Expandable.Material, k_ExpandedState, Drawer_SectionMaterialUnsorted), CED.FoldoutGroup(Styles.postProcessSectionTitle, Expandable.PostProcess, k_ExpandedState, Drawer_SectionPostProcessSettings), @@ -655,6 +663,13 @@ static void Drawer_SectionDepthOfFieldQualitySettings(SerializedHDRenderPipeline static private bool m_ShowMotionBlurMediumQualitySection = false; static private bool m_ShowMotionBlurHighQualitySection = false; + static void DrawMotionBlurQualitySetting(SerializedHDRenderPipelineAsset serialized, int tier) + { + ++EditorGUI.indentLevel; + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.MotionBlurSampleCount.GetArrayElementAtIndex(tier), Styles.sampleCountQuality); + --EditorGUI.indentLevel; + } + static void Drawer_SectionMotionBlurQualitySettings(SerializedHDRenderPipelineAsset serialized, Editor owner) { m_ShowMotionBlurLowQualitySection = EditorGUILayout.Foldout(m_ShowMotionBlurLowQualitySection, Styles.lowQualityContent, true); @@ -662,21 +677,21 @@ static void Drawer_SectionMotionBlurQualitySettings(SerializedHDRenderPipelineAs if (m_ShowMotionBlurLowQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.Low; - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.MotionBlurSampleCount.GetArrayElementAtIndex(quality), Styles.sampleCountQuality); + DrawMotionBlurQualitySetting(serialized, quality); } m_ShowMotionBlurMediumQualitySection = EditorGUILayout.Foldout(m_ShowMotionBlurMediumQualitySection, Styles.mediumQualityContent, true); CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowMotionBlurMediumQualitySection); if (m_ShowMotionBlurMediumQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.Medium; - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.MotionBlurSampleCount.GetArrayElementAtIndex(quality), Styles.sampleCountQuality); + DrawMotionBlurQualitySetting(serialized, quality); } m_ShowMotionBlurHighQualitySection = EditorGUILayout.Foldout(m_ShowMotionBlurHighQualitySection, Styles.highQualityContent, true); CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowMotionBlurHighQualitySection); if (m_ShowMotionBlurHighQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.High; - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.MotionBlurSampleCount.GetArrayElementAtIndex(quality), Styles.sampleCountQuality); + DrawMotionBlurQualitySetting(serialized, quality); } } @@ -686,9 +701,11 @@ static void Drawer_SectionMotionBlurQualitySettings(SerializedHDRenderPipelineAs static void DrawBloomQualitySetting(SerializedHDRenderPipelineAsset serialized, int tier) { + ++EditorGUI.indentLevel; EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.BloomRes.GetArrayElementAtIndex(tier), Styles.resolutionQuality); EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.BloomHighPrefilteringQuality.GetArrayElementAtIndex(tier), Styles.highQualityPrefiltering); EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.BloomHighFilteringQuality.GetArrayElementAtIndex(tier), Styles.highQualityFiltering); + --EditorGUI.indentLevel; } static void Drawer_SectionBloomQualitySettings(SerializedHDRenderPipelineAsset serialized, Editor owner) @@ -720,6 +737,13 @@ static void Drawer_SectionBloomQualitySettings(SerializedHDRenderPipelineAsset s static private bool m_ShowChromaticAberrationMediumQualitySection = false; static private bool m_ShowChromaticAberrationHighQualitySection = false; + static void DrawChromaticAberrationQualitySetting(SerializedHDRenderPipelineAsset serialized, int tier) + { + ++EditorGUI.indentLevel; + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.ChromaticAbMaxSamples.GetArrayElementAtIndex(tier), Styles.maxSamplesQuality); + --EditorGUI.indentLevel; + } + static void Drawer_SectionChromaticAberrationQualitySettings(SerializedHDRenderPipelineAsset serialized, Editor owner) { m_ShowChromaticAberrationLowQualitySection = EditorGUILayout.Foldout(m_ShowChromaticAberrationLowQualitySection, Styles.lowQualityContent, true); @@ -727,35 +751,43 @@ static void Drawer_SectionChromaticAberrationQualitySettings(SerializedHDRenderP if (m_ShowChromaticAberrationLowQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.Low; - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.ChromaticAbMaxSamples.GetArrayElementAtIndex(quality), Styles.maxSamplesQuality); + DrawChromaticAberrationQualitySetting(serialized, quality); } m_ShowChromaticAberrationMediumQualitySection = EditorGUILayout.Foldout(m_ShowChromaticAberrationMediumQualitySection, Styles.mediumQualityContent, true); CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowChromaticAberrationMediumQualitySection); if (m_ShowChromaticAberrationMediumQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.Medium; - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.ChromaticAbMaxSamples.GetArrayElementAtIndex(quality), Styles.maxSamplesQuality); + DrawChromaticAberrationQualitySetting(serialized, quality); } m_ShowChromaticAberrationHighQualitySection = EditorGUILayout.Foldout(m_ShowChromaticAberrationHighQualitySection, Styles.highQualityContent, true); CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowChromaticAberrationHighQualitySection); if (m_ShowChromaticAberrationHighQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.High; - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.postProcessQualitySettings.ChromaticAbMaxSamples.GetArrayElementAtIndex(quality), Styles.maxSamplesQuality); + DrawChromaticAberrationQualitySetting(serialized, quality); } } - static private bool m_ShowAOLowQualitySection = false; - static private bool m_ShowAOMediumQualitySection = false; - static private bool m_ShowAOHighQualitySection = false; - static void DrawAOQualitySetting(SerializedHDRenderPipelineAsset serialized, int tier) { + ++EditorGUI.indentLevel; EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.AOStepCount.GetArrayElementAtIndex(tier), Styles.AOStepCount); EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.AOFullRes.GetArrayElementAtIndex(tier), Styles.AOFullRes); EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.AOMaximumRadiusPixels.GetArrayElementAtIndex(tier), Styles.AOMaxRadiusInPixels); EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.AODirectionCount.GetArrayElementAtIndex(tier), Styles.AODirectionCount); EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.AOBilateralUpsample.GetArrayElementAtIndex(tier), Styles.AOBilateralUpsample); + --EditorGUI.indentLevel; + } + + static void DrawRTAOQualitySetting(SerializedHDRenderPipelineAsset serialized, int tier) + { + ++EditorGUI.indentLevel; + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTAORayLength.GetArrayElementAtIndex(tier), Styles.RTAORayLength); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTAOSampleCount.GetArrayElementAtIndex(tier), Styles.RTAOSampleCount); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTAODenoise.GetArrayElementAtIndex(tier), Styles.RTAODenoise); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTAODenoiserRadius.GetArrayElementAtIndex(tier), Styles.RTAODenoiserRadius); + --EditorGUI.indentLevel; } static void CheckFoldoutClick(Rect foldoutRect, ref bool foldoutFlag) @@ -770,6 +802,10 @@ static void CheckFoldoutClick(Rect foldoutRect, ref bool foldoutFlag) } } + static private bool m_ShowAOLowQualitySection = false; + static private bool m_ShowAOMediumQualitySection = false; + static private bool m_ShowAOHighQualitySection = false; + static void Drawer_SectionSSAOQualitySettings(SerializedHDRenderPipelineAsset serialized, Editor owner) { m_ShowAOLowQualitySection = EditorGUILayout.Foldout(m_ShowAOLowQualitySection, Styles.lowQualityContent); @@ -797,10 +833,48 @@ static void Drawer_SectionSSAOQualitySettings(SerializedHDRenderPipelineAsset se } } + static private bool m_ShowRTAOLowQualitySection = false; + static private bool m_ShowRTAOMediumQualitySection = false; + static private bool m_ShowRTAOHighQualitySection = false; + + static void Drawer_SectionRTAOQualitySettings(SerializedHDRenderPipelineAsset serialized, Editor owner) + { + m_ShowRTAOLowQualitySection = EditorGUILayout.Foldout(m_ShowRTAOLowQualitySection, Styles.lowQualityContent); + CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowRTAOLowQualitySection); + if (m_ShowRTAOLowQualitySection) + { + int quality = (int)ScalableSettingLevelParameter.Level.Low; + DrawRTAOQualitySetting(serialized, quality); + } + + m_ShowRTAOMediumQualitySection = EditorGUILayout.Foldout(m_ShowRTAOMediumQualitySection, Styles.mediumQualityContent); + CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowRTAOMediumQualitySection); + if (m_ShowRTAOMediumQualitySection) + { + int quality = (int)ScalableSettingLevelParameter.Level.Medium; + DrawRTAOQualitySetting(serialized, quality); + } + + m_ShowRTAOHighQualitySection = EditorGUILayout.Foldout(m_ShowRTAOHighQualitySection, Styles.highQualityContent); + CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowRTAOHighQualitySection); + if (m_ShowRTAOHighQualitySection) + { + int quality = (int)ScalableSettingLevelParameter.Level.High; + DrawRTAOQualitySetting(serialized, quality); + } + } + static private bool m_ShowContactShadowLowQualitySection = false; static private bool m_ShowContactShadowMediumQualitySection = false; static private bool m_ShowContactShadowHighQualitySection = false; + static void DrawContactShadowQualitySetting(SerializedHDRenderPipelineAsset serialized, int tier) + { + ++EditorGUI.indentLevel; + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.ContactShadowSampleCount.GetArrayElementAtIndex(tier), Styles.contactShadowsSampleCount); + --EditorGUI.indentLevel; + } + static void Drawer_SectionContactShadowQualitySettings(SerializedHDRenderPipelineAsset serialized, Editor owner) { m_ShowContactShadowLowQualitySection = EditorGUILayout.Foldout(m_ShowContactShadowLowQualitySection, Styles.lowQualityContent); @@ -808,7 +882,7 @@ static void Drawer_SectionContactShadowQualitySettings(SerializedHDRenderPipelin if (m_ShowContactShadowLowQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.Low; - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.ContactShadowSampleCount.GetArrayElementAtIndex(quality), Styles.contactShadowsSampleCount); + DrawContactShadowQualitySetting(serialized, quality); } m_ShowContactShadowMediumQualitySection = EditorGUILayout.Foldout(m_ShowContactShadowMediumQualitySection, Styles.mediumQualityContent); @@ -816,7 +890,7 @@ static void Drawer_SectionContactShadowQualitySettings(SerializedHDRenderPipelin if (m_ShowContactShadowMediumQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.Medium; - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.ContactShadowSampleCount.GetArrayElementAtIndex(quality), Styles.contactShadowsSampleCount); + DrawContactShadowQualitySetting(serialized, quality); } m_ShowContactShadowHighQualitySection = EditorGUILayout.Foldout(m_ShowContactShadowHighQualitySection, Styles.highQualityContent); @@ -824,7 +898,7 @@ static void Drawer_SectionContactShadowQualitySettings(SerializedHDRenderPipelin if (m_ShowContactShadowHighQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.High; - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.ContactShadowSampleCount.GetArrayElementAtIndex(quality), Styles.contactShadowsSampleCount); + DrawContactShadowQualitySetting(serialized, quality); } } @@ -832,6 +906,13 @@ static void Drawer_SectionContactShadowQualitySettings(SerializedHDRenderPipelin static private bool m_ShowSSRMediumQualitySection = false; static private bool m_ShowSSRHighQualitySection = false; + static void DrawSSRQualitySetting(SerializedHDRenderPipelineAsset serialized, int tier) + { + ++EditorGUI.indentLevel; + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.SSRMaxRaySteps.GetArrayElementAtIndex(tier), Styles.contactShadowsSampleCount); + --EditorGUI.indentLevel; + } + static void Drawer_SectionSSRQualitySettings(SerializedHDRenderPipelineAsset serialized, Editor owner) { m_ShowSSRLowQualitySection = EditorGUILayout.Foldout(m_ShowSSRLowQualitySection, Styles.lowQualityContent); @@ -839,7 +920,7 @@ static void Drawer_SectionSSRQualitySettings(SerializedHDRenderPipelineAsset ser if (m_ShowSSRLowQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.Low; - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.SSRMaxRaySteps.GetArrayElementAtIndex(quality), Styles.contactShadowsSampleCount); + DrawSSRQualitySetting(serialized, quality); } m_ShowSSRMediumQualitySection = EditorGUILayout.Foldout(m_ShowSSRMediumQualitySection, Styles.mediumQualityContent); @@ -847,7 +928,7 @@ static void Drawer_SectionSSRQualitySettings(SerializedHDRenderPipelineAsset ser if (m_ShowSSRMediumQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.Medium; - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.SSRMaxRaySteps.GetArrayElementAtIndex(quality), Styles.contactShadowsSampleCount); + DrawSSRQualitySetting(serialized, quality); } m_ShowSSRHighQualitySection = EditorGUILayout.Foldout(m_ShowSSRHighQualitySection, Styles.highQualityContent); @@ -855,7 +936,52 @@ static void Drawer_SectionSSRQualitySettings(SerializedHDRenderPipelineAsset ser if (m_ShowSSRHighQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.High; - EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.SSRMaxRaySteps.GetArrayElementAtIndex(quality), Styles.contactShadowsSampleCount); + DrawSSRQualitySetting(serialized, quality); + } + } + + static private bool m_ShowRTRLowQualitySection = false; + static private bool m_ShowRTRMediumQualitySection = false; + static private bool m_ShowRTRHighQualitySection = false; + + static void DrawRTRQualitySetting(SerializedHDRenderPipelineAsset serialized, int tier) + { + ++EditorGUI.indentLevel; + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTRMinSmoothness.GetArrayElementAtIndex(tier), Styles.RTRMinSmoothness); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTRSmoothnessFadeStart.GetArrayElementAtIndex(tier), Styles.RTRSmoothnessFadeStart); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTRRayLength.GetArrayElementAtIndex(tier), Styles.RTRRayLength); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTRClampValue.GetArrayElementAtIndex(tier), Styles.RTRClampValue); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTRFullResolution.GetArrayElementAtIndex(tier), Styles.RTRFullResolution); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTRDenoise.GetArrayElementAtIndex(tier), Styles.RTRDenoise); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTRDenoiserRadius.GetArrayElementAtIndex(tier), Styles.RTRDenoiserRadius); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTRSmoothDenoising.GetArrayElementAtIndex(tier), Styles.RTRSmoothDenoising); + --EditorGUI.indentLevel; + } + + static void Drawer_SectionRTRQualitySettings(SerializedHDRenderPipelineAsset serialized, Editor owner) + { + m_ShowRTRLowQualitySection = EditorGUILayout.Foldout(m_ShowRTRLowQualitySection, Styles.lowQualityContent); + CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowRTRLowQualitySection); + if (m_ShowRTRLowQualitySection) + { + int quality = (int)ScalableSettingLevelParameter.Level.Low; + DrawRTRQualitySetting(serialized, quality); + } + + m_ShowRTRMediumQualitySection = EditorGUILayout.Foldout(m_ShowRTRMediumQualitySection, Styles.mediumQualityContent); + CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowRTRMediumQualitySection); + if (m_ShowRTRMediumQualitySection) + { + int quality = (int)ScalableSettingLevelParameter.Level.Medium; + DrawRTRQualitySetting(serialized, quality); + } + + m_ShowRTRHighQualitySection = EditorGUILayout.Foldout(m_ShowRTRHighQualitySection, Styles.highQualityContent); + CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowRTRHighQualitySection); + if (m_ShowRTRHighQualitySection) + { + int quality = (int)ScalableSettingLevelParameter.Level.High; + DrawRTRQualitySetting(serialized, quality); } } @@ -863,6 +989,18 @@ static void Drawer_SectionSSRQualitySettings(SerializedHDRenderPipelineAsset ser static private bool m_ShowFogMediumQualitySection = false; static private bool m_ShowFogHighQualitySection = false; + static void DrawVolumetricFogQualitySetting(SerializedHDRenderPipelineAsset serialized, int tier) + { + ++EditorGUI.indentLevel; + var budget = serialized.renderPipelineSettings.lightingQualitySettings.VolumetricFogBudget.GetArrayElementAtIndex(tier); + EditorGUILayout.PropertyField(budget, Styles.FogSettingsBudget); + budget.floatValue = Mathf.Clamp(budget.floatValue, 0.0f, 1.0f); + var ratio = serialized.renderPipelineSettings.lightingQualitySettings.VolumetricFogRatio.GetArrayElementAtIndex(tier); + EditorGUILayout.PropertyField(ratio, Styles.FogSettingsRatio); + ratio.floatValue = Mathf.Clamp(ratio.floatValue, 0.0f, 1.0f); + --EditorGUI.indentLevel; + } + static void Drawer_SectionFogQualitySettings(SerializedHDRenderPipelineAsset serialized, Editor owner) { m_ShowFogLowQualitySection = EditorGUILayout.Foldout(m_ShowFogLowQualitySection, Styles.lowQualityContent); @@ -870,12 +1008,7 @@ static void Drawer_SectionFogQualitySettings(SerializedHDRenderPipelineAsset ser if (m_ShowFogLowQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.Low; - var budget = serialized.renderPipelineSettings.lightingQualitySettings.VolumetricFogBudget.GetArrayElementAtIndex(quality); - EditorGUILayout.PropertyField(budget, Styles.FogSettingsBudget); - budget.floatValue = Mathf.Clamp(budget.floatValue, 0.0f, 1.0f); - var ratio = serialized.renderPipelineSettings.lightingQualitySettings.VolumetricFogRatio.GetArrayElementAtIndex(quality); - EditorGUILayout.PropertyField(ratio, Styles.FogSettingsRatio); - ratio.floatValue = Mathf.Clamp(ratio.floatValue, 0.0f, 1.0f); + DrawVolumetricFogQualitySetting(serialized, quality); } m_ShowFogMediumQualitySection = EditorGUILayout.Foldout(m_ShowFogMediumQualitySection, Styles.mediumQualityContent); @@ -883,12 +1016,7 @@ static void Drawer_SectionFogQualitySettings(SerializedHDRenderPipelineAsset ser if (m_ShowFogMediumQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.Medium; - var budget = serialized.renderPipelineSettings.lightingQualitySettings.VolumetricFogBudget.GetArrayElementAtIndex(quality); - EditorGUILayout.PropertyField(budget, Styles.FogSettingsBudget); - budget.floatValue = Mathf.Clamp(budget.floatValue, 0.0f, 1.0f); - var ratio = serialized.renderPipelineSettings.lightingQualitySettings.VolumetricFogRatio.GetArrayElementAtIndex(quality); - EditorGUILayout.PropertyField(ratio, Styles.FogSettingsRatio); - ratio.floatValue = Mathf.Clamp(ratio.floatValue, 0.0f, 1.0f); + DrawVolumetricFogQualitySetting(serialized, quality); } m_ShowFogHighQualitySection = EditorGUILayout.Foldout(m_ShowFogHighQualitySection, Styles.highQualityContent); @@ -896,12 +1024,52 @@ static void Drawer_SectionFogQualitySettings(SerializedHDRenderPipelineAsset ser if (m_ShowFogHighQualitySection) { int quality = (int)ScalableSettingLevelParameter.Level.High; - var budget = serialized.renderPipelineSettings.lightingQualitySettings.VolumetricFogBudget.GetArrayElementAtIndex(quality); - EditorGUILayout.PropertyField(budget, Styles.FogSettingsBudget); - budget.floatValue = Mathf.Clamp(budget.floatValue, 0.0f, 1.0f); - var ratio = serialized.renderPipelineSettings.lightingQualitySettings.VolumetricFogRatio.GetArrayElementAtIndex(quality); - EditorGUILayout.PropertyField(ratio, Styles.FogSettingsRatio); - ratio.floatValue = Mathf.Clamp(ratio.floatValue, 0.0f, 1.0f); + DrawVolumetricFogQualitySetting(serialized, quality); + } + } + + static private bool m_ShowRTGILowQualitySection = false; + static private bool m_ShowRTGIMediumQualitySection = false; + static private bool m_ShowRTGIHighQualitySection = false; + + static void DrawRTGIQualitySetting(SerializedHDRenderPipelineAsset serialized, int tier) + { + ++EditorGUI.indentLevel; + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTGIRayLength.GetArrayElementAtIndex(tier), Styles.RTGIRayLength); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTGIClampValue.GetArrayElementAtIndex(tier), Styles.RTGIClampValue); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTGIFullResolution.GetArrayElementAtIndex(tier), Styles.RTGIFullResolution); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTGIUpScaleRadius.GetArrayElementAtIndex(tier), Styles.RTGIUpScaleRadius); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTGIDenoise.GetArrayElementAtIndex(tier), Styles.RTGIDenoise); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTGIHalfResDenoise.GetArrayElementAtIndex(tier), Styles.RTGIHalfResDenoise); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTGIDenoiserRadius.GetArrayElementAtIndex(tier), Styles.RTGIDenoiserRadius); + EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightingQualitySettings.RTGISecondDenoise.GetArrayElementAtIndex(tier), Styles.RTGISecondDenoise); + --EditorGUI.indentLevel; + } + + static void Drawer_SectionRTGIQualitySettings(SerializedHDRenderPipelineAsset serialized, Editor owner) + { + m_ShowRTGILowQualitySection = EditorGUILayout.Foldout(m_ShowRTGILowQualitySection, Styles.lowQualityContent); + CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowRTGILowQualitySection); + if (m_ShowRTGILowQualitySection) + { + int quality = (int)ScalableSettingLevelParameter.Level.Low; + DrawRTGIQualitySetting(serialized, quality); + } + + m_ShowRTGIMediumQualitySection = EditorGUILayout.Foldout(m_ShowRTGIMediumQualitySection, Styles.mediumQualityContent); + CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowRTGIMediumQualitySection); + if (m_ShowRTGIMediumQualitySection) + { + int quality = (int)ScalableSettingLevelParameter.Level.Medium; + DrawRTGIQualitySetting(serialized, quality); + } + + m_ShowRTGIHighQualitySection = EditorGUILayout.Foldout(m_ShowRTGIHighQualitySection, Styles.highQualityContent); + CheckFoldoutClick(GUILayoutUtility.GetLastRect(), ref m_ShowRTGIHighQualitySection); + if (m_ShowRTGIHighQualitySection) + { + int quality = (int)ScalableSettingLevelParameter.Level.High; + DrawRTGIQualitySetting(serialized, quality); } } diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedLightingQualitySettings.cs b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedLightingQualitySettings.cs index 1844d13fbcb..a484827a0c5 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedLightingQualitySettings.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Settings/SerializedLightingQualitySettings.cs @@ -14,12 +14,38 @@ class SerializedLightingQualitySettings public SerializedProperty AODirectionCount; public SerializedProperty AOBilateralUpsample; + // Ray Traced Ambient Occlusion + public SerializedProperty RTAORayLength; + public SerializedProperty RTAOSampleCount; + public SerializedProperty RTAODenoise; + public SerializedProperty RTAODenoiserRadius; + // Contact Shadows public SerializedProperty ContactShadowSampleCount; // SSR public SerializedProperty SSRMaxRaySteps; + // Ray Traced reflections + public SerializedProperty RTRMinSmoothness; + public SerializedProperty RTRSmoothnessFadeStart; + public SerializedProperty RTRRayLength; + public SerializedProperty RTRClampValue; + public SerializedProperty RTRFullResolution; + public SerializedProperty RTRDenoise; + public SerializedProperty RTRDenoiserRadius; + public SerializedProperty RTRSmoothDenoising; + + // Ray Traced Global Illumination + public SerializedProperty RTGIRayLength; + public SerializedProperty RTGIFullResolution; + public SerializedProperty RTGIClampValue; + public SerializedProperty RTGIUpScaleRadius; + public SerializedProperty RTGIDenoise; + public SerializedProperty RTGIHalfResDenoise; + public SerializedProperty RTGIDenoiserRadius; + public SerializedProperty RTGISecondDenoise; + // Fog public SerializedProperty VolumetricFogBudget; public SerializedProperty VolumetricFogRatio; @@ -35,12 +61,38 @@ public SerializedLightingQualitySettings(SerializedProperty root) AODirectionCount = root.Find((GlobalLightingQualitySettings s) => s.AODirectionCount); AOBilateralUpsample = root.Find((GlobalLightingQualitySettings s) => s.AOBilateralUpsample); + // RTAO + RTAORayLength = root.Find((GlobalLightingQualitySettings s) => s.RTAORayLength); + RTAOSampleCount = root.Find((GlobalLightingQualitySettings s) => s.RTAOSampleCount); + RTAODenoise = root.Find((GlobalLightingQualitySettings s) => s.RTAODenoise); + RTAODenoiserRadius = root.Find((GlobalLightingQualitySettings s) => s.RTAODenoiserRadius); + // Contact Shadows ContactShadowSampleCount = root.Find((GlobalLightingQualitySettings s) => s.ContactShadowSampleCount); // SSR SSRMaxRaySteps = root.Find((GlobalLightingQualitySettings s) => s.SSRMaxRaySteps); + // Ray Traced reflections + RTRMinSmoothness = root.Find((GlobalLightingQualitySettings s) => s.RTRMinSmoothness); + RTRSmoothnessFadeStart = root.Find((GlobalLightingQualitySettings s) => s.RTRSmoothnessFadeStart); + RTRRayLength = root.Find((GlobalLightingQualitySettings s) => s.RTRRayLength); + RTRClampValue = root.Find((GlobalLightingQualitySettings s) => s.RTRClampValue); + RTRFullResolution = root.Find((GlobalLightingQualitySettings s) => s.RTRFullResolution); + RTRDenoise = root.Find((GlobalLightingQualitySettings s) => s.RTRDenoise); + RTRDenoiserRadius = root.Find((GlobalLightingQualitySettings s) => s.RTRDenoiserRadius); + RTRSmoothDenoising = root.Find((GlobalLightingQualitySettings s) => s.RTRSmoothDenoising); + + // Ray Traced Global Illumination + RTGIRayLength = root.Find((GlobalLightingQualitySettings s) => s.RTGIRayLength); + RTGIFullResolution = root.Find((GlobalLightingQualitySettings s) => s.RTGIFullResolution); + RTGIClampValue = root.Find((GlobalLightingQualitySettings s) => s.RTGIClampValue); + RTGIUpScaleRadius = root.Find((GlobalLightingQualitySettings s) => s.RTGIUpScaleRadius); + RTGIDenoise = root.Find((GlobalLightingQualitySettings s) => s.RTGIDenoise); + RTGIHalfResDenoise = root.Find((GlobalLightingQualitySettings s) => s.RTGIHalfResDenoise); + RTGIDenoiserRadius = root.Find((GlobalLightingQualitySettings s) => s.RTGIDenoiserRadius); + RTGISecondDenoise = root.Find((GlobalLightingQualitySettings s) => s.RTGISecondDenoise); + // Fog VolumetricFogBudget = root.Find((GlobalLightingQualitySettings s) => s.Fog_Budget); VolumetricFogRatio = root.Find((GlobalLightingQualitySettings s) => s.Fog_DepthRatio); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/GlobalLightingQualitySettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/GlobalLightingQualitySettings.cs index 1c8f2f15d20..7fc9f7cdc9b 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/GlobalLightingQualitySettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/GlobalLightingQualitySettings.cs @@ -219,8 +219,6 @@ internal GlobalLightingQualitySettings() public float[] RTGIDenoiserRadius = new float[s_QualitySettingCount]; /// Flag that enables the second denoising pass. public bool[] RTGISecondDenoise = new bool[s_QualitySettingCount]; - /// Flag that defines the radius of the second denoiser. - public float[] RTGISecondDenoiserRadius = new float[s_QualitySettingCount]; // Ray Traced Reflections /// Controls the minimal smoothness. From e80067b8036f53590300011669b43fe400d885eb Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Wed, 3 Mar 2021 11:58:03 +0100 Subject: [PATCH 5/6] Formatting --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 9783e0f8f85..4f42e3b0dc6 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -89,7 +89,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed lightmaps not working properly with shader graphs in ray traced reflections (case 1305335). - Fixed skybox for ortho cameras. - Fixed issue when debug full screen 'Transparent Screen Space Reflection' do not take in consideration debug exposure - + ### Changed - Removed the material pass probe volumes evaluation mode. - Volume parameter of type Cubemap can now accept Cubemap render textures and custom render textures. From 210c2507698dafd02266cf172cd21ffbe75cadf5 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Wed, 3 Mar 2021 16:48:19 +0100 Subject: [PATCH 6/6] Windows vulkan reference screenshots --- .../LinuxEditor/Vulkan/None/1705_Decals-stress-test.png | 4 ++-- .../WindowsEditor/Vulkan/None/1705_Decals-stress-test.png | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1705_Decals-stress-test.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1705_Decals-stress-test.png index c9bb792d19c..ecc2506c123 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1705_Decals-stress-test.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1705_Decals-stress-test.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26967c2d8e6b6ed0ef7c8ee11b3e59062bea0fc86966bc47b0435b1ddd4cb3d0 -size 227439 +oid sha256:c2007e58e8b93590d38031207b067094640829ec887b86b230681be55f613efb +size 227829 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1705_Decals-stress-test.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1705_Decals-stress-test.png index c9bb792d19c..ecc2506c123 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1705_Decals-stress-test.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1705_Decals-stress-test.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26967c2d8e6b6ed0ef7c8ee11b3e59062bea0fc86966bc47b0435b1ddd4cb3d0 -size 227439 +oid sha256:c2007e58e8b93590d38031207b067094640829ec887b86b230681be55f613efb +size 227829