diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Common/Default.asset b/TestProjects/HDRP_RuntimeTests/Assets/Common/Default.asset new file mode 100644 index 00000000000..68ad1a8d085 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Common/Default.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4881f9a2c4d568047b316028d20a8dca, type: 3} + m_Name: Default + m_EditorClassIdentifier: + version: 0 + simplificationLevels: 3 + minDistanceBetweenProbes: 1 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Common/Default.asset.meta b/TestProjects/HDRP_RuntimeTests/Assets/Common/Default.asset.meta new file mode 100644 index 00000000000..332b575a4f0 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Common/Default.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c5b7fcbfc6aa87e458cb1c1893973b7c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Common/Test.asset b/TestProjects/HDRP_RuntimeTests/Assets/Common/Test.asset new file mode 100644 index 00000000000..6abb012b3c5 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Common/Test.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4881f9a2c4d568047b316028d20a8dca, type: 3} + m_Name: Test + m_EditorClassIdentifier: + version: 0 + simplificationLevels: 3 + minDistanceBetweenProbes: 0.5 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Common/Test.asset.meta b/TestProjects/HDRP_RuntimeTests/Assets/Common/Test.asset.meta new file mode 100644 index 00000000000..897e915bf8e --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Common/Test.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c70ba2f8270ecc54fa63963d2f32413d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/HDRPDefaultResources/HDRenderPipelineGlobalSettings.asset b/TestProjects/HDRP_RuntimeTests/Assets/HDRPDefaultResources/HDRenderPipelineGlobalSettings.asset index 04e07dadba4..00bb90e34ed 100644 --- a/TestProjects/HDRP_RuntimeTests/Assets/HDRPDefaultResources/HDRenderPipelineGlobalSettings.asset +++ b/TestProjects/HDRP_RuntimeTests/Assets/HDRPDefaultResources/HDRenderPipelineGlobalSettings.asset @@ -18,7 +18,7 @@ MonoBehaviour: m_RenderingPathDefaultCameraFrameSettings: bitDatas: data1: 140651589009244 - data2: 4539628440495554584 + data2: 13763000477350330392 lodBias: 1 lodBiasMode: 0 lodBiasQualityLevel: 0 @@ -65,6 +65,7 @@ MonoBehaviour: m_RenderPipelineRayTracingResources: {fileID: 0} beforeTransparentCustomPostProcesses: [] beforePostProcessCustomPostProcesses: [] + afterPostProcessBlursCustomPostProcesses: [] afterPostProcessCustomPostProcesses: [] beforeTAACustomPostProcesses: [] lightLayerName0: @@ -104,9 +105,61 @@ MonoBehaviour: rendererListCulling: 0 DLSSProjectId: 000000 useDLSSCustomProjectId: 0 - supportProbeVolumes: 0 + supportProbeVolumes: 1 supportRuntimeDebugDisplay: 0 - apvScenesBounds: - serializedBounds: [] - serializedHasVolumes: [] + apvScenesData: + serializedBounds: + - sceneGUID: 5028fc98db6fe304c90852113dca5b00 + bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 40.5, y: 40.5, z: 40.5} + serializedHasVolumes: + - sceneGUID: 5028fc98db6fe304c90852113dca5b00 + hasProbeVolumes: 1 + serializedProfiles: + - sceneGUID: 5028fc98db6fe304c90852113dca5b00 + profile: {fileID: 11400000, guid: c70ba2f8270ecc54fa63963d2f32413d, type: 2} + serializedBakeSettings: + - sceneGUID: 5028fc98db6fe304c90852113dca5b00 + settings: + dilationSettings: + enableDilation: 1 + dilationDistance: 1 + dilationValidityThreshold: 0.25 + dilationIterations: 1 + squaredDistWeighting: 1 + virtualOffsetSettings: + useVirtualOffset: 1 + outOfGeoOffset: 0.01 + searchMultiplier: 0.2 + serializedBakingSets: + - name: Default + sceneGUIDs: [] + settings: + dilationSettings: + enableDilation: 1 + dilationDistance: 1 + dilationValidityThreshold: 0.25 + dilationIterations: 1 + squaredDistWeighting: 1 + virtualOffsetSettings: + useVirtualOffset: 1 + outOfGeoOffset: 0.01 + searchMultiplier: 0.2 + profile: {fileID: 11400000, guid: c5b7fcbfc6aa87e458cb1c1893973b7c, type: 2} + - name: Test + sceneGUIDs: + - 5028fc98db6fe304c90852113dca5b00 + settings: + dilationSettings: + enableDilation: 1 + dilationDistance: 1 + dilationValidityThreshold: 0.25 + dilationIterations: 1 + squaredDistWeighting: 1 + virtualOffsetSettings: + useVirtualOffset: 1 + outOfGeoOffset: 0.01 + searchMultiplier: 0.2 + profile: {fileID: 11400000, guid: c70ba2f8270ecc54fa63963d2f32413d, type: 2} m_Version: 3 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/LinuxPlayer/Vulkan/None/007-BasicAPV.png b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/LinuxPlayer/Vulkan/None/007-BasicAPV.png new file mode 100644 index 00000000000..410c4cfd148 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/LinuxPlayer/Vulkan/None/007-BasicAPV.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0be2f52408c9eb4f5a16640f8be37867e8f6f5fd60926ca2365038d940b2a40b +size 549495 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/LinuxPlayer/Vulkan/None/007-BasicAPV.png.meta b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/LinuxPlayer/Vulkan/None/007-BasicAPV.png.meta new file mode 100644 index 00000000000..44ce261c216 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/LinuxPlayer/Vulkan/None/007-BasicAPV.png.meta @@ -0,0 +1,98 @@ +fileFormatVersion: 2 +guid: c438fdceed894c1429f258393302b4c1 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/OSXPlayer/Metal/None/007-BasicAPV.png b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/OSXPlayer/Metal/None/007-BasicAPV.png new file mode 100644 index 00000000000..410c4cfd148 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/OSXPlayer/Metal/None/007-BasicAPV.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0be2f52408c9eb4f5a16640f8be37867e8f6f5fd60926ca2365038d940b2a40b +size 549495 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/OSXPlayer/Metal/None/007-BasicAPV.png.meta b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/OSXPlayer/Metal/None/007-BasicAPV.png.meta new file mode 100644 index 00000000000..81d906e5597 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/OSXPlayer/Metal/None/007-BasicAPV.png.meta @@ -0,0 +1,98 @@ +fileFormatVersion: 2 +guid: d118bf79ce5043443919befed7dfcb9b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/007-BasicAPV.png b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/007-BasicAPV.png new file mode 100644 index 00000000000..410c4cfd148 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/007-BasicAPV.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0be2f52408c9eb4f5a16640f8be37867e8f6f5fd60926ca2365038d940b2a40b +size 549495 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/007-BasicAPV.png.meta b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/007-BasicAPV.png.meta new file mode 100644 index 00000000000..d99ca8b2370 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/007-BasicAPV.png.meta @@ -0,0 +1,98 @@ +fileFormatVersion: 2 +guid: 03ef396217f01774e806303532b656c1 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D12/None/007-BasicAPV.png b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D12/None/007-BasicAPV.png new file mode 100644 index 00000000000..410c4cfd148 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D12/None/007-BasicAPV.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0be2f52408c9eb4f5a16640f8be37867e8f6f5fd60926ca2365038d940b2a40b +size 549495 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D12/None/007-BasicAPV.png.meta b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D12/None/007-BasicAPV.png.meta new file mode 100644 index 00000000000..d77ef8e293b --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D12/None/007-BasicAPV.png.meta @@ -0,0 +1,98 @@ +fileFormatVersion: 2 +guid: 8b8468ce2d2319a468dd44572fc3f4f1 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/None/007-BasicAPV.png b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/None/007-BasicAPV.png new file mode 100644 index 00000000000..410c4cfd148 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/None/007-BasicAPV.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0be2f52408c9eb4f5a16640f8be37867e8f6f5fd60926ca2365038d940b2a40b +size 549495 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/None/007-BasicAPV.png.meta b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/None/007-BasicAPV.png.meta new file mode 100644 index 00000000000..9454bcb1e47 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/ReferenceImages/Linear/WindowsPlayer/Vulkan/None/007-BasicAPV.png.meta @@ -0,0 +1,98 @@ +fileFormatVersion: 2 +guid: 96f8a0c547a5f5c44ad40501acff6dac +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV.meta b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV.meta new file mode 100644 index 00000000000..c94f9fcb7b7 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0f20479dd85cb274c85f95639c322d12 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV.unity b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV.unity new file mode 100644 index 00000000000..f7501d663ac --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV.unity @@ -0,0 +1,1945 @@ +%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: 223.66943, g: 277.1443, b: 366.80762, 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: 112000000, guid: 51b8394082e803e47975f4daa47e4748, + type: 2} + m_LightingSettings: {fileID: 4890085278179872738, guid: 35fb592543f1765468d55aa2bc2e9542, + 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 &92247174 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 92247178} + - component: {fileID: 92247177} + - component: {fileID: 92247176} + - component: {fileID: 92247175} + m_Layer: 0 + m_Name: Cube (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!65 &92247175 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 92247174} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &92247176 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 92247174} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 1840cbc382dd21346a00e0d5ec48d768, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 2 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &92247177 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 92247174} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &92247178 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 92247174} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 3.46} + m_LocalScale: {x: 6.5748878, y: 8.5557995, z: 0.4509} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 280984832} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &243388874 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 243388877} + - component: {fileID: 243388876} + - component: {fileID: 243388875} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!114 &243388875 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 243388874} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Intensity: 12479.749 + m_EnableSpotReflector: 1 + m_LuxAtDistance: 1 + m_InnerSpotPercent: 0 + m_SpotIESCutoffPercent: 100 + m_LightDimmer: 1 + m_VolumetricDimmer: 1 + m_LightUnit: 2 + m_FadeDistance: 10000 + m_VolumetricFadeDistance: 10000 + m_AffectDiffuse: 1 + m_AffectSpecular: 1 + m_NonLightmappedOnly: 0 + m_ShapeWidth: 0.5 + m_ShapeHeight: 0.5 + m_AspectRatio: 1 + m_ShapeRadius: 0.025 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 0.99 + m_ApplyRangeAttenuation: 1 + m_DisplayAreaLightEmissiveMesh: 0 + m_AreaLightCookie: {fileID: 0} + m_IESPoint: {fileID: 0} + m_IESSpot: {fileID: 0} + m_IncludeForRayTracing: 1 + m_AreaLightShadowCone: 120 + m_UseScreenSpaceShadows: 0 + m_InteractsWithSky: 1 + m_AngularDiameter: 0.5 + m_FlareSize: 2 + m_FlareTint: {r: 1, g: 1, b: 1, a: 1} + m_FlareFalloff: 4 + m_SurfaceTexture: {fileID: 0} + m_SurfaceTint: {r: 1, g: 1, b: 1, a: 1} + m_Distance: 1.5e+11 + m_UseRayTracedShadows: 0 + m_NumRayTracingSamples: 4 + m_FilterTracedShadow: 1 + m_FilterSizeTraced: 16 + m_SunLightConeAngle: 0.5 + m_LightShadowRadius: 0.5 + m_SemiTransparentShadow: 0 + m_ColorShadow: 1 + m_DistanceBasedFiltering: 0 + m_EvsmExponent: 15 + m_EvsmLightLeakBias: 0 + m_EvsmVarianceBias: 0.00001 + m_EvsmBlurPasses: 0 + m_LightlayersMask: 1 + m_LinkShadowLayers: 1 + m_ShadowNearPlane: 0.1 + m_BlockerSampleCount: 24 + m_FilterSampleCount: 16 + m_MinFilterSize: 0.1 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 0 + m_Level: 2 + m_ShadowDimmer: 1 + m_VolumetricShadowDimmer: 1 + m_ShadowFadeDistance: 10000 + m_UseContactShadow: + m_Override: 0 + m_UseOverride: 1 + m_Level: 0 + m_RayTracedContactShadow: 0 + m_ShadowTint: {r: 0, g: 0, b: 0, a: 1} + m_PenumbraTint: 0 + 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 + m_OnDemandShadowRenderOnPlacement: 1 + m_ShadowCascadeRatios: + - 0.05 + - 0.2 + - 0.3 + m_ShadowCascadeBorders: + - 0.2 + - 0.2 + - 0.2 + - 0.2 + m_ShadowAlgorithm: 0 + m_ShadowVariant: 0 + m_ShadowPrecision: 0 + useOldInspector: 0 + useVolumetric: 1 + featuresFoldout: 1 + 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 &243388876 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 243388874} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 12479.749 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 1 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 1 + m_LightShadowCasterMode: 2 + m_AreaSize: {x: 0.5, y: 0.5} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 1 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &243388877 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 243388874} + m_LocalRotation: {x: 0.918641, y: 0.04122707, z: -0.15610048, w: 0.36059934} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 42.485, y: -159.599, z: -177.137} +--- !u!1 &260797553 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 260797557} + - component: {fileID: 260797556} + - component: {fileID: 260797555} + - component: {fileID: 260797554} + m_Layer: 0 + m_Name: Cube (6) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &260797554 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 260797553} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &260797555 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 260797553} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &260797556 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 260797553} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &260797557 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 260797553} + m_LocalRotation: {x: -0.00013346355, y: 0.35190612, z: -0.012346548, w: 0.9359539} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 5.8068, y: 1, z: 0.087947} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1013775042} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0.484, y: 41.206, z: -1.33} +--- !u!1 &280984831 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 280984832} + m_Layer: 0 + m_Name: Static Geo + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &280984832 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 280984831} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1.23, y: 6.27, z: -2.22} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 2132055078} + - {fileID: 766200819} + - {fileID: 92247178} + - {fileID: 1522498576} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &334101957 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 334101961} + - component: {fileID: 334101960} + - component: {fileID: 334101959} + - component: {fileID: 334101958} + m_Layer: 0 + m_Name: Cube (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &334101958 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 334101957} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &334101959 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 334101957} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &334101960 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 334101957} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &334101961 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 334101957} + m_LocalRotation: {x: -0, y: 0.18416503, z: -0, w: 0.9828954} + m_LocalPosition: {x: 1.5699999, y: -1.3199997, z: 4.1200004} + m_LocalScale: {x: 5.8068, y: 1, z: 0.087947} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1013775042} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 21.225, z: 0} +--- !u!1 &525690398 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 525690402} + - component: {fileID: 525690401} + - component: {fileID: 525690400} + - component: {fileID: 525690399} + m_Layer: 0 + m_Name: we + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 126 + m_IsActive: 1 +--- !u!135 &525690399 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 525690398} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &525690400 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 525690398} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 2 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &525690401 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 525690398} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &525690402 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 525690398} + m_LocalRotation: {x: -0.15382878, y: -0.7524498, z: 0.18917732, w: -0.61185616} + m_LocalPosition: {x: 3.15, y: -3.77, z: 5.12} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1013775042} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &683602977 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 683602981} + - component: {fileID: 683602980} + - component: {fileID: 683602979} + - component: {fileID: 683602978} + m_Layer: 0 + m_Name: we (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 126 + m_IsActive: 1 +--- !u!135 &683602978 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683602977} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &683602979 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683602977} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 2 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &683602980 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683602977} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &683602981 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 683602977} + m_LocalRotation: {x: -0.15382878, y: -0.7524498, z: 0.18917732, w: -0.61185616} + m_LocalPosition: {x: 1.8799999, y: -3.6100001, z: -1.36} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1013775042} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &766200815 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 766200819} + - component: {fileID: 766200818} + - component: {fileID: 766200817} + - component: {fileID: 766200816} + m_Layer: 0 + m_Name: Cube (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!65 &766200816 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 766200815} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &766200817 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 766200815} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: b0508405273e2cc4986cc6b960f93f02, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 2 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &766200818 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 766200815} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &766200819 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 766200815} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 6.514} + m_LocalScale: {x: 6.5748878, y: 4.832147, z: 0.4509} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 280984832} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &874748917 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 874748921} + - component: {fileID: 874748920} + - component: {fileID: 874748919} + - component: {fileID: 874748918} + m_Layer: 0 + m_Name: we (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 126 + m_IsActive: 1 +--- !u!135 &874748918 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874748917} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &874748919 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874748917} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 2 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &874748920 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874748917} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &874748921 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 874748917} + m_LocalRotation: {x: -0.15382878, y: -0.7524498, z: 0.18917732, w: -0.61185616} + m_LocalPosition: {x: 2.57, y: -3.6100001, z: 1.95} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1013775042} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1013775041 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1013775042} + m_Layer: 0 + m_Name: Dynamic + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1013775042 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1013775041} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -4.1, y: 11.08, z: 0.43} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 525690402} + - {fileID: 683602981} + - {fileID: 874748921} + - {fileID: 2072380640} + - {fileID: 1970315741} + - {fileID: 334101961} + - {fileID: 260797557} + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1017176618 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1017176620} + - component: {fileID: 1017176619} + m_Layer: 0 + m_Name: Probe Volume + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1017176619 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1017176618} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cded085d155cde949b60f67a11dbc3bd, type: 3} + m_Name: + m_EditorClassIdentifier: + globalVolume: 1 + size: {x: 11.439015, y: 16.300907, z: 18.955118} + geometryDistanceOffset: 0.2 + objectLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + lowestSubdivLevelOverride: 0 + highestSubdivLevelOverride: 0 + overridesSubdivLevels: 0 + mightNeedRebaking: 1 + cachedTransform: + e00: 1 + e01: 0 + e02: 0 + e03: 1.7852998 + e10: 0 + e11: 1 + e12: 0 + e13: -6.27 + e20: 0 + e21: 0 + e22: 1 + e23: -2.0473003 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + cachedHashCode: -145479973 +--- !u!4 &1017176620 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1017176618} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1.7852998, y: 6.27, z: 2.0473003} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1438838908 +GameObject: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1438838910} + - component: {fileID: 1438838909} + m_Layer: 0 + m_Name: StaticLightingSky + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1438838909 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1438838908} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Profile: {fileID: 11400000, guid: 4d502e9676ca62146a92f66b36b2c3cd, type: 2} + m_StaticLightingSkyUniqueID: 1 + m_StaticLightingCloudsUniqueID: 0 + m_StaticLightingVolumetricClouds: 0 +--- !u!4 &1438838910 +Transform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1438838908} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1522498572 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1522498576} + - component: {fileID: 1522498575} + - component: {fileID: 1522498574} + - component: {fileID: 1522498573} + m_Layer: 0 + m_Name: Cube (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!65 &1522498573 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1522498572} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1522498574 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1522498572} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 4a82379d4d3fd7a428f80bdf4ea431dd, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 2 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1522498575 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1522498572} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1522498576 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1522498572} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 6.5748878, y: 14.800908, z: 0.4509} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 280984832} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1735562047 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1735562052} + - component: {fileID: 1735562051} + - component: {fileID: 1735562050} + - component: {fileID: 1735562049} + - component: {fileID: 1735562048} + m_Layer: 0 + m_Name: Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1735562048 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1735562047} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9459100e7946cb84eb53a26a14473032, type: 3} + m_Name: + m_EditorClassIdentifier: + ImageComparisonSettings: + TargetWidth: 1280 + TargetHeight: 720 + PerPixelCorrectnessThreshold: 0.001 + PerPixelGammaThreshold: 0.003921569 + PerPixelAlphaThreshold: 0.003921569 + AverageCorrectnessThreshold: 0.001 + IncorrectPixelsThreshold: 0.0000038146973 + UseHDR: 0 + UseBackBuffer: 0 + ImageResolution: 0 + ActiveImageTests: 1 + ActivePixelTests: 7 + doBeforeTest: + m_PersistentCalls: + m_Calls: [] + captureFramerate: 30 + waitFrames: 150 + xrCompatible: 1 + xrThresholdMultiplier: 1 + checkMemoryAllocation: 1 + renderPipelineAsset: {fileID: 11400000, guid: e9f382b6155be5443811c22d984cea2c, + type: 2} +--- !u!114 &1735562049 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1735562047} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} + m_Name: + m_EditorClassIdentifier: + clearColorMode: 0 + backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} + clearDepth: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + volumeAnchorOverride: {fileID: 0} + antialiasing: 3 + SMAAQuality: 2 + dithering: 0 + stopNaNs: 0 + taaSharpenStrength: 0.5 + TAAQuality: 1 + taaHistorySharpening: 0.35 + taaAntiFlicker: 0.5 + taaMotionVectorRejection: 0 + taaAntiHistoryRinging: 0 + taaBaseBlendFactor: 0.875 + physicalParameters: + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + flipYMode: 0 + xrRendering: 1 + fullscreenPassthrough: 0 + allowDynamicResolution: 0 + customRenderingSettings: 1 + invertFaceCulling: 0 + probeLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + hasPersistentHistory: 0 + allowDeepLearningSuperSampling: 1 + deepLearningSuperSamplingUseCustomQualitySettings: 0 + deepLearningSuperSamplingQuality: 0 + deepLearningSuperSamplingUseCustomAttributes: 0 + deepLearningSuperSamplingUseOptimalSettings: 1 + deepLearningSuperSamplingSharpening: 0 + exposureTarget: {fileID: 0} + materialMipBias: 0 + m_RenderingPathCustomFrameSettings: + bitDatas: + data1: 72198260625768269 + data2: 13763000477350330392 + lodBias: 1 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 + msaaMode: 1 + materialQuality: 0 + renderingPathCustomFrameSettingsOverrideMask: + mask: + data1: 0 + data2: 9223372036854775808 + defaultFrameSettings: 0 + m_Version: 8 + 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!81 &1735562050 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1735562047} + m_Enabled: 1 +--- !u!20 &1735562051 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1735562047} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1735562052 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1735562047} + m_LocalRotation: {x: -0.024632774, y: -0.7965032, z: 0.03252355, w: -0.60325634} + m_LocalPosition: {x: -10.772858, y: 8.679055, z: 3.9845886} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1750132030 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1750132032} + - component: {fileID: 1750132031} + m_Layer: 0 + m_Name: Global Volume + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1750132031 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1750132030} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IsGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: 4d502e9676ca62146a92f66b36b2c3cd, type: 2} +--- !u!4 &1750132032 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1750132030} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.7211275, y: -1.0588579, z: 1.6321487} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1943135964 +GameObject: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1943135966} + - component: {fileID: 1943135965} + m_Layer: 0 + m_Name: ProbeVolumePerSceneData + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1943135965 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1943135964} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a83d2f7ae04ab6f4f99b0d85377be998, type: 3} + m_Name: + m_EditorClassIdentifier: + serializedAssets: + - state: 0 + asset: {fileID: 11400000, guid: a51673b8ec3ae0e48a8e2463c9b5bfdd, type: 2} +--- !u!4 &1943135966 +Transform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1943135964} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1970315737 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1970315741} + - component: {fileID: 1970315740} + - component: {fileID: 1970315739} + - component: {fileID: 1970315738} + m_Layer: 0 + m_Name: Cube (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1970315738 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1970315737} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1970315739 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1970315737} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1970315740 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1970315737} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1970315741 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1970315737} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.5699999, y: -3.5710506, z: 6.769372} + m_LocalScale: {x: 5.8068, y: 1, z: 0.087947} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1013775042} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2072380636 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2072380640} + - component: {fileID: 2072380639} + - component: {fileID: 2072380638} + - component: {fileID: 2072380637} + m_Layer: 0 + m_Name: we (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 126 + m_IsActive: 1 +--- !u!135 &2072380637 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2072380636} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2072380638 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2072380636} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 2 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2072380639 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2072380636} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2072380640 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2072380636} + m_LocalRotation: {x: -0.15722753, y: -0.7513866, z: 0.19335704, w: -0.61099166} + m_LocalPosition: {x: 3.57, y: -2.1000004, z: 2.6499999} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1013775042} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 28.862, y: 101.767, z: 0} +--- !u!1 &2132055074 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2132055078} + - component: {fileID: 2132055077} + - component: {fileID: 2132055076} + - component: {fileID: 2132055075} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 2147483647 + m_IsActive: 1 +--- !u!65 &2132055075 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2132055074} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2132055076 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2132055074} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 2 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2132055077 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2132055074} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2132055078 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2132055074} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.5553, y: -1.0900002, z: 4.2673} + m_LocalScale: {x: 9.939015, y: 0.66195, z: 17.455118} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 280984832} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV.unity.meta b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV.unity.meta new file mode 100644 index 00000000000..b00421aae67 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5028fc98db6fe304c90852113dca5b00 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/AssetWithAPV.asset b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/AssetWithAPV.asset new file mode 100644 index 00000000000..a03962cbd09 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/AssetWithAPV.asset @@ -0,0 +1,470 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cf1dab834d4ec34195b920ea7bbf9ec, type: 3} + m_Name: AssetWithAPV + m_EditorClassIdentifier: + m_RenderPipelineSettings: + supportShadowMask: 1 + supportSSR: 0 + supportSSRTransparent: 0 + supportSSAO: 1 + supportSSGI: 0 + supportSubsurfaceScattering: 1 + sssSampleBudget: + m_Values: 140000002800000050000000 + m_SchemaId: + m_Id: With3Levels + supportVolumetrics: 1 + supportVolumetricClouds: 0 + supportLightLayers: 0 + supportDistortion: 1 + supportTransparentBackface: 1 + supportTransparentDepthPrepass: 1 + supportTransparentDepthPostpass: 1 + colorBufferFormat: 74 + supportCustomPass: 1 + customBufferFormat: 12 + supportedLitShaderMode: 2 + planarReflectionResolution: + m_Values: 000100000004000000080000 + m_SchemaId: + m_Id: With3Levels + supportDecals: 1 + supportDecalLayers: 0 + supportSurfaceGradient: 1 + decalNormalBufferHP: 0 + msaaSampleCount: 1 + supportMotionVectors: 1 + supportRuntimeAOVAPI: 0 + supportDitheringCrossFade: 1 + supportTerrainHole: 0 + supportProbeVolume: 1 + probeVolumeMemoryBudget: 1024 + probeVolumeSHBands: 1 + supportRayTracing: 0 + supportedRayTracingMode: 3 + lightLoopSettings: + cookieAtlasSize: 2048 + cookieFormat: 74 + cookieAtlasLastValidMip: 0 + cookieTexArraySize: 1 + planarReflectionAtlasSize: 1024 + reflectionProbeCacheSize: 64 + reflectionCubemapSize: 256 + reflectionCacheCompressed: 0 + reflectionProbeFormat: 74 + skyReflectionSize: 256 + skyLightingOverrideLayerMask: + serializedVersion: 2 + m_Bits: 0 + supportFabricConvolution: 0 + maxDirectionalLightsOnScreen: 16 + maxPunctualLightsOnScreen: 512 + maxAreaLightsOnScreen: 64 + maxEnvLightsOnScreen: 64 + maxDecalsOnScreen: 512 + maxPlanarReflectionOnScreen: 16 + maxLightsPerClusterCell: 8 + maxLocalVolumetricFogSize: 32 + maxLocalVolumetricFogOnScreen: 64 + hdShadowInitParams: + maxShadowRequests: 128 + directionalShadowsDepthBits: 32 + shadowFilteringQuality: 1 + punctualLightShadowAtlas: + shadowAtlasResolution: 4096 + shadowAtlasDepthBits: 32 + useDynamicViewportRescale: 1 + areaLightShadowAtlas: + shadowAtlasResolution: 4096 + shadowAtlasDepthBits: 32 + useDynamicViewportRescale: 1 + cachedPunctualLightShadowAtlas: 2048 + cachedAreaLightShadowAtlas: 1024 + shadowResolutionDirectional: + m_Values: 00010000000200000004000000080000 + m_SchemaId: + m_Id: With4Levels + shadowResolutionPunctual: + m_Values: 00010000000200000004000000080000 + m_SchemaId: + m_Id: With4Levels + shadowResolutionArea: + m_Values: 00010000000200000004000000080000 + m_SchemaId: + m_Id: With4Levels + maxDirectionalShadowMapResolution: 2048 + maxPunctualShadowMapResolution: 2048 + maxAreaShadowMapResolution: 2048 + supportScreenSpaceShadows: 0 + maxScreenSpaceShadowSlots: 4 + screenSpaceShadowBufferFormat: 48 + decalSettings: + drawDistance: 1000 + atlasWidth: 4096 + atlasHeight: 4096 + perChannelMask: 0 + postProcessSettings: + m_LutSize: 32 + lutFormat: 48 + bufferFormat: 74 + dynamicResolutionSettings: + enabled: 0 + useMipBias: 0 + enableDLSS: 0 + DLSSPerfQualitySetting: 0 + DLSSUseOptimalSettings: 1 + DLSSSharpness: 0.5 + maxPercentage: 100 + minPercentage: 100 + dynResType: 1 + upsampleFilter: 1 + forceResolution: 0 + forcedPercentage: 100 + lowResTransparencyMinimumThreshold: 0 + rayTracingHalfResThreshold: 50 + lowresTransparentSettings: + enabled: 1 + checkerboardDepthBuffer: 1 + upsampleType: 1 + xrSettings: + singlePass: 1 + occlusionMesh: 1 + cameraJitter: 0 + postProcessQualitySettings: + NearBlurSampleCount: 030000000500000008000000 + NearBlurMaxRadius: + - 2 + - 4 + - 7 + FarBlurSampleCount: 04000000070000000e000000 + FarBlurMaxRadius: + - 5 + - 8 + - 13 + DoFResolution: 040000000200000001000000 + DoFHighQualityFiltering: 000101 + DoFPhysicallyBased: 000000 + MotionBlurSampleCount: 04000000080000000c000000 + BloomRes: 040000000200000002000000 + BloomHighQualityFiltering: 000101 + BloomHighQualityPrefiltering: 000001 + ChromaticAberrationMaxSamples: 03000000060000000c000000 + lightSettings: + useContactShadow: + m_Values: 000001 + m_SchemaId: + m_Id: With3Levels + maximumLODLevel: + m_Values: 000000000000000000000000 + m_SchemaId: + m_Id: With3Levels + lodBias: + m_Values: + - 1 + - 1 + - 1 + m_SchemaId: + m_Id: With3Levels + lightingQualitySettings: + AOStepCount: 040000000600000010000000 + AOFullRes: 000001 + AOMaximumRadiusPixels: 200000002800000050000000 + AOBilateralUpsample: 000101 + AODirectionCount: 010000000200000004000000 + ContactShadowSampleCount: 060000000a00000010000000 + SSRMaxRaySteps: 100000002000000040000000 + SSGIRaySteps: 200000004000000080000000 + SSGIDenoise: 010101 + SSGIHalfResDenoise: 010000 + SSGIDenoiserRadius: + - 0.75 + - 0.5 + - 0.5 + SSGISecondDenoise: 010101 + RTAORayLength: + - 0.5 + - 3 + - 20 + RTAOSampleCount: 010000000200000008000000 + RTAODenoise: 010101 + RTAODenoiserRadius: + - 0.25 + - 0.5 + - 0.65 + RTGIRayLength: + - 50 + - 50 + - 50 + RTGIFullResolution: 000001 + RTGIClampValue: + - 2 + - 3 + - 5 + RTGIRaySteps: 200000003000000040000000 + RTGIDenoise: 010101 + RTGIHalfResDenoise: 010000 + RTGIDenoiserRadius: + - 1 + - 1 + - 1 + RTGISecondDenoise: 010101 + RTRMinSmoothness: + - 0.6 + - 0.4 + - 0 + RTRSmoothnessFadeStart: + - 0.7 + - 0.5 + - 0 + RTRRayLength: + - 50 + - 50 + - 50 + RTRClampValue: + - 0.8 + - 1 + - 1.2 + RTRFullResolution: 000001 + RTRRayMaxIterations: 200000003000000040000000 + RTRDenoise: 010101 + RTRDenoiserRadius: 080000000c00000010000000 + RTRSmoothDenoising: 010000 + Fog_ControlMode: 000000000000000000000000 + Fog_Budget: + - 0.166 + - 0.33 + - 0.666 + Fog_DepthRatio: + - 0.666 + - 0.666 + - 0.5 + m_ObsoleteLightLayerName0: + m_ObsoleteLightLayerName1: + m_ObsoleteLightLayerName2: + m_ObsoleteLightLayerName3: + m_ObsoleteLightLayerName4: + m_ObsoleteLightLayerName5: + m_ObsoleteLightLayerName6: + m_ObsoleteLightLayerName7: + m_ObsoleteDecalLayerName0: + m_ObsoleteDecalLayerName1: + m_ObsoleteDecalLayerName2: + m_ObsoleteDecalLayerName3: + m_ObsoleteDecalLayerName4: + m_ObsoleteDecalLayerName5: + m_ObsoleteDecalLayerName6: + m_ObsoleteDecalLayerName7: + m_ObsoleteSupportRuntimeDebugDisplay: 0 + allowShaderVariantStripping: 1 + enableSRPBatcher: 1 + availableMaterialQualityLevels: -1 + m_DefaultMaterialQualityLevel: 4 + diffusionProfileSettings: {fileID: 0} + virtualTexturingSettings: + streamingCpuCacheSizeInMegaBytes: 256 + streamingGpuCacheSettings: + - format: 0 + sizeInMegaBytes: 128 + m_UseRenderGraph: 1 + m_Version: 21 + 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_ObsoleteBakedOrCustomReflectionFrameSettings: + 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_ObsoleteRealtimeReflectionFrameSettings: + 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_ObsoleteDefaultVolumeProfile: {fileID: 0} + m_ObsoleteDefaultLookDevProfile: {fileID: 0} + m_ObsoleteFrameSettingsMovedToDefaultSettings: + bitDatas: + data1: 0 + data2: 0 + lodBias: 0 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 0 + msaaMode: 0 + materialQuality: 0 + m_ObsoleteBakedOrCustomReflectionFrameSettingsMovedToDefaultSettings: + bitDatas: + data1: 0 + data2: 0 + lodBias: 0 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 0 + msaaMode: 0 + materialQuality: 0 + m_ObsoleteRealtimeReflectionFrameSettingsMovedToDefaultSettings: + bitDatas: + data1: 0 + data2: 0 + lodBias: 0 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 0 + msaaMode: 0 + materialQuality: 0 + m_ObsoleteRenderPipelineResources: {fileID: 0} + m_ObsoleteRenderPipelineRayTracingResources: {fileID: 0} + m_ObsoleteBeforeTransparentCustomPostProcesses: [] + m_ObsoleteBeforePostProcessCustomPostProcesses: [] + m_ObsoleteAfterPostProcessCustomPostProcesses: [] + m_ObsoleteBeforeTAACustomPostProcesses: [] + m_ObsoleteShaderVariantLogLevel: 0 + m_ObsoleteLensAttenuation: 0 + m_ObsoleteDiffusionProfileSettingsList: [] diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/AssetWithAPV.asset.meta b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/AssetWithAPV.asset.meta new file mode 100644 index 00000000000..b57c9312985 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/AssetWithAPV.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e9f382b6155be5443811c22d984cea2c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/BasicAPV_LightingSettings.lighting b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/BasicAPV_LightingSettings.lighting new file mode 100644 index 00000000000..43e8ab690e3 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/BasicAPV_LightingSettings.lighting @@ -0,0 +1,64 @@ +%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: BasicAPV_LightingSettings + serializedVersion: 4 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 2 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_LightmapCompression: 3 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 0 + 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: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 1 + 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 + m_PVRTiledBaking: 0 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/BasicAPV_LightingSettings.lighting.meta b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/BasicAPV_LightingSettings.lighting.meta new file mode 100644 index 00000000000..6b47917924a --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/BasicAPV_LightingSettings.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 35fb592543f1765468d55aa2bc2e9542 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Blue.mat b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Blue.mat new file mode 100644 index 00000000000..b4a9890ecb6 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Blue.mat @@ -0,0 +1,263 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-8383016387482546174 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 12 + hdPluginSubTargetMaterialVersions: + m_Keys: [] + m_Values: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Blue + m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} + m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT _NORMALMAP_TANGENT_SPACE + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2225 + stringTagMap: {} + disabledShaderPasses: + - TransparentDepthPrepass + - TransparentDepthPostpass + - TransparentBackface + - RayTracingPrepass + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + 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: + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AddPrecomputedVelocity: 0 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 + - _AlphaToMaskInspectorValue: 0 + - _Anisotropy: 0 + - _BlendMode: 0 + - _CoatMask: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 0 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DoubleSidedEnable: 0 + - _DoubleSidedGIMode: 0 + - _DoubleSidedNormalMode: 1 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 1 + - _EmissiveIntensityUnit: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnergyConservingSpecularColor: 1 + - _HeightAmplitude: 0.02 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: 0 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0.5 + - _InvTilingScale: 1 + - _Ior: 1.5 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _MetallicRemapMax: 1 + - _MetallicRemapMin: 0 + - _NormalMapSpace: 0 + - _NormalScale: 1 + - _OpaqueCullMode: 2 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 + - _RayTracing: 0 + - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 + - _RefractionModel: 0 + - _Smoothness: 0.5 + - _SmoothnessRemapMax: 1 + - _SmoothnessRemapMin: 0 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SubsurfaceMask: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 1 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 + - _UVBase: 0 + - _UVDetail: 0 + - _UVEmissive: 0 + - _UseEmissiveIntensity: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestTransparent: 4 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0, g: 0.22859287, b: 1, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0, g: 0.22859284, b: 1, a: 1} + - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Blue.mat.meta b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Blue.mat.meta new file mode 100644 index 00000000000..61d4d63a8db --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Blue.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4a82379d4d3fd7a428f80bdf4ea431dd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Emissive.mat b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Emissive.mat new file mode 100644 index 00000000000..fd54dfc425f --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Emissive.mat @@ -0,0 +1,289 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Emissive + m_Shader: {fileID: 4800000, guid: c4edd00ff2db5b24391a4fcb1762e459, type: 3} + m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT _NORMALMAP_TANGENT_SPACE + m_LightmapFlags: 2 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: {} + disabledShaderPasses: + - DistortionVectors + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionVectorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UnlitColorMap: + m_Texture: {fileID: 0} + 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: + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AddPrecomputedVelocity: 0 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 + - _AlphaToMaskInspectorValue: 0 + - _Anisotropy: 0 + - _BlendMode: 0 + - _CoatMask: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 0 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DistortionBlendMode: 0 + - _DistortionBlurBlendMode: 0 + - _DistortionBlurDstBlend: 1 + - _DistortionBlurRemapMax: 1 + - _DistortionBlurRemapMin: 0 + - _DistortionBlurScale: 1 + - _DistortionBlurSrcBlend: 1 + - _DistortionDepthTest: 1 + - _DistortionDstBlend: 1 + - _DistortionEnable: 0 + - _DistortionOnly: 0 + - _DistortionScale: 1 + - _DistortionSrcBlend: 1 + - _DistortionVectorBias: -1 + - _DistortionVectorScale: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedGIMode: 0 + - _DoubleSidedNormalMode: 1 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 100000000 + - _EmissiveIntensityUnit: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnergyConservingSpecularColor: 1 + - _HeightAmplitude: 0.02 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: 0 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0.5 + - _IncludeIndirectLighting: 1 + - _InvTilingScale: 1 + - _Ior: 1.5 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _MetallicRemapMax: 1 + - _MetallicRemapMin: 0 + - _NormalMapSpace: 0 + - _NormalScale: 1 + - _OpaqueCullMode: 2 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 + - _RayTracing: 0 + - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 + - _RefractionModel: 0 + - _Smoothness: 0.5 + - _SmoothnessRemapMax: 1 + - _SmoothnessRemapMin: 0 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 0 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 32 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SubsurfaceMask: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 1 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 + - _UVBase: 0 + - _UVDetail: 0 + - _UVEmissive: 0 + - _UseEmissiveIntensity: 1 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestModeDistortion: 4 + - _ZTestTransparent: 4 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 260348.78, g: 161650.03, b: 65626644, a: 100000000} + - _EmissiveColorLDR: {r: 0.03363706, g: 0.020885184, b: 0.8301887, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + - _UnlitColor: {r: 1, g: 1, b: 1, a: 1} + - _UnlitColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] +--- !u!114 &5739636367987549349 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 12 + hdPluginSubTargetMaterialVersions: + m_Keys: [] + m_Values: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Emissive.mat.meta b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Emissive.mat.meta new file mode 100644 index 00000000000..76617b589c4 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Emissive.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 191c73b6823c9414cb29e11872ad8009 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Global Volume Profile.asset b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Global Volume Profile.asset new file mode 100644 index 00000000000..1774a187581 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Global Volume Profile.asset @@ -0,0 +1,420 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-8743303337135696796 +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: 2d08ce26990eb1a4a9177b860541e702, type: 3} + m_Name: Exposure + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 1 + m_Value: 0 + meteringMode: + m_OverrideState: 1 + m_Value: 2 + luminanceSource: + m_OverrideState: 1 + m_Value: 1 + fixedExposure: + m_OverrideState: 1 + m_Value: 12 + compensation: + m_OverrideState: 1 + m_Value: 0 + limitMin: + m_OverrideState: 1 + m_Value: -1 + limitMax: + m_OverrideState: 1 + m_Value: 14 + curveMap: + m_OverrideState: 1 + m_Value: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: -10 + value: -10 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 20 + value: 20 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + limitMinCurveMap: + m_OverrideState: 1 + m_Value: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: -10 + value: -12 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 20 + value: 18 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + limitMaxCurveMap: + m_OverrideState: 1 + m_Value: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: -10 + value: -8 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 20 + value: 22 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + adaptationMode: + m_OverrideState: 1 + m_Value: 1 + adaptationSpeedDarkToLight: + m_OverrideState: 1 + m_Value: 3 + adaptationSpeedLightToDark: + m_OverrideState: 1 + m_Value: 1 + weightTextureMask: + m_OverrideState: 1 + m_Value: {fileID: 0} + histogramPercentages: + m_OverrideState: 1 + m_Value: {x: 40, y: 90} + histogramUseCurveRemapping: + m_OverrideState: 1 + m_Value: 0 + targetMidGray: + m_OverrideState: 1 + m_Value: 0 + centerAroundExposureTarget: + m_OverrideState: 1 + m_Value: 0 + proceduralCenter: + m_OverrideState: 1 + m_Value: {x: 0.5, y: 0.5} + proceduralRadii: + m_OverrideState: 1 + m_Value: {x: 0.3, y: 0.3} + maskMinIntensity: + m_OverrideState: 1 + m_Value: -30 + maskMaxIntensity: + m_OverrideState: 1 + m_Value: 30 + proceduralSoftness: + m_OverrideState: 1 + m_Value: 0.5 +--- !u!114 &-4724640126259955149 +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: 6bd486065ce11414fa40e631affc4900, type: 3} + m_Name: ProbeVolumesOptions + m_EditorClassIdentifier: + active: 1 + normalBias: + m_OverrideState: 1 + m_Value: 1.088 + viewBias: + m_OverrideState: 1 + m_Value: 0.59 + scaleBiasWithMinProbeDistance: + m_OverrideState: 1 + m_Value: 1 + samplingNoise: + m_OverrideState: 1 + m_Value: 0.078 +--- !u!114 &-4145478425724808730 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59b6606ef2548734bb6d11b9d160bc7e, type: 3} + m_Name: HDRISky + m_EditorClassIdentifier: + active: 1 + rotation: + m_OverrideState: 1 + m_Value: 0 + skyIntensityMode: + m_OverrideState: 1 + m_Value: 0 + exposure: + m_OverrideState: 1 + m_Value: 10.77 + multiplier: + m_OverrideState: 1 + m_Value: 1 + upperHemisphereLuxValue: + m_OverrideState: 1 + m_Value: 0.4660715 + upperHemisphereLuxColor: + m_OverrideState: 1 + m_Value: {x: 0.18750614, y: 0.29181972, z: 0.5} + desiredLuxValue: + m_OverrideState: 1 + m_Value: 20000 + updateMode: + m_OverrideState: 1 + m_Value: 0 + updatePeriod: + m_OverrideState: 1 + m_Value: 0 + includeSunInBaking: + m_OverrideState: 1 + m_Value: 0 + hdriSky: + m_OverrideState: 1 + m_Value: {fileID: 8900000, guid: 8253d41e6e8b11a4cbe77a4f8f82934d, type: 3} + distortionMode: + m_OverrideState: 1 + m_Value: 0 + flowmap: + m_OverrideState: 1 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 1 + m_Value: 1 + scrollOrientation: + m_OverrideState: 1 + m_Value: + mode: 1 + customValue: 0 + additiveValue: 0 + multiplyValue: 1 + scrollSpeed: + m_OverrideState: 1 + m_Value: + mode: 1 + customValue: 100 + additiveValue: 0 + multiplyValue: 1 + enableBackplate: + m_OverrideState: 1 + m_Value: 0 + backplateType: + m_OverrideState: 1 + m_Value: 0 + groundLevel: + m_OverrideState: 1 + m_Value: 0 + scale: + m_OverrideState: 1 + m_Value: {x: 32, y: 32} + projectionDistance: + m_OverrideState: 1 + m_Value: 16 + plateRotation: + m_OverrideState: 1 + m_Value: 0 + plateTexRotation: + m_OverrideState: 1 + m_Value: 0 + plateTexOffset: + m_OverrideState: 1 + m_Value: {x: 0, y: 0} + blendAmount: + m_OverrideState: 1 + m_Value: 0 + shadowTint: + m_OverrideState: 1 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + pointLightShadow: + m_OverrideState: 1 + m_Value: 0 + dirLightShadow: + m_OverrideState: 1 + m_Value: 0 + rectLightShadow: + m_OverrideState: 1 + m_Value: 0 + m_SkyVersion: 1 + enableDistortion: + m_OverrideState: 1 + m_Value: 0 + procedural: + m_OverrideState: 1 + m_Value: 1 + scrollDirection: + m_OverrideState: 1 + m_Value: 0 + m_ObsoleteScrollSpeed: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &-1308821538832935063 +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 + skyType: + m_OverrideState: 1 + m_Value: 1 + cloudType: + m_OverrideState: 1 + m_Value: 0 + skyAmbientMode: + m_OverrideState: 1 + m_Value: 0 + windOrientation: + m_OverrideState: 1 + m_Value: 0 + windSpeed: + m_OverrideState: 1 + m_Value: 100 + fogType: + m_OverrideState: 1 + 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: Global Volume Profile + m_EditorClassIdentifier: + components: + - {fileID: -1308821538832935063} + - {fileID: -8743303337135696796} + - {fileID: -4145478425724808730} + - {fileID: 1394333224716679204} + - {fileID: 1147814561637400567} + - {fileID: -4724640126259955149} +--- !u!114 &1147814561637400567 +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: f034cba68ab55e046ae1445a42f18c0e, type: 3} + m_Name: IndirectLightingController + m_EditorClassIdentifier: + active: 1 + indirectDiffuseLightingMultiplier: + m_OverrideState: 1 + m_Value: 1.5 + indirectDiffuseLightingLayers: + m_OverrideState: 1 + m_Value: 255 + reflectionLightingMultiplier: + m_OverrideState: 1 + m_Value: 1 + reflectionLightingLayers: + m_OverrideState: 1 + m_Value: 255 + reflectionProbeIntensityMultiplier: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &1394333224716679204 +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: 7ddcec8a8eb2d684d833ac8f5d26aebd, type: 3} + m_Name: HDShadowSettings + m_EditorClassIdentifier: + active: 1 + maxShadowDistance: + m_OverrideState: 1 + m_Value: 50 + directionalTransmissionMultiplier: + m_OverrideState: 1 + m_Value: 1 + cascadeShadowSplitCount: + m_OverrideState: 1 + m_Value: 4 + cascadeShadowSplit0: + m_OverrideState: 1 + m_Value: 0.05 + cascadeShadowSplit1: + m_OverrideState: 1 + m_Value: 0.15 + cascadeShadowSplit2: + m_OverrideState: 1 + m_Value: 0.3 + cascadeShadowBorder0: + m_OverrideState: 1 + m_Value: 0 + cascadeShadowBorder1: + m_OverrideState: 1 + m_Value: 0 + cascadeShadowBorder2: + m_OverrideState: 1 + m_Value: 0 + cascadeShadowBorder3: + m_OverrideState: 1 + m_Value: 0 diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Global Volume Profile.asset.meta b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Global Volume Profile.asset.meta new file mode 100644 index 00000000000..d2751bfbc3e --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Global Volume Profile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4d502e9676ca62146a92f66b36b2c3cd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Green.mat b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Green.mat new file mode 100644 index 00000000000..3be4936983b --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Green.mat @@ -0,0 +1,263 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-8383016387482546174 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 12 + hdPluginSubTargetMaterialVersions: + m_Keys: [] + m_Values: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Green + m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} + m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT _NORMALMAP_TANGENT_SPACE + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2225 + stringTagMap: {} + disabledShaderPasses: + - TransparentDepthPrepass + - TransparentDepthPostpass + - TransparentBackface + - RayTracingPrepass + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + 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: + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AddPrecomputedVelocity: 0 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 + - _AlphaToMaskInspectorValue: 0 + - _Anisotropy: 0 + - _BlendMode: 0 + - _CoatMask: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 0 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DoubleSidedEnable: 0 + - _DoubleSidedGIMode: 0 + - _DoubleSidedNormalMode: 1 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 1 + - _EmissiveIntensityUnit: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnergyConservingSpecularColor: 1 + - _HeightAmplitude: 0.02 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: 0 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0.5 + - _InvTilingScale: 1 + - _Ior: 1.5 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _MetallicRemapMax: 1 + - _MetallicRemapMin: 0 + - _NormalMapSpace: 0 + - _NormalScale: 1 + - _OpaqueCullMode: 2 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 + - _RayTracing: 0 + - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 + - _RefractionModel: 0 + - _Smoothness: 0.5 + - _SmoothnessRemapMax: 1 + - _SmoothnessRemapMin: 0 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SubsurfaceMask: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 1 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 + - _UVBase: 0 + - _UVDetail: 0 + - _UVEmissive: 0 + - _UseEmissiveIntensity: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestTransparent: 4 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.44369793, g: 1, b: 0, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0.4436979, g: 1, b: 0, a: 1} + - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Green.mat.meta b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Green.mat.meta new file mode 100644 index 00000000000..6e427e26430 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Green.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1840cbc382dd21346a00e0d5ec48d768 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/LightingData.asset b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/LightingData.asset new file mode 100644 index 00000000000..b5ab746f3ad Binary files /dev/null and b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/LightingData.asset differ diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/LightingData.asset.meta b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/LightingData.asset.meta new file mode 100644 index 00000000000..dcf0ff6113f --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/LightingData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 51b8394082e803e47975f4daa47e4748 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 112000000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/ProbeVolumeData.asset b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/ProbeVolumeData.asset new file mode 100644 index 00000000000..0b1068fb099 Binary files /dev/null and b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/ProbeVolumeData.asset differ diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/ProbeVolumeData.asset.meta b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/ProbeVolumeData.asset.meta new file mode 100644 index 00000000000..bbbab1d16f7 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/ProbeVolumeData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a51673b8ec3ae0e48a8e2463c9b5bfdd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Red.mat b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Red.mat new file mode 100644 index 00000000000..a314b6ac732 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Red.mat @@ -0,0 +1,263 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-8383016387482546174 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 12 + hdPluginSubTargetMaterialVersions: + m_Keys: [] + m_Values: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Red + m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} + m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT _NORMALMAP_TANGENT_SPACE + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2225 + stringTagMap: {} + disabledShaderPasses: + - TransparentDepthPrepass + - TransparentDepthPostpass + - TransparentBackface + - RayTracingPrepass + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + 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: + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AddPrecomputedVelocity: 0 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 + - _AlphaToMaskInspectorValue: 0 + - _Anisotropy: 0 + - _BlendMode: 0 + - _CoatMask: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 0 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DoubleSidedEnable: 0 + - _DoubleSidedGIMode: 0 + - _DoubleSidedNormalMode: 1 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 1 + - _EmissiveIntensityUnit: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnergyConservingSpecularColor: 1 + - _HeightAmplitude: 0.02 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: 0 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0.5 + - _InvTilingScale: 1 + - _Ior: 1.5 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _MetallicRemapMax: 1 + - _MetallicRemapMin: 0 + - _NormalMapSpace: 0 + - _NormalScale: 1 + - _OpaqueCullMode: 2 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 + - _RayTracing: 0 + - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 + - _RefractionModel: 0 + - _Smoothness: 0.5 + - _SmoothnessRemapMax: 1 + - _SmoothnessRemapMin: 0 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SubsurfaceMask: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 1 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 + - _UVBase: 0 + - _UVDetail: 0 + - _UVEmissive: 0 + - _UseEmissiveIntensity: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestTransparent: 4 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 0, b: 0, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 0, b: 0, a: 1} + - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Red.mat.meta b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Red.mat.meta new file mode 100644 index 00000000000..04977fe1af7 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV/Red.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b0508405273e2cc4986cc6b960f93f02 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Tests/TestFilters.meta b/TestProjects/HDRP_RuntimeTests/Assets/Tests/TestFilters.meta new file mode 100644 index 00000000000..e12a9b1b139 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Tests/TestFilters.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a3ab664b704b08e4e8d9049bb7c46f56 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Tests/TestFilters/TestCaseFilters.asset b/TestProjects/HDRP_RuntimeTests/Assets/Tests/TestFilters/TestCaseFilters.asset new file mode 100644 index 00000000000..1ffb6c2abd3 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Tests/TestFilters/TestCaseFilters.asset @@ -0,0 +1,42 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f6aa9f32113aec4a8bded44c1febe5c, type: 3} + m_Name: TestCaseFilters + m_EditorClassIdentifier: + filters: + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: 5028fc98db6fe304c90852113dca5b00, type: 3} + ColorSpace: 1 + BuildPlatform: 2 + GraphicsDevice: 16 + XrSdk: + StereoModes: 0 + Reason: Failing + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: 5028fc98db6fe304c90852113dca5b00, type: 3} + ColorSpace: 1 + BuildPlatform: 24 + GraphicsDevice: 21 + XrSdk: + StereoModes: 0 + Reason: Failing + - FilteredScene: {fileID: 0} + FilteredScenes: + - {fileID: 102900000, guid: 5028fc98db6fe304c90852113dca5b00, type: 3} + ColorSpace: 1 + BuildPlatform: 31 + GraphicsDevice: 13 + XrSdk: + StereoModes: 0 + Reason: Failing diff --git a/TestProjects/HDRP_RuntimeTests/Assets/Tests/TestFilters/TestCaseFilters.asset.meta b/TestProjects/HDRP_RuntimeTests/Assets/Tests/TestFilters/TestCaseFilters.asset.meta new file mode 100644 index 00000000000..648c9662940 --- /dev/null +++ b/TestProjects/HDRP_RuntimeTests/Assets/Tests/TestFilters/TestCaseFilters.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 19949a2b50257e944affe512756f2322 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_RuntimeTests/ProjectSettings/EditorBuildSettings.asset b/TestProjects/HDRP_RuntimeTests/ProjectSettings/EditorBuildSettings.asset index 7bf94a1283a..f4e49cd1a63 100644 --- a/TestProjects/HDRP_RuntimeTests/ProjectSettings/EditorBuildSettings.asset +++ b/TestProjects/HDRP_RuntimeTests/ProjectSettings/EditorBuildSettings.asset @@ -32,4 +32,7 @@ EditorBuildSettings: - enabled: 1 path: Assets/Scenes/006-Compositor.unity guid: 78814036fbc87f24bbe8ec788ad92e67 + - enabled: 1 + path: Assets/Scenes/007-BasicAPV.unity + guid: 5028fc98db6fe304c90852113dca5b00 m_configObjects: {} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity index aed9489c07f..b73b3ae3861 100644 --- a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/5x_SkyAndFog/5010_CloudLayer.unity @@ -155,6 +155,7 @@ MonoBehaviour: m_Profile: {fileID: 0} m_StaticLightingSkyUniqueID: 0 m_StaticLightingCloudsUniqueID: 0 + m_StaticLightingVolumetricClouds: 0 --- !u!4 &440300293 Transform: m_ObjectHideFlags: 1 @@ -165,6 +166,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 @@ -239,7 +241,7 @@ PrefabInstance: - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} propertyPath: m_Version - value: 7 + value: 8 objectReference: {fileID: 0} - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} @@ -297,7 +299,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} m_Name: m_EditorClassIdentifier: - isGlobal: 1 + m_IsGlobal: 1 priority: 0 blendDistance: 0 weight: 1 @@ -312,10 +314,109 @@ Transform: m_LocalRotation: {x: -0.21947044, y: -0.16306235, z: 0.04581291, w: 0.9608041} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: -24.004, y: -21.409, z: 10.062} +--- !u!1 &859268402 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 859268406} + - component: {fileID: 859268405} + - component: {fileID: 859268404} + - component: {fileID: 859268403} + m_Layer: 0 + m_Name: Cylinder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!136 &859268403 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 859268402} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5000001 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697} +--- !u!23 &859268404 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 859268402} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &859268405 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 859268402} + m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &859268406 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 859268402} + m_LocalRotation: {x: -0.6182124, y: -0.5235662, z: -0.26186123, w: -0.5245195} + m_LocalPosition: {x: -16.35, y: 5.44, z: -0.68} + m_LocalScale: {x: 1, y: 1.2278, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 21.983, y: -250.298, z: 83.903} --- !u!850595691 &1149913020 LightingSettings: m_ObjectHideFlags: 0 @@ -323,7 +424,7 @@ LightingSettings: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Settings.lighting - serializedVersion: 3 + serializedVersion: 4 m_GIWorkflowMode: 1 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 0 @@ -336,7 +437,7 @@ LightingSettings: m_LightmapMaxSize: 1024 m_BakeResolution: 40 m_Padding: 2 - m_TextureCompression: 1 + m_LightmapCompression: 3 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 @@ -377,6 +478,7 @@ LightingSettings: m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 + m_PVRTiledBaking: 0 --- !u!1 &1211733623 GameObject: m_ObjectHideFlags: 0 @@ -490,6 +592,7 @@ MonoBehaviour: m_BarnDoorAngle: 90 m_BarnDoorLength: 0.05 m_preserveCachedShadow: 0 + m_OnDemandShadowRenderOnPlacement: 1 m_ShadowCascadeRatios: - 0.05 - 0.2 @@ -505,7 +608,6 @@ MonoBehaviour: useOldInspector: 0 useVolumetric: 1 featuresFoldout: 1 - showAdditionalSettings: 5 m_AreaLightEmissiveMeshShadowCastingMode: 0 m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 m_AreaLightEmissiveMeshLayer: -1 @@ -589,10 +691,108 @@ Transform: m_LocalRotation: {x: 0.019990426, y: -0.8984555, z: 0.22855908, w: -0.37435126} m_LocalPosition: {x: 0, y: 2, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 23.312, y: -227.938, z: -13.029} +--- !u!1 &1650258960 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1650258964} + - component: {fileID: 1650258963} + - component: {fileID: 1650258962} + - component: {fileID: 1650258961} + m_Layer: 0 + m_Name: Cube (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1650258961 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1650258960} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1650258962 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1650258960} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1650258963 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1650258960} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1650258964 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1650258960} + m_LocalRotation: {x: -0.16856372, y: -0.5874063, z: -0.048525434, w: 0.79005414} + m_LocalPosition: {x: -14.59, y: 6.84, z: -0.51} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: -18.866, y: -74.487, z: 7.368} --- !u!1 &1996547904 GameObject: m_ObjectHideFlags: 0 @@ -685,7 +885,105 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 100, y: 0.5, z: 100} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2010362230 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2010362234} + - component: {fileID: 2010362233} + - component: {fileID: 2010362232} + - component: {fileID: 2010362231} + m_Layer: 0 + m_Name: Cube (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &2010362231 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2010362230} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2010362232 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2010362230} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2010362233 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2010362230} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2010362234 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2010362230} + m_LocalRotation: {x: -0.16856372, y: -0.5874063, z: -0.048525434, w: 0.79005414} + m_LocalPosition: {x: -15.06, y: 6.65, z: -1.96} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: -18.866, y: -74.487, z: 7.368} diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/5010_CloudLayer.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/5010_CloudLayer.png index e5bd601c4a0..101e82753a9 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/5010_CloudLayer.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/5010_CloudLayer.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:35ff1830c77c9e65fc7f7d0dbccf95f47c3ae4398fb7341d7a95e2425538c134 -size 233075 +oid sha256:0d03357ed7dabf230b4bb9bf1b92ae1a6e1f799f8b8a5a998a67c5fc42f876fc +size 232580 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/5010_CloudLayer.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/5010_CloudLayer.png index b6d0d3e11cc..101e82753a9 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/5010_CloudLayer.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/5010_CloudLayer.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a87f04aae29392a286b618630430184f21c566d81b9af5ab5a0a757b93302c3 -size 233300 +oid sha256:0d03357ed7dabf230b4bb9bf1b92ae1a6e1f799f8b8a5a998a67c5fc42f876fc +size 232580 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/5010_CloudLayer.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/5010_CloudLayer.png index bdbacb32195..097817eb9f6 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/5010_CloudLayer.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/5010_CloudLayer.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d23d3d1466512d66d36532b04405e66ee7aabb3d587270977346b2189a08388 -size 233225 +oid sha256:0d8096dd487c7b6f4bddb3759eb8ba2178fe4c3edf9d64f1c51333f6282ffc9c +size 232669 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5010_CloudLayer.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5010_CloudLayer.png index 10e3c5440cc..7c71126b641 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5010_CloudLayer.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/5010_CloudLayer.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be0a85a64e2c95a909f53da60ae1babc31d1ca93c57c7a6ce7d6e3c6a95ddda4 -size 233313 +oid sha256:e85797653348b8b40001d9d26f123ad47d25ed1f104c61a2d208909197cf4e53 +size 232571 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/5010_CloudLayer.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/5010_CloudLayer.png index e5bd601c4a0..101e82753a9 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/5010_CloudLayer.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/5010_CloudLayer.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:35ff1830c77c9e65fc7f7d0dbccf95f47c3ae4398fb7341d7a95e2425538c134 -size 233075 +oid sha256:0d03357ed7dabf230b4bb9bf1b92ae1a6e1f799f8b8a5a998a67c5fc42f876fc +size 232580 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/5010_CloudLayer.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/5010_CloudLayer.png index 938ad0835c1..f23bc63a2ac 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/5010_CloudLayer.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsPlayer/Direct3D11/None/5010_CloudLayer.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a1651f1d6879f05c07f898522c1c871d89f7688665c9b72f200e62fde756674 -size 232840 +oid sha256:7602d8d2f65bffc0315313099dc2d545bc4392d915a78a6ceaaae81b263cf5f1 +size 232352 diff --git a/com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs b/com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs index 8b0ca7e9b91..87c17912ed6 100644 --- a/com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs +++ b/com.unity.render-pipelines.core/Editor/CoreEditorUtils.cs @@ -991,7 +991,16 @@ public static GameObject CreateGameObject(string name, UnityEngine.Object contex GameObjectUtility.SetParentAndAlign(go, context as GameObject); Undo.RegisterCreatedObjectUndo(go, "Create " + go.name); Selection.activeObject = go; - EditorApplication.ExecuteMenuItem("GameObject/Move To View"); + + if (parent != null) + go.transform.localPosition = Vector3.zero; + else + { + if (EditorPrefs.GetBool("Create3DObject.PlaceAtWorldOrigin", false)) + go.transform.localPosition = Vector3.zero; + else + EditorApplication.ExecuteMenuItem("GameObject/Move To View"); + } return go; } diff --git a/com.unity.render-pipelines.core/Editor/Lighting/LightAnchorEditor.cs b/com.unity.render-pipelines.core/Editor/Lighting/LightAnchorEditor.cs index 9e6660fbde7..7f59dc5c41d 100644 --- a/com.unity.render-pipelines.core/Editor/Lighting/LightAnchorEditor.cs +++ b/com.unity.render-pipelines.core/Editor/Lighting/LightAnchorEditor.cs @@ -33,6 +33,7 @@ public class LightAnchorEditor : Editor SerializedProperty m_DistanceProperty; SerializedProperty m_FrameSpaceProperty; SerializedProperty m_AnchorPositionOverrideProperty; + SerializedProperty m_AnchorPositionOffsetProperty; LightAnchor manipulator { @@ -132,7 +133,8 @@ public override void OnInspectorGUI() EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(m_DistanceProperty, LightAnchorStyles.distanceProperty); - distanceChanged = EditorGUI.EndChangeCheck(); + if (distanceChanged = EditorGUI.EndChangeCheck()) + m_DistanceProperty.floatValue = Mathf.Min(m_DistanceProperty.floatValue, LightAnchor.k_MaxDistance); EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(m_FrameSpaceProperty, LightAnchorStyles.upDirectionProperty); @@ -142,6 +144,15 @@ public override void OnInspectorGUI() EditorGUILayout.PropertyField(m_AnchorPositionOverrideProperty, LightAnchorStyles.anchorPositionOverrideProperty); positionOverrideChanged = EditorGUI.EndChangeCheck(); + if (m_AnchorPositionOverrideProperty.objectReferenceValue != null) + { + EditorGUI.indentLevel++; + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_AnchorPositionOffsetProperty, LightAnchorStyles.anchorPositionOffsetProperty); + positionOverrideChanged |= EditorGUI.EndChangeCheck(); + EditorGUI.indentLevel--; + } + if (m_FoldoutPreset = EditorGUILayout.Foldout(m_FoldoutPreset, "Common")) { Color cachedColor = GUI.backgroundColor; @@ -301,8 +312,9 @@ public override void OnInspectorGUI() Debug.LogError($"Can't assign '{newTransform.name}' because it's a child of the Light Anchor component"); else { - float newDistance = Vector3.Distance(manipulator.transform.position, newTransform.position); manipulator.anchorPositionOverride = newTransform; + manipulator.anchorPositionOffset = m_AnchorPositionOffsetProperty.vector3Value; + float newDistance = Vector3.Distance(manipulator.transform.position, manipulator.anchorPosition); // Orient the object to face the new override position manipulator.SynchronizeOnTransform(camera); // And adjust it's distance to avoid modifying it's position. @@ -358,6 +370,7 @@ void OnEnable() m_DistanceProperty = serializedObject.FindProperty("m_Distance"); m_FrameSpaceProperty = serializedObject.FindProperty("m_FrameSpace"); m_AnchorPositionOverrideProperty = serializedObject.FindProperty("m_AnchorPositionOverride"); + m_AnchorPositionOffsetProperty = serializedObject.FindProperty("m_AnchorPositionOffset"); } void EditorToolsOnactiveToolChanged() @@ -599,6 +612,7 @@ static class LightAnchorStyles static public GUIContent distanceProperty = EditorGUIUtility.TrTextContent("Distance", "Controls how far 'back', the light is placed from its anchor"); static public GUIContent upDirectionProperty = EditorGUIUtility.TrTextContent("Up direction", "Specifies the space in which the up direction of the anchor is defined. Local is relative to the camera."); static public GUIContent anchorPositionOverrideProperty = EditorGUIUtility.TrTextContent("Anchor Position Override", "Specifies the anchor position manually instead of relying on the angles, distance and transform position to compute the anchor position."); + static public GUIContent anchorPositionOffsetProperty = EditorGUIUtility.TrTextContent("Anchor Position Offset", "Specifies the anchor position offset relative to the anchor position override."); static public GUIContent[] angleSubContent = new[] { EditorGUIUtility.TrTextContent("Orbit"), diff --git a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbePlacement.cs b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbePlacement.cs index 8db954ef05c..d3506c75e51 100644 --- a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbePlacement.cs +++ b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbePlacement.cs @@ -377,7 +377,7 @@ static void SubdivideSubCell(ProbeReferenceVolume.Volume cellVolume, ProbeSubdiv VoxelizeProbeVolumeData(cmd, cellAABB, probeVolumes, ctx); // Find the maximum subdivision level we can have in this cell (avoid extra work if not needed) - int startSubdivisionLevel = ctx.maxSubdivisionLevelInSubCell - GetMaxSubdivision(ctx, probeVolumes.Max(p => p.component.GetMaxSubdivMultiplier())); + int startSubdivisionLevel = Mathf.Max(0, ctx.maxSubdivisionLevelInSubCell - GetMaxSubdivision(ctx, probeVolumes.Max(p => p.component.GetMaxSubdivMultiplier()))); for (int subdivisionLevel = startSubdivisionLevel; subdivisionLevel <= ctx.maxSubdivisionLevelInSubCell; subdivisionLevel++) { // Add the bricks from the probe volume min subdivision level: @@ -416,6 +416,8 @@ static void SubdivideSubCell(ProbeReferenceVolume.Volume cellVolume, ProbeSubdiv cmd.WaitAllAsyncReadbackRequests(); Graphics.ExecuteCommandBuffer(cmd); + cmd.Clear(); + CommandBufferPool.Release(cmd); } static bool RastersizeGeometry(CommandBuffer cmd, ProbeReferenceVolume.Volume cellVolume, GPUSubdivisionContext ctx, diff --git a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeSubdivisionContext.cs b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeSubdivisionContext.cs index cba47d6c04d..bf2c161abde 100644 --- a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeSubdivisionContext.cs +++ b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeSubdivisionContext.cs @@ -159,7 +159,8 @@ public void Initialize(ProbeReferenceVolumeProfile profile, Vector3 refVolOrigin if ((flags & StaticEditorFlags.ContributeGI) == 0) continue; - var volume = ProbePlacement.ToVolume(r.bounds); + // Inflate a bit the volume in case it's too small (plane case) + var volume = ProbePlacement.ToVolume(new Bounds(r.bounds.center, r.bounds.size + Vector3.one * 0.01f)); renderers.Add((r, volume)); } diff --git a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeBakingWindow.cs b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeBakingWindow.cs index c71329e39fc..c8ed5a69585 100644 --- a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeBakingWindow.cs +++ b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeBakingWindow.cs @@ -173,6 +173,12 @@ void InitializeBakingSetList() void RefreshAfterUndo() { + if (!ProbeReferenceVolume.instance.isInitialized || !ProbeReferenceVolume.instance.enabledBySRP) + { + // Feature not enabled, nothing to do. + return; + } + InitializeBakingSetList(); OnBakingSetSelected(m_BakingSets); diff --git a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeUI.Drawer.cs b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeUI.Drawer.cs index 16e6f5d25ef..f55ffc50552 100644 --- a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeUI.Drawer.cs +++ b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeUI.Drawer.cs @@ -147,54 +147,53 @@ static void Drawer_VolumeContent(SerializedProbeVolume serialized, Editor owner) } EditorGUI.BeginDisabledGroup(!hasProfile); - var rect = EditorGUILayout.GetControlRect(true); EditorGUI.BeginProperty(rect, Styles.s_HighestSubdivLevel, serialized.highestSubdivisionLevelOverride); EditorGUI.BeginProperty(rect, Styles.s_LowestSubdivLevel, serialized.lowestSubdivisionLevelOverride); // Round min and max subdiv int maxSubdiv = ProbeReferenceVolume.instance.GetMaxSubdivision() - 1; - // it's likely we don't have a profile loaded yet. - if (maxSubdiv < 0) + if (ProbeReferenceVolume.instance.sceneData != null) { - if (ProbeReferenceVolume.instance.sceneData != null) - { - var profile = ProbeReferenceVolume.instance.sceneData.GetProfileForScene(pv.gameObject.scene); + var profile = ProbeReferenceVolume.instance.sceneData.GetProfileForScene(pv.gameObject.scene); - if (profile != null) - { - ProbeReferenceVolume.instance.SetMinBrickAndMaxSubdiv(profile.minBrickSize, profile.maxSubdivision); - maxSubdiv = ProbeReferenceVolume.instance.GetMaxSubdivision() - 1; - } - else - { - maxSubdiv = 0; - } + if (profile != null) + { + ProbeReferenceVolume.instance.SetMinBrickAndMaxSubdiv(profile.minBrickSize, profile.maxSubdivision); + maxSubdiv = ProbeReferenceVolume.instance.GetMaxSubdivision() - 1; + } + else + { + maxSubdiv = Mathf.Max(0, maxSubdiv); } } EditorGUILayout.LabelField("Subdivision Overrides", EditorStyles.boldLabel); EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(serialized.overridesSubdivision, Styles.s_OverridesSubdivision); + EditorGUI.BeginDisabledGroup(!serialized.overridesSubdivision.boolValue); + int value = serialized.highestSubdivisionLevelOverride.intValue; // We were initialized, but we cannot know the highest subdiv statically, so we need to resort to this. if (serialized.highestSubdivisionLevelOverride.intValue < 0) serialized.highestSubdivisionLevelOverride.intValue = maxSubdiv; - serialized.highestSubdivisionLevelOverride.intValue = EditorGUILayout.IntSlider(Styles.s_HighestSubdivLevel, serialized.highestSubdivisionLevelOverride.intValue, 0, maxSubdiv); - serialized.lowestSubdivisionLevelOverride.intValue = EditorGUILayout.IntSlider(Styles.s_LowestSubdivLevel, serialized.lowestSubdivisionLevelOverride.intValue, 0, maxSubdiv); + serialized.highestSubdivisionLevelOverride.intValue = Mathf.Min(maxSubdiv, EditorGUILayout.IntSlider(Styles.s_HighestSubdivLevel, serialized.highestSubdivisionLevelOverride.intValue, 0, maxSubdiv)); + serialized.lowestSubdivisionLevelOverride.intValue = Mathf.Min(maxSubdiv, EditorGUILayout.IntSlider(Styles.s_LowestSubdivLevel, serialized.lowestSubdivisionLevelOverride.intValue, 0, maxSubdiv)); serialized.lowestSubdivisionLevelOverride.intValue = Mathf.Min(serialized.lowestSubdivisionLevelOverride.intValue, serialized.highestSubdivisionLevelOverride.intValue); EditorGUI.EndProperty(); EditorGUI.EndProperty(); - int minSubdivInVolume = serialized.lowestSubdivisionLevelOverride.intValue; - int maxSubdivInVolume = serialized.highestSubdivisionLevelOverride.intValue; + int minSubdivInVolume = serialized.overridesSubdivision.boolValue ? serialized.lowestSubdivisionLevelOverride.intValue : 0; + int maxSubdivInVolume = serialized.overridesSubdivision.boolValue ? serialized.highestSubdivisionLevelOverride.intValue : maxSubdiv; EditorGUI.indentLevel--; if (hasProfile) EditorGUILayout.HelpBox($"The distance between probes will fluctuate between : {ProbeReferenceVolume.instance.GetDistanceBetweenProbes(maxSubdiv - maxSubdivInVolume)}m and {ProbeReferenceVolume.instance.GetDistanceBetweenProbes(maxSubdiv - minSubdivInVolume)}m", MessageType.Info); EditorGUI.EndDisabledGroup(); + EditorGUI.EndDisabledGroup(); if (EditorGUI.EndChangeCheck()) { diff --git a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeUI.Skin.cs b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeUI.Skin.cs index 959f003e597..0dacaaa504c 100644 --- a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeUI.Skin.cs +++ b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeVolumeUI.Skin.cs @@ -8,6 +8,7 @@ internal static class Styles { internal static readonly GUIContent s_Size = new GUIContent("Size", "Modify the size of this Probe Volume. This is independent of the Transform's Scale."); internal static readonly GUIContent s_GlobalVolume = new GUIContent("Global", "If the volume is marked as global, it will be fit to the scene content every time the scene is saved or the baking starts."); + internal static readonly GUIContent s_OverridesSubdivision = new GUIContent("Override Subdivision Levels", "Whether to override or not the subdivision levels."); internal static readonly GUIContent s_HighestSubdivLevel = new GUIContent("Highest Subdivision Level", "Overrides the highest subdivision level used by the system. This determines how finely a probe volume is subdivided, lower values means larger minimum distance between probes."); internal static readonly GUIContent s_LowestSubdivLevel = new GUIContent("Lowest Subdivision Level", "Overrides the lowest subdivision level used by the system. This determines how coarsely a probe volume is allowed to be subdivided, higher values means smaller maximum distance between probes."); internal static readonly GUIContent s_ObjectLayerMask = new GUIContent("Object Layer Mask", "Control which layers will be used to select the meshes for the probe placement algorithm."); diff --git a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/SerializedProbeVolume.cs b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/SerializedProbeVolume.cs index e10e428751f..b6900e1b628 100644 --- a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/SerializedProbeVolume.cs +++ b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/SerializedProbeVolume.cs @@ -6,6 +6,7 @@ internal class SerializedProbeVolume internal SerializedProperty globalVolume; internal SerializedProperty size; + internal SerializedProperty overridesSubdivision; internal SerializedProperty highestSubdivisionLevelOverride; internal SerializedProperty lowestSubdivisionLevelOverride; internal SerializedProperty objectLayerMask; @@ -23,7 +24,7 @@ internal SerializedProbeVolume(SerializedObject obj) geometryDistanceOffset = serializedObject.FindProperty("geometryDistanceOffset"); highestSubdivisionLevelOverride = serializedObject.FindProperty("highestSubdivLevelOverride"); lowestSubdivisionLevelOverride = serializedObject.FindProperty("lowestSubdivLevelOverride"); - + overridesSubdivision = serializedObject.FindProperty("overridesSubdivLevels"); } internal void Apply() diff --git a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/VoxelizeScene.shader b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/VoxelizeScene.shader index c1bfe4c5ac1..c978da58775 100644 --- a/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/VoxelizeScene.shader +++ b/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/VoxelizeScene.shader @@ -5,6 +5,10 @@ Shader "Hidden/ProbeVolume/VoxelizeScene" Tags { "RenderType"="Opaque" } LOD 100 + HLSLINCLUDE + #define EPSILON (1e-10) + ENDHLSL + Pass { Name "Voxelize Mesh" @@ -68,10 +72,10 @@ Shader "Hidden/ProbeVolume/VoxelizeScene" float4 frag(VertexToFragment i) : COLOR { - if (any(i.cellPos01 < 0) || any(i.cellPos01 >= 1)) + if (any(i.cellPos01 < -EPSILON) || any(i.cellPos01 >= 1 + EPSILON)) return 0; - uint3 pos = uint3(i.cellPos01 * _OutputSize); + uint3 pos = min(uint3(i.cellPos01 * _OutputSize), _OutputSize); _Output[pos] = 1; @@ -93,7 +97,7 @@ Shader "Hidden/ProbeVolume/VoxelizeScene" #pragma vertex vert #pragma fragment frag #pragma target 4.5 - #pragma enable_d3d11_debug_symbols + // #pragma enable_d3d11_debug_symbols #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" @@ -167,14 +171,14 @@ Shader "Hidden/ProbeVolume/VoxelizeScene" float4 frag(VertexToFragment i) : COLOR { - if (any(i.cellPos01 < 0) || any(i.cellPos01 >= 1)) + if (any(i.cellPos01 < -EPSILON) || any(i.cellPos01 >= 1 + EPSILON)) return 0; // Offset the cellposition with the heightmap float hole = _TerrainHolesTexture.Sample(s_point_clamp_sampler, float3(i.uv, 0)); clip(hole == 0.0f ? -1 : 1); - uint3 pos = uint3(i.cellPos01 * _OutputSize); + uint3 pos = min(uint3(i.cellPos01 * _OutputSize), _OutputSize); _Output[pos] = 1; return float4(i.cellPos01.xyz, 1); diff --git a/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeBrickIndex.cs b/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeBrickIndex.cs index b8c623d41d4..cb87009288d 100644 --- a/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeBrickIndex.cs +++ b/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeBrickIndex.cs @@ -66,7 +66,11 @@ struct BrickMeta Dictionary> m_VoxelToBricks; Dictionary m_BricksToVoxels; - int m_VoxelSubdivLevel = 3; + int GetVoxelSubdivLevel() + { + int defaultVoxelSubdivLevel = 3; + return Mathf.Min(defaultVoxelSubdivLevel, ProbeReferenceVolume.instance.GetMaxSubdivision() - 1); + } bool m_NeedUpdateIndexComputeBuffer; @@ -137,11 +141,11 @@ void MapBrickToVoxels(ProbeBrickIndex.Brick brick, HashSet voxels) { // create a list of all voxels this brick will touch int brick_subdiv = brick.subdivisionLevel; - int voxels_touched_cnt = (int)Mathf.Pow(3, Mathf.Max(0, brick_subdiv - m_VoxelSubdivLevel)); + int voxels_touched_cnt = (int)Mathf.Pow(3, Mathf.Max(0, brick_subdiv - GetVoxelSubdivLevel())); Vector3Int ipos = brick.position; int brick_size = ProbeReferenceVolume.CellSize(brick.subdivisionLevel); - int voxel_size = ProbeReferenceVolume.CellSize(m_VoxelSubdivLevel); + int voxel_size = ProbeReferenceVolume.CellSize(GetVoxelSubdivLevel()); if (voxels_touched_cnt <= 1) { @@ -161,7 +165,7 @@ void MapBrickToVoxels(ProbeBrickIndex.Brick brick, HashSet voxels) void ClearVoxel(Vector3Int pos, CellIndexUpdateInfo cellInfo) { Vector3Int vx_min, vx_max; - ClipToIndexSpace(pos, m_VoxelSubdivLevel, out vx_min, out vx_max, cellInfo); + ClipToIndexSpace(pos, GetVoxelSubdivLevel(), out vx_min, out vx_max, cellInfo); UpdatePhysicalIndex(vx_min, vx_max, -1, cellInfo); } @@ -441,7 +445,7 @@ void UpdateIndexForVoxel(Vector3Int voxel, List bricks, List m_CellsToBeLoaded = new List(); + + // Ref counting here as a separate dictionary as a temporary measure to facilitate future changes that will soon go in. + // cell.index, refCount + Dictionary m_CellRefCounting = new Dictionary(); + void InvalidateAllCellRefs() + { + m_CellRefCounting.Clear(); + } + bool m_NeedLoadAsset = false; bool m_ProbeReferenceVolumeInit = false; bool m_EnabledBySRP = false; @@ -693,20 +702,34 @@ void RemoveCell(Cell cell) { if (cell.loaded) { - if (cells.ContainsKey(cell.index)) - cells.Remove(cell.index); + bool needsUnloading = true; + if (m_CellRefCounting.ContainsKey(cell.index)) + { + m_CellRefCounting[cell.index]--; + needsUnloading = m_CellRefCounting[cell.index] <= 0; + if (needsUnloading) + { + m_CellRefCounting[cell.index] = 0; + } + } - if (m_ChunkInfo.ContainsKey(cell.index)) - m_ChunkInfo.Remove(cell.index); + if (needsUnloading) + { + if (cells.ContainsKey(cell.index)) + cells.Remove(cell.index); - if (cell.flatIdxInCellIndices >= 0) - m_CellIndices.MarkCellAsUnloaded(cell.flatIdxInCellIndices); + if (m_ChunkInfo.ContainsKey(cell.index)) + m_ChunkInfo.Remove(cell.index); - RegId cellBricksID = new RegId(); - if (m_CellToBricks.TryGetValue(cell, out cellBricksID)) - { - ReleaseBricks(cellBricksID); - m_CellToBricks.Remove(cell); + if (cell.flatIdxInCellIndices >= 0) + m_CellIndices.MarkCellAsUnloaded(cell.flatIdxInCellIndices); + + RegId cellBricksID = new RegId(); + if (m_CellToBricks.TryGetValue(cell, out cellBricksID)) + { + ReleaseBricks(cellBricksID); + m_CellToBricks.Remove(cell); + } } } @@ -715,6 +738,9 @@ void RemoveCell(Cell cell) void AddCell(Cell cell, List chunks) { + if (m_CellRefCounting.ContainsKey(cell.index)) m_CellRefCounting[cell.index]++; + else m_CellRefCounting.Add(cell.index, 1); + cell.loaded = true; cells[cell.index] = cell; @@ -898,6 +924,9 @@ void PerformPendingLoading() // Load the ones that are already active but reload if we said we need to load if (m_HasChangedIndex) { + // We changed index so all assets are going to be re-loaded, hence the refs will be repopulated from scratch + InvalidateAllCellRefs(); + foreach (var asset in m_ActiveAssets.Values) { LoadAsset(asset); diff --git a/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolume.cs b/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolume.cs index d53d5bf7453..8a33a93fad6 100644 --- a/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolume.cs +++ b/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolume.cs @@ -31,6 +31,8 @@ public class ProbeVolume : MonoBehaviour public int lowestSubdivLevelOverride = 0; [HideInInspector] public int highestSubdivLevelOverride = -1; + [HideInInspector] + public bool overridesSubdivLevels = false; [SerializeField] internal bool mightNeedRebaking = false; @@ -114,6 +116,7 @@ public override int GetHashCode() unchecked { hash = hash * 23 + size.GetHashCode(); + hash = hash * 23 + overridesSubdivLevels.GetHashCode(); hash = hash * 23 + highestSubdivLevelOverride.GetHashCode(); hash = hash * 23 + lowestSubdivLevelOverride.GetHashCode(); hash = hash * 23 + geometryDistanceOffset.GetHashCode(); @@ -128,13 +131,13 @@ public override int GetHashCode() internal float GetMinSubdivMultiplier() { float maxSubdiv = ProbeReferenceVolume.instance.GetMaxSubdivision() - 1; - return Mathf.Max(0.0f, lowestSubdivLevelOverride / maxSubdiv); + return overridesSubdivLevels ? Mathf.Clamp(lowestSubdivLevelOverride / maxSubdiv, 0.0f, 1.0f) : 0.0f; } internal float GetMaxSubdivMultiplier() { float maxSubdiv = ProbeReferenceVolume.instance.GetMaxSubdivision() - 1; - return Mathf.Max(0.0f, highestSubdivLevelOverride / maxSubdiv); + return overridesSubdivLevels ? Mathf.Clamp(highestSubdivLevelOverride / maxSubdiv, 0.0f, 1.0f) : 1.0f; } // Momentarily moving the gizmo rendering for bricks and cells to Probe Volume itself, diff --git a/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeSceneData.cs b/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeSceneData.cs index ac07023f734..9d789db7d86 100644 --- a/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeSceneData.cs +++ b/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ProbeVolumeSceneData.cs @@ -281,7 +281,7 @@ private int FindInflatingBrickSize(Vector3 size, ProbeVolume pv) float minSideInBricks = Mathf.CeilToInt(minSizedDim / minBrickSize); int absoluteMaxSubdiv = ProbeReferenceVolume.instance.GetMaxSubdivision() - 1; - minSideInBricks = Mathf.Max(minSideInBricks, Mathf.Pow(3, absoluteMaxSubdiv - pv.highestSubdivLevelOverride)); + minSideInBricks = Mathf.Max(minSideInBricks, Mathf.Pow(3, absoluteMaxSubdiv - (pv.overridesSubdivLevels ? pv.highestSubdivLevelOverride : 0))); int subdivLevel = Mathf.FloorToInt(Mathf.Log(minSideInBricks, 3)); return subdivLevel; diff --git a/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ShaderVariablesProbeVolumes.cs b/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ShaderVariablesProbeVolumes.cs index 6ee1e2bfef1..e31f3670cde 100644 --- a/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ShaderVariablesProbeVolumes.cs +++ b/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ShaderVariablesProbeVolumes.cs @@ -16,8 +16,8 @@ internal unsafe struct ShaderVariablesProbeVolumes public Vector3 _PoolDim; public float _ViewBias; - public float _PVSamplingNoise; public Vector3 _MinCellPosition; + public float _PVSamplingNoise; public Vector3 _CellIndicesDim; public float _CellInMeters; diff --git a/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ShaderVariablesProbeVolumes.cs.hlsl b/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ShaderVariablesProbeVolumes.cs.hlsl index 6d057e8e715..33515c029cf 100644 --- a/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ShaderVariablesProbeVolumes.cs.hlsl +++ b/com.unity.render-pipelines.core/Runtime/Lighting/ProbeVolume/ShaderVariablesProbeVolumes.cs.hlsl @@ -9,8 +9,8 @@ GLOBAL_CBUFFER_START(ShaderVariablesProbeVolumes, b5) float3 _PoolDim; float _ViewBias; - float _PVSamplingNoise; float3 _MinCellPosition; + float _PVSamplingNoise; float3 _CellIndicesDim; float _CellInMeters; float _CellInMinBricks; diff --git a/com.unity.render-pipelines.core/Runtime/Lights/LightAnchor.cs b/com.unity.render-pipelines.core/Runtime/Lights/LightAnchor.cs index e8a88932005..0bfd68fc275 100644 --- a/com.unity.render-pipelines.core/Runtime/Lights/LightAnchor.cs +++ b/com.unity.render-pipelines.core/Runtime/Lights/LightAnchor.cs @@ -17,6 +17,7 @@ public class LightAnchor : MonoBehaviour { const float k_ArcRadius = 5; const float k_AxisLength = 10; + internal const float k_MaxDistance = 10000f; [SerializeField, Min(0)] float m_Distance = 0f; @@ -24,6 +25,8 @@ public class LightAnchor : MonoBehaviour UpDirection m_FrameSpace = UpDirection.World; [SerializeField] Transform m_AnchorPositionOverride; + [SerializeField] + Vector3 m_AnchorPositionOffset; [SerializeField] float m_Yaw; @@ -74,7 +77,7 @@ public float roll public float distance { get => m_Distance; - set => m_Distance = Mathf.Max(0, value); + set => m_Distance = Mathf.Clamp(value, 0f, k_MaxDistance); } /// @@ -109,7 +112,7 @@ public Vector3 anchorPosition get { if (anchorPositionOverride != null) - return anchorPositionOverride.position; + return anchorPositionOverride.position + anchorPositionOverride.TransformDirection(anchorPositionOffset); else return transform.position + transform.forward * distance; } @@ -132,6 +135,15 @@ public Transform anchorPositionOverride set => m_AnchorPositionOverride = value; } + /// + /// Offset relative to the position of the anchor position override transform in object space. + /// + public Vector3 anchorPositionOffset + { + get => m_AnchorPositionOffset; + set => m_AnchorPositionOffset = value; + } + /// /// Normalizes the input angle to be in the range of -180 and 180. /// diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 9fdde1f36a6..5eb89299016 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -18,6 +18,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed missing DisallowMultipleComponent annotations in HDAdditionalReflectionData and HDAdditionalLightData (case 1365879). - Fixed support for light/shadow dimmers (volumetric or not) in path tracing. - Fixed ambient occlusion strenght incorrectly using GTAOMultiBounce +- Fixed decal position when created from context menu. (case 1368987) +- Fixed the clouds not taking properly into account the fog when in distant mode and with a close far plane (case 1367993). +- Fixed selection of light types (point, area, directional) for path-traced Unlit shadow mattes. +- Fixed precision issues with the scene voxelization for APV, especially with geometry at the origin. +- Fixed the volumetric clouds debug view not taking into account the exposure and leading to Nans (case 1365054). +- Fixed the dependency between transparent SSR and transparent depth prepass being implicit (case 1365915). +- Fixed depth pyramid being incorrect when having multiple cameras (scene view and gameview) and when hardware DRS was activated. +- Fixed the cloudlayer not using depth buffer. +- Fixed support for orthographic camera in path tracing. +- Fixed crossfade not working on the HD ST8 ShaderGraph [case 1369586](https://fogbugz.unity3d.com/f/cases/1369586/) +- Fixed minor performance issues in SSGI (case 1367144). + +### Changed +- Changed the max distance for Light Anchors to avoid unstability with high values (case 1362802). ## [12.0.0] - 2021-01-11 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Accumulation.md b/com.unity.render-pipelines.high-definition/Documentation~/Accumulation.md index b5b0d5756d1..803d86279be 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Accumulation.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Accumulation.md @@ -117,9 +117,9 @@ In this example, you can see that the slow open profile creates a motion trail a ## High Quality Anti-aliasing with Accumulation -You can use the accumulation API to create a high quality antialiased frame, similar to a [SuperSampling](https://en.wikipedia.org/wiki/Supersampling) effect. The accumulation API uses fewer memory resources in the GPU than higher resolution rendering. +You can use the accumulation API to create a high quality antialiased frame, similar to the [SuperSampling](https://en.wikipedia.org/wiki/Supersampling) method. The accumulation API uses fewer memory resources in the GPU than higher resolution rendering. -To do this, use the accumulation API to jitter the projection matrix of each rendered subframe. The following script example uses the this method to perform high quality antialiasing : +To do this, use the accumulation API to jitter the projection matrix of each rendered subframe. The following script example uses this method to perform high quality antialiasing : ```C# public class SuperSampling : MonoBehaviour diff --git a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md index e4af1424679..56be6ce1166 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Asset.md @@ -119,7 +119,7 @@ Use the Reflection settings to configure the max number and resolution of the pr | **Property** | **Description** | | ---------------------------------------- | ------------------------------------------------------------ | | **Screen Space Reflection** | Enable the checkbox to make HDRP support [screen space reflection](https://docs.unity3d.com/Manual/PostProcessing-ScreenSpaceReflection.html). SSR is a technique for calculating reflections by reusing screen space data. | -| **- Transparent** | Enable the checkbox to make HDRP support [screen space reflection](https://docs.unity3d.com/Manual/PostProcessing-ScreenSpaceReflection.html) on transparent materials. | +| **- Transparent** | Enable the checkbox to make HDRP support [screen space reflection](https://docs.unity3d.com/Manual/PostProcessing-ScreenSpaceReflection.html) on transparent materials. This feature requires the transparent depth render prepasses to be enabled on the HDRP asset.| | **Reflection and Planar Probes Format** | Color format used for reflection and planar probes. | | **Compress Reflection Probe Cache** | Enable the checkbox to compress the [Reflection Probe](Reflection-Probe.md) cache in order to save space on disk. | | **Reflection Cubemap Size** | Use the drop-down to select the maximum resolution of individual Reflection Probe[ ](https://docs.unity3d.com/Manual/class-Cubemap.html)[cubemaps](https://docs.unity3d.com/Manual/class-Cubemap.html). | diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Light-Layers.md b/com.unity.render-pipelines.high-definition/Documentation~/Light-Layers.md index c0c261a3041..e8490955ea6 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Light-Layers.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Light-Layers.md @@ -60,4 +60,4 @@ To restore the transmission effect, create a Point Light and assign it to the sa ![](Images/LightLayers3.png) -For more information on this process, see Pierre Donzallaz’s [expert guide](https://docs.unity3d.com/uploads/ExpertGuides/Create_High-Quality_Light_Fixtures_in_Unity.pdf) on creating high quality light fixtures in Unity. +For more information on this process, see Pierre Donzallaz’s [expert guide](https://pydonzallaz.files.wordpress.com/2019/02/create-high-quality-light-fixtures-in-unity.pdf) on creating high quality light fixtures in Unity. diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Override-Screen-Space-Reflection.md b/com.unity.render-pipelines.high-definition/Documentation~/Override-Screen-Space-Reflection.md index f6ed9eaab51..c50fb470db8 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Override-Screen-Space-Reflection.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Override-Screen-Space-Reflection.md @@ -34,7 +34,8 @@ HDRP uses the [Volume](Volumes.md) framework to calculate SSR, so to enable and | **Property** | **Description** | | ----------------------------- | ------------------------------------------------------------ | -| **Enable** | Indicates whether HDRP processes SSR for Cameras in the influence of this effect's Volume. | +| **Enable (Opaque)** | Indicates whether HDRP processes SSR on opaque objects for Cameras in the influence of this effect's Volume. | +| **Enable (Transparent)** | Indicates whether HDRP processes SSR on transparent objects for Cameras in the influence of this effect's Volume. | | **Tracing** | Specifies the method HDRP uses to calculate reflections. Depending on the option you select, the properties visible in the Inspector change. For more information on what the options do, see [tracing modes](#tracing-modes). The options are:
• **Ray Marching**: Uses a screen-space ray marching solution to calculate reflections. For the list of properties this option exposes, see [Screen-space](#screen-space).
• **Ray Tracing**: Uses ray tracing to calculate reflections. For information on ray-traced reflections, see [ray-traced reflection](Ray-Traced-Reflections.md). For the list of properties this option exposes, see [Ray-traced](#ray-traced).
• **Mixed**: Uses a combination of ray tracing and ray marching to calculate reflections. For the list of properties this option exposes, see [Ray-traced](#ray-traced). | | **Algorithm** | Specifies the algorithm to use for the screen-space reflection effect. The options are:
• **Approximation**: Approximates screen-space reflection to quickly calculate a result. This solution is less precise than **PBR Accumulation**, particularly for rough surfaces, but is less resource intensive.
• **PBR Accumulation**: Accumulates multiple frames to calculate a more accurate result. You can control the amount of accumulation using **Accumulation Factor**. This solution might produce more ghosting than **Approximation**, due to the accumulation, and is also more resources intensive. HDRP does not apply this algorithm to transparent material and instead always uses **Approximation**. | | **Minimum Smoothness** | Use the slider to set the minimum amount of surface smoothness at which HDRP performs SSR tracing. Lower values result in HDRP performing SSR tracing for less smooth GameObjects. If the smoothness value of the pixel is lower than this value, HDRP falls back to the next available reflection method in the [reflection hierarchy](Reflection-in-HDRP.md#ReflectionHierarchy). | @@ -83,3 +84,5 @@ If a transparent material has **Receive SSR Transparent** enabled, HDRP always u ### Ray-traced reflection Currently, ray tracing in HDRP does not support [decals](decal.md). This means that, when you use ray-traced reflection, decals do not appear in reflective surfaces. + +If a transparent material has **Receive SSR Transparent** enabled, HDRP will evaluate the reflections as smooth. diff --git a/com.unity.render-pipelines.high-definition/Documentation~/creating-and-editing-lights-at-runtime.md b/com.unity.render-pipelines.high-definition/Documentation~/creating-and-editing-lights-at-runtime.md index bfcac6cfc7e..9fdf76acc97 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/creating-and-editing-lights-at-runtime.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/creating-and-editing-lights-at-runtime.md @@ -1,10 +1,10 @@ # Creating and editing lights at runtime -The High Definition Render Pipeline (HDRP) extends Unity's [Light](https://docs.unity3d.com/Manual/class-Light.html) component with additional data and functionality. To do this, it adds the [HDAdditionalLightData](./api/UnityEngine.Rendering.HighDefinition.HDAdditionalLightData.html) component to the GameObject that the Light component is attached to. Because of this, you cannot create and edit Lights at runtime in the usual way. This document explains how to create an HDRP [Light](Light-Component.md) at runtime and how to edit its properties. +The High Definition Render Pipeline (HDRP) extends Unity's [Light](https://docs.unity3d.com/Manual/class-Light.html) component with additional data and functionality. To do this, it adds the [HDAdditionalLightData](xref:UnityEngine.Rendering.HighDefinition.HDAdditionalLightData) component to the GameObject that the Light component is attached to. Because of this, you cannot create and edit Lights at runtime in the usual way. This document explains how to create an HDRP [Light](Light-Component.md) at runtime and how to edit its properties. ## Creating a new light -HDRP provides a utility function that adds a Light component to a GameObject, and sets up its dependencies. The function is `AddHDLight` and it takes an [HDLightTypeAndShape](./api/UnityEngine.Rendering.HighDefinition.HDLightTypeAndShape.html) as a parameter which sets the Light's type and shape. +HDRP provides a utility function that adds a Light component to a GameObject, and sets up its dependencies. The function is `AddHDLight` and it takes an [HDLightTypeAndShape](xref:UnityEngine.Rendering.HighDefinition.GameObjectExtension.AddHDLight(UnityEngine.GameObject,UnityEngine.Rendering.HighDefinition.HDLightTypeAndShape)) as a parameter which sets the Light's type and shape. ``` using UnityEngine; diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDScreenSpaceReflectionEditor.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDScreenSpaceReflectionEditor.cs index 9bd73d57cf1..15f5cead0d3 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDScreenSpaceReflectionEditor.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/HDScreenSpaceReflectionEditor.cs @@ -10,6 +10,7 @@ class HDScreenSpaceReflectionEditor : VolumeComponentWithQualityEditor { // Shared data SerializedDataParameter m_Enable; + SerializedDataParameter m_EnableTransparent; SerializedDataParameter m_Tracing; SerializedDataParameter m_MinSmoothness; SerializedDataParameter m_SmoothnessFadeStart; @@ -50,6 +51,7 @@ public override void OnEnable() // Shared data m_Enable = Unpack(o.Find(x => x.enabled)); + m_EnableTransparent = Unpack(o.Find(x => x.enabledTransparent)); m_Tracing = Unpack(o.Find(x => x.tracing)); m_MinSmoothness = Unpack(o.Find(x => x.minSmoothness)); m_SmoothnessFadeStart = Unpack(o.Find(x => x.smoothnessFadeStart)); @@ -87,6 +89,8 @@ public override void OnEnable() base.OnEnable(); } + static public readonly GUIContent k_EnabledOpaque = EditorGUIUtility.TrTextContent("Enabled (Opaque)", "Enable Screen Space Reflections."); + static public readonly GUIContent k_EnabledTransparent = EditorGUIUtility.TrTextContent("Enabled (Transparent)", "Enable Transparent Screen Space Reflections"); static public readonly GUIContent k_Algo = EditorGUIUtility.TrTextContent("Algorithm", "The screen space reflection algorithm used."); static public readonly GUIContent k_TracingText = EditorGUIUtility.TrTextContent("Tracing", "Controls the technique used to compute the reflection.Controls the technique used to compute the reflections. Ray marching uses a ray-marched screen-space solution, Ray tracing uses a hardware accelerated world-space solution. Mixed uses first Ray marching, then Ray tracing if it fails to intersect on-screen geometry."); static public readonly GUIContent k_ReflectSkyText = EditorGUIUtility.TrTextContent("Reflect Sky", "When enabled, SSR handles sky reflection."); @@ -213,7 +217,20 @@ public override void OnInspectorGUI() return; } - PropertyField(m_Enable); + PropertyField(m_Enable, k_EnabledOpaque); + + bool transparentSSRSupported = currentAsset.currentPlatformRenderPipelineSettings.supportSSR + && currentAsset.currentPlatformRenderPipelineSettings.supportSSRTransparent + && currentAsset.currentPlatformRenderPipelineSettings.supportTransparentDepthPrepass; + if (transparentSSRSupported) + { + PropertyField(m_EnableTransparent, k_EnabledTransparent); + } + else + { + EditorGUILayout.Space(); + EditorGUILayout.HelpBox("The current HDRP Asset does not support Transparent Screen Space Reflection.", MessageType.Info, wide: true); + } // If ray tracing is supported display the tracing choice if (HDRenderPipeline.assetSupportsRayTracing) diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs index 8b6ec806f86..415153e58d3 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/UIBlocks/SurfaceOptionUIBlock.cs @@ -138,7 +138,7 @@ internal static class Styles // SSR public static GUIContent receivesSSRText = new GUIContent("Receive SSR", "When enabled, this Material can receive screen space reflections."); - public static GUIContent receivesSSRTransparentText = new GUIContent("Receive SSR Transparent", "When enabled, this Material can receive screen space reflections."); + public static GUIContent receivesSSRTransparentText = new GUIContent("Receive SSR Transparent", "When enabled, this Material can receive screen space reflections. This will force a transparent depth prepass on the object if HDRP supports it."); public static GUIContent opaqueCullModeText = new GUIContent("Cull Mode", "For opaque objects, change the cull mode of the object."); 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 e31fed264e0..db78a6f956a 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 @@ -120,7 +120,7 @@ public class Styles public static readonly GUIContent supportShadowMaskContent = EditorGUIUtility.TrTextContent("Shadowmask", "When enabled, HDRP allocates Shader variants and memory for processing shadow masks. This allows you to use shadow masks in your Unity Project."); public static readonly GUIContent supportSSRContent = EditorGUIUtility.TrTextContent("Screen Space Reflection", "When enabled, HDRP allocates memory for processing screen space reflection (SSR). This allows you to use SSR in your Unity Project."); public static readonly GUIContent planarResolutionTitle = EditorGUIUtility.TrTextContent("Planar Resolution Tiers"); - public static readonly GUIContent supportSSRTransparentContent = EditorGUIUtility.TrTextContent("Transparent", "When enabled, HDRP executes additional steps to achieve screen space reflection (SSR) on transparent objects."); + public static readonly GUIContent supportSSRTransparentContent = EditorGUIUtility.TrTextContent("Transparent", "When enabled, HDRP executes additional steps to achieve screen space reflection (SSR) on transparent objects. This feature requires both screen space reflections and transparent depth prepass to be enabled."); public static readonly GUIContent supportSSAOContent = EditorGUIUtility.TrTextContent("Screen Space Ambient Occlusion", "When enabled, HDRP allocates memory for processing screen space ambient occlusion (SSAO). This allows you to use SSAO in your Unity Project."); public static readonly GUIContent supportSSGIContent = EditorGUIUtility.TrTextContent("Screen Space Global Illumination", "When enabled, HDRP allocates memory for processing screen space global illumination (SSGI). This allows you to use SSGI in your Unity Project."); public static readonly GUIContent supportedSSSContent = EditorGUIUtility.TrTextContent("Subsurface Scattering", "When enabled, HDRP allocates memory for processing subsurface scattering (SSS). This allows you to use SSS in your Unity Project."); 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 61e4c1213b7..732c43dadef 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs @@ -232,7 +232,7 @@ static void Drawer_SectionProbeVolume(SerializedHDRenderPipelineAsset serialized } else { - EditorGUILayout.HelpBox("The probe volumes feature is disabled. The feature needs to be enabled in the HDRP Global Settings.", MessageType.Warning, wide: true); + EditorGUILayout.HelpBox("The probe volumes feature is disabled. The feature needs to be enabled in the HDRP Global Settings.", MessageType.Info, wide: true); } } @@ -264,7 +264,8 @@ static void Drawer_SectionCookies(SerializedHDRenderPipelineAsset serialized, Ed static void Drawer_SectionReflection(SerializedHDRenderPipelineAsset serialized, Editor owner) { EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportSSR, Styles.supportSSRContent); - using (new EditorGUI.DisabledScope(!serialized.renderPipelineSettings.supportSSR.boolValue)) + // Both support SSR and support transparent depth prepass are required for ssr transparent to be supported. + using (new EditorGUI.DisabledScope(!(serialized.renderPipelineSettings.supportSSR.boolValue && serialized.renderPipelineSettings.supportTransparentDepthPrepass.boolValue))) { ++EditorGUI.indentLevel; EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportSSRTransparent, Styles.supportSSRTransparentContent); diff --git a/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset b/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset index 70bfbffc6e5..9b8a0bb654f 100644 --- a/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset +++ b/com.unity.render-pipelines.high-definition/Editor/RenderPipelineResources/DefaultSettingsVolumeProfile.asset @@ -44,7 +44,7 @@ MonoBehaviour: m_OverrideState: 0 m_Value: 1 m_SampleCount: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 8 --- !u!114 &-1016694868962581565 MonoBehaviour: @@ -93,8 +93,8 @@ MonoBehaviour: m_OverrideState: 0 m_Value: 0.15 m_SampleCount: - m_OverrideState: 1 - m_Value: 12 + m_OverrideState: 0 + m_Value: 8 --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 @@ -276,13 +276,13 @@ MonoBehaviour: m_OverrideState: 0 m_Value: 1 m_Resolution: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 2 m_HighQualityPrefiltering: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 0 m_HighQualityFiltering: - m_OverrideState: 0 + m_OverrideState: 1 m_Value: 1 --- !u!114 &1932259527246508038 MonoBehaviour: @@ -525,22 +525,22 @@ MonoBehaviour: m_Value: 0 m_MaximumRadiusInPixels: m_OverrideState: 0 - m_Value: 40 + m_Value: 32 m_BilateralUpsample: m_OverrideState: 0 - m_Value: 1 + m_Value: 0 m_DirectionCount: m_OverrideState: 0 m_Value: 2 m_RayLength: m_OverrideState: 0 - m_Value: 0.5 + m_Value: 3 m_SampleCount: m_OverrideState: 0 - m_Value: 4 + m_Value: 2 m_Denoise: m_OverrideState: 0 - m_Value: 0 + m_Value: 1 m_DenoiserRadius: m_OverrideState: 0 m_Value: 0.5 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 2d3c81c1dc3..a64b3841f54 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Debug/DebugDisplay.cs @@ -2220,7 +2220,7 @@ internal bool DebugNeedsExposure() debugLighting == DebugLightingMode.DiffuseLighting || debugLighting == DebugLightingMode.SpecularLighting || debugLighting == DebugLightingMode.VisualizeCascade || debugLighting == DebugLightingMode.ProbeVolumeSampledSubdivision) || (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.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; + (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 || data.fullScreenDebugMode == FullScreenDebugMode.VolumetricClouds; } } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/HDShadow.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/HDShadow.hlsl index 1c399940211..b6788b26dc2 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/HDShadow.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/HDShadow.hlsl @@ -17,6 +17,10 @@ # include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowContext.hlsl" +// Normal light loop is guaranteed to be scalar, but not always we sample shadows with said guarantee. In those cases we define SHADOW_DATA_NOT_GUARANTEED_SCALAR to skip the forcing into scalar. +#define FORCE_SHADOW_SCALAR_READ !defined(SHADOW_DATA_NOT_GUARANTEED_SCALAR) && !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_GAMECORE) && (defined(PLATFORM_SUPPORTS_WAVE_INTRINSICS) && !defined(LIGHTLOOP_DISABLE_TILE_AND_CLUSTER)) + + // normalWS is the vertex normal if available or shading normal use to bias the shadow position float GetDirectionalShadowAttenuation(HDShadowContext shadowContext, float2 positionSS, float3 positionWS, float3 normalWS, int shadowDataIndex, float3 L) { @@ -32,7 +36,7 @@ float GetDirectionalShadowAttenuation(HDShadowContext shadowContext, float2 posi float GetPunctualShadowAttenuation(HDShadowContext shadowContext, float2 positionSS, float3 positionWS, float3 normalWS, int shadowDataIndex, float3 L, float L_dist, bool pointLight, bool perspecive) { -#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_GAMECORE) && (defined(PLATFORM_SUPPORTS_WAVE_INTRINSICS) && !defined(LIGHTLOOP_DISABLE_TILE_AND_CLUSTER)) +#if FORCE_SHADOW_SCALAR_READ shadowDataIndex = WaveReadLaneFirst(shadowDataIndex); #endif @@ -63,7 +67,7 @@ float GetPunctualShadowAttenuation(HDShadowContext shadowContext, float2 positio float GetPunctualShadowClosestDistance(HDShadowContext shadowContext, SamplerState sampl, real3 positionWS, int shadowDataIndex, float3 L, float3 lightPositionWS, bool pointLight) { -#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_GAMECORE) && (defined(PLATFORM_SUPPORTS_WAVE_INTRINSICS) && !defined(LIGHTLOOP_DISABLE_TILE_AND_CLUSTER)) +#if FORCE_SHADOW_SCALAR_READ shadowDataIndex = WaveReadLaneFirst(shadowDataIndex); #endif @@ -94,7 +98,7 @@ float GetRectAreaShadowAttenuation(HDShadowContext shadowContext, float2 positio { // We need to disable the scalarization here on xbox due to bad code generated by FXC for the eye shader. // This shouldn't have an enormous impact since with Area lights we are already exploded in VGPR by this point. -#if !defined(SHADER_API_XBOXONE) && !defined(SHADER_API_GAMECORE) && (defined(PLATFORM_SUPPORTS_WAVE_INTRINSICS) && !defined(LIGHTLOOP_DISABLE_TILE_AND_CLUSTER)) +#if FORCE_SHADOW_SCALAR_READ shadowDataIndex = WaveReadLaneFirst(shadowDataIndex); #endif HDShadowData sd = shadowContext.shadowDatas[shadowDataIndex]; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsample.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsample.compute index 0fd78a21bcd..27c460d12ce 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsample.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsample.compute @@ -1,4 +1,3 @@ -#pragma kernel BilateralUpSampleSingle BILATERAL_UPSAMPLE=BilateralUpSampleSingle SINGLE_CHANNEL #pragma kernel BilateralUpSampleColor BILATERAL_UPSAMPLE=BilateralUpSampleColor //#pragma enable_d3d11_debug_symbols @@ -10,78 +9,103 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RayTracingCommon.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsample.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs.hlsl" // Mip chain depth buffer TEXTURE2D_X(_DepthTexture); // The half resolution texture that needs to be upscaled TEXTURE2D_X(_LowResolutionTexture); -// Constant buffer where all variables should land -CBUFFER_START(UnityScreenSpaceGlobalIllumination) - float4 _HalfScreenSize; - float2 _DepthPyramidFirstMipLevelOffset; -CBUFFER_END +// LDS that store the half resolution data +groupshared float3 gs_cacheLighting[36]; +groupshared float gs_cacheDepth[36]; + +void FillUpsampleDataLDS(uint groupIndex, uint2 groupOrigin) +{ + // Define which value we will be acessing with this worker thread + int acessCoordX = groupIndex % 6; + int acessCoordY = groupIndex / 6; + + // Everything we are accessing is in intermediate res (half rez). + uint2 traceGroupOrigin = groupOrigin / 2; + + // The initial position of the access + int2 originXY = traceGroupOrigin - int2(1, 1); + + // Compute the sample position + int2 sampleCoord = int2(clamp(originXY.x + acessCoordX, 0, _HalfScreenSize.x - 1), clamp(originXY.y + acessCoordY, 0, _HalfScreenSize.y - 1)); + + // Sample and store into the LDS + gs_cacheLighting[groupIndex] = LOAD_TEXTURE2D_X(_LowResolutionTexture, sampleCoord).xyz; + // As an input we are not using the depth pyramid, but the full resolution depth (so we need to make sure to read from there for the upsample aswell). + gs_cacheDepth[groupIndex] = LOAD_TEXTURE2D_X(_DepthTexture, sampleCoord * 2).x; +} + +uint OffsetToLDSAdress(uint2 groupThreadId, int2 offset) +{ + // Compute the tap coordinate in the 6x6 grid + uint2 tapAddress = (uint2)((int2)(groupThreadId / 2 + 1) + offset); + return clamp((uint)(tapAddress.x) % 6 + tapAddress.y * 6, 0, 35); +} + +// Function that fills the struct as we cannot use arrays +void FillUpsampleNeighborhoodData_2x2(int2 groupThreadId, int subRegionIdx, out NeighborhoodUpsampleData2x2_RGB neighborhoodData) +{ + // Fill the sample data + int tapIdx = OffsetToLDSAdress(groupThreadId, int2((int)_TapOffsets[2 * subRegionIdx].x, (int)_TapOffsets[2 * subRegionIdx].y)); + neighborhoodData.lowValue0 = max(0, (gs_cacheLighting[tapIdx])); + neighborhoodData.lowDepth.x = gs_cacheDepth[tapIdx]; + neighborhoodData.lowWeight.x = _DistanceBasedWeights[subRegionIdx].x; + + tapIdx = OffsetToLDSAdress(groupThreadId, int2((int)_TapOffsets[2 * subRegionIdx].z, (int)_TapOffsets[2 * subRegionIdx].w)); + neighborhoodData.lowValue1 = max(0, (gs_cacheLighting[tapIdx])); + neighborhoodData.lowDepth.y = gs_cacheDepth[tapIdx]; + neighborhoodData.lowWeight.y = _DistanceBasedWeights[subRegionIdx].y; + + tapIdx = OffsetToLDSAdress(groupThreadId, int2((int)_TapOffsets[2 * subRegionIdx + 1].x, (int)_TapOffsets[2 * subRegionIdx + 1].y)); + neighborhoodData.lowValue2 = max(0, (gs_cacheLighting[tapIdx])); + neighborhoodData.lowDepth.z = gs_cacheDepth[tapIdx]; + neighborhoodData.lowWeight.z = _DistanceBasedWeights[subRegionIdx].z; + + tapIdx = OffsetToLDSAdress(groupThreadId, int2((int)_TapOffsets[2 * subRegionIdx + 1].z, (int)_TapOffsets[2 * subRegionIdx + 1].w)); + neighborhoodData.lowValue3 = max(0, (gs_cacheLighting[tapIdx])); + neighborhoodData.lowDepth.w = gs_cacheDepth[tapIdx]; + neighborhoodData.lowWeight.w = _DistanceBasedWeights[subRegionIdx].w; +} // The output of our upscaling pass -RW_TEXTURE2D_X(float4, _OutputUpscaledTexture); +RW_TEXTURE2D_X(float3, _OutputUpscaledTexture); [numthreads(BILATERAL_UPSAMPLE_TILE_SIZE, BILATERAL_UPSAMPLE_TILE_SIZE, 1)] -void BILATERAL_UPSAMPLE(uint3 dispatchThreadId : SV_DispatchThreadID, uint2 groupThreadId : SV_GroupThreadID, uint2 groupId : SV_GroupID) +void BILATERAL_UPSAMPLE(uint3 currentCoord : SV_DispatchThreadID, + int groupIndex : SV_GroupIndex, + uint2 groupThreadId : SV_GroupThreadID, + uint2 groupId : SV_GroupID) { - UNITY_XR_ASSIGN_VIEW_INDEX(dispatchThreadId.z); + UNITY_XR_ASSIGN_VIEW_INDEX(currentCoord.z); + + // Only 36 workers of the 64 region do the pre-fetching + if (groupIndex < 36) + { + // Load 1 value per thread + FillUpsampleDataLDS(groupIndex, groupId * 8); + } + + // Make sure all values are loaded in LDS by now. + GroupMemoryBarrierWithGroupSync(); // If out of bounds, discard - if (any(dispatchThreadId.xy > uint2(_ScreenSize.xy))) + if (any(currentCoord.xy > uint2(_ScreenSize.xy))) return; - // The pixel position to process - const uint2 outputCoord = dispatchThreadId.xy; - // Read the depth value as early as possible and use it as late as possible - float hiResDepth = LOAD_TEXTURE2D_X(_DepthTexture, outputCoord).x; - - // Define what is the half resolution of this pixel - int2 halfResolution = (int2)(outputCoord / 2); - - // Define what is the half resolution of this pixel - int2 coordRepresenatative = halfResolution * 2; - - // Compute the shift within the half res - int2 halfResShift = outputCoord - coordRepresenatative; - - // Compute the shift of the pixel in the group - int shiftIndex = halfResShift.y * 2 + halfResShift.x; - - // Compute the shift in the upscale table - int offsetInCoordTable = shiftIndex * 4; - - // Compute the half resolution coordinates we should tap from - int2 halfResTap0 = clamp(0, halfResolution + UpscaleBilateralPixels[offsetInCoordTable], _HalfScreenSize.xy - 1); - int2 halfResTap1 = clamp(0, halfResolution + UpscaleBilateralPixels[offsetInCoordTable + 1], _HalfScreenSize.xy - 1); - int2 halfResTap2 = clamp(0, halfResolution + UpscaleBilateralPixels[offsetInCoordTable + 2], _HalfScreenSize.xy - 1); - int2 halfResTap3 = clamp(0, halfResolution + UpscaleBilateralPixels[offsetInCoordTable + 3], _HalfScreenSize.xy - 1); - - // Grab the depth of all the half resolution pixels - float4 lowDepths = float4(LOAD_TEXTURE2D_X(_DepthTexture, asuint(_DepthPyramidFirstMipLevelOffset) + halfResTap0).x - , LOAD_TEXTURE2D_X(_DepthTexture, asuint(_DepthPyramidFirstMipLevelOffset) + halfResTap1).x - , LOAD_TEXTURE2D_X(_DepthTexture, asuint(_DepthPyramidFirstMipLevelOffset) + halfResTap2).x - , LOAD_TEXTURE2D_X(_DepthTexture, asuint(_DepthPyramidFirstMipLevelOffset) + halfResTap3).x); - -#if SINGLE_CHANNEL - // Grab all the scalar values required for upscale - float4 lowRes = float4(_LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap0)].x - , _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap1)].x - , _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap2)].x - , _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap3)].x); - // Upscale and output - _OutputUpscaledTexture[COORD_TEXTURE2D_X(outputCoord)] = BilUpSingle(hiResDepth, lowDepths, lowRes); -#else - // Grab all the color values required for upscale - float4 lowResCol0 = max(0, _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap0)]); - float4 lowResCol1 = max(0, _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap1)]); - float4 lowResCol2 = max(0, _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap2)]); - float4 lowResCol3 = max(0, _LowResolutionTexture[COORD_TEXTURE2D_X(halfResTap3)]); - - _OutputUpscaledTexture[COORD_TEXTURE2D_X(outputCoord)] = BilUpColor(hiResDepth, lowDepths, lowResCol0, lowResCol1, lowResCol2, lowResCol3); -#endif + float hiResDepth = LOAD_TEXTURE2D_X(_DepthTexture, currentCoord.xy).x; + + // Tap the neighborhood data from + NeighborhoodUpsampleData2x2_RGB upsampleData; + int localIndex = (currentCoord.x & 1) + (currentCoord.y & 1) * 2; + FillUpsampleNeighborhoodData_2x2(groupThreadId, localIndex, upsampleData); + + // Upscale and return the result + _OutputUpscaledTexture[COORD_TEXTURE2D_X(currentCoord.xy)] = BilUpColor2x2_RGB(hiResDepth, upsampleData); } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsample.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsample.hlsl index fb784dfec71..afc31779d15 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsample.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsample.hlsl @@ -173,3 +173,32 @@ float4 BilUpColor3x3(float highDepth, in NeighborhoodUpsampleData3x3 data) + float4(_NoiseFilterStrength, _NoiseFilterStrength, _NoiseFilterStrength, 0.0); return WeightedSum / TotalWeight; } + +// Due to compiler issues, it is not possible to use arrays to store the neighborhood values, we then store them in this structure +struct NeighborhoodUpsampleData2x2_RGB +{ + // Low resolution depths + float4 lowDepth; + + // The low resolution values + float3 lowValue0; + float3 lowValue1; + float3 lowValue2; + float3 lowValue3; + + // Weights used to combine the neighborhood + float4 lowWeight; +}; + +// The bilateral upscale function (3x3 neighborhood) +float3 BilUpColor2x2_RGB(float highDepth, in NeighborhoodUpsampleData2x2_RGB data) +{ + float4 combinedWeights = data.lowWeight / (abs(highDepth - data.lowDepth) + _UpsampleTolerance); + float TotalWeight = combinedWeights.x + combinedWeights.y + combinedWeights.z + combinedWeights.w + _NoiseFilterStrength; + float3 WeightedSum = data.lowValue0.xyz * combinedWeights.x + + data.lowValue1.xyz * combinedWeights.y + + data.lowValue2.xyz * combinedWeights.z + + data.lowValue3.xyz * combinedWeights.w + + _NoiseFilterStrength; + return WeightedSum / TotalWeight; +} diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs new file mode 100644 index 00000000000..99d69795296 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs @@ -0,0 +1,68 @@ +using System; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Experimental.Rendering.RenderGraphModule; + +namespace UnityEngine.Rendering.HighDefinition +{ + internal class BilateralUpsample + { + // This is the representation of the half resolution neighborhood + // |-----|-----|-----| + // | | | | + // |-----|-----|-----| + // | | | | + // |-----|-----|-----| + // | | | | + // |-----|-----|-----| + + // This is the representation of the full resolution neighborhood + // |-----|-----|-----| + // | | | | + // |-----|--|--|-----| + // | |--|--| | + // |-----|--|--|-----| + // | | | | + // |-----|-----|-----| + + // The base is centered at (0, 0) at the center of the center pixel: + // The 4 full res pixels are centered {L->R, T->B} at {-0.25, -0.25}, {0.25, -0.25} + // {-0.25, 0.25}, {0.25, 0.25} + // + // The 9 half res pixels are placed {L->R, T->B} at {-1.0, -1.0}, {0.0, -1.0}, {1.0, -1.0} + // {-1.0, 0.0}, {0.0, 0.0}, {1.0, 0.0} + // {-1.0, 1.0}, {0.0, 1.0}, {1.0, 1.0} + + // Set of pre-generated weights (L->R, T->B). After experimentation, the final weighting function is exp(-distance^2) + static internal float[] distanceBasedWeights_3x3 = new float[] { 0.324652f, 0.535261f, 0.119433f, 0.535261f, 0.882497f, 0.196912f, 0.119433f, 0.196912f, 0.0439369f, + 0.119433f, 0.535261f, 0.324652f, 0.196912f, 0.882497f, 0.535261f, 0.0439369f, 0.196912f, 0.119433f, + 0.119433f, 0.196912f, 0.0439369f, 0.535261f, 0.882497f, 0.196912f, 0.324652f, 0.535261f, 0.119433f, + 0.0439369f, 0.196912f, 0.119433f, 0.196912f, 0.882497f, 0.535261f, 0.119433f, 0.535261f, 0.324652f}; + + // Set of pre-generated weights (L->R, T->B). After experimentation, the final weighting function is exp(-distance^2) + static internal float[] distanceBasedWeights_2x2 = new float[] { 0.324652f, 0.535261f, 0.535261f, 0.882497f, + 0.535261f, 0.324652f, 0.882497f, 0.535261f, + 0.535261f, 0.882497f, 0.324652f, 0.535261f, + 0.882497f, 0.535261f, 0.535261f, 0.324652f}; + + static internal float[] tapOffsets_2x2 = new float[] { -1.0f, -1.0f, 0.0f, -1.0f, -1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -1.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f, 0.0f, + -1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f, 1.0f, + 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f}; + } + + + [GenerateHLSL(needAccessors = false, generateCBuffer = true)] + unsafe struct ShaderVariablesBilateralUpsample + { + // Half resolution we are up sampling from + public Vector4 _HalfScreenSize; + + // Weights used for the bilateral up sample + [HLSLArray(3 * 4, typeof(Vector4))] + public fixed float _DistanceBasedWeights[12 * 4]; + + // Offsets used to tap into the half resolution neighbors + [HLSLArray(2 * 4, typeof(Vector4))] + public fixed float _TapOffsets[8 * 4]; + } +} diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs.hlsl new file mode 100644 index 00000000000..cbe3ec1027b --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs.hlsl @@ -0,0 +1,16 @@ +// +// This file was automatically generated. Please don't edit by hand. Execute Editor command [ Edit > Rendering > Generate Shader Includes ] instead +// + +#ifndef BILATERALUPSAMPLEDEF_CS_HLSL +#define BILATERALUPSAMPLEDEF_CS_HLSL +// Generated from UnityEngine.Rendering.HighDefinition.ShaderVariablesBilateralUpsample +// PackingRules = Exact +CBUFFER_START(ShaderVariablesBilateralUpsample) + float4 _HalfScreenSize; + float4 _DistanceBasedWeights[12]; + float4 _TapOffsets[8]; +CBUFFER_END + + +#endif diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs.hlsl.meta b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs.hlsl.meta new file mode 100644 index 00000000000..8f2c4c89d36 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f7ac8eb9772bfe6438d5ddd73c5e4fcb +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs.meta b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs.meta new file mode 100644 index 00000000000..9b4fc869e7c --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/BilateralUpsampleDef.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 60f785490b2403b479ba132fc159b661 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/HDRenderPipeline.ScreenSpaceGlobalIllumination.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/HDRenderPipeline.ScreenSpaceGlobalIllumination.cs index 7599324acac..a6830857cd3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/HDRenderPipeline.ScreenSpaceGlobalIllumination.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/HDRenderPipeline.ScreenSpaceGlobalIllumination.cs @@ -189,7 +189,7 @@ TextureHandle TraceSSGI(RenderGraph renderGraph, HDCamera hdCamera, GlobalIllumi BlueNoise blueNoise = GetBlueNoiseManager(); passData.ditheredTextureSet = blueNoise.DitheredTextureSet8SPP(); passData.shaderVariablesRayTracingCB = m_ShaderVariablesRayTracingCB; - passData.offsetBuffer = m_DepthBufferMipChainInfo.GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); + passData.offsetBuffer = hdCamera.depthBufferMipChainInfo.GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); passData.lightList = builder.ReadComputeBuffer(lightList); passData.depthTexture = builder.ReadTexture(depthPyramid); @@ -217,7 +217,7 @@ TextureHandle TraceSSGI(RenderGraph renderGraph, HDCamera hdCamera, GlobalIllumi // Output textures passData.outputBuffer = builder.WriteTexture(renderGraph.CreateTexture(new TextureDesc(Vector2.one, true, true) - { colorFormat = GraphicsFormat.R16G16B16A16_SFloat, enableRandomWrite = true, name = "SSGI Color" })); + { colorFormat = GraphicsFormat.B10G11R11_UFloatPack32, enableRandomWrite = true, name = "SSGI Color" })); builder.SetRenderFunc( (TraceSSGIPassData data, RenderGraphContext ctx) => @@ -291,9 +291,7 @@ class UpscaleSSGIPassData public int texHeight; public int viewCount; public Vector4 halfScreenSize; - - // Generation parameters - public Vector2 firstMipOffset; + public ShaderVariablesBilateralUpsample shaderVariablesBilateralUpsampleCB; // Compute Shader public ComputeShader bilateralUpsampleCS; @@ -314,10 +312,16 @@ TextureHandle UpscaleSSGI(RenderGraph renderGraph, HDCamera hdCamera, GlobalIllu passData.texWidth = hdCamera.actualWidth; passData.texHeight = hdCamera.actualHeight; passData.viewCount = hdCamera.viewCount; - passData.halfScreenSize.Set(passData.texWidth / 2, passData.texHeight / 2, 1.0f / (passData.texWidth * 0.5f), 1.0f / (passData.texHeight * 0.5f)); - // Set the generation parameters - passData.firstMipOffset.Set(HDShadowUtils.Asfloat((uint)info.mipLevelOffsets[1].x), HDShadowUtils.Asfloat((uint)info.mipLevelOffsets[1].y)); + passData.shaderVariablesBilateralUpsampleCB._HalfScreenSize = new Vector4(passData.texWidth / 2, passData.texHeight / 2, 1.0f / (passData.texWidth * 0.5f), 1.0f / (passData.texHeight * 0.5f)); + unsafe + { + for (int i = 0; i < 16; ++i) + passData.shaderVariablesBilateralUpsampleCB._DistanceBasedWeights[i] = BilateralUpsample.distanceBasedWeights_2x2[i]; + + for (int i = 0; i < 32; ++i) + passData.shaderVariablesBilateralUpsampleCB._TapOffsets[i] = BilateralUpsample.tapOffsets_2x2[i]; + } // Grab the right kernel passData.bilateralUpsampleCS = m_Asset.renderPipelineResources.shaders.bilateralUpsampleCS; @@ -326,7 +330,7 @@ TextureHandle UpscaleSSGI(RenderGraph renderGraph, HDCamera hdCamera, GlobalIllu passData.depthTexture = builder.ReadTexture(depthPyramid); passData.inputBuffer = builder.ReadTexture(inputBuffer); passData.outputBuffer = builder.WriteTexture(renderGraph.CreateTexture(new TextureDesc(Vector2.one, true, true) - { colorFormat = GraphicsFormat.R16G16B16A16_SFloat, enableRandomWrite = true, name = "SSGI Final" })); + { colorFormat = GraphicsFormat.B10G11R11_UFloatPack32, enableRandomWrite = true, name = "SSGI Final" })); builder.SetRenderFunc( (UpscaleSSGIPassData data, RenderGraphContext ctx) => @@ -336,9 +340,7 @@ TextureHandle UpscaleSSGI(RenderGraph renderGraph, HDCamera hdCamera, GlobalIllu int numTilesXHR = (data.texWidth + (ssgiTileSize - 1)) / ssgiTileSize; int numTilesYHR = (data.texHeight + (ssgiTileSize - 1)) / ssgiTileSize; - // Inject the input scalars - ctx.cmd.SetComputeVectorParam(data.bilateralUpsampleCS, HDShaderIDs._HalfScreenSize, data.halfScreenSize); - ctx.cmd.SetComputeVectorParam(data.bilateralUpsampleCS, HDShaderIDs._DepthPyramidFirstMipLevelOffset, data.firstMipOffset); + ConstantBuffer.PushGlobal(ctx.cmd, data.shaderVariablesBilateralUpsampleCB, HDShaderIDs._ShaderVariablesBilateralUpsample); // Inject all the input buffers ctx.cmd.SetComputeTextureParam(data.bilateralUpsampleCS, data.upscaleKernel, HDShaderIDs._DepthTexture, data.depthTexture); @@ -451,7 +453,7 @@ TextureHandle RenderScreenSpaceIndirectDiffuse(HDCamera hdCamera, in PrepassOutp switch (GetIndirectDiffuseMode(hdCamera)) { case IndirectDiffuseMode.ScreenSpace: - result = RenderSSGI(m_RenderGraph, hdCamera, prepassOutput.depthPyramidTexture, prepassOutput.stencilBuffer, prepassOutput.normalBuffer, prepassOutput.resolvedMotionVectorsBuffer, historyValidationTexture, m_ShaderVariablesRayTracingCB, GetDepthBufferMipChainInfo(), lightList); + result = RenderSSGI(m_RenderGraph, hdCamera, prepassOutput.depthPyramidTexture, prepassOutput.stencilBuffer, prepassOutput.normalBuffer, prepassOutput.resolvedMotionVectorsBuffer, historyValidationTexture, m_ShaderVariablesRayTracingCB, hdCamera.depthBufferMipChainInfo, lightList); break; case IndirectDiffuseMode.Raytrace: diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceGlobalIllumination.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceGlobalIllumination.compute index 5a9c81382ee..e2b68e42c5a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceGlobalIllumination.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceGlobalIllumination.compute @@ -135,16 +135,27 @@ void TraceReflectionProbes(PositionInputs posInput, float3 normalWS, float3 rayD GetCountAndStart(posInput, LIGHTCATEGORY_ENV, envLightStart, envLightCount); totalWeight = 0.0f; + uint envStartFirstLane; + bool fastPath = IsFastPath(envLightStart, envStartFirstLane); + + if (fastPath) + envLightStart = envStartFirstLane; + // Scalarized loop, same rationale of the punctual light version uint v_envLightListOffset = 0; uint v_envLightIdx = envLightStart; while (v_envLightListOffset < envLightCount) { v_envLightIdx = FetchIndex(envLightStart, v_envLightListOffset); - uint s_envLightIdx = v_envLightIdx; + uint s_envLightIdx = ScalarizeElementIndex(v_envLightIdx, fastPath); if (s_envLightIdx == -1) break; + // Compiler has a tendency to bypass the scalarization, we force it again here. + #ifdef PLATFORM_SUPPORTS_WAVE_INTRINSICS + s_envLightIdx = WaveReadLaneFirst(s_envLightIdx); + #endif + EnvLightData envLightData = FetchEnvLight(s_envLightIdx); // Scalar load. // If current scalar and vector light index match, we process the light. The v_envLightListOffset for current thread is increased. @@ -175,7 +186,7 @@ void TraceReflectionProbes(PositionInputs posInput, float3 normalWS, float3 rayD TEXTURE2D_X(_IndirectDiffuseHitPointTexture); // Depth buffer of the previous frame (full resolution) TEXTURE2D_X(_HistoryDepthTexture); -RW_TEXTURE2D_X(float4, _IndirectDiffuseTextureRW); +RW_TEXTURE2D_X(float3, _IndirectDiffuseTextureRW); // The maximal difference in depth that is considered acceptable to read from the color pyramid #define DEPTH_DIFFERENCE_THRESHOLD 0.1 @@ -252,7 +263,7 @@ void REPROJECT_GLOBAL_ILLUMINATION(uint3 dispatchThreadId : SV_DispatchThreadID, if (!invalid) { // The intersection was considered valid, we can read from the color pyramid - color = SAMPLE_TEXTURE2D_X_LOD(_ColorPyramidTexture, s_linear_clamp_sampler, prevFrameUV, SSGI_MIP_OFFSET).rgb * GetInversePreviousExposureMultiplier() * GetCurrentExposureMultiplier(); + color = SAMPLE_TEXTURE2D_X_LOD(_ColorPyramidTexture, s_linear_clamp_sampler, prevFrameUV, SSGI_MIP_OFFSET).rgb * GetInversePreviousExposureMultiplier(); } #if defined(PROBE_VOLUMES_L1) || defined(PROBE_VOLUMES_L2) else if(_EnableProbeVolumes) @@ -267,8 +278,7 @@ void REPROJECT_GLOBAL_ILLUMINATION(uint3 dispatchThreadId : SV_DispatchThreadID, posInput.positionSS, apvBuiltinData.bakeDiffuseLighting, apvBuiltinData.backBakeDiffuseLighting); // Not used - color = apvBuiltinData.bakeDiffuseLighting * GetCurrentExposureMultiplier(); - invalid = false; + color = apvBuiltinData.bakeDiffuseLighting; } #endif else @@ -282,9 +292,6 @@ void REPROJECT_GLOBAL_ILLUMINATION(uint3 dispatchThreadId : SV_DispatchThreadID, color += SAMPLE_TEXTURECUBE_ARRAY_LOD(_SkyTexture, s_trilinear_clamp_sampler, sampleDir, 0.0, 0).xyz * (1.0 - weight); weight = 1.0; } - - invalid = false; - color *= GetCurrentExposureMultiplier(); } // TODO: Remove me when you can find where the nans come from @@ -292,14 +299,12 @@ void REPROJECT_GLOBAL_ILLUMINATION(uint3 dispatchThreadId : SV_DispatchThreadID, color = 0.0f; // Convert to HSV space - color = RgbToHsv(color); + color = RgbToHsv(color * GetCurrentExposureMultiplier()); // Expose and clamp the final color color.z = clamp(color.z, 0.0, SSGI_CLAMP_VALUE); // Convert back to HSV space color = HsvToRgb(color); - // We are simply interested to know if the intersected pixel was moving, so we multiply it by a big number - // TODO: make this process not binary // Write the output to the target pixel - _IndirectDiffuseTextureRW[COORD_TEXTURE2D_X(dispatchThreadId.xy)] = float4(color, 1.0f); + _IndirectDiffuseTextureRW[COORD_TEXTURE2D_X(dispatchThreadId.xy)] = color; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflection.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflection.cs index 90af9e5d0c9..345dcb7020f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflection.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/ScreenSpaceReflection.cs @@ -55,6 +55,10 @@ bool UsesRayTracing() [Tooltip("Enable Screen Space Reflections.")] public BoolParameter enabled = new BoolParameter(true); + /// Enable Transparent Screen Space Reflections. + [Tooltip("Enable Transparent Screen Space Reflections.")] + public BoolParameter enabledTransparent = new BoolParameter(true); + /// /// [Tooltip("Controls the casting technique used to evaluate the effect.")] diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/HDRenderPipeline.VolumetricClouds.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/HDRenderPipeline.VolumetricClouds.cs index 51a3f0f06fa..673a6948ec5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/HDRenderPipeline.VolumetricClouds.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/HDRenderPipeline.VolumetricClouds.cs @@ -36,38 +36,6 @@ public partial class HDRenderPipeline // Combine pass via hardware blending, used in case of MSAA color target. Material m_CloudCombinePass; - // This is the representation of the half resolution neighborhood - // |-----|-----|-----| - // | | | | - // |-----|-----|-----| - // | | | | - // |-----|-----|-----| - // | | | | - // |-----|-----|-----| - - // This is the representation of the full resolution neighborhood - // |-----|-----|-----| - // | | | | - // |-----|--|--|-----| - // | |--|--| | - // |-----|--|--|-----| - // | | | | - // |-----|-----|-----| - - // The base is centered at (0, 0) at the center of the center pixel: - // The 4 full res pixels are centered {L->R, T->B} at {-0.25, -0.25}, {0.25, -0.25} - // {-0.25, 0.25}, {0.25, 0.25} - // - // The 9 half res pixels are placed {L->R, T->B} at {-1.0, -1.0}, {0.0, -1.0}, {1.0, -1.0} - // {-1.0, 0.0}, {0.0, 0.0}, {1.0, 0.0} - // {-1.0, 1.0}, {0.0, 1.0}, {1.0, 1.0} - - // Set of pre-generated weights (L->R, T->B). After experimentation, the final weighting function is exp(-distance^2) - static float[] m_DistanceBasedWeights = new float[] { 0.324652f, 0.535261f, 0.119433f, 0.535261f, 0.882497f, 0.196912f, 0.119433f, 0.196912f, 0.0439369f, - 0.119433f, 0.535261f, 0.324652f, 0.196912f, 0.882497f, 0.535261f, 0.0439369f, 0.196912f, 0.119433f, - 0.119433f, 0.196912f, 0.0439369f, 0.535261f, 0.882497f, 0.196912f, 0.324652f, 0.535261f, 0.119433f, - 0.0439369f, 0.196912f, 0.119433f, 0.196912f, 0.882497f, 0.535261f, 0.119433f, 0.535261f, 0.324652f}; - struct VolumetricCloudsCameraData { public TVolumetricCloudsCameraType cameraType; @@ -547,7 +515,7 @@ void UpdateShaderVariableslClouds(ref ShaderVariablesClouds cb, HDCamera hdCamer { for (int p = 0; p < 4; ++p) for (int i = 0; i < 9; ++i) - cb._DistanceBasedWeights[12 * p + i] = m_DistanceBasedWeights[9 * p + i]; + cb._DistanceBasedWeights[12 * p + i] = BilateralUpsample.distanceBasedWeights_3x3[9 * p + i]; } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricClouds.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricClouds.compute index bddd056f658..f9a92c358f0 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricClouds.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricClouds.compute @@ -29,6 +29,10 @@ #pragma multi_compile _ LOCAL_VOLUMETRIC_CLOUDS #pragma multi_compile _ USE_INTERMEDIATE_BUFFER +#if !defined(LOCAL_VOLUMETRIC_CLOUDS) + #define DISTANT_VOLUMETRIC_CLOUDS +#endif + //#define WITHOUT_LDS // #pragma enable_d3d11_debug_symbols @@ -838,7 +842,7 @@ void RenderClouds(uint3 traceCoord : SV_DispatchThreadID, uint2 groupThreadId : if (any(traceCoord.xy >= uint2(_TraceScreenSize.xy))) return; -#if !defined(LOCAL_VOLUMETRIC_CLOUDS) +#if defined(DISTANT_VOLUMETRIC_CLOUDS) // Clear the cloud value _CloudsLightingTextureRW[COORD_TEXTURE2D_X(traceCoord.xy)] = float4(0.0, 0.0, 0.0, 1.0); @@ -875,16 +879,25 @@ void RenderClouds(uint3 traceCoord : SV_DispatchThreadID, uint2 groupThreadId : // Evaluate the cloud transmittance VolumetricRayResult result = TraceVolumetricRay(ray); - // Compute the cloud depths - float cloudMinDistance = clamp(_ProjectionParams.y, min(result.meanDistance, ray.maxRayLength), _ProjectionParams.z); - float cloudMinDepth = result.invalidRay ? ray.depthValue : ConvertCloudDepth(ray.direction * cloudMinDistance); - // Apply a fast tonemap result.inScattering = applyFastTonemapping(result.inScattering); // output the result _CloudsLightingTextureRW[COORD_TEXTURE2D_X(traceCoord.xy)] = float4(result.inScattering, result.transmittance); + + // Minimal distance to the clouds + float minimalDistance = min(result.meanDistance, ray.maxRayLength); + + // If we are processing local clouds, we store the distance information as a depth, otherwise we just store the distance (for the fog). +#if defined(LOCAL_VOLUMETRIC_CLOUDS) + // Compute the cloud depth + float cloudMinDistance = clamp(minimalDistance, _ProjectionParams.y, _ProjectionParams.z); + float cloudMinDepth = result.invalidRay ? ray.depthValue : ConvertCloudDepth(ray.direction * cloudMinDistance); _CloudsDepthTextureRW[COORD_TEXTURE2D_X(traceCoord.xy)] = cloudMinDepth; +#else + // Output the cloud distance + _CloudsDepthTextureRW[COORD_TEXTURE2D_X(traceCoord.xy)] = result.invalidRay ? ray.maxRayLength : max(minimalDistance, _ProjectionParams.y); +#endif } void FillCloudReprojectionLDS(uint groupIndex, uint2 groupOrigin) @@ -980,7 +993,8 @@ void REPROJECT_CLOUDS(uint3 dispatchThreadId : SV_DispatchThreadID, #ifdef LOCAL_VOLUMETRIC_CLOUDS float2 motionVector = EvaluateCloudMotionVectors(fullResCoord, currentCloudDepth, 1.0); #else - float2 motionVector = EvaluateCloudMotionVectors(fullResCoord, currentCloudDepth, 0.0); + // If we are processing clouds as distant, we have no choice but to consider them very far. + float2 motionVector = EvaluateCloudMotionVectors(fullResCoord, UNITY_RAW_FAR_CLIP_VALUE, 0.0); #endif // Compute the history pixel coordinate to tap from @@ -1379,6 +1393,12 @@ void UPSAMPLE_KERNEL(uint3 finalCoord : SV_DispatchThreadID, // Compute the view direction float3 viewDir = -normalize(cloudPosInput.positionWS); + // If the clouds are distant clouds, we need to adjust the position world space as the far plane is probably too close for the fog to be correct +#if defined(DISTANT_VOLUMETRIC_CLOUDS) + float cloudDistance = GetCloudDepth_LDS(groupThreadId, 0); + cloudPosInput.positionWS = -viewDir * cloudDistance; +#endif + // Compute the fog attenuation of the clouds float3 fogColor; float3 fogOpacity; @@ -1460,7 +1480,7 @@ void COMBINE_KERNEL(uint3 finalCoord : SV_DispatchThreadID, currentClouds.w = saturate(currentClouds.w); #ifdef LOCAL_VOLUMETRIC_CLOUDS - float cloudsDepth = LOAD_TEXTURE2D_X(_DepthStatusTexture, finalCoord.xy).x; + float cloudsDepth = LOAD_TEXTURE2D_X(_DepthStatusTexture, finalCoord.xy).z; #else float cloudsDepth = UNITY_RAW_FAR_CLIP_VALUE; #endif @@ -1471,6 +1491,12 @@ void COMBINE_KERNEL(uint3 finalCoord : SV_DispatchThreadID, // Compute the view direction float3 viewDir = -normalize(cloudPosInput.positionWS); + // If the clouds are distant clouds, we need to adjust the position world space as the far plane is probably too close for the fog to be correct +#if defined(DISTANT_VOLUMETRIC_CLOUDS) + float cloudDistance = GetCloudDepth_LDS(groupThreadId, 0); + cloudPosInput.positionWS = -viewDir * LOAD_TEXTURE2D_X(_DepthStatusTexture, finalCoord.xy).z; +#endif + // Compute the fog attenuation of the clouds float3 fogColor; float3 fogOpacity; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricLighting.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricLighting.compute index 0cbb1414a85..bd5c8f33a87 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricLighting.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricLighting.compute @@ -40,6 +40,9 @@ // which might be lower than the max number of lights that might be in the big tile. #define PRE_FILTER_LIGHT_LIST 1 && defined(USE_BIG_TILE_LIGHTLIST) + +#define SHADOW_DATA_NOT_GUARANTEED_SCALAR // We are not looping over shadows in a scalarized fashion. If we will at some point, remove this define. + //-------------------------------------------------------------------------------------------------- // Included headers //-------------------------------------------------------------------------------------------------- @@ -480,6 +483,9 @@ float3 EvaluateVoxelDiffuseGI(PositionInputs posInput, JitteredRay ray, float t0 // for L0 term it'd just cancel out as both are just constant factors. EvaluateAdaptiveProbeVolume(GetAbsolutePositionWS(posInput.positionWS), posInput.positionSS, apvDiffuseGI); + const float cornetteShanksZonalHarmonicL0 = sqrt(4.0f * PI); + weight *= PI * cornetteShanksZonalHarmonicL0; + // It is possible that some invalid probes are sampled due to how APV is laying the probes // For now the safest way is to ignore the NaN data when sampled. if (AnyIsNaN(apvDiffuseGI)) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Nature/SpeedTree8.shadergraph b/com.unity.render-pipelines.high-definition/Runtime/Material/Nature/SpeedTree8.shadergraph index c752d755271..93016f95bd6 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Nature/SpeedTree8.shadergraph +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Nature/SpeedTree8.shadergraph @@ -63,7 +63,12 @@ "m_Id": "634c255335cd4db09ac805304e2bc617" } ], - "m_CategoryData": [], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "45952b5f3be646068270ae26c096eb6e" + } + ], "m_Nodes": [ { "m_Id": "fcc433617395e08d9aacd0032a2a0b34" @@ -1164,7 +1169,8 @@ "serializedMesh": { "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", "m_Guid": "" - } + }, + "preventRotation": false }, "m_Path": "HDRP/Nature", "m_GraphPrecision": 0, @@ -1222,6 +1228,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -1360,6 +1367,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -1404,6 +1412,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -1418,7 +1427,9 @@ 374980739, -1920596915, -1152536816 - ] + ], + "m_Dropdowns": [], + "m_DropdownSelectedEntries": [] } { @@ -1456,6 +1467,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -1577,9 +1589,13 @@ "m_DefaultReferenceName": "ENUM_920DDEB0", "m_OverrideReferenceName": "_WINDQUALITY", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_KeywordType": 1, "m_KeywordDefinition": 0, "m_KeywordScope": 0, + "m_KeywordStages": 63, "m_Entries": [ { "id": 1, @@ -1663,12 +1679,14 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, "m_TextureType": 0, - "m_NormalMapSpace": 0 + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true } { @@ -1768,6 +1786,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -1801,6 +1820,9 @@ "m_DefaultReferenceName": "", "m_OverrideReferenceName": "_MainTex", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -1809,6 +1831,8 @@ "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", "m_Guid": "" }, + "isMainTexture": false, + "useTilingAndOffset": false, "m_Modifiable": true, "m_DefaultType": 0 } @@ -1887,6 +1911,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -1920,6 +1945,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -1954,6 +1980,9 @@ "m_DefaultReferenceName": "", "m_OverrideReferenceName": "_ExtraTex", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -1962,6 +1991,8 @@ "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", "m_Guid": "" }, + "isMainTexture": false, + "useTilingAndOffset": false, "m_Modifiable": true, "m_DefaultType": 0 } @@ -2016,6 +2047,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -2073,6 +2105,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -2133,6 +2166,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -2195,6 +2229,9 @@ "m_DefaultReferenceName": "Enable_Hue_Variation", "m_OverrideReferenceName": "_HueVariationKwToggle", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -2234,6 +2271,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -2296,6 +2334,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -2353,6 +2392,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -2388,6 +2428,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -2492,9 +2533,13 @@ "m_DefaultReferenceName": "BOOLEAN_C1CEEA62_ON", "m_OverrideReferenceName": "LOD_FADE_CROSSFADE", "m_GeneratePropertyBlock": false, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_KeywordType": 0, "m_KeywordDefinition": 2, "m_KeywordScope": 1, + "m_KeywordStages": 63, "m_Entries": [], "m_Value": 0, "m_IsEditable": true @@ -2556,6 +2601,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -2588,6 +2634,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -2608,6 +2655,9 @@ "m_DefaultReferenceName": "", "m_OverrideReferenceName": "_HueVariationColor", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -2618,6 +2668,7 @@ "b": 0.0, "a": 0.20000000298023225 }, + "isMainColor": false, "m_ColorMode": 0 } @@ -2664,6 +2715,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -2707,6 +2759,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -2739,6 +2792,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -2761,6 +2815,9 @@ "m_DefaultReferenceName": "", "m_OverrideReferenceName": "_AlphaClipThreshold", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -2838,6 +2895,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -2860,7 +2918,9 @@ -84633316, 2074262670, 1903731781 - ] + ], + "m_Dropdowns": [], + "m_DropdownSelectedEntries": [] } { @@ -2890,6 +2950,9 @@ "m_DefaultReferenceName": "Vector1_CCA346BE", "m_OverrideReferenceName": "_SubsurfaceScale", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -2913,6 +2976,72 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "45952b5f3be646068270ae26c096eb6e", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "195973b245ddcc89a69e46b8ec1b1d2e" + }, + { + "m_Id": "fc70317939bbfa8581a7ade53f48f51b" + }, + { + "m_Id": "2a070aac1d0e4f77977002ec88c22aac" + }, + { + "m_Id": "3a8b96872d8e908c9aa22a87fc1870a4" + }, + { + "m_Id": "b39613f30248422db815758074405b39" + }, + { + "m_Id": "87da6183deeb0c82b1a9a03c658a12ac" + }, + { + "m_Id": "5aa0aea4df9149e99751222c8691d772" + }, + { + "m_Id": "207a17eaceb23f8fb51b28e46bd9f489" + }, + { + "m_Id": "bb0b9f010f3f430cbfa7ad8a59310232" + }, + { + "m_Id": "70ac6b2e29e3b286ae73c4c1b4642c09" + }, + { + "m_Id": "44c0a8adcd34ab8387e837e69912d552" + }, + { + "m_Id": "93ef1c1c2d2143d68be4beb1b4a4c881" + }, + { + "m_Id": "3d4f47389792288b981d95e7bb2adac7" + }, + { + "m_Id": "d0f1653b738e4856a00635fee2ba0fdb" + }, + { + "m_Id": "0d4d0b0011ad4b11809bc2afbe75d280" + }, + { + "m_Id": "e003cdffe0a84294985117d1db475a5a" + }, + { + "m_Id": "34aa4ed71e594aa0aa20c6bad111303f" + }, + { + "m_Id": "a8eb1a55202a44469d7ae71abf7b59ca" + }, + { + "m_Id": "634c255335cd4db09ac805304e2bc617" + } + ] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -2984,6 +3113,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -3006,7 +3136,9 @@ -1083973806, 1313628562, 145226482 - ] + ], + "m_Dropdowns": [], + "m_DropdownSelectedEntries": [] } { @@ -3065,6 +3197,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -3098,6 +3231,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -3201,6 +3335,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -3263,6 +3398,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -3415,6 +3551,9 @@ "m_DefaultReferenceName": "Enable_Extra_Map", "m_OverrideReferenceName": "EFFECT_EXTRA_TEX", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -3543,6 +3682,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -3599,6 +3739,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 2, "m_CustomColors": { "m_SerializableColors": [] @@ -3656,6 +3797,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -3715,7 +3857,7 @@ "m_SGVersion": 0, "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.SystemData", "m_ObjectId": "628ec2e74dc0484b9444bc16985acfda", - "m_MaterialNeedsUpdateHash": 6448510, + "m_MaterialNeedsUpdateHash": 280370, "m_SurfaceType": 0, "m_RenderingPass": 1, "m_BlendMode": 0, @@ -3730,8 +3872,16 @@ "m_SupportLodCrossFade": false, "m_DoubleSidedMode": 2, "m_DOTSInstancing": false, - "m_Version": 0, - "m_FirstTimeMigrationExecuted": true, + "m_CustomVelocity": false, + "m_Tessellation": false, + "m_TessellationMode": 0, + "m_TessellationFactorMinDistance": 20.0, + "m_TessellationFactorMaxDistance": 50.0, + "m_TessellationFactorTriangleSize": 100.0, + "m_TessellationShapeFactor": 0.75, + "m_TessellationBackFaceCullEpsilon": -0.25, + "m_TessellationMaxDisplacement": 0.009999999776482582, + "m_Version": 1, "inspectorFoldoutMask": 9 } @@ -3748,9 +3898,13 @@ "m_DefaultReferenceName": "ENABLE_SUBSURFACE", "m_OverrideReferenceName": "OUTPUT_SPLIT_LIGHTING", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_KeywordType": 0, "m_KeywordDefinition": 2, "m_KeywordScope": 0, + "m_KeywordStages": 63, "m_Entries": [], "m_Value": 0, "m_IsEditable": true @@ -3804,9 +3958,7 @@ "m_RefractionModel": 0, "m_SSSTransmission": true, "m_EnergyConservingSpecular": true, - "m_ClearCoat": false, - "m_EmissionOverriden": false, - "m_ForceForwardEmissive": false + "m_ClearCoat": false } { @@ -3866,6 +4018,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -3907,6 +4060,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -4014,6 +4168,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -4088,6 +4243,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -4123,6 +4279,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 2, "m_CustomColors": { "m_SerializableColors": [] @@ -4166,6 +4323,9 @@ "m_DefaultReferenceName": "", "m_OverrideReferenceName": "_SubsurfaceTex", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -4174,6 +4334,8 @@ "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", "m_Guid": "" }, + "isMainTexture": false, + "useTilingAndOffset": false, "m_Modifiable": true, "m_DefaultType": 1 } @@ -4258,6 +4420,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -4392,6 +4555,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -4501,6 +4665,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -4541,6 +4706,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -4688,6 +4854,9 @@ "m_DefaultReferenceName": "", "m_OverrideReferenceName": "_BumpMap", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -4696,6 +4865,8 @@ "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", "m_Guid": "" }, + "isMainTexture": false, + "useTilingAndOffset": false, "m_Modifiable": true, "m_DefaultType": 3 } @@ -4886,7 +5057,8 @@ "m_Id": "edead4231d3b49d39360ca6e292b9394" } ], - "m_CustomEditorGUI": "" + "m_CustomEditorGUI": "", + "m_SupportVFX": false } { @@ -4915,6 +5087,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 2, "m_CustomColors": { "m_SerializableColors": [] @@ -4971,6 +5144,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -5017,6 +5191,9 @@ "m_DefaultReferenceName": "Diffusion_Profile", "m_OverrideReferenceName": "", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -5082,6 +5259,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -5178,6 +5356,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -5281,12 +5460,14 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] }, "m_TextureType": 0, - "m_NormalMapSpace": 0 + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true } { @@ -5423,9 +5604,13 @@ "m_DefaultReferenceName": "BOOLEAN_4515C081_ON", "m_OverrideReferenceName": "SHADERPASS_SHADOWS", "m_GeneratePropertyBlock": false, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_KeywordType": 0, "m_KeywordDefinition": 2, "m_KeywordScope": 0, + "m_KeywordStages": 63, "m_Entries": [], "m_Value": 0, "m_IsEditable": true @@ -5440,7 +5625,7 @@ "m_SlotType": 1, "m_Hidden": false, "m_ShaderOutputName": "NormalTangentSpace", - "m_StageCapability": 2, + "m_StageCapability": 3, "m_Value": { "x": 0.0, "y": 0.0, @@ -5566,6 +5751,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -5655,6 +5841,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -5675,6 +5862,9 @@ "m_DefaultReferenceName": "Enable_Normal_Map", "m_OverrideReferenceName": "_NormalMapKwToggle", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -5732,6 +5922,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -5784,6 +5975,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -5884,6 +6076,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -5969,6 +6162,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -6053,6 +6247,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -6075,6 +6270,9 @@ "m_DefaultReferenceName": "Smoothness", "m_OverrideReferenceName": "_Glossiness", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -6382,6 +6580,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -6441,6 +6640,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -6558,6 +6758,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -6593,6 +6794,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -6651,6 +6853,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -6716,6 +6919,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -6762,6 +6966,9 @@ "m_DefaultReferenceName": "Boolean_d0f1653b738e4856a00635fee2ba0fdb", "m_OverrideReferenceName": "_WindQuality", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -6795,6 +7002,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -6830,6 +7038,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -6893,6 +7102,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -6946,6 +7156,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -6961,7 +7172,7 @@ "m_SlotType": 0, "m_Hidden": false, "m_ShaderOutputName": "Vector3_F863C863", - "m_StageCapability": 2, + "m_StageCapability": 3, "m_Value": { "x": 0.0, "y": 0.0, @@ -7048,6 +7259,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -7104,6 +7316,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 2, "m_CustomColors": { "m_SerializableColors": [] @@ -7219,9 +7432,13 @@ "m_DefaultReferenceName": "BOOLEAN_E5812BC_ON", "m_OverrideReferenceName": "EFFECT_BILLBOARD", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_KeywordType": 0, "m_KeywordDefinition": 0, "m_KeywordScope": 0, + "m_KeywordStages": 63, "m_Entries": [], "m_Value": 0, "m_IsEditable": true @@ -7292,7 +7509,7 @@ "m_SlotType": 1, "m_Hidden": false, "m_ShaderOutputName": "NormalWorldSpace", - "m_StageCapability": 2, + "m_StageCapability": 3, "m_Value": { "x": 0.0, "y": 0.0, @@ -7422,8 +7639,16 @@ "m_SupportLodCrossFade": false, "m_DoubleSidedMode": 0, "m_DOTSInstancing": false, + "m_CustomVelocity": false, + "m_Tessellation": false, + "m_TessellationMode": 0, + "m_TessellationFactorMinDistance": 20.0, + "m_TessellationFactorMaxDistance": 50.0, + "m_TessellationFactorTriangleSize": 100.0, + "m_TessellationShapeFactor": 0.75, + "m_TessellationBackFaceCullEpsilon": -0.25, + "m_TessellationMaxDisplacement": 0.009999999776482582, "m_Version": 0, - "m_FirstTimeMigrationExecuted": false, "inspectorFoldoutMask": 0 } @@ -7484,6 +7709,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -7583,6 +7809,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -7605,7 +7832,9 @@ 992411759, 2003352493, -724862820 - ] + ], + "m_Dropdowns": [], + "m_DropdownSelectedEntries": [] } { @@ -7634,6 +7863,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -7674,9 +7904,7 @@ "m_RefractionModel": 0, "m_SSSTransmission": true, "m_EnergyConservingSpecular": true, - "m_ClearCoat": false, - "m_EmissionOverriden": false, - "m_ForceForwardEmissive": false + "m_ClearCoat": false } { @@ -7815,6 +8043,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": true, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] @@ -7835,6 +8064,9 @@ "m_DefaultReferenceName": "", "m_OverrideReferenceName": "_Color", "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, "m_Precision": 0, "overrideHLSLDeclaration": false, "hlslDeclarationOverride": 0, @@ -7845,6 +8077,7 @@ "b": 1.0, "a": 1.0 }, + "isMainColor": false, "m_ColorMode": 0 } @@ -7880,6 +8113,7 @@ "synonyms": [], "m_Precision": 0, "m_PreviewExpanded": false, + "m_DismissedVersion": 0, "m_PreviewMode": 0, "m_CustomColors": { "m_SerializableColors": [] 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 8795bd65cec..807bc0288f4 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 @@ -336,6 +336,12 @@ internal void SetParentCamera(HDCamera parentHdCam, bool useGpuFetchedExposure, /// Mark the HDCamera as persistant so it won't be destroyed if the camera is disabled internal bool isPersistent = false; + internal HDUtils.PackedMipChainInfo m_DepthBufferMipChainInfo = new HDUtils.PackedMipChainInfo(); + + internal ref HDUtils.PackedMipChainInfo depthBufferMipChainInfo => ref m_DepthBufferMipChainInfo; + + internal Vector2Int depthMipChainSize => m_DepthBufferMipChainInfo.textureSize; + // VisualSky is the sky used for rendering in the main view. // LightingSky is the sky used for lighting the scene (ambient probe and sky reflection) // It's usually the visual sky unless a sky lighting override is setup. @@ -694,6 +700,8 @@ internal HDCamera(Camera cam) volumeStack = VolumeManager.instance.CreateStack(); + m_DepthBufferMipChainInfo.Allocate(); + Reset(); } @@ -730,7 +738,7 @@ internal bool IsSSREnabled(bool transparent = false) if (!transparent) return frameSettings.IsEnabled(FrameSettingsField.SSR) && ssr.enabled.value && frameSettings.IsEnabled(FrameSettingsField.OpaqueObjects); else - return frameSettings.IsEnabled(FrameSettingsField.TransparentSSR) && ssr.enabled.value; + return frameSettings.IsEnabled(FrameSettingsField.TransparentSSR) && ssr.enabledTransparent.value; } internal bool IsSSGIEnabled() @@ -927,6 +935,8 @@ internal void Update(FrameSettings currentFrameSettings, HDRenderPipeline hdrp, Vector2Int nonScaledViewport = new Vector2Int(actualWidth, actualHeight); + m_DepthBufferMipChainInfo.ComputePackedMipChainInfo(nonScaledViewport); + lowResScale = 0.5f; if (canDoDynamicResolution) { diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Debug.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Debug.cs index 931bb194939..06086615fc5 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Debug.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Debug.cs @@ -331,8 +331,8 @@ TextureHandle ResolveFullScreenDebug(RenderGraph renderGraph, TextureHandle inpu passData.debugFullScreenMaterial = m_DebugFullScreen; passData.input = builder.ReadTexture(inputFullScreenDebug); passData.depthPyramid = builder.ReadTexture(depthPyramid); - passData.depthPyramidMip = (int)(m_CurrentDebugDisplaySettings.data.fullscreenDebugMip * GetDepthBufferMipChainInfo().mipLevelCount); - passData.depthPyramidOffsets = GetDepthBufferMipChainInfo().GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); + passData.depthPyramidMip = (int)(m_CurrentDebugDisplaySettings.data.fullscreenDebugMip * hdCamera.depthBufferMipChainInfo.mipLevelCount); + passData.depthPyramidOffsets = hdCamera.depthBufferMipChainInfo.GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); // On Vulkan, not binding the Random Write Target will result in an invalid drawcall. // To avoid that, if the compute buffer is invalid, we bind a dummy compute buffer anyway. if (m_DebugFullScreenComputeBuffer.IsValid()) 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 6462ef3e9ea..44484a2ab31 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 @@ -1084,7 +1084,7 @@ void UpdateSSRConstantBuffer(HDCamera hdCamera, ScreenSpaceReflection settings, cb._SsrEdgeFadeRcpLength = Mathf.Min(1.0f / settings.screenFadeDistance.value, float.MaxValue); cb._ColorPyramidUvScaleAndLimitPrevFrame = HDUtils.ComputeViewportScaleAndLimit(hdCamera.historyRTHandleProperties.previousViewportSize, hdCamera.historyRTHandleProperties.previousRenderTargetSize); cb._SsrColorPyramidMaxMip = hdCamera.colorPyramidHistoryMipCount - 1; - cb._SsrDepthPyramidMaxMip = m_DepthBufferMipChainInfo.mipLevelCount - 1; + cb._SsrDepthPyramidMaxMip = hdCamera.depthBufferMipChainInfo.mipLevelCount - 1; if (hdCamera.isFirstFrame || hdCamera.cameraFrameCount <= 2) cb._SsrAccumulationAmount = 1.0f; else @@ -1123,6 +1123,12 @@ TextureHandle RenderSSR(RenderGraph renderGraph, BuildCoarseStencilAndResolveIfNeeded(renderGraph, hdCamera, resolveOnly: true, ref prepassOutput); } + // The first color pyramid of the frame is generated after the SSR transparent, so we have no choice but to use the previous + // frame color pyramid (that includes transparents from the previous frame). + RTHandle colorPyramidRT = hdCamera.GetPreviousFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain); + if (colorPyramidRT == null) + return renderGraph.defaultResources.blackTextureXR; + using (var builder = renderGraph.AddRenderPass("Render SSR", out var passData)) { builder.EnableAsyncCompute(hdCamera.frameSettings.SSRRunsAsync()); @@ -1130,7 +1136,7 @@ TextureHandle RenderSSR(RenderGraph renderGraph, hdCamera.AllocateScreenSpaceAccumulationHistoryBuffer(1.0f); bool usePBRAlgo = !transparent && settings.usedAlgorithm.value == ScreenSpaceReflectionAlgorithm.PBRAccumulation; - var colorPyramid = renderGraph.ImportTexture(hdCamera.GetPreviousFrameRT((int)HDCameraFrameHistoryType.ColorBufferMipChain)); + var colorPyramid = renderGraph.ImportTexture(colorPyramidRT); var volumeSettings = hdCamera.volumeStack.GetComponent(); UpdateSSRConstantBuffer(hdCamera, volumeSettings, ref passData.cb); @@ -1146,7 +1152,7 @@ TextureHandle RenderSSR(RenderGraph renderGraph, passData.width = hdCamera.actualWidth; passData.height = hdCamera.actualHeight; passData.viewCount = hdCamera.viewCount; - passData.offsetBufferData = m_DepthBufferMipChainInfo.GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); + passData.offsetBufferData = hdCamera.depthBufferMipChainInfo.GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); passData.accumNeedClear = usePBRAlgo; passData.previousAccumNeedClear = usePBRAlgo && (hdCamera.currentSSRAlgorithm == ScreenSpaceReflectionAlgorithm.Approximation || hdCamera.isFirstFrame || hdCamera.resetPostProcessingHistory); hdCamera.currentSSRAlgorithm = volumeSettings.usedAlgorithm.value; // Store for next frame comparison diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Prepass.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Prepass.cs index 621b1509bb5..765ebeda941 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Prepass.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.Prepass.cs @@ -17,16 +17,6 @@ public partial class HDRenderPipeline DBufferOutput m_DBufferOutput; GPUCopy m_GPUCopy; - HDUtils.PackedMipChainInfo m_DepthBufferMipChainInfo; - - Vector2Int ComputeDepthBufferMipChainSize(Vector2Int screenSize) - { - m_DepthBufferMipChainInfo.ComputePackedMipChainInfo(screenSize); - return m_DepthBufferMipChainInfo.textureSize; - } - - // Avoid GCAlloc by capturing functor... - TextureDesc m_DepthPyramidDesc; void InitializePrepass(HDRenderPipelineAsset hdAsset) { @@ -43,12 +33,7 @@ void InitializePrepass(HDRenderPipelineAsset hdAsset) m_DBufferOutput = new DBufferOutput(); m_DBufferOutput.mrt = new TextureHandle[(int)Decal.DBufferMaterial.Count]; - m_DepthBufferMipChainInfo = new HDUtils.PackedMipChainInfo(); - m_DepthBufferMipChainInfo.Allocate(); - m_GPUCopy = new GPUCopy(defaultResources.shaders.copyChannelCS); - m_DepthPyramidDesc = new TextureDesc(ComputeDepthBufferMipChainSize, true, true) - { colorFormat = GraphicsFormat.R32_SFloat, enableRandomWrite = true, name = "CameraDepthBufferMipChain" }; } void CleanupPrepass() @@ -65,11 +50,6 @@ bool NeedClearGBuffer(HDCamera hdCamera) return m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled() || hdCamera.frameSettings.IsEnabled(FrameSettingsField.ClearGBuffers); } - HDUtils.PackedMipChainInfo GetDepthBufferMipChainInfo() - { - return m_DepthBufferMipChainInfo; - } - struct PrepassOutput { // Buffers that may be output by the prepass. @@ -789,8 +769,13 @@ void CopyDepthBufferIfNeeded(RenderGraph renderGraph, HDCamera hdCamera, ref Pre { using (var builder = renderGraph.AddRenderPass("Copy depth buffer", out var passData, ProfilingSampler.Get(HDProfileId.CopyDepthBuffer))) { + var depthMipchainSize = hdCamera.depthMipChainSize; passData.inputDepth = builder.ReadTexture(output.resolvedDepthBuffer); - passData.outputDepth = builder.WriteTexture(renderGraph.CreateTexture(m_DepthPyramidDesc)); + + passData.outputDepth = builder.WriteTexture(renderGraph.CreateTexture( + new TextureDesc(depthMipchainSize.x, depthMipchainSize.y, true, true) + { colorFormat = GraphicsFormat.R32_SFloat, enableRandomWrite = true, name = "CameraDepthBufferMipChain" })); + passData.GPUCopy = m_GPUCopy; passData.width = hdCamera.actualWidth; passData.height = hdCamera.actualHeight; @@ -1099,7 +1084,7 @@ void DownsampleDepthForLowResTransparency(RenderGraph renderGraph, HDCamera hdCa } if (computeMip1OfPyramid) { - passData.mip0Offset = GetDepthBufferMipChainInfo().mipLevelOffsets[1]; + passData.mip0Offset = hdCamera.depthBufferMipChainInfo.mipLevelOffsets[1]; m_DownsampleDepthMaterialHalfresCheckerboard.EnableKeyword("OUTPUT_FIRST_MIP_OF_MIPCHAIN"); } passData.downsampleDepthMaterial = m_DownsampleDepthMaterialHalfresCheckerboard; @@ -1182,7 +1167,7 @@ void GenerateDepthPyramid(RenderGraph renderGraph, HDCamera hdCamera, bool mip0A using (var builder = renderGraph.AddRenderPass("Generate Depth Buffer MIP Chain", out var passData, ProfilingSampler.Get(HDProfileId.DepthPyramid))) { passData.depthTexture = builder.WriteTexture(output.depthPyramidTexture); - passData.mipInfo = GetDepthBufferMipChainInfo(); + passData.mipInfo = hdCamera.depthBufferMipChainInfo; passData.mipGenerator = m_MipGenerator; passData.mip0AlreadyComputed = mip0AlreadyComputed; 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 ae1b267621a..4decba13e1d 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 @@ -47,7 +47,7 @@ void RecordRenderGraph(RenderRequest renderRequest, // We need to initialize the MipChainInfo here, so it will be available to any render graph pass that wants to use it during setup // Be careful, ComputePackedMipChainInfo needs the render texture size and not the viewport size. Otherwise it would compute the wrong size. - m_DepthBufferMipChainInfo.ComputePackedMipChainInfo(RTHandles.rtHandleProperties.currentRenderTargetSize); + hdCamera.depthBufferMipChainInfo.ComputePackedMipChainInfo(RTHandles.rtHandleProperties.currentRenderTargetSize); #if UNITY_EDITOR var showGizmos = camera.cameraType == CameraType.Game @@ -143,8 +143,8 @@ void RecordRenderGraph(RenderRequest renderRequest, // Evaluate the history validation buffer that may be required by temporal accumulation based effects TextureHandle historyValidationTexture = EvaluateHistoryValidationBuffer(m_RenderGraph, hdCamera, prepassOutput.depthBuffer, prepassOutput.resolvedNormalBuffer, prepassOutput.resolvedMotionVectorsBuffer); - lightingBuffers.ambientOcclusionBuffer = RenderAmbientOcclusion(m_RenderGraph, hdCamera, prepassOutput.depthPyramidTexture, prepassOutput.resolvedNormalBuffer, prepassOutput.resolvedMotionVectorsBuffer, historyValidationTexture, m_DepthBufferMipChainInfo, m_ShaderVariablesRayTracingCB, rayCountTexture); - lightingBuffers.contactShadowsBuffer = RenderContactShadows(m_RenderGraph, hdCamera, msaa ? prepassOutput.depthValuesMSAA : prepassOutput.depthPyramidTexture, gpuLightListOutput, GetDepthBufferMipChainInfo().mipLevelOffsets[1].y); + lightingBuffers.ambientOcclusionBuffer = RenderAmbientOcclusion(m_RenderGraph, hdCamera, prepassOutput.depthPyramidTexture, prepassOutput.resolvedNormalBuffer, prepassOutput.resolvedMotionVectorsBuffer, historyValidationTexture, hdCamera.depthBufferMipChainInfo, m_ShaderVariablesRayTracingCB, rayCountTexture); + lightingBuffers.contactShadowsBuffer = RenderContactShadows(m_RenderGraph, hdCamera, msaa ? prepassOutput.depthValuesMSAA : prepassOutput.depthPyramidTexture, gpuLightListOutput, hdCamera.depthBufferMipChainInfo.mipLevelOffsets[1].y); var volumetricDensityBuffer = VolumeVoxelizationPass(m_RenderGraph, hdCamera, m_VisibleVolumeBoundsBuffer, m_VisibleVolumeDataBuffer, gpuLightListOutput.bigTileLightList); @@ -165,7 +165,7 @@ void RecordRenderGraph(RenderRequest renderRequest, lightingBuffers.screenspaceShadowBuffer = RenderScreenSpaceShadows(m_RenderGraph, hdCamera, prepassOutput, prepassOutput.depthBuffer, prepassOutput.normalBuffer, prepassOutput.motionVectorsBuffer, historyValidationTexture, rayCountTexture); - var maxZMask = GenerateMaxZPass(m_RenderGraph, hdCamera, prepassOutput.depthPyramidTexture, m_DepthBufferMipChainInfo); + var maxZMask = GenerateMaxZPass(m_RenderGraph, hdCamera, prepassOutput.depthPyramidTexture, hdCamera.depthBufferMipChainInfo); var volumetricLighting = VolumetricLightingPass(m_RenderGraph, hdCamera, prepassOutput.depthPyramidTexture, volumetricDensityBuffer, maxZMask, gpuLightListOutput.bigTileLightList, shadowResult); @@ -1195,7 +1195,7 @@ SendGeometryGraphcisBuffersParameters PrepareSendGeometryBuffersParameters(HDCam parameters.hdCamera = hdCamera; parameters.needNormalBuffer = false; parameters.needDepthBuffer = false; - parameters.packedMipChainInfo = m_DepthBufferMipChainInfo; + parameters.packedMipChainInfo = hdCamera.depthBufferMipChainInfo; HDAdditionalCameraData acd = null; hdCamera.camera.TryGetComponent(out acd); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs index 27ea6b10e65..eec4ef52cac 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDStringConstants.cs @@ -373,6 +373,7 @@ static class HDShaderIDs public static readonly int _ShaderVariablesVolumetric = Shader.PropertyToID("ShaderVariablesVolumetric"); public static readonly int _ShaderVariablesLightList = Shader.PropertyToID("ShaderVariablesLightList"); public static readonly int _ShaderVariablesRaytracing = Shader.PropertyToID("ShaderVariablesRaytracing"); + public static readonly int _ShaderVariablesBilateralUpsample = Shader.PropertyToID("ShaderVariablesBilateralUpsample"); public static readonly int _ShaderVariablesRaytracingLightLoop = Shader.PropertyToID("ShaderVariablesRaytracingLightLoop"); public static readonly int _ShaderVariablesDebugDisplay = Shader.PropertyToID("ShaderVariablesDebugDisplay"); public static readonly int _ShaderVariablesClouds = Shader.PropertyToID("ShaderVariablesClouds"); @@ -636,6 +637,7 @@ static class HDShaderIDs public static readonly int _SampleCountTextureRW = Shader.PropertyToID("_SampleCountTextureRW"); public static readonly int _AffectSmoothSurfaces = Shader.PropertyToID("_AffectSmoothSurfaces"); public static readonly int _ObjectMotionStencilBit = Shader.PropertyToID("_ObjectMotionStencilBit"); + public static readonly int _PointDistribution = Shader.PropertyToID("_PointDistribution"); public static readonly int _DenoiseInputArrayTexture = Shader.PropertyToID("_DenoiseInputArrayTexture"); public static readonly int _ValidityInputArrayTexture = Shader.PropertyToID("_ValidityInputArrayTexture"); @@ -770,6 +772,7 @@ static class HDShaderIDs public static readonly int _ExposureTexture = Shader.PropertyToID("_ExposureTexture"); public static readonly int _PrevExposureTexture = Shader.PropertyToID("_PrevExposureTexture"); + // Note that this is a separate name because is bound locally to a exposure shader, while _PrevExposureTexture is bound globally for everything else. public static readonly int _PreviousExposureTexture = Shader.PropertyToID("_PreviousExposureTexture"); public static readonly int _ExposureDebugTexture = Shader.PropertyToID("_ExposureDebugTexture"); public static readonly int _ExposureParams = Shader.PropertyToID("_ExposureParams"); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingLight.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingLight.hlsl index f4a5cc2f65e..822e374bf42 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingLight.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingLight.hlsl @@ -110,7 +110,9 @@ bool IsDistantLightActive(DirectionalLightData lightData, float3 normal) return dot(normal, lightData.forward) <= sin(lightData.angularDiameter * 0.5); } -LightList CreateLightList(float3 position, float3 normal, uint lightLayers = DEFAULT_LIGHT_LAYERS, bool withLocal = true, bool withDistant = true, float3 lightPosition = FLT_MAX) +LightList CreateLightList(float3 position, float3 normal, uint lightLayers = DEFAULT_LIGHT_LAYERS, + bool withPoint = true, bool withArea = true, bool withDistant = true, + float3 lightPosition = FLT_MAX) { LightList list; uint i; @@ -119,7 +121,7 @@ LightList CreateLightList(float3 position, float3 normal, uint lightLayers = DEF list.localCount = 0; list.localPointCount = 0; - if (withLocal) + if (withPoint || withArea) { uint localPointCount, localCount; @@ -144,35 +146,43 @@ LightList CreateLightList(float3 position, float3 normal, uint lightLayers = DEF bool forceLightPosition = (lightPosition.x != FLT_MAX); // First point lights (including spot lights) - for (i = 0; i < localPointCount && list.localPointCount < MAX_LOCAL_LIGHT_COUNT; i++) + if (withPoint) { -#ifdef USE_LIGHT_CLUSTER - const LightData lightData = FetchClusterLightIndex(list.cellIndex, i); -#else - const LightData lightData = _LightDatasRT[i]; -#endif + for (i = 0; i < localPointCount && list.localPointCount < MAX_LOCAL_LIGHT_COUNT; i++) + { + #ifdef USE_LIGHT_CLUSTER + const LightData lightData = FetchClusterLightIndex(list.cellIndex, i); + #else + const LightData lightData = _LightDatasRT[i]; + #endif + + if (forceLightPosition && any(lightPosition - lightData.positionRWS)) + continue; - if (forceLightPosition && any(lightPosition - lightData.positionRWS)) - continue; + if (IsMatchingLightLayer(lightData.lightLayers, lightLayers) && IsPointLightActive(lightData, position, normal)) + list.localIndex[list.localPointCount++] = i; + } - if (IsMatchingLightLayer(lightData.lightLayers, lightLayers) && IsPointLightActive(lightData, position, normal)) - list.localIndex[list.localPointCount++] = i; + list.localCount = list.localPointCount; } // Then rect area lights - for (list.localCount = list.localPointCount; i < localCount && list.localCount < MAX_LOCAL_LIGHT_COUNT; i++) + if (withArea) { -#ifdef USE_LIGHT_CLUSTER - const LightData lightData = FetchClusterLightIndex(list.cellIndex, i); -#else - const LightData lightData = _LightDatasRT[i]; -#endif + for (i = localPointCount; i < localCount && list.localCount < MAX_LOCAL_LIGHT_COUNT; i++) + { + #ifdef USE_LIGHT_CLUSTER + const LightData lightData = FetchClusterLightIndex(list.cellIndex, i); + #else + const LightData lightData = _LightDatasRT[i]; + #endif - if (forceLightPosition && any(lightPosition - lightData.positionRWS)) - continue; + if (forceLightPosition && any(lightPosition - lightData.positionRWS)) + continue; - if (IsMatchingLightLayer(lightData.lightLayers, lightLayers) && IsRectAreaLightActive(lightData, position, normal)) - list.localIndex[list.localCount++] = i; + if (IsMatchingLightLayer(lightData.lightLayers, lightLayers) && IsRectAreaLightActive(lightData, position, normal)) + list.localIndex[list.localCount++] = i; + } } } @@ -837,7 +847,7 @@ float PickLocalLightInterval(float3 rayOrigin, float3 rayDirection, inout float LightList CreateLightList(float3 position, bool sampleLocalLights, float3 lightPosition = FLT_MAX) { - return CreateLightList(position, 0.0, DEFAULT_LIGHT_LAYERS, sampleLocalLights, !sampleLocalLights, lightPosition); + return CreateLightList(position, 0.0, DEFAULT_LIGHT_LAYERS, sampleLocalLights, sampleLocalLights, !sampleLocalLights, lightPosition); } #endif // UNITY_PATH_TRACING_LIGHT_INCLUDED diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingMain.raytrace b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingMain.raytrace index fa80ff8edb0..c59b95e489d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingMain.raytrace +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/PathTracing/Shaders/PathTracingMain.raytrace @@ -90,58 +90,78 @@ void MissMaterial(inout PathIntersection pathIntersection : SV_RayPayload) ApplyFogAttenuation(WorldRayOrigin(), WorldRayDirection(), pathIntersection.value); } +void ApplyDepthOfField(uint2 pixelCoord, float dotDirection, inout float3 origin, inout float3 direction) +{ + float apertureRadius = _PathTracedDoFConstants.x; + + if (apertureRadius <= 0.0) + return; + + // Sample the lens aperture using the next available dimensions + // (we use 40 for path tracing, 2 for sub-pixel jittering, 64 for SSS -> 106, 107) + float2 uv = apertureRadius * SampleDiskUniform(GetSample(pixelCoord, _RaytracingSampleIndex, 106), + GetSample(pixelCoord, _RaytracingSampleIndex, 107)); + + // Compute the focus point by intersecting the pinhole ray with the focus plane + float focusDistance = _PathTracedDoFConstants.y; + float t = focusDistance / dotDirection; + float3 focusPoint = origin + t * direction; + + // Compute the new ray origin (_ViewMatrix[0] = right, _ViewMatrix[1] = up) + origin += _ViewMatrix[0].xyz * uv.x + _ViewMatrix[1].xyz * uv.y; + + // The new ray direction should pass through the focus point + direction = normalize(focusPoint - origin); +} + [shader("raygeneration")] void RayGen() { - uint2 LaunchIndex = DispatchRaysIndex().xy; - // Get the current pixel coordinates - uint2 currentPixelCoord = uint2(LaunchIndex.x, LaunchIndex.y); + uint2 pixelCoord = DispatchRaysIndex().xy; // Jitter them (we use 4x10 dimensions of our sequence during path tracing atm, so pick the next available ones) - float4 jitteredPixelCoord = float4(currentPixelCoord, 1.0, 1.0); - jitteredPixelCoord.x += GetSample(currentPixelCoord, _RaytracingSampleIndex, 40); - jitteredPixelCoord.y += GetSample(currentPixelCoord, _RaytracingSampleIndex, 41); - - // Compute the ray direction from those coordinates (for zero aperture - float3 directionWS = -normalize(mul(jitteredPixelCoord, _PixelCoordToViewDirWS).xyz); - float3 cameraPosWS = GetPrimaryCameraPosition(); + float4 jitteredPixelCoord = float4(pixelCoord, 1.0, 1.0); + jitteredPixelCoord.x += GetSample(pixelCoord, _RaytracingSampleIndex, 40); + jitteredPixelCoord.y += GetSample(pixelCoord, _RaytracingSampleIndex, 41); - float apertureRadius = _PathTracedDoFConstants.x; - if (apertureRadius > 0.0) - { - // Compute the ray origin and direction for a lens with non-zero aperture + // Create the ray descriptor for this pixel + RayDesc ray; + ray.TMin = _RaytracingCameraNearPlane; + ray.TMax = FLT_INF; - // Sample the lens apperture using the next available dimensions (we use 40 for path tracing, 2 for sub-pixel jittering, 64 for SSS -> 106, 107) - float r1 = GetSample(currentPixelCoord, _RaytracingSampleIndex, 106); - float r2 = GetSample(currentPixelCoord, _RaytracingSampleIndex, 107); - float2 uv = apertureRadius * SampleDiskUniform(r1, r2); + // We need the camera forward direction in both types of projection + float3 cameraDirection = GetViewForwardDir(); - // Compute the new ray origin ( _ViewMatrix[0] = right, _ViewMatrix[1] = up, _ViewMatrix[2] = forward ) - cameraPosWS += _ViewMatrix[0].xyz * uv.x + _ViewMatrix[1].xyz * uv.y; + // Compute the ray's origin and direction, for either perspective or orthographic projection + if (IsPerspectiveProjection()) + { + ray.Origin = GetPrimaryCameraPosition(); + ray.Direction = -normalize(mul(jitteredPixelCoord, _PixelCoordToViewDirWS).xyz); - // Compute the focus point by intersecting the pinhole ray with the focus plane - float focusDistance = _PathTracedDoFConstants.y; - float t = focusDistance / dot(directionWS, _ViewMatrix[2].xyz); - float3 focusPointWS = GetPrimaryCameraPosition() - t * directionWS; + // Use planar clipping, to match rasterization + float dotDirection = dot(cameraDirection, ray.Direction); + ray.TMin /= dotDirection; - // The new ray direction should pass through the focus point - directionWS = normalize(focusPointWS - cameraPosWS); + ApplyDepthOfField(pixelCoord, dotDirection, ray.Origin, ray.Direction); } + else // Orthographic projection + { + uint2 pixelResolution = DispatchRaysDimensions().xy; + float3 screenCoord = float3(2.0 * jitteredPixelCoord.x / pixelResolution.x - 1.0, + -2.0 * jitteredPixelCoord.y / pixelResolution.y + 1.0, + 0.0); - // Create the ray descriptor for this pixel - RayDesc rayDescriptor; - rayDescriptor.Origin = cameraPosWS; - rayDescriptor.Direction = directionWS; - rayDescriptor.TMin = _RaytracingCameraNearPlane; - rayDescriptor.TMax = FLT_INF; + ray.Origin = mul(_InvViewProjMatrix, screenCoord); + ray.Direction = cameraDirection; + } // Create and init the PathIntersection structure for this PathIntersection pathIntersection; pathIntersection.value = 1.0; pathIntersection.alpha = 1.0; pathIntersection.remainingDepth = _RaytracingMaxRecursion; - pathIntersection.pixelCoord = currentPixelCoord; + pathIntersection.pixelCoord = pixelCoord; pathIntersection.maxRoughness = 0.0; // In order to achieve filtering for the textures, we need to compute the spread angle of the pixel @@ -149,9 +169,9 @@ void RayGen() pathIntersection.cone.width = 0.0; // Evaluate the ray intersection - TraceRay(_RaytracingAccelerationStructure, RAY_FLAG_CULL_BACK_FACING_TRIANGLES, RAYTRACINGRENDERERFLAG_PATH_TRACING, 0, 1, 0, rayDescriptor, pathIntersection); + TraceRay(_RaytracingAccelerationStructure, RAY_FLAG_CULL_BACK_FACING_TRIANGLES, RAYTRACINGRENDERERFLAG_PATH_TRACING, 0, 1, 0, ray, pathIntersection); - _FrameTexture[COORD_TEXTURE2D_X(currentPixelCoord)] = float4(pathIntersection.value, pathIntersection.alpha); + _FrameTexture[COORD_TEXTURE2D_X(pixelCoord)] = float4(pathIntersection.value, pathIntersection.alpha); } // This should never be called, return magenta just in case diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDDiffuseDenoiser.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDDiffuseDenoiser.cs index 645cd1a1bd7..6c9a59503d3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDDiffuseDenoiser.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDDiffuseDenoiser.cs @@ -6,7 +6,7 @@ namespace UnityEngine.Rendering.HighDefinition { class HDDiffuseDenoiser { - // Resources used for the denoiser + // Resources used for the de-noiser ComputeShader m_DiffuseDenoiser; Texture m_OwenScrambleRGBA; @@ -17,6 +17,15 @@ class HDDiffuseDenoiser int m_BilateralFilterColorKernel; int m_GatherSingleKernel; int m_GatherColorKernel; + ComputeBuffer m_PointDistribution; + static internal float[] pointDistribution = new float[] { 0.647285104f, -0.534139216f, 0.201738372f, 0.260410696f, + -0.443308681f, 0.259598345f, 0.0f, 0.0f, + 0.851900041f, 0.214261428f, 0.0376310274f, -0.406103343f, + -0.357411921f, -0.525219262f, -0.00147355383f, 0.239211172f, + -0.463947058f, 0.646911025f, -0.0379408896f, -0.291660219f, + 0.405679494f, -0.473511368f, 0.0473965593f, 0.0411158539f, + -0.963973522f, -0.155723229f, -0.444706231f, 0.141471207f, + 0.0980135575f, 0.687162697f, 0.156328082f, -0.0518609099f}; public void Init(HDRenderPipelineRuntimeResources rpResources, HDRenderPipeline renderPipeline) { @@ -31,10 +40,13 @@ public void Init(HDRenderPipelineRuntimeResources rpResources, HDRenderPipeline m_BilateralFilterColorKernel = m_DiffuseDenoiser.FindKernel("BilateralFilterColor"); m_GatherSingleKernel = m_DiffuseDenoiser.FindKernel("GatherSingle"); m_GatherColorKernel = m_DiffuseDenoiser.FindKernel("GatherColor"); + m_PointDistribution = new ComputeBuffer(16 * 2, sizeof(float)); + m_PointDistribution.SetData(pointDistribution); } public void Release() { + CoreUtils.SafeRelease(m_PointDistribution); } class DiffuseDenoiserPassData @@ -57,7 +69,7 @@ class DiffuseDenoiserPassData public int gatherKernel; // Other parameters - public Texture owenScrambleRGBA; + public ComputeBufferHandle pointDistribution; public ComputeShader diffuseDenoiserCS; public TextureHandle depthStencilBuffer; @@ -98,7 +110,7 @@ public TextureHandle Denoise(RenderGraph renderGraph, HDCamera hdCamera, Diffuse } passData.viewCount = hdCamera.viewCount; - // Denoising parameters + // Parameters passData.pixelSpreadTangent = HDRenderPipeline.GetPixelSpreadTangent(hdCamera.camera.fieldOfView, passData.texWidth, passData.texHeight); passData.kernelSize = denoiserParams.kernelSize; passData.halfResolutionFilter = denoiserParams.halfResolutionFilter; @@ -111,13 +123,13 @@ public TextureHandle Denoise(RenderGraph renderGraph, HDCamera hdCamera, Diffuse passData.gatherKernel = denoiserParams.singleChannel ? m_GatherSingleKernel : m_GatherColorKernel; // Other parameters - passData.owenScrambleRGBA = m_OwenScrambleRGBA; passData.diffuseDenoiserCS = m_DiffuseDenoiser; + passData.pointDistribution = builder.ReadComputeBuffer(renderGraph.ImportComputeBuffer(m_PointDistribution)); passData.depthStencilBuffer = builder.ReadTexture(depthBuffer); passData.normalBuffer = builder.ReadTexture(normalBuffer); passData.noisyBuffer = builder.ReadTexture(noisyBuffer); - passData.intermediateBuffer = builder.CreateTransientTexture(new TextureDesc(Vector2.one, true, true) { colorFormat = GraphicsFormat.R16G16B16A16_SFloat, enableRandomWrite = true, name = "DiffuseDenoiserIntermediate" }); + passData.intermediateBuffer = builder.CreateTransientTexture(new TextureDesc(Vector2.one, true, true) { colorFormat = GraphicsFormat.B10G11R11_UFloatPack32, enableRandomWrite = true, name = "DiffuseDenoiserIntermediate" }); passData.outputBuffer = builder.WriteTexture(outputBuffer); builder.SetRenderFunc( @@ -129,8 +141,8 @@ public TextureHandle Denoise(RenderGraph renderGraph, HDCamera hdCamera, Diffuse int numTilesY = (data.texHeight + (areaTileSize - 1)) / areaTileSize; // Request the intermediate buffers that we need - ctx.cmd.SetGlobalTexture(HDShaderIDs._OwenScrambledRGTexture, data.owenScrambleRGBA); ctx.cmd.SetComputeFloatParam(data.diffuseDenoiserCS, HDShaderIDs._DenoiserFilterRadius, data.kernelSize); + ctx.cmd.SetComputeBufferParam(data.diffuseDenoiserCS, data.bilateralFilterKernel, HDShaderIDs._PointDistribution, data.pointDistribution); ctx.cmd.SetComputeTextureParam(data.diffuseDenoiserCS, data.bilateralFilterKernel, HDShaderIDs._DenoiseInputTexture, data.noisyBuffer); ctx.cmd.SetComputeTextureParam(data.diffuseDenoiserCS, data.bilateralFilterKernel, HDShaderIDs._DepthTexture, data.depthStencilBuffer); ctx.cmd.SetComputeTextureParam(data.diffuseDenoiserCS, data.bilateralFilterKernel, HDShaderIDs._NormalBufferTexture, data.normalBuffer); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs index 3a16771b902..78039c1a7cf 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRaytracingManager.cs @@ -441,7 +441,7 @@ internal void BuildRayTracingAccelerationStructure(HDCamera hdCamera) AmbientOcclusion aoSettings = hdCamera.volumeStack.GetComponent(); bool rtAOEnabled = aoSettings.rayTracing.value && hdCamera.frameSettings.IsEnabled(FrameSettingsField.SSAO); ScreenSpaceReflection reflSettings = hdCamera.volumeStack.GetComponent(); - bool rtREnabled = reflSettings.enabled.value && ScreenSpaceReflection.RayTracingActive(reflSettings) && hdCamera.frameSettings.IsEnabled(FrameSettingsField.SSR); + bool rtREnabled = (reflSettings.enabled.value || reflSettings.enabledTransparent.value) && ScreenSpaceReflection.RayTracingActive(reflSettings) && hdCamera.frameSettings.IsEnabled(FrameSettingsField.SSR); GlobalIllumination giSettings = hdCamera.volumeStack.GetComponent(); bool rtGIEnabled = giSettings.enable.value && GlobalIllumination.RayTracingActive(giSettings) && hdCamera.frameSettings.IsEnabled(FrameSettingsField.SSGI); RecursiveRendering recursiveSettings = hdCamera.volumeStack.GetComponent(); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRenderPipeline.RaytracingIndirectDiffuse.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRenderPipeline.RaytracingIndirectDiffuse.cs index c772eca1b86..d72a92997b7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRenderPipeline.RaytracingIndirectDiffuse.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRenderPipeline.RaytracingIndirectDiffuse.cs @@ -73,7 +73,7 @@ DeferredLightingRTParameters PrepareIndirectDiffuseDeferredLightingRTParameters( deferredParameters.rayBinSizeResult = m_RayBinSizeResult; deferredParameters.accelerationStructure = RequestAccelerationStructure(); deferredParameters.lightCluster = RequestLightCluster(); - deferredParameters.mipChainBuffer = m_DepthBufferMipChainInfo.GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); + deferredParameters.mipChainBuffer = hdCamera.depthBufferMipChainInfo.GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); // Shaders deferredParameters.rayMarchingCS = m_GlobalSettings.renderPipelineRayTracingResources.rayMarchingCS; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRenderPipeline.RaytracingReflection.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRenderPipeline.RaytracingReflection.cs index 07f878183a7..5cd569e423a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRenderPipeline.RaytracingReflection.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/HDRenderPipeline.RaytracingReflection.cs @@ -343,7 +343,7 @@ DeferredLightingRTParameters PrepareReflectionDeferredLightingRTParameters(HDCam deferredParameters.rayBinSizeResult = m_RayBinSizeResult; deferredParameters.accelerationStructure = RequestAccelerationStructure(); deferredParameters.lightCluster = RequestLightCluster(); - deferredParameters.mipChainBuffer = m_DepthBufferMipChainInfo.GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); + deferredParameters.mipChainBuffer = hdCamera.depthBufferMipChainInfo.GetOffsetBufferData(m_DepthPyramidMipLevelOffsetsBuffer); // Shaders deferredParameters.rayMarchingCS = m_GlobalSettings.renderPipelineRayTracingResources.rayMarchingCS; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/DiffuseDenoiser.compute b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/DiffuseDenoiser.compute index 2ec49f2a023..a4727584be4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/DiffuseDenoiser.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/DiffuseDenoiser.compute @@ -19,7 +19,6 @@ #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariablesGlobal.cs.hlsl" // Ray Tracing includes -#include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/RaytracingSampling.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/ShaderVariablesRaytracing.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/BilateralFilter.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Raytracing/Shaders/Denoising/DenoisingUtils.hlsl" @@ -30,7 +29,8 @@ // Noisy Input Buffer TEXTURE2D_X(_DenoiseInputTexture); - +// Buffer used for point sampling +StructuredBuffer _PointDistribution; // Filtered Output buffer (depends on the singel or color variant of the denoiser) #if SINGLE_CHANNEL RW_TEXTURE2D_X(float, _DenoiseOutputTextureRW); @@ -117,15 +117,7 @@ void BILATERAL_FILTER(uint3 dispatchThreadId : SV_DispatchThreadID, uint2 groupT for (uint sampleIndex = 0; sampleIndex < (uint)numSamples; ++sampleIndex) { // Fetch the noise value for the current sample - float2 newSample; - newSample.x = GetLDSequenceSampleFloat(sampleIndex + sampleOffset, 0); - newSample.y = GetLDSequenceSampleFloat(sampleIndex + sampleOffset, 1); - - // Convert the sample to a local unit disk - newSample = SampleDiskCubic(newSample.x, newSample.y); - - // Distribute them according a square profile - newSample *= denoisingRadius; + float2 newSample = _PointDistribution[sampleIndex + sampleOffset] * denoisingRadius; // Convert the point to hemogenous clip space float3 wsPos = center.position + localToWorld[0] * newSample.x + localToWorld[1] * newSample.y; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettings.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettings.cs index 87f765ed4ac..e5fa2c6732d 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettings.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/Settings/FrameSettings.cs @@ -832,7 +832,7 @@ internal static void Sanitize(ref FrameSettings sanitizedFrameSettings, Camera c // No recursive reflections bool ssr = sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.SSR] &= renderPipelineSettings.supportSSR && !msaa && !preview && temporalAccumulationAllowed; - sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.TransparentSSR] &= ssr && renderPipelineSettings.supportSSRTransparent && sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.TransparentObjects]; + sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.TransparentSSR] &= ssr && renderPipelineSettings.supportSSRTransparent && sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.TransparentObjects] && renderPipelineSettings.supportTransparentDepthPrepass; sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.Refraction] &= !preview; // Because the camera is shared between the faces of the reflection probes, we cannot allow effects that rely on the accumulation process sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.SSAO] &= renderPipelineSettings.supportSSAO && !preview && sanitizedFrameSettings.bitDatas[(int)FrameSettingsField.OpaqueObjects] && temporalAccumulationAllowed; diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassPathTracing.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassPathTracing.hlsl index 552a7276c75..f2c881c9b52 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassPathTracing.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassPathTracing.hlsl @@ -23,7 +23,12 @@ float3 GetPositionBias(float3 geomNormal, float bias, bool below) // Compute scalar visibility for shadow mattes, between 0 and 1 float ComputeVisibility(float3 position, float3 normal, float3 inputSample) { - LightList lightList = CreateLightList(position, normal); + // Select active types of lights + bool withPoint = asuint(_ShadowMatteFilter) & LIGHTFEATUREFLAGS_PUNCTUAL; + bool withArea = asuint(_ShadowMatteFilter) & LIGHTFEATUREFLAGS_AREA; + bool withDistant = asuint(_ShadowMatteFilter) & LIGHTFEATUREFLAGS_DIRECTIONAL; + + LightList lightList = CreateLightList(position, normal, DEFAULT_LIGHT_LAYERS, withPoint, withArea, withDistant); RayDesc rayDescriptor; rayDescriptor.Origin = position + normal * _RaytracingRayBias; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudSystem/CloudLayer/CloudLayerRenderer.cs b/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudSystem/CloudLayer/CloudLayerRenderer.cs index 5bd3ba32b77..674b9322f93 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudSystem/CloudLayer/CloudLayerRenderer.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Sky/CloudSystem/CloudLayer/CloudLayerRenderer.cs @@ -138,7 +138,10 @@ public override void RenderClouds(BuiltinSkyParameters builtinParams, bool rende } else { - CoreUtils.SetRenderTarget(cmd, builtinParams.colorBuffer); + if (builtinParams.depthBuffer == BuiltinSkyParameters.nullRT) + CoreUtils.SetRenderTarget(cmd, builtinParams.colorBuffer); + else + CoreUtils.SetRenderTarget(cmd, builtinParams.colorBuffer, builtinParams.depthBuffer); CoreUtils.DrawFullScreen(cmd, m_CloudLayerMaterial, m_PropertyBlock, 1); } }