I recently upgraded to Universal Render Pipeline.
I followed this (https://docs.unity3d.com/Packages/c...7.2/manual/rendering-to-a-render-texture.html) instruction to have multiple cameras in my scene.
I have a bloom effect in my scene which is working perfectly in my ARCamera(main camera). But, after adding the second camera, the bloom effect is not appearing in the game view (working in scene view).
I’ve enabled post-processing in both cameras (I’m sure that there is no problem with the cameras). The problem is, render texture is not capturing the HDR color from the ARCamera.
How to fix this?
Reference Images available in this thread: https://forum.unity.com/threads/hdr-bloom-issue-when-using-multiple-cameras-in-urp.834619/#post-5515264
Answer
Changing “Color Format” of Render Texture to R16G16B16A16_SFLOAT worked for me
2 Likes
I’m trying to do a similar thing in unity 2021.2.15f (latest unity version at the time) using URP.
I’ve got a sun (sphere) with a material with a HDR emissive colour with an intensity of 10, I render this to a cube map using this code:
public class CubeMapGenerator : MonoBehaviour
{
public Camera Camera;
public RenderTexture RenderTexture;
public GameObject Background;
public Material BackgroundMaterial;
void Start()
{
RenderTexture.format = RenderTextureFormat.DefaultHDR;
Camera.allowHDR = true;
Camera.RenderToCubemap(RenderTexture);
Background.SetActive(false);
BackgroundMaterial.SetTexture("_Tex", RenderTexture);
RenderSettings.skybox = BackgroundMaterial;
}
}
I then place the rendered texture into a Cubemap material and apply as my skybox and add post effects with bloom threshold of 1.0.
There is no bloom effect, it suggests there’s no values sorted above 1.0 in the rendered texture colour channels, my sun object (still sitting in the scene) glows dramatically as expected.
Is there something I’m missing I’ve tried all the format options including R32G32B32A32_FLOAT.
I’ve made a demo project of this which I can put into a GitHub repo if that helps.
Found solution.
Updated my question with the answer!