Flickering and Buggy Reflections

Hello all,

I am seeing a pretty severe issue with reflection probes. In the editor reflections seem to work fine with a slight flicker. However, once I made a standalone I noticed some pretty bad issues. I tested on Windows 8.1, Nvidia GTX 970 and the latest drivers available. The application is running in DX11 mode. The reflections flicker between the two images seen below:


Here is a reference image with the reflection probe disabled:

Any idea what is going on? Any idea how to fix it? Is this a bug?

I found one problem with the flickering which fixed it in the editor. This is what I used to have to update my reflection probe:

using UnityEngine;

public class ReflectionsUpdate : MonoBehaviour {
    private int renderID = -1;

    void LateUpdate () {
        ReflectionProbe r = gameObject.GetComponent<ReflectionProbe>();

        if ((renderID == -1 || r.IsFinishedRendering(renderID)) && r.enabled) {
                renderID=r.RenderProbe(false);
        }
    }
}

I realized that the above code mixes the time-sliced mode with the immediate mode. So this is what I have now:

using UnityEngine;

public class ReflectionsUpdate : MonoBehaviour {
    private int renderID = -1;
    public bool timeSlice = true;

    void LateUpdate () {
        ReflectionProbe r = gameObject.GetComponent<ReflectionProbe>();

        if (timeSlice) {
            if ((renderID == -1 || r.IsFinishedRendering(renderID)) && r.enabled) {
                renderID=r.RenderProbe(true);
            }
        } else {
            if (r.enabled) {
                renderID=r.RenderProbe(false);
            }
        }
    }
}

Like I said, this fixed the flickering in the editor. Now reflections work and look exactly like they should be in the editor.

Now this is what reflections look like if I build a Windows x86 standalone:

Please submit a bug with repro project attached, thank you. You can do it via menu in Unity, Help->Report a Bug