- Home /
How to determine if rendering is actually HDR?
I can see here that in order to determine if a camera is rendering in HDR, I need to determine two things: if this camera is allowed to render in HDR, and also whether it is possible to render in HDR in the current Graphics Tier. The former is easy, but I can't figure out how to do the latter. I've seen TierSettings.hdr but I can't figure out how to get it from something, and I've seen Graphics.activeTier but I can't figure out where to use it (it's just an enum; I don't know what list it's a key for). Or is there a simpler method altogether that I'm overlooking?
(Just for context, in the more general case, what I really want is for my script to know whether to pass RenderTextureFormat.DefaultHDR or RenderTextureFormat.ARGB32 to CommandBuffer.GetTemporaryRT, to take advantage of HDR when appropriate.)
Can you not use SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.DefaultHDR)
? https://docs.unity3d.com/ScriptReference/SystemInfo.SupportsRenderTextureFormat.html
Hmm, is that going to indicate whether the currently-active tier would allow it, though? I guess in practice it's likely to be the case, but I assumed since the Camera.allowHDR article docs mentioned TierSettings.hdr that that's where I should be looking... this might be good enough outside of debugging-related edge cases, though, thanks!
Your answer
