From 27f539f3a2a50d148fb42e27d26cda2f3af06f6f Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Fri, 15 Oct 2021 17:52:36 +0200 Subject: [PATCH 01/10] [HDRP] fix screenshots after cache server reset --- .../Linear/LinuxEditor/Vulkan/None/1225_Lit_SpeedTree8SG.png | 4 ++-- .../Linear/OSXEditor/Metal/None/1225_Lit_SpeedTree8SG.png | 4 ++-- .../Linear/OSXEditor/Metal/None/1601_TerrainLit.png | 4 ++-- .../Linear/OSXEditor/Metal/None/1603_TerrainLit_BaseMap.png | 4 ++-- .../WindowsEditor/Direct3D11/None/1225_Lit_SpeedTree8SG.png | 4 ++-- .../WindowsEditor/Direct3D12/None/1225_Lit_SpeedTree8SG.png | 4 ++-- .../WindowsEditor/Vulkan/None/1225_Lit_SpeedTree8SG.png | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1225_Lit_SpeedTree8SG.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1225_Lit_SpeedTree8SG.png index 77914b8c84a..7eb718cb1d1 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1225_Lit_SpeedTree8SG.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1225_Lit_SpeedTree8SG.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f622416be73766cfd3d1d9ab6eae75520f0f585f39f89abda8d02841a6e29f1 -size 382045 +oid sha256:f293458382c5800f45f929f1ab766a5078ee45af4f5b34bd50e296ebd0f6fb6e +size 381251 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1225_Lit_SpeedTree8SG.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1225_Lit_SpeedTree8SG.png index 39dbece4f81..33548fabdf9 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1225_Lit_SpeedTree8SG.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1225_Lit_SpeedTree8SG.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c4cd7437be8dbd4eade9c688711271edd7abd0060aeb65f450d98f760791d286 -size 385892 +oid sha256:6edbc47acb321d25cedd77d3f879f393e48ffa35aaafc7daf0d52c519024d178 +size 385144 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1601_TerrainLit.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1601_TerrainLit.png index 1b5c936605c..e42cfcdc110 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1601_TerrainLit.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1601_TerrainLit.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a09ee93acf5a27125f5a8c450df181e3c45b15bc2c778460fe8c1a336aaf6e7d -size 463699 +oid sha256:456eb59b892f94b658e885ecc3cd849ab81774caf17d04ac13c1571a7b3ad5df +size 463596 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1603_TerrainLit_BaseMap.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1603_TerrainLit_BaseMap.png index 1215913d11a..439637e2c81 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1603_TerrainLit_BaseMap.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1603_TerrainLit_BaseMap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a4069362234802828a984dbc2d049b274025726c28c384ae12a2c54050c067d -size 369222 +oid sha256:547756b4267f58f8ba34a06167ec3aa0742970875e869914b5bcb5a1478bc4f9 +size 368835 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1225_Lit_SpeedTree8SG.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1225_Lit_SpeedTree8SG.png index 2379651ec07..adfbb11bcbf 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1225_Lit_SpeedTree8SG.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1225_Lit_SpeedTree8SG.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e71edc56019ab94a36b3438c81198a89671972ce801b85e89e5091362c4dffd -size 385570 +oid sha256:a26f82c7b08a69dffb0d75c56e81b3030b717990ad98df12a4b191828b26385e +size 384893 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/1225_Lit_SpeedTree8SG.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/1225_Lit_SpeedTree8SG.png index 4a04ed41545..562f034104f 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/1225_Lit_SpeedTree8SG.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/1225_Lit_SpeedTree8SG.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:494898728b890cbcf568dbe41e048fead05069d8009ab45ae0701b059abcf256 -size 385670 +oid sha256:df7fed0ddf64b4a6e5096b65ba6b95f696c81f8c65c8607b1fa7e7d658314dc9 +size 384929 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1225_Lit_SpeedTree8SG.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1225_Lit_SpeedTree8SG.png index 77914b8c84a..7eb718cb1d1 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1225_Lit_SpeedTree8SG.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1225_Lit_SpeedTree8SG.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f622416be73766cfd3d1d9ab6eae75520f0f585f39f89abda8d02841a6e29f1 -size 382045 +oid sha256:f293458382c5800f45f929f1ab766a5078ee45af4f5b34bd50e296ebd0f6fb6e +size 381251 From 27d48f6cdaab8af18af5a42a23e02c522d9cbc20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarkko=20Lempi=C3=A4inen?= <79095390+JarkkoUnity@users.noreply.github.com> Date: Mon, 20 Sep 2021 18:23:07 +0300 Subject: [PATCH 02/10] Bugfix 1359282: Emissive decal silhouette issue #5532 --- .../1x_Materials/1715_DecalEmissive.meta | 8 + .../1x_Materials/1715_DecalEmissive.unity | 726 ++++++++++++++++++ .../1715_DecalEmissive.unity.meta | 7 + .../1715_DecalEmissive/AltoStratusMap.png | 3 + .../AltoStratusMap.png.meta | 98 +++ .../1715_DecalEmissive/DecalEmissive.mat | 288 +++++++ .../1715_DecalEmissive/DecalEmissive.mat.meta | 8 + .../Vulkan/None/1715_DecalEmissive.png | 3 + .../Vulkan/None/1715_DecalEmissive.png.meta | 110 +++ .../Metal/None/1715_DecalEmissive.png | 3 + .../Metal/None/1715_DecalEmissive.png.meta | 110 +++ .../Direct3D11/None/1715_DecalEmissive.png | 3 + .../None/1715_DecalEmissive.png.meta | 110 +++ .../Direct3D12/None/1715_DecalEmissive.png | 3 + .../None/1715_DecalEmissive.png.meta | 110 +++ .../Vulkan/None/1715_DecalEmissive.png | 3 + .../Vulkan/None/1715_DecalEmissive.png.meta | 110 +++ .../ProjectSettings/EditorBuildSettings.asset | 3 + .../CHANGELOG.md | 1 + .../Runtime/Material/Decal/DecalData.hlsl | 24 +- .../ShaderPass/ShaderPassDecal.hlsl | 7 +- 21 files changed, 1735 insertions(+), 3 deletions(-) create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive.unity create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive.unity.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/AltoStratusMap.png create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/AltoStratusMap.png.meta create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/DecalEmissive.mat create mode 100644 TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/DecalEmissive.mat.meta create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1715_DecalEmissive.png create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1715_DecalEmissive.png.meta create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1715_DecalEmissive.png create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1715_DecalEmissive.png.meta create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1715_DecalEmissive.png create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1715_DecalEmissive.png.meta create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/1715_DecalEmissive.png create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/1715_DecalEmissive.png.meta create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1715_DecalEmissive.png create mode 100644 TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1715_DecalEmissive.png.meta diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive.meta new file mode 100644 index 00000000000..d70c21ca28a --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9daef647c4205924ab7e0075bd033037 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive.unity b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive.unity new file mode 100644 index 00000000000..58080f959fb --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive.unity @@ -0,0 +1,726 @@ +%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: 4 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 0 + 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: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: 54ca12e650c99164895320391009a14d, + 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 &296064738 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 296064742} + - component: {fileID: 296064741} + - component: {fileID: 296064740} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &296064740 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 296064738} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Intensity: 1 + m_EnableSpotReflector: 0 + 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 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 1 + 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.2 + m_BlockerSampleCount: 24 + m_FilterSampleCount: 32 + m_MinFilterSize: 1 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 1 + m_Level: 1 + 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: 3 + 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 &296064741 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 296064738} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + 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: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &296064742 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 296064738} + m_LocalRotation: {x: 0.8372187, y: -0.16181819, z: -0.3467875, w: 0.39066362} + m_LocalPosition: {x: 18.19, y: 0.19, z: -17.8863} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 32.814, y: -122.716, z: -139.85} +--- !u!1001 &999330731 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalPosition.x + value: 1.1664648 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalPosition.y + value: 0.5074532 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalPosition.z + value: -0.33030128 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.w + value: -0.38379234 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.x + value: -0.014521828 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.y + value: 0.92264545 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalRotation.z + value: -0.034899745 + objectReference: {fileID: 0} + - target: {fileID: 4209882255362944, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: field of view + value: 60 + objectReference: {fileID: 0} + - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: far clip plane + value: 1000 + objectReference: {fileID: 0} + - target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: near clip plane + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 114733060649624252, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: renderPipelines.Array.size + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 114733060649624252, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: renderPipelines.Array.data[3] + value: + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_Version + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: customRenderingSettings + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_RenderingPathCustomFrameSettings.msaaMode + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_RenderingPathCustomFrameSettings.bitDatas.data1 + value: 70007966400348 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: m_RenderingPathCustomFrameSettings.bitDatas.data2 + value: 4539628428684427264 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: renderingPathCustomFrameSettingsOverrideMask.mask.data1 + value: 4115 + objectReference: {fileID: 0} + - target: {fileID: 114777190906822814, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: renderingPathCustomFrameSettingsOverrideMask.mask.data2 + value: 4294967296 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: renderPipelineAsset + value: + objectReference: {fileID: 11400000, guid: 56f0077c9b403e4419bb5c4a5954637f, + type: 2} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: renderGraphCompatible + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: ImageComparisonSettings.TargetWidth + value: 1280 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: ImageComparisonSettings.TargetHeight + value: 720 + objectReference: {fileID: 0} + - target: {fileID: 114995348509370400, guid: c07ace9ab142ca9469fa377877c2f1e7, + type: 3} + propertyPath: ImageComparisonSettings.ImageResolution + value: 2 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3} +--- !u!1 &1253735582 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1253735586} + - component: {fileID: 1253735585} + - component: {fileID: 1253735584} + - component: {fileID: 1253735583} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!135 &1253735583 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1253735582} + 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 &1253735584 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1253735582} + 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 &1253735585 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1253735582} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1253735586 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1253735582} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.038, y: 0.5, z: -1.393} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1401861560 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1401861562} + - component: {fileID: 1401861561} + m_Layer: 0 + m_Name: Decal Projector + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1401861561 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1401861560} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f19d9143a39eb3b46bc4563e9889cfbd, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 2100000, guid: 230dcde76d5ee5a4b9fd9d3880cd7fa7, type: 2} + m_DrawDistance: 1000 + m_FadeScale: 0.9 + m_StartAngleFade: 180 + m_EndAngleFade: 180 + m_UVScale: {x: 20, y: 20} + m_UVBias: {x: 0, y: 0} + m_AffectsTransparency: 0 + m_DecalLayerMask: 1 + m_ScaleMode: 0 + m_Offset: {x: 0, y: 0, z: 0} + m_Size: {x: 10, y: 10, z: 2} + m_FadeFactor: 1 + m_Version: 2 +--- !u!4 &1401861562 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1401861560} + m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0.5, 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: 0, y: 0, z: 0} +--- !u!1 &1758145502 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1758145506} + - component: {fileID: 1758145505} + - component: {fileID: 1758145504} + - component: {fileID: 1758145503} + m_Layer: 0 + m_Name: Floor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1758145503 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1758145502} + 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 &1758145504 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1758145502} + 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 &1758145505 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1758145502} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1758145506 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1758145502} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 10, y: 0, z: 10} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive.unity.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive.unity.meta new file mode 100644 index 00000000000..50bf38a4cdb --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ddf62f9a3f4f4ea4b892a15c7e82964f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/AltoStratusMap.png b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/AltoStratusMap.png new file mode 100644 index 00000000000..c9190d2b66b --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/AltoStratusMap.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d14103568d6c23b404fdcfa8f61620d5174c427a054aa27e6b34235f72eaf7b0 +size 10845 diff --git a/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/AltoStratusMap.png.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/AltoStratusMap.png.meta new file mode 100644 index 00000000000..ab6acccb12c --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/AltoStratusMap.png.meta @@ -0,0 +1,98 @@ +fileFormatVersion: 2 +guid: 7cca6922140e7b74ab8bc3fc7a6e61db +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_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/DecalEmissive.mat b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/DecalEmissive.mat new file mode 100644 index 00000000000..f45d7839516 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/DecalEmissive.mat @@ -0,0 +1,288 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-3167539567616836531 +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: DecalEmissive + m_Shader: {fileID: 4800000, guid: 1d64af84bdc970c4fae0c1e06dd95b73, type: 3} + m_ShaderKeywords: _EMISSIVEMAP + m_LightmapFlags: 4 + m_EnableInstancingVariants: 1 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: + - TransparentDepthPrepass + - TransparentDepthPostpass + - TransparentBackface + - RayTracingPrepass + - MOTIONVECTORS + - DBufferProjector + - DBufferMesh + 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: 2800000, guid: 7cca6922140e7b74ab8bc3fc7a6e61db, type: 3} + 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: + - _AO: 1 + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AddPrecomputedVelocity: 0 + - _AffectAO: 0 + - _AffectAlbedo: 0 + - _AffectEmission: 1 + - _AffectMetal: 0 + - _AffectNormal: 0 + - _AffectSmoothness: 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 + - _DecalBlend: 0.5 + - _DecalColorMask0: 0 + - _DecalColorMask1: 0 + - _DecalColorMask2: 0 + - _DecalColorMask3: 0 + - _DecalMaskMapBlueScale: 1 + - _DecalMeshBiasType: 0 + - _DecalMeshDepthBias: 0 + - _DecalMeshViewBias: 0 + - _DecalStencilRef: 16 + - _DecalStencilWriteMask: 16 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 0 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DoubleSidedEnable: 0 + - _DoubleSidedGIMode: 0 + - _DoubleSidedNormalMode: 1 + - _DrawOrder: 0 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 100 + - _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 + - _MaskBlendSrc: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _MetallicRemapMax: 1 + - _MetallicRemapMin: 0 + - _NormalBlendSrc: 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 + - _Unity_Identify_HDRP_Decal: 1 + - _UseEmissiveIntensity: 1 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 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: 100, g: 100, b: 100, a: 100} + - _EmissiveColorHDR: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColorLDR: {r: 1, g: 1, b: 1, 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_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/DecalEmissive.mat.meta b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/DecalEmissive.mat.meta new file mode 100644 index 00000000000..981b2c4f51b --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive/DecalEmissive.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 230dcde76d5ee5a4b9fd9d3880cd7fa7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1715_DecalEmissive.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1715_DecalEmissive.png new file mode 100644 index 00000000000..7833ba930a6 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1715_DecalEmissive.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74eba5d9ec89409bc0da926537bc15d535ac83282095e1a2e5785e69aee83f29 +size 278193 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1715_DecalEmissive.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1715_DecalEmissive.png.meta new file mode 100644 index 00000000000..4ae688fe5f2 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1715_DecalEmissive.png.meta @@ -0,0 +1,110 @@ +fileFormatVersion: 2 +guid: b4fff80e615853c42b017e9924a280d9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + 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: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1715_DecalEmissive.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1715_DecalEmissive.png new file mode 100644 index 00000000000..269a37131ac --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1715_DecalEmissive.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7aab72137139c254fbf27ad6c5de2ff23946d136b42f6942cfcbaec9145436f0 +size 240939 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1715_DecalEmissive.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1715_DecalEmissive.png.meta new file mode 100644 index 00000000000..fce4032fc56 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1715_DecalEmissive.png.meta @@ -0,0 +1,110 @@ +fileFormatVersion: 2 +guid: e3f04bcb11e66144fb0d0bdaf00a748b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + 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: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1715_DecalEmissive.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1715_DecalEmissive.png new file mode 100644 index 00000000000..302235c4298 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1715_DecalEmissive.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0f800a65bf2f213837d10de18a5d5d65cc6a25a10ff548c9f6ce7f59c3d7f56 +size 259073 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1715_DecalEmissive.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1715_DecalEmissive.png.meta new file mode 100644 index 00000000000..96448d58466 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D11/None/1715_DecalEmissive.png.meta @@ -0,0 +1,110 @@ +fileFormatVersion: 2 +guid: 0428f47e1784a5748840c807fdbc09eb +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + 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: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/1715_DecalEmissive.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/1715_DecalEmissive.png new file mode 100644 index 00000000000..302235c4298 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/1715_DecalEmissive.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0f800a65bf2f213837d10de18a5d5d65cc6a25a10ff548c9f6ce7f59c3d7f56 +size 259073 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/1715_DecalEmissive.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/1715_DecalEmissive.png.meta new file mode 100644 index 00000000000..4f005dc2b25 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Direct3D12/None/1715_DecalEmissive.png.meta @@ -0,0 +1,110 @@ +fileFormatVersion: 2 +guid: a804711a8d9d0a54594a83a724579b7f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + 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: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1715_DecalEmissive.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1715_DecalEmissive.png new file mode 100644 index 00000000000..7833ba930a6 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1715_DecalEmissive.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74eba5d9ec89409bc0da926537bc15d535ac83282095e1a2e5785e69aee83f29 +size 278193 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1715_DecalEmissive.png.meta b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1715_DecalEmissive.png.meta new file mode 100644 index 00000000000..6f384366a07 --- /dev/null +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1715_DecalEmissive.png.meta @@ -0,0 +1,110 @@ +fileFormatVersion: 2 +guid: 91c28a3bb4721bc40bb88c859367b427 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 1 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + 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: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/HDRP_Tests/ProjectSettings/EditorBuildSettings.asset b/TestProjects/HDRP_Tests/ProjectSettings/EditorBuildSettings.asset index 2e619e279bf..2c0ea36a8af 100644 --- a/TestProjects/HDRP_Tests/ProjectSettings/EditorBuildSettings.asset +++ b/TestProjects/HDRP_Tests/ProjectSettings/EditorBuildSettings.asset @@ -191,6 +191,9 @@ EditorBuildSettings: - enabled: 1 path: Assets/GraphicTests/Scenes/1x_Materials/1713_MeshDecalViewBias.unity guid: 0adc2fcc221085f45ba4dce7e4afae0d + - enabled: 1 + path: Assets/GraphicTests/Scenes/1x_Materials/1715_DecalEmissive.unity + guid: ddf62f9a3f4f4ea4b892a15c7e82964f - enabled: 1 path: Assets/GraphicTests/Scenes/1x_Materials/1800_Classification.unity guid: 5043daebf48d1b740bb244b9a55508ef diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 9165115b991..2f1eff15105 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Fixed diffusion profile being reset to default on SpeedTree8 materials with subsurface scattering enabled during import. - Fixed error in SSGI when disabling decals (case 1365521). +- Fixed silhouette issue with emissive decals ## [10.7.0] - 2021-07-02 diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalData.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalData.hlsl index 148f63e377f..7f3ae045903 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalData.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/Decal/DecalData.hlsl @@ -30,9 +30,29 @@ void GetSurfaceData(FragInputs input, float3 V, PositionInputs posInput, float a #ifdef _MATERIAL_AFFECTS_EMISSION surfaceData.emissive = _EmissiveColor.rgb * fadeFactor; - #ifdef _EMISSIVEMAP +#ifdef _EMISSIVEMAP + #if (SHADERPASS == SHADERPASS_FORWARD_EMISSIVE_PROJECTOR) + // Fogbugzz 1359282. With projector emissive we can have issue with mips evaluation at the silhouette + // so perform the processing ourselve. But not all paltform support GetDimensions() so in case it is not + // supported we just used lof 0 + #if defined(MIP_COUNT_SUPPORTED) + float2 emissiveColorMapSize; + float emissiveColorMapLODs; + _EmissiveColorMap.GetDimensions(0, emissiveColorMapSize.x, emissiveColorMapSize.y, emissiveColorMapLODs); + float2 uvdx = ddx(texCoords * emissiveColorMapSize), uvdy = ddy(texCoords * emissiveColorMapSize); + // float lod = 0.5f * log2(dot(uvdx, uvdx) + dot(uvdy, uvdy)) - 1.0f; + float lod = 0.5f * log2(max(dot(uvdx, uvdx), dot(uvdy, uvdy))) - 1.0f; + float lddx = ddx(posInput.linearDepth), lddy = ddy(posInput.linearDepth); + float ldd = max(dot(lddx, lddx), dot(lddy, lddy)); + float maxlod = emissiveColorMapLODs * (1.0f - 4.0f * ldd); + surfaceData.emissive *= SAMPLE_TEXTURE2D_LOD(_EmissiveColorMap, sampler_EmissiveColorMap, texCoords, min(lod, maxlod)).rgb; + #else + surfaceData.emissive *= SAMPLE_TEXTURE2D_LOD(_EmissiveColorMap, sampler_EmissiveColorMap, texCoords, 0.0).rgb; + #endif // defined(MIP_COUNT_SUPPORTED) + #else surfaceData.emissive *= SAMPLE_TEXTURE2D(_EmissiveColorMap, sampler_EmissiveColorMap, texCoords).rgb; - #endif + #endif // (SHADERPASS == SHADERPASS_FORWARD_EMISSIVE_PROJECTOR) +#endif // _EMISSIVEMAP // Inverse pre-expose using _EmissiveExposureWeight weight float3 emissiveRcpExposure = surfaceData.emissive * GetInverseCurrentExposureMultiplier(); diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDecal.hlsl b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDecal.hlsl index 067c8eef212..3e832ae55f4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDecal.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/ShaderPass/ShaderPassDecal.hlsl @@ -62,7 +62,12 @@ void Frag( PackedVaryingsToPS packedInput, #if (SHADERPASS == SHADERPASS_DBUFFER_PROJECTOR) || (SHADERPASS == SHADERPASS_FORWARD_EMISSIVE_PROJECTOR) - float depth = LoadCameraDepth(input.positionSS.xy); + float depth = LoadCameraDepth(input.positionSS.xy); +#if (SHADERPASS == SHADERPASS_FORWARD_EMISSIVE_PROJECTOR) && UNITY_REVERSED_Z + // There seems to be some issue with depth derivatives (use in the context of Emissive for lit shader to select mips correctly (see DecalData.hlsl) + // that required clamping the device depth to a small but larger-than-0 value in shader, which was showing artifacts in sphere silhouette against sky background + depth = max(0.0001f, depth); +#endif PositionInputs posInput = GetPositionInput(input.positionSS.xy, _ScreenSize.zw, depth, UNITY_MATRIX_I_VP, UNITY_MATRIX_V); // Decal layer mask accepted by the receiving material From 6e87583161b8b9c572d703d92e21d534eb7702cd Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Fri, 15 Oct 2021 12:53:42 +0200 Subject: [PATCH 03/10] Force scalarization of shadow index data off (#6007) --- .../Runtime/Lighting/LightLoop/HDShadow.hlsl | 10 +++++++--- .../VolumetricLighting/VolumetricLighting.compute | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) 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/VolumetricLighting/VolumetricLighting.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricLighting.compute index 5ffc61915ea..6083a5bb269 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 @@ -38,6 +38,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 //-------------------------------------------------------------------------------------------------- From ffcacced439ac4fb98c064d3e4277cb33b8622e9 Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Fri, 15 Oct 2021 12:55:54 +0200 Subject: [PATCH 04/10] [HDRP] Merge Hd/bugfix #5999 --- .../RenderGraphDefaultResources.cs | 6 ++++++ .../CHANGELOG.md | 4 ++++ .../Documentation~/Feature-Comparison.md | 1 + .../Reflection/SerializedHDReflectionProbe.cs | 3 --- .../ShaderGraph/SubTargetPropertyBlock.cs | 14 ++++++++------ .../Lighting/LightLoop/LightLoopDef.hlsl | 7 +++++-- .../GTAOCopyHistory.compute | 4 ++-- .../Shadow/HDShadowManager.RenderGraph.cs | 19 ++++++++++++++++++- .../RenderPipeline/HDRenderPipeline.Debug.cs | 2 ++ .../HDRenderPipeline.LightLoop.cs | 9 +++++++++ .../HDRenderPipeline.RenderGraph.cs | 2 ++ 11 files changed, 57 insertions(+), 14 deletions(-) diff --git a/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphDefaultResources.cs b/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphDefaultResources.cs index 58b9809c074..294fe9d4611 100644 --- a/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphDefaultResources.cs +++ b/com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraphDefaultResources.cs @@ -12,6 +12,7 @@ public class RenderGraphDefaultResources // We need to keep around a RTHandle version of default regular 2D textures since RenderGraph API is all RTHandle. RTHandle m_BlackTexture2D; RTHandle m_WhiteTexture2D; + RTHandle m_ShadowTexture2D; /// Default black 2D texture. public TextureHandle blackTexture { get; private set; } @@ -31,23 +32,28 @@ public class RenderGraphDefaultResources public TextureHandle blackTexture3DXR { get; private set; } /// Default white XR 2D texture. public TextureHandle whiteTextureXR { get; private set; } + /// Default 1x1 shadow texture. + public TextureHandle defaultShadowTexture { get; private set; } internal RenderGraphDefaultResources() { m_BlackTexture2D = RTHandles.Alloc(Texture2D.blackTexture); m_WhiteTexture2D = RTHandles.Alloc(Texture2D.whiteTexture); + m_ShadowTexture2D = RTHandles.Alloc(1, 1, depthBufferBits: DepthBits.Depth32, isShadowMap: true); } internal void Cleanup() { m_BlackTexture2D.Release(); m_WhiteTexture2D.Release(); + m_ShadowTexture2D.Release(); } internal void InitializeForRendering(RenderGraph renderGraph) { blackTexture = renderGraph.ImportTexture(m_BlackTexture2D); whiteTexture = renderGraph.ImportTexture(m_WhiteTexture2D); + defaultShadowTexture = renderGraph.ImportTexture(m_ShadowTexture2D); clearTextureXR = renderGraph.ImportTexture(TextureXR.GetClearTexture()); magentaTextureXR = renderGraph.ImportTexture(TextureXR.GetMagentaTexture()); diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 2f1eff15105..a802f3d4f40 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed diffusion profile being reset to default on SpeedTree8 materials with subsurface scattering enabled during import. - Fixed error in SSGI when disabling decals (case 1365521). - Fixed silhouette issue with emissive decals +- Fixed range compression factor being clamped. (case 1365707) +- Fixed tooltip not showing on labels in ShaderGraphs (1358483). +- Fix API warnings in Matcap mode on Metal. +- Fix D3D validation layer errors w.r.t shadow textures when an atlas is not used. ## [10.7.0] - 2021-07-02 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Feature-Comparison.md b/com.unity.render-pipelines.high-definition/Documentation~/Feature-Comparison.md index ad1b0212b8e..54326736721 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/Feature-Comparison.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/Feature-Comparison.md @@ -116,6 +116,7 @@ The tables that follow provide an overview of the Features that the High Definit | **Realtime** | Yes | yes | | **Baked** | Yes | Yes | | ***Sampling*** | | | +| **Anchor Override** | Yes | Not supported | | **Simple** | Yes | See [Reflection Hierarchy](Reflection-in-HDRP.md). | | **Blend Probes** | Yes | See [Reflection Hierarchy](Reflection-in-HDRP.md). | | **Blend Probes and Skybox** | Yes | See [Reflection Hierarchy](Reflection-in-HDRP.md). | diff --git a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/SerializedHDReflectionProbe.cs b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/SerializedHDReflectionProbe.cs index e421af53911..5091116c7de 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/SerializedHDReflectionProbe.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Lighting/Reflection/SerializedHDReflectionProbe.cs @@ -39,9 +39,6 @@ internal override void Update() internal override void Apply() { - // Force the mode to real time so its influence is properly culled by the camera. - legacyMode.intValue = 1; - serializedLegacyObject.ApplyModifiedProperties(); base.Apply(); } diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SubTargetPropertyBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SubTargetPropertyBlock.cs index a884d58e166..fd4a7c82c60 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SubTargetPropertyBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SubTargetPropertyBlock.cs @@ -45,16 +45,17 @@ protected void AddProperty(GUIContent displayName, Func getter, Acti switch (getter()) { - case bool b: elem = new Toggle { value = b, tooltip = displayName.tooltip } as BaseField; break; - case int i: elem = new IntegerField { value = i, tooltip = displayName.tooltip } as BaseField; break; - case float f: elem = new FloatField { value = f, tooltip = displayName.tooltip } as BaseField; break; - case Enum e: elemEnum = new EnumField(e) { value = e, tooltip = displayName.tooltip }; break; + case bool b: elem = new Toggle { value = b } as BaseField; break; + case int i: elem = new IntegerField { value = i, isDelayed = true } as BaseField; break; + case float f: elem = new FloatField { value = f, isDelayed = true } as BaseField; break; + case Enum e: elemEnum = new EnumField(e) { value = e }; break; default: throw new Exception($"Can't create UI field for type {getter().GetType()}, please add it if it's relevant. If you can't consider using TargetPropertyGUIContext.AddProperty instead."); } if (elem != null) { - context.AddProperty(displayName.text, indentLevel, elem, (evt) => { + context.AddProperty(displayName.text, displayName.tooltip, indentLevel, elem, (evt) => + { if (Equals(getter(), evt.newValue)) return; @@ -65,7 +66,8 @@ protected void AddProperty(GUIContent displayName, Func getter, Acti } else { - context.AddProperty(displayName.text, indentLevel, elemEnum, (evt) => { + context.AddProperty(displayName.text, displayName.tooltip, indentLevel, elemEnum, (evt) => + { if (Equals(getter(), evt.newValue)) return; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl index 61e2bef3986..a9869ce65f3 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoopDef.hlsl @@ -152,15 +152,18 @@ float4 SampleEnv(LightLoopContext lightLoopContext, int index, float3 texCoord, color.rgb = SAMPLE_TEXTURECUBE_ARRAY_LOD_ABSTRACT(_EnvCubemapTextures, s_trilinear_clamp_sampler, texCoord, _EnvSliceSize * index + sliceIdx, lod).rgb; } + // Planar and Reflection Probes aren't pre-expose, so best to clamp to max16 here in case of inf + color.rgb = ClampToFloat16Max(color.rgb); + color.rgb *= rangeCompressionFactorCompensation; } else // SINGLE_PASS_SAMPLE_SKY { color.rgb = SampleSkyTexture(texCoord, lod, sliceIdx).rgb; + // Sky isn't pre-expose, so best to clamp to max16 here in case of inf + color.rgb = ClampToFloat16Max(color.rgb); } - // Planar, Reflection Probes and Sky aren't pre-expose, so best to clamp to max16 here in case of inf - color.rgb = ClampToFloat16Max(color.rgb); return color; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/GTAOCopyHistory.compute b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/GTAOCopyHistory.compute index 9ee41237afd..a0c661787da 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/GTAOCopyHistory.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/ScreenSpaceLighting/GTAOCopyHistory.compute @@ -2,12 +2,12 @@ #pragma kernel GTAODenoise_CopyHistory -RW_TEXTURE2D_X(uint, _OutputTexture); +RW_TEXTURE2D_X(float4, _OutputTexture); TEXTURE2D_X(_InputTexture); [numthreads(8, 8, 1)] void GTAODenoise_CopyHistory(uint3 dispatchThreadId : SV_DispatchThreadID) { UNITY_XR_ASSIGN_VIEW_INDEX(dispatchThreadId.z); - _OutputTexture[COORD_TEXTURE2D_X(dispatchThreadId.xy)] = _InputTexture[COORD_TEXTURE2D_X(dispatchThreadId.xy)].x; + _OutputTexture[COORD_TEXTURE2D_X(dispatchThreadId.xy)] = _InputTexture[COORD_TEXTURE2D_X(dispatchThreadId.xy)]; } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.RenderGraph.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.RenderGraph.cs index bbb143d9eb3..6f10d74ab35 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.RenderGraph.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.RenderGraph.cs @@ -74,7 +74,7 @@ static void BindAtlasTexture(RenderGraphContext ctx, TextureHandle texture, int if (texture.IsValid()) ctx.cmd.SetGlobalTexture(shaderId, texture); else - ctx.cmd.SetGlobalTexture(shaderId, ctx.defaultResources.blackTexture); + ctx.cmd.SetGlobalTexture(shaderId, ctx.defaultResources.defaultShadowTexture); } void BindShadowGlobalResources(RenderGraph renderGraph, in ShadowResult shadowResult) @@ -95,6 +95,23 @@ void BindShadowGlobalResources(RenderGraph renderGraph, in ShadowResult shadowRe } } + internal static void BindDefaultShadowGlobalResources(RenderGraph renderGraph) + { + using (var builder = renderGraph.AddRenderPass("BindDefaultShadowGlobalResources", out var passData)) + { + builder.AllowPassCulling(false); + builder.SetRenderFunc( + (BindShadowGlobalResourcesPassData data, RenderGraphContext ctx) => + { + BindAtlasTexture(ctx, ctx.defaultResources.defaultShadowTexture, HDShaderIDs._ShadowmapAtlas); + BindAtlasTexture(ctx, ctx.defaultResources.defaultShadowTexture, HDShaderIDs._ShadowmapCascadeAtlas); + BindAtlasTexture(ctx, ctx.defaultResources.defaultShadowTexture, HDShaderIDs._ShadowmapAreaAtlas); + BindAtlasTexture(ctx, ctx.defaultResources.defaultShadowTexture, HDShaderIDs._CachedShadowmapAtlas); + BindAtlasTexture(ctx, ctx.defaultResources.defaultShadowTexture, HDShaderIDs._CachedAreaLightShadowmapAtlas); + }); + } + } + class BlitCachedShadowPassData { public TextureHandle sourceCachedAtlas; 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 7c4bd7e5301..6f187deaa2b 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 @@ -593,6 +593,8 @@ TextureHandle RenderDebugViewMaterial(RenderGraph renderGraph, CullingResults cu HDUtils.BlitColorAndDepth(context.cmd, data.clearColorTexture, data.clearDepthTexture, new Vector4(1, 1, 0, 0), 0, !data.clearDepth); } + BindDefaultTexturesLightingBuffers(context.defaultResources, context.cmd); + BindDBufferGlobalData(data.dbuffer, context); DrawOpaqueRendererList(context, data.frameSettings, data.opaqueRendererList); 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 7da3a470980..6818bac3cad 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 @@ -44,6 +44,15 @@ static void BindGlobalLightingBuffers(in LightingBuffers buffers, CommandBuffer cmd.SetGlobalTexture(HDShaderIDs._ScreenSpaceShadowsTexture, buffers.screenspaceShadowBuffer); } + static void BindDefaultTexturesLightingBuffers(RenderGraphDefaultResources defaultResources, CommandBuffer cmd) + { + cmd.SetGlobalTexture(HDShaderIDs._AmbientOcclusionTexture, defaultResources.blackTextureXR); + cmd.SetGlobalTexture(HDShaderIDs._SsrLightingTexture, defaultResources.blackTextureXR); + cmd.SetGlobalTexture(HDShaderIDs._IndirectDiffuseTexture, defaultResources.blackTextureXR); + cmd.SetGlobalTexture(HDShaderIDs._ContactShadowTexture, defaultResources.blackUIntTextureXR); + cmd.SetGlobalTexture(HDShaderIDs._ScreenSpaceShadowsTexture, defaultResources.blackTextureXR); + } + class BuildGPULightListPassData { public BuildGPULightListParameters buildGPULightListParameters; 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 3aa0c76f627..badd347e281 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 @@ -81,6 +81,8 @@ void ExecuteWithRenderGraph(RenderRequest renderRequest, // For alpha output in AOVs or debug views, in case we have a shadow matte material, we need to render the shadow maps if (m_CurrentDebugDisplaySettings.data.materialDebugSettings.debugViewMaterialCommonValue == Attributes.MaterialSharedProperty.Alpha) RenderShadows(m_RenderGraph, hdCamera, cullingResults, ref shadowResult); + else + HDShadowManager.BindDefaultShadowGlobalResources(m_RenderGraph); // Stop Single Pass is after post process. StartXRSinglePass(m_RenderGraph, hdCamera); From b851a7302fe7be5b2ee5bd6287f778b3115b75af Mon Sep 17 00:00:00 2001 From: skhiat <55133890+skhiat@users.noreply.github.com> Date: Fri, 15 Oct 2021 18:41:05 +0200 Subject: [PATCH 05/10] Fix PBR Accumulation for 10.6 (#5991) * Fix PBR Accumulation for 10.6 * Add ChangeLog --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 1 + .../Runtime/RenderPipeline/HDRenderPipeline.LightLoop.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index a802f3d4f40..411ac34df34 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -154,6 +154,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed undo of some properties on light editor. - Fixed material Emission properties not begin animated when recording an animation (case 1328108). - Fixed issue with velocity rejection when using physically-based DoF +- Fixed SSR PBR Accumulation algorithm, which was constantly cleared ### Changed - Reduced the maximal number of bounces for both RTGI and RTR (case 1318876). 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 6818bac3cad..0d1d68a1cf2 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 @@ -542,8 +542,13 @@ TextureHandle RenderSSR( RenderGraph renderGraph, if (!hdCamera.colorPyramidHistoryIsValid) { hdCamera.colorPyramidHistoryIsValid = true; // For the next frame... + hdCamera.colorPyramidHistoryValidFrames = 0; result = renderGraph.defaultResources.blackTextureXR; } + else + { + hdCamera.colorPyramidHistoryValidFrames++; + } } PushFullScreenDebugTexture(renderGraph, result, transparent ? FullScreenDebugMode.TransparentScreenSpaceReflections : FullScreenDebugMode.ScreenSpaceReflections); From abf14dfa056ebb18eb1e74826cf17580b107a0e2 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Fri, 15 Oct 2021 18:42:28 +0200 Subject: [PATCH 06/10] Update CHANGELOG.md --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 411ac34df34..beec34febe6 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed tooltip not showing on labels in ShaderGraphs (1358483). - Fix API warnings in Matcap mode on Metal. - Fix D3D validation layer errors w.r.t shadow textures when an atlas is not used. - +- Fixed screen space reflection PBR Accumulation ## [10.7.0] - 2021-07-02 ### Fixed @@ -154,7 +154,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed undo of some properties on light editor. - Fixed material Emission properties not begin animated when recording an animation (case 1328108). - Fixed issue with velocity rejection when using physically-based DoF -- Fixed SSR PBR Accumulation algorithm, which was constantly cleared ### Changed - Reduced the maximal number of bounces for both RTGI and RTR (case 1318876). From 8b7b4e9f73eb7f6cf55d004e0ba32b4caf8b80ca Mon Sep 17 00:00:00 2001 From: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Date: Tue, 12 Oct 2021 20:08:17 +0200 Subject: [PATCH 07/10] Fix shadow mask fade and optimize it at same time #5911 --- .../CHANGELOG.md | 2 ++ .../Runtime/Lighting/LightDefinition.cs | 2 ++ .../Runtime/Lighting/LightDefinition.cs.hlsl | 1 + .../Runtime/Lighting/LightEvaluation.hlsl | 16 +++------------- .../Runtime/Lighting/LightLoop/LightLoop.cs | 16 ++++++++++++++++ 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index beec34febe6..17f912e8d88 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix API warnings in Matcap mode on Metal. - Fix D3D validation layer errors w.r.t shadow textures when an atlas is not used. - Fixed screen space reflection PBR Accumulation +- Fixed and optimize distance shadowmask fade. + ## [10.7.0] - 2021-07-02 ### Fixed diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightDefinition.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightDefinition.cs index 40967976b88..b9ab8e67e7e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightDefinition.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightDefinition.cs @@ -95,11 +95,13 @@ struct DirectionalLightData [SurfaceDataAttributes(precision = FieldPrecision.Real)] public Vector4 shadowMaskSelector; // Used with ShadowMask feature + public Vector2 cascadesBorderFadeScaleBias; public float diffuseDimmer; public float specularDimmer; public float penumbraTint; public float isRayTracedContactShadow; + public float distanceFromCamera; // -1 -> no sky interaction public float angularDiameter; // Units: radians public float flareFalloff; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightDefinition.cs.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightDefinition.cs.hlsl index 922e14189b8..7c29ff56c63 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightDefinition.cs.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightDefinition.cs.hlsl @@ -72,6 +72,7 @@ struct DirectionalLightData real minRoughness; int screenSpaceShadowIndex; real4 shadowMaskSelector; + float2 cascadesBorderFadeScaleBias; float diffuseDimmer; float specularDimmer; float penumbraTint; diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl index e8d029bc29f..dd953805d3e 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightEvaluation.hlsl @@ -269,19 +269,9 @@ SHADOW_TYPE EvaluateShadow_Directional( LightLoopContext lightLoopContext, Posit shadow = lightLoopContext.shadowValue; #ifdef SHADOWS_SHADOWMASK - // TODO: Optimize this code! Currently it is a bit like brute force to get the last transistion and fade to shadow mask, but there is - // certainly more efficient to do - // We reuse the transition from the cascade system to fade between shadow mask at max distance - uint payloadOffset; - real fade; - int cascadeCount; - int shadowSplitIndex = 0; - - shadowSplitIndex = EvalShadow_GetSplitIndex(lightLoopContext.shadowContext, light.shadowIndex, posInput.positionWS, fade, cascadeCount); - - // we have a fade caclulation for each cascade but we must lerp with shadow mask only for the last one - // if shadowSplitIndex is -1 it mean we are outside cascade and should return 1.0 to use shadowmask: saturate(-shadowSplitIndex) return 0 for >= 0 and 1 for -1 - fade = ((shadowSplitIndex + 1) == cascadeCount) ? fade : saturate(-shadowSplitIndex); + float3 camToPixel = posInput.positionWS - GetPrimaryCameraPosition(); + float distanceCamToPixel2 = dot(camToPixel, camToPixel); + float fade = saturate(distanceCamToPixel2 * light.cascadesBorderFadeScaleBias.x + light.cascadesBorderFadeScaleBias.y); // In the transition code (both dithering and blend) we use shadow = lerp( shadow, 1.0, fade ) for last transition // mean if we expend the code we have (shadow * (1 - fade) + fade). Here to make transition with shadow mask diff --git a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs index e7f73eb6599..3ac12a38b00 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs @@ -1353,6 +1353,22 @@ internal void GetDirectionalLightData(CommandBuffer cmd, HDCamera hdCamera, Visi { lightData.shadowMaskSelector[lightComponent.bakingOutput.occlusionMaskChannel] = 1.0f; lightData.nonLightMappedOnly = lightComponent.lightShadowCasterMode == LightShadowCasterMode.NonLightmappedOnly ? 1 : 0; + // Get shadow info from the volume stack. + var shadowSettings = hdCamera.volumeStack.GetComponent(); + float maxDistanceSq = shadowSettings.maxShadowDistance.value * shadowSettings.maxShadowDistance.value; + float outBorderDistance = shadowSettings.cascadeShadowBorders[shadowSettings.cascadeShadowSplitCount.value - 1]; + if (outBorderDistance < 1e-4f) + { + lightData.cascadesBorderFadeScaleBias = new Vector2(1e6f, -maxDistanceSq * 1e6f); + } + else + { + outBorderDistance = 1.0f - outBorderDistance; + outBorderDistance *= outBorderDistance; + float distanceFadeNear = outBorderDistance * maxDistanceSq; + lightData.cascadesBorderFadeScaleBias.x = 1.0f / (maxDistanceSq - distanceFadeNear); + lightData.cascadesBorderFadeScaleBias.y = -distanceFadeNear / (maxDistanceSq - distanceFadeNear); + } } else { From 2cae06103161ebbfc4771ebd2b1a8113697b7302 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Fri, 15 Oct 2021 19:11:21 +0200 Subject: [PATCH 08/10] Revert: Fixed tooltip not showing on labels in ShaderGraphs #5877 --- .../CHANGELOG.md | 1 - .../Material/ShaderGraph/SubTargetPropertyBlock.cs | 14 ++++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 17f912e8d88..9e7d61aec34 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -11,7 +11,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed error in SSGI when disabling decals (case 1365521). - Fixed silhouette issue with emissive decals - Fixed range compression factor being clamped. (case 1365707) -- Fixed tooltip not showing on labels in ShaderGraphs (1358483). - Fix API warnings in Matcap mode on Metal. - Fix D3D validation layer errors w.r.t shadow textures when an atlas is not used. - Fixed screen space reflection PBR Accumulation diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SubTargetPropertyBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SubTargetPropertyBlock.cs index fd4a7c82c60..a884d58e166 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SubTargetPropertyBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SubTargetPropertyBlock.cs @@ -45,17 +45,16 @@ protected void AddProperty(GUIContent displayName, Func getter, Acti switch (getter()) { - case bool b: elem = new Toggle { value = b } as BaseField; break; - case int i: elem = new IntegerField { value = i, isDelayed = true } as BaseField; break; - case float f: elem = new FloatField { value = f, isDelayed = true } as BaseField; break; - case Enum e: elemEnum = new EnumField(e) { value = e }; break; + case bool b: elem = new Toggle { value = b, tooltip = displayName.tooltip } as BaseField; break; + case int i: elem = new IntegerField { value = i, tooltip = displayName.tooltip } as BaseField; break; + case float f: elem = new FloatField { value = f, tooltip = displayName.tooltip } as BaseField; break; + case Enum e: elemEnum = new EnumField(e) { value = e, tooltip = displayName.tooltip }; break; default: throw new Exception($"Can't create UI field for type {getter().GetType()}, please add it if it's relevant. If you can't consider using TargetPropertyGUIContext.AddProperty instead."); } if (elem != null) { - context.AddProperty(displayName.text, displayName.tooltip, indentLevel, elem, (evt) => - { + context.AddProperty(displayName.text, indentLevel, elem, (evt) => { if (Equals(getter(), evt.newValue)) return; @@ -66,8 +65,7 @@ protected void AddProperty(GUIContent displayName, Func getter, Acti } else { - context.AddProperty(displayName.text, displayName.tooltip, indentLevel, elemEnum, (evt) => - { + context.AddProperty(displayName.text, indentLevel, elemEnum, (evt) => { if (Equals(getter(), evt.newValue)) return; From 1a4add0f26a2d826aa2134529d838a8a922800b4 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Fri, 15 Oct 2021 19:13:24 +0200 Subject: [PATCH 09/10] Update CHANGELOG.md --- com.unity.render-pipelines.high-definition/CHANGELOG.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 6378a747efa..c11286e1caf 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -11,11 +11,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed error in SSGI when disabling decals (case 1365521). - Fixed silhouette issue with emissive decals - Fixed range compression factor being clamped. (case 1365707) -- Fixed tooltip not showing on labels in ShaderGraphs (1358483). -- Fix API warnings in Matcap mode on Metal. -- Fix D3D validation layer errors w.r.t shadow textures when an atlas is not used. -- Fixed screen space reflection PBR Accumulation -- Fixed and optimize distance shadowmask fade. - Fixed memory leak with XR combined occlusion meshes (case 1366173). - Fix API warnings in Matcap mode on Metal. - Fix D3D validation layer errors w.r.t shadow textures when an atlas is not used. From 00f292750f6600b9783370729227502da7705651 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Sat, 16 Oct 2021 13:40:22 +0200 Subject: [PATCH 10/10] update reference screenhsots --- .../Linear/LinuxEditor/Vulkan/None/1715_DecalEmissive.png | 4 ++-- .../Linear/OSXEditor/Metal/None/1601_TerrainLit.png | 4 ++-- .../Linear/OSXEditor/Metal/None/1603_TerrainLit_BaseMap.png | 4 ++-- .../Linear/WindowsEditor/Vulkan/None/1715_DecalEmissive.png | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1715_DecalEmissive.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1715_DecalEmissive.png index 7833ba930a6..22eb4be2524 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1715_DecalEmissive.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/LinuxEditor/Vulkan/None/1715_DecalEmissive.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:74eba5d9ec89409bc0da926537bc15d535ac83282095e1a2e5785e69aee83f29 -size 278193 +oid sha256:c54bfbcd9ba25433443faab1dc00ffd9c45b12b3e98a6fa41414af4b26f3dbbb +size 224706 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1601_TerrainLit.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1601_TerrainLit.png index e42cfcdc110..a065a76bfe1 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1601_TerrainLit.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1601_TerrainLit.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:456eb59b892f94b658e885ecc3cd849ab81774caf17d04ac13c1571a7b3ad5df -size 463596 +oid sha256:777885473088055fdbff3c2970cbfaa7ac34348fe485efb6231562eb7f1fa0c7 +size 463674 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1603_TerrainLit_BaseMap.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1603_TerrainLit_BaseMap.png index 439637e2c81..34bda3ff5e5 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1603_TerrainLit_BaseMap.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/OSXEditor/Metal/None/1603_TerrainLit_BaseMap.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:547756b4267f58f8ba34a06167ec3aa0742970875e869914b5bcb5a1478bc4f9 -size 368835 +oid sha256:2d8cf24c70dc4257a4a7f43276a8c618b49c3200c580da31f978014ca371cc84 +size 369200 diff --git a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1715_DecalEmissive.png b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1715_DecalEmissive.png index 7833ba930a6..22eb4be2524 100644 --- a/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1715_DecalEmissive.png +++ b/TestProjects/HDRP_Tests/Assets/ReferenceImages/Linear/WindowsEditor/Vulkan/None/1715_DecalEmissive.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:74eba5d9ec89409bc0da926537bc15d535ac83282095e1a2e5785e69aee83f29 -size 278193 +oid sha256:c54bfbcd9ba25433443faab1dc00ffd9c45b12b3e98a6fa41414af4b26f3dbbb +size 224706