HDR and alpha in URP - not possible?

Hi,

I was trying to output to a buffer format with an alpha channel in URP with HDR enabled and it looks like this is unsupported. When HDR is disabled the output buffer format is R8G8B8A8_UNorm, when I enable HDR the output buffer changes to B10G11R11_UFloatPack32, which does not have an alpha channel.

I have read that in HDRP there is an option in the render pipeline asset to change the render buffer format. See eg:
https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@7.2/manual/Alpha-Output.html

I looked but could not find an equivalent option for URP. Is alpha+HDR is not currently supported for URP? If not, is it possible we could have the buffer format option added to the pipeline asset?

Cheers,
Elliot

2 Likes

I am also having a similar issue, the new Blitter class for full screen quad render is not drawing to transparency, i assume that could be the reason also.

This renders URP useless going forward, as nothing in complex effects will work.

You can use custom shaders with the Blitter API, so if your source and dest textures have alpha you can still use and output these values. You can check what your texture formats are using the frame debugger.

1 Like

Hi, the issue is that in the full screen renderer to camera the rendertexture is the camera one, that is the defaultHDR format and seems as you mention that transparency is not working when blit to full screen quad, with a custom shader that does try to change it, is always opaque.

I try to replace my code due to this warning

warning CS0618: ‘RenderingUtils.fullscreenMesh’ is obsolete: 'Use Blitter.BlitCameraTexture instead of CommandBuffer.DrawMesh(fullscreenMesh

Maybe can try use a custom rendertatget as destination, but not sure if the function will use the correct full screen dimensions, as in the example code.

https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@14.0/manual/customize/blit-overview.html

I’m running into this issue as well. I can see that my screen texture is B10G11R11_UFloatPack32 which obviously does not support an alpha channel. Is there a way to force URP to use a different texture format that does support alpha?