Issue with multiple cameras and bloom+HDR

I got a first person shooter where in order to not have the player weapon clip through other objects, I have a second weapon camera. This camera is set to render only a “weapon” layer, have its clear flags as depth only, and rendering on top of the main camera (which renders everything else).


This in itself works well, and I have all my image effects set on the weapon camera since it renders on top, which also works well. Among these image effects is a bloom component, and here’s where I’m having a bit of a problem.


The bloom effect itself correctly applies to everything in the scene, even things not rendered by the weapon camera. However, I also have all cameras enable HDR, and this does not seem to work correctly. Only the weapon camera acts as if HDR is enabled, and the main camera underneath looks the same no matter whether I enable HDR or not.


If I instead put the bloom component on the main camera, everything but the weapon has bloom+HDR correctly applied, but this is not an option since I want the weapon model to also receive the bloom. Applying a second bloom to the weapon camera also doesn’t seem like a good idea, both for performance reasons but also since it will also apply to the underlying layer.


Does anyone have thoughts on the best way to make this work as intended? To clarify I’d like a way for bloom+HDR to apply to everything in the scene, regardless of which camera renders it. Any help is greatly appreciated!

Solved this issue. I was rendering to a RenderTexture as part of the pipeline, and changing the RenderTextureFormat from ARGB32 to DefaultHDR did the trick - it now all shows up as intended.