HDR Render Texture downsampling not working on iOS Retina Devices - Unity 5

When downsampling Render Textures in Unity 5 leads to very pixelated images on iOS Retina devices when using HDR. The picture below shows the issue in our game using the standard Bloom post-process effect. The left side shows the render output in Unity 4, the right side the very pixelated output in Unity 5 of the downsampled bloom textures.

2270791--152176--sshot1.png

The problems appears when you downsample a render texture with the format ARGBHalf (aka RenderTextureFormat.DefaultHDR). It seems like it is rendering the texture with point filtering instead of the default bilinear filtering. Explicitly setting Bilinear filtering does not fix this.

Below is sample code to reproduce this behavior:

using UnityEngine;
using System.Collections;

public class Resolution : MonoBehaviour
{
    void Start ()
    {
        //ARGBHalf leads to a very pixelated image
        test = new RenderTexture(Screen.width / 8, Screen.height / 8, 0, RenderTextureFormat.DefaultHDR);
        Debug.Log (RenderTextureFormat.DefaultHDR);
    }
 
    RenderTexture test;

 
    void OnRenderImage(RenderTexture source, RenderTexture dest)
    {
        Graphics.Blit(source, test);
        Graphics.Blit(test, dest);
    }
}

And this is what it looks like in Unity 4(on the left side) and Unity 5 (on the right side):

2270791--152177--sshot2.png

This problem does not occur in the editor, but appears on iOS hardware (tested on an iPad 3 and an iPhone 6). We appreciate any help or suggestions or repros on this topic. We think some weird combination of HDR, texture size and mobile shader is causing this weird case but we can’t seem to find a solution.

Here’s a super-simple project illustrating the issue. Looks fine on PC, oddly pixelated on iOS. If someone could confirm they are experiencing the same issue, it would be greatly appreciated.

2271496–152256–BloomBug.zip (391 KB)

May want to submit a bug report with the file you attached above.
Will most likely get more direct attention.

Thanks, we’ve opened a bug report here: https://fogbugz.unity3d.com/default.asp?723591_8006b8qqu9k131l9. We haven’t had luck getting an acknowledgement when we previously reported it.

Any suggestions as to how we could work around this issue?

We’ve just been told that this issue is fixed in the upcoming 5.2 release. Thanks for the help.

1 Like