Game rendering as black in Unity 2017.1 on Galaxy S6 when HDR is enabled

I’m having trouble with certain phones rendering my game as black after upgrading from Unity 5.5.0 to Unity 2017.1, and I’ve tracked down the issue to having HDR enabled. To demonstrate the issue, I’ve created two basic projects which have HDR rendering enabled. One is made in Unity 2017.1, the other is in Unity 5.5.0:
https://www.dropbox.com/s/rgucnexxqwxy6pq/simplehdrtest_bugdemo.zip?dl=1

If you build for Android, when the app launches, you will see a black screen on Galaxy S6, and if you tap the on-screen GUI button to toggle HDR off, you will see the skybox rendering correctly.

To demonstrate that this worked in Unity 5.5.0, I’ve created a very similar project with HDR enabled on the camera. With this project, things render correctly regardless of if HDR is on.

My suspicion is that this issue has something to do with needing to use RGB Float render textures instead of RGB 32 render textures when HDR is enabled. I tried toggling the HDR Mode option in the graphics setting to try different RenderTexture formats but had no luck. Additionally, the Galaxy S6 reports via SystemInfo.SupportsRenderTextureFormat() that it does in fact support ARGBHalf and RGB111110Float RenderTextures. Is there a setting I’m missing that will allow me to render with HDR in 2017.1 on these phones?

This test project works fine on all other phones I’ve tried except the Galaxy S6 and Galaxy S6 Edge. When I compare the Frame Debugger for a working phone vs. the Galaxy, they appear to be executing the same steps.

Thanks for any help, I have a deadline fast approaching. I’ve reported this to Unity as case 949306.

Update that this seems to happen with only certain models of Galaxy S6 and S6 Edge phones.
black screen: SM-G920A, SM-G925A
correct rendering: SM-G920V, SM-G928V, SM-G920T

We are being exactly the same as this in our project. We are using 2017.2

Is there any solution?
We meet the same problem, we are using 2017.2.0f3.

Turn off Auto Graphics API and remove OpenGLES3, everything will be fine.

For us, it looks like the “A” phones are the AT&T phones, and they issue Android updates less frequently. They’re on an older version of Android that has some issue that doesn’t support the texture type used by HDR. We had to turn HDR off for these phones. I did this by rendering a test frame, seeing if the pixels in the texture were garbage, and turning off HDR if they were.

1 Like

I too am encountering this issue. Unity version 2017.3.1p1.

I’m using a custom shader that renders to a rendertexture with format DefaultHDR. It renders black on Samsung Galaxy S6, S7 and S8, even though SystemInfo.SupportsRenderTextureFormat() tells me it is supported.

Any more thoughts on this?

The solution we ended up with over here was just to disable HDR in scenarios where we detected this issue. We never found a real solution.

Shame. Is this a unity bug? I find it hard to believe a phone like the S8 doesn’t support HDR textures.

It has been a while, but I believe the answer we settled on is that it’s a bug with an older version of Android not supporting HDR properly with Unity. We were seeing it only with AT&T phones (note the “A” in the model number of phones we are seeing this on), and AT&T hadn’t rolled out an Android update in a long time for that phone. We didn’t see this behavior with the Verizon or T-Mobile models, and those carriers roll out updates more frequently.

It’s possible that we are wrong on this! This was just the theory we came up with. So, if the theory is true, it’s not that the S8 doesn’t support HDR, it’s that the S8 + an older version of Android has a bug that keeps HDR from working properly. (we didn’t actually observe this on the S8, we only saw it on the S6, but maybe we didn’t have an AT&T S8)

Interesting. The model numbers of the S6, S7 and S8 i’ve tested on are all F models. I have also tested on a Samsung Galaxy A5 phone (SM-A520F) and strangely enough this one works…