diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/308_ScreenSpaceGlobalIllumination.png b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/308_ScreenSpaceGlobalIllumination.png new file mode 100644 index 00000000000..264ee31cbd6 --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/308_ScreenSpaceGlobalIllumination.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5760fbaf16589fb6feb1cc987f8871574e1db95157a5dc4e92f546ed868615d1 +size 445770 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/308_ScreenSpaceGlobalIllumination.png.meta b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/308_ScreenSpaceGlobalIllumination.png.meta new file mode 100644 index 00000000000..0bafdfe6c80 --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/308_ScreenSpaceGlobalIllumination.png.meta @@ -0,0 +1,94 @@ +fileFormatVersion: 2 +guid: 7cb3e8ed6ebafef45b5a03f3c9ff829f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/308_ScreenSpaceGlobalIllumination.unity b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/308_ScreenSpaceGlobalIllumination.unity new file mode 100644 index 00000000000..125cb9ef5b0 --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/308_ScreenSpaceGlobalIllumination.unity @@ -0,0 +1,510 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: 2220d1a7e0ac01e4890c58804f90ffcf, + type: 2} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &101661933 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 101661935} + - component: {fileID: 101661934} + m_Layer: 0 + m_Name: Volume + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &101661934 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 101661933} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + isGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: 24fdf59ac2decc247a92827f65a8e56c, type: 2} +--- !u!4 &101661935 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 101661933} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &856466313 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 6117102520564098274, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_Name + value: RayTracingFrameIndexDisplay + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.048 + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_LocalPosition.z + value: 0.064 + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_LocalRotation.z + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_LocalScale.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_LocalScale.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6117102520564098278, guid: 0c9fcf2263b163643b5bc77eddcf9135, + type: 3} + propertyPath: m_LocalScale.z + value: 0.5 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 0c9fcf2263b163643b5bc77eddcf9135, type: 3} +--- !u!1 &1453285547 +GameObject: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1453285549} + - component: {fileID: 1453285548} + m_Layer: 0 + m_Name: StaticLightingSky + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1453285548 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1453285547} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Profile: {fileID: 11400000, guid: 24fdf59ac2decc247a92827f65a8e56c, type: 2} + m_StaticLightingSkyUniqueID: 0 +--- !u!4 &1453285549 +Transform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1453285547} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1859526232 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1132393308280272, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_Name + value: HDRP_Test_Camera + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalPosition.y + value: 1.1530278 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalPosition.z + value: 1.87 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.x + value: -0.002500722 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.y + value: 0.99832326 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.z + value: -0.057298686 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.w + value: 0.007828522 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_Version + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_RenderingPathCustomFrameSettings.bitDatas.data1 + value: 70005818916701 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: renderPipelineAsset + value: + objectReference: {fileID: 11400000, guid: 14a0f3aaa5e78a3439ec76d270471ebe, + type: 2} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: checkMemoryAllocation + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: ImageComparisonSettings.TargetHeight + value: 480 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: waitFrames + value: 5 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} +--- !u!1001 &5229108846403476070 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3428701081926499078, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_Name + value: GlobalIlluminationScene + objectReference: {fileID: 0} + - target: {fileID: 5229108844755917169, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5229108844755917182, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_Version + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 5229108845396451520, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5229108845396451521, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_Version + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 5229108845396451521, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: useVolumetric + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5229108845396451521, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_ApplyRangeAttenuation + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5229108846346827036, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_Version + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 5229108846346827036, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: useVolumetric + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5229108846346827036, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_ApplyRangeAttenuation + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5229108846346827039, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5379669199747340271, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5379669199747340271, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5379669199747340271, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5379669199747340271, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5379669199747340271, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5379669199747340271, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5379669199747340271, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5379669199747340271, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 5379669199747340271, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5379669199747340271, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5379669199747340271, guid: 9345716ac27248541acf0f882313d4be, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9345716ac27248541acf0f882313d4be, type: 3} diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/308_ScreenSpaceGlobalIllumination.unity.meta b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/308_ScreenSpaceGlobalIllumination.unity.meta new file mode 100644 index 00000000000..efff75ed327 --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/308_ScreenSpaceGlobalIllumination.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ccf33fc5169d0624c91b9116ebf44c7f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/SSGILighting.lighting b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/SSGILighting.lighting new file mode 100644 index 00000000000..b6d03d7e3de --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/SSGILighting.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SSGILighting + serializedVersion: 2 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 1 + m_BakeBackend: 1 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_TextureCompression: 1 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 2 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRRussianRouletteStartBounce: 2 + m_PVREnvironmentMIS: 1 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/SSGILighting.lighting.meta b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/SSGILighting.lighting.meta new file mode 100644 index 00000000000..5ceb713bbf4 --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/SSGILighting.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2220d1a7e0ac01e4890c58804f90ffcf +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/ScreenSpaceGlobalIllumination.asset b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/ScreenSpaceGlobalIllumination.asset new file mode 100644 index 00000000000..4d7ed1734b0 --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/ScreenSpaceGlobalIllumination.asset @@ -0,0 +1,146 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-1061456513750252976 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0d7593b3a9277ac4696b20006c21dde2, type: 3} + m_Name: VisualEnvironment + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + skyType: + m_OverrideState: 1 + m_Value: 0 + skyAmbientMode: + m_OverrideState: 0 + m_Value: 0 + fogType: + m_OverrideState: 0 + m_Value: 0 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: ScreenSpaceGlobalIllumination + m_EditorClassIdentifier: + components: + - {fileID: 2646528850580886815} + - {fileID: -1061456513750252976} +--- !u!114 &2646528850580886815 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 42ef2681fa3dc8c4fa031f044e68c63f, type: 3} + m_Name: GlobalIllumination + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + quality: + m_OverrideState: 1 + m_Value: 2 + enable: + m_OverrideState: 1 + m_Value: 1 + depthBufferThickness: + m_OverrideState: 0 + m_Value: 0.01 + min: 0 + max: 1 + m_RaySteps: + m_OverrideState: 0 + m_Value: 24 + min: 16 + max: 128 + m_MaximalRadius: + m_OverrideState: 0 + m_Value: 2 + min: 0.01 + max: 50 + m_FullResolutionSS: + m_OverrideState: 0 + m_Value: 1 + m_ClampValueSS: + m_OverrideState: 0 + m_Value: 2 + min: 0.01 + max: 10 + m_FilterRadius: + m_OverrideState: 0 + m_Value: 2 + min: 2 + max: 8 + rayTracing: + m_OverrideState: 1 + m_Value: 0 + layerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + rayLength: + m_OverrideState: 0 + m_Value: 10 + min: 0.001 + max: 50 + clampValue: + m_OverrideState: 0 + m_Value: 1 + min: 0.001 + max: 10 + mode: + m_OverrideState: 0 + m_Value: 2 + fullResolution: + m_OverrideState: 0 + m_Value: 0 + upscaleRadius: + m_OverrideState: 0 + m_Value: 2 + min: 2 + max: 4 + sampleCount: + m_OverrideState: 0 + m_Value: 1 + min: 1 + max: 32 + bounceCount: + m_OverrideState: 0 + m_Value: 1 + min: 1 + max: 31 + denoise: + m_OverrideState: 1 + m_Value: 1 + halfResolutionDenoiser: + m_OverrideState: 0 + m_Value: 0 + denoiserRadius: + m_OverrideState: 0 + m_Value: 0.6 + min: 0.001 + max: 1 + secondDenoiserPass: + m_OverrideState: 0 + m_Value: 0 + secondDenoiserRadius: + m_OverrideState: 0 + m_Value: 0.3 + min: 0.001 + max: 0.5 diff --git a/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/ScreenSpaceGlobalIllumination.asset.meta b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/ScreenSpaceGlobalIllumination.asset.meta new file mode 100644 index 00000000000..8b18d3a083a --- /dev/null +++ b/TestProjects/HDRP_DXR_Tests/Assets/Scenes/GlobalIlluminationData/ScreenSpaceGlobalIllumination.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 24fdf59ac2decc247a92827f65a8e56c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_DXR_Tests/ProjectSettings/EditorBuildSettings.asset b/TestProjects/HDRP_DXR_Tests/ProjectSettings/EditorBuildSettings.asset index 3078800d4dd..4b089bf9fec 100644 --- a/TestProjects/HDRP_DXR_Tests/ProjectSettings/EditorBuildSettings.asset +++ b/TestProjects/HDRP_DXR_Tests/ProjectSettings/EditorBuildSettings.asset @@ -56,6 +56,9 @@ EditorBuildSettings: - enabled: 1 path: Assets/Scenes/307_GlobalIlluminationFog.unity guid: 8a5a48512a640734394f6427d94fd0f8 + - enabled: 0 + path: Assets/Scenes/308_ScreenSpaceGlobalIllumination.unity + guid: ccf33fc5169d0624c91b9116ebf44c7f - enabled: 1 path: Assets/Scenes/406_RayTracedShadows.unity guid: 4aaf485f4ac39ff4e9fd997caff44abe diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/SSGIDenoiser.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/SSGIDenoiser.compute index 64e18e22537..6f47c1a6a3d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/SSGIDenoiser.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/SSGIDenoiser.compute @@ -31,6 +31,7 @@ CBUFFER_START(UnityScreenSpaceGlobalIllumination) float2 _DepthPyramidFirstMipLevelOffset; float4 _HalfScreenSize; int _IndirectDiffuseSpatialFilter; + float _HistoryValidity; CBUFFER_END // Denoised output buffer @@ -204,7 +205,7 @@ void TEMPORAL_FILTER(uint3 dispatchThreadId : SV_DispatchThreadID // If the history was a background pixel, skip it bool invalidHistory = false; - if (historyDepth == UNITY_RAW_FAR_CLIP_VALUE) + if (historyDepth == UNITY_RAW_FAR_CLIP_VALUE || _HistoryValidity == 0.0) invalidHistory = true; // Compute the world space position (from previous frame) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/SSGIDenoiser.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/SSGIDenoiser.cs index fb30bdd2939..99a6adf7103 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/SSGIDenoiser.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/SSGIDenoiser.cs @@ -84,7 +84,7 @@ RTHandle IndirectDiffuseHistoryBufferAllocatorFunction(string viewName, int fram public void Denoise(CommandBuffer cmd, HDCamera hdCamera, RTHandle noisyBuffer, RTHandle outputBuffer, - bool halfResolution = false) + bool halfResolution = false, float historyValidity = 1.0f) { // Grab the global illumination volume component var giSettings = hdCamera.volumeStack.GetComponent(); @@ -141,6 +141,7 @@ public void Denoise(CommandBuffer cmd, HDCamera hdCamera, // Bind the input buffers cmd.SetComputeTextureParam(m_SSGIDenoiserCS, m_KernelFilter, HDShaderIDs._DepthTexture, m_SharedRTManager.GetDepthTexture()); cmd.SetComputeTextureParam(m_SSGIDenoiserCS, m_KernelFilter, HDShaderIDs._NormalBufferTexture, m_SharedRTManager.GetNormalBuffer()); + cmd.SetComputeFloatParam(m_SSGIDenoiserCS, HDShaderIDs._HistoryValidity, historyValidity); if (halfResolution) { cmd.SetComputeTextureParam(m_SSGIDenoiserCS, m_KernelFilter, HDShaderIDs._HistoryDepthTexture, historyDepthBuffer1); diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceGlobalIllumination.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceGlobalIllumination.cs index 9a0d4ee6cd4..2b5fc8db8a1 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceGlobalIllumination.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceGlobalIllumination.cs @@ -172,9 +172,18 @@ void RenderSSGI(HDCamera hdCamera, CommandBuffer cmd, ScriptableRenderContext re // Do the reprojection cmd.DispatchCompute(ssGICS, currentKernel, numTilesXHR, numTilesYHR, hdCamera.viewCount); + float historyValidity = 1.0f; +#if UNITY_HDRP_DXR_TESTS_DEFINE + if (Application.isPlaying) + historyValidity = 0.0f; + else +#endif + // We need to check if something invalidated the history buffers + historyValidity *= ValidRayTracingHistory(hdCamera) ? 1.0f : 0.0f; + // Do the denoising part SSGIDenoiser ssgiDenoiser = GetSSGIDenoiser(); - ssgiDenoiser.Denoise(cmd, hdCamera, buffer1, buffer0, halfResolution: !giSettings.fullResolutionSS); + ssgiDenoiser.Denoise(cmd, hdCamera, buffer1, buffer0, halfResolution: !giSettings.fullResolutionSS, historyValidity: historyValidity); // If this was a half resolution effect, we still have to upscale it if (!giSettings.fullResolutionSS)