diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 7e646dfa567..3c67cfcb0e8 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -152,6 +152,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed broken Lanczos filter artifacts on ps4, caused by a very aggressive epsilon (case 1328904) - Fixed global Settings ignore the path set via Fix All in HDRP wizard (case 1327978) - Fixed GBuffer clear option in FrameSettings not working +- Fixed usage of Panini Projection with floating point HDRP and Post Processing color buffers. ### Changed - Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard diff --git a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/PaniniProjection.compute b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/PaniniProjection.compute index e1f03a8a5c8..bf637fd8e1f 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/PaniniProjection.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/PaniniProjection.compute @@ -1,15 +1,17 @@ #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/PostProcessDefines.hlsl" #pragma only_renderers d3d11 playstation xboxone xboxseries vulkan metal switch #pragma kernel KMain #pragma multi_compile GENERIC UNITDISTANCE +#pragma multi_compile _ ENABLE_ALPHA TEXTURE2D_X(_InputTexture); -RW_TEXTURE2D_X(float3, _OutputTexture); +RW_TEXTURE2D_X(CTYPE, _OutputTexture); SAMPLER(sampler_LinearClamp); @@ -125,7 +127,7 @@ void KMain(uint3 dispatchThreadId : SV_DispatchThreadID) } else { - float3 smp = SAMPLE_TEXTURE2D_X_LOD(_InputTexture, sampler_LinearClamp, ClampAndScaleUVForBilinear(coords), 0.0).xyz; + CTYPE smp = SAMPLE_TEXTURE2D_X_LOD(_InputTexture, sampler_LinearClamp, ClampAndScaleUVForBilinear(coords), 0.0).CTYPE_SWIZZLE; _OutputTexture[COORD_TEXTURE2D_X(posInputs.positionSS)] = smp; } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs index 9e68add632c..8a364795a1a 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs @@ -3019,6 +3019,9 @@ TextureHandle PaniniProjectionPass(RenderGraph renderGraph, HDCamera hdCamera, T else passData.paniniProjectionCS.EnableKeyword("UNITDISTANCE"); + if (m_EnableAlpha) + passData.paniniProjectionCS.EnableKeyword("ENABLE_ALPHA"); + passData.paniniParams = new Vector4(viewExtents.x, viewExtents.y, paniniD, paniniS); passData.paniniProjectionKernel = passData.paniniProjectionCS.FindKernel("KMain");