Search Issue Tracker


Fixed in 2022.2.17f1, 2023.1.0b13, 2023.2.0a3



Found in



Issue ID




[HDRP] Buffers sampling in shadergraph is broken when using low resultion pass



Steps to reproduce:
* Open "Scenes/SampleScene" in the attached project
* Look at the game view rendering





Quad objects on the right (Low Resolution) should look similar to the ones on the left (Default).


Issue reported by a user on the forum here : []  A work around has been provided, but a fix in the source code would be better.

The issue seems to be cause by the _ScreenSize value not beeing updated in the shaders constant buffer when rendering the low resolution transparents pass.
I was able to fix the issue by updating it in HDRenderPipeline.RenderGraph.cs (L1189) with the following code change, but it is probably not a clean fix:

TextureHandle RenderLowResTransparent(RenderGraph renderGraph, HDCamera hdCamera, TextureHandle downsampledDepth, CullingResults cullingResults, RendererListHandle rendererList)
  using (var builder = renderGraph.AddRenderPass<RenderLowResTransparentPassData>("Low Res Transparent", out var passData, ProfilingSampler.Get(HDProfileId.LowResTransparent)))
    passData.globalCB = m_ShaderVariablesGlobalCB;
    passData.lowResScale = hdCamera.lowResScale;
    passData.frameSettings = hdCamera.frameSettings;
    passData.rendererList = builder.UseRendererList(rendererList);
    builder.UseDepthBuffer(downsampledDepth, DepthAccess.ReadWrite);
    // We need R16G16B16A16_SFloat as we need a proper alpha channel for compositing.
    var output = builder.UseColorBuffer(renderGraph.CreateTexture(new TextureDesc( * hdCamera.lowResScale, true, true)
      { colorFormat = GraphicsFormat.R16G16B16A16_SFloat, enableRandomWrite = true, clearBuffer = true, clearColor =, name = "Low res transparent" }), 0);    builder.SetRenderFunc(
      (RenderLowResTransparentPassData data, RenderGraphContext context) =>
        UpdateOffscreenRenderingConstants(ref data.globalCB, true, 1.0f / data.lowResScale);
        var origSize = data.globalCB._ScreenSize; // FIX
        data.globalCB._ScreenSize = Vector4.Scale(data.globalCB._ScreenSize, new Vector4(2f, 2f, 0.5f, 0.5f)); // FIX

ConstantBuffer.PushGlobal(context.cmd, data.globalCB, HDShaderIDs._ShaderVariablesGlobal);
DrawTransparentRendererList(context.renderContext, context.cmd, data.frameSettings, data.rendererList);
UpdateOffscreenRenderingConstants(ref data.globalCB, false, 1.0f);
        data.globalCB._ScreenSize = origSize; // FIX
        ConstantBuffer.PushGlobal(context.cmd, data.globalCB, HDShaderIDs._ShaderVariablesGlobal);
      });    return output;
} {code}

A test scene was added here :

  1. Resolution Note (fix version 2023.2.0a3):

    This is now fixed and verified. Will be backported to 2023.1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.