Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Reflection Probes Are Broken Under iOS and WebGL

Discussion in 'General Graphics' started by cl9-2, Mar 6, 2015.

  1. cl9-2

    cl9-2

    Joined:
    May 31, 2013
    Posts:
    417
    Has anyone had any success with reflection probes on mobile or in the browser?

    Here are the type of results I see:

    ReflectionProbe-Editor.png
    In the Editor

    iOS.jpg

    On iOS (iPad Mini Retina)

    WebGL.png

    On WebGL (Firefox)
     
  2. cl9-2

    cl9-2

    Joined:
    May 31, 2013
    Posts:
    417
  3. cl9-2

    cl9-2

    Joined:
    May 31, 2013
    Posts:
    417
  4. Miggy

    Miggy

    Joined:
    Feb 9, 2010
    Posts:
    76
    I can't get real-time reflection probes to work on IOS (Pro) either. Is this a feature that is supposed to work, Unity?
     
  5. cl9-2

    cl9-2

    Joined:
    May 31, 2013
    Posts:
    417
    With the same settings above, same problems

    Runs fine on a Mac



    Still broken on WebGL (5 minute build)



    and iOS of course (OpenGL ES, compiled with Mono 2.x to avoid long wait)

     
  6. cl9-2

    cl9-2

    Joined:
    May 31, 2013
    Posts:
    417
    Either @Kuba, @SpiriTx or @KEngelstoft, (in reference to this thread) in which version of Unity will the issue of real time reflection probes on iOS and WebGL be addressed?

    Thanks.
     
  7. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    311
    Hmm, I'm also having issues with reflection probes on iOS. In the editor they look fine, but when I deploy to iOS I get a very strange faceting effect on the model (which is the unity default sphere here). Occasionally the cubemap seems to flick to black (on some quads) as well.

    In the Editor:


    On iOS (strange facets):


    On iOS (black flickering):


    The facets almost look as though smooth normals haven't been used, when clearly they are being used in the editor. All this being said, the probes do appear to be otherwise reflecting correctly. If I find out the cause I'll be sure to post.

    EDIT: After more testing, it's become clear that the facets and black sections aren't related to the model's geometry, they're caused by the cubemap (I've since tried with different resolution spheres and looked at them from different angles, and the facets roll over the surface).

    ------------------------------------------------------------------------------------------------------------------------------

    EDIT#2: Upgraded to U5.02 and everything works perfectly!
     
    Last edited: May 17, 2015
  8. cl9-2

    cl9-2

    Joined:
    May 31, 2013
    Posts:
    417
    I upgraded to 5.02 a just a moment ago. Same problem. Baked reflection probes are still working across different platforms with a variety of skyboxes, but real-time (per-frame) reflections are still broken on iOS (no reflections at all) and WebGL (artifacts).
     
  9. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    This still seems to be plaguing WebGL in 5.2.1. Any update or workarounds?
     
  10. benfattino

    benfattino

    Joined:
    Nov 26, 2010
    Posts:
    43
    Same problem... No way to solve! I am compile on WebGL. Unity 5.2.1 and Unity 5.3 Beta...
     
  11. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
  12. cl9-2

    cl9-2

    Joined:
    May 31, 2013
    Posts:
    417
    Unfortunately no, it didn't work with WebGL, and WebGL builds generally appear to have more problems in 5.2 than 5.1, but the code works on PC and iOS (albeit with not-so-good performance).
     
  13. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Sigh...I wish there was a better timeline for when this will be working in WebGL. Unity's roadmap doesn't have a date for this either. It only mentions they are working on WebGL 2.0 support.
     
  14. visoft-tov

    visoft-tov

    Joined:
    Aug 6, 2015
    Posts:
    5
    I have the same problem on WebGL and iOS build, but iOS build has close to 0 artifacts and WebGL has a lot.
    We really invested a lot of time to make sure our project works on IL2CPP, please fix this.
     
    Ben-BearFish likes this.
  15. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Has anyone found another alternative to getting Reflection Probes and GI running properly in WebGL or mobile in Unity 5 (5.2)? Or at least recreated the functionality through another means?
     
  16. MaT227

    MaT227

    Joined:
    Jul 3, 2012
    Posts:
    628
    I am also interested by this as I am facing same issues. Reflection probes are not working correctly on WebGL using Unity 5.3.0f1.
     
  17. Stephen-Bertrand

    Stephen-Bertrand

    Joined:
    Feb 27, 2015
    Posts:
    1
    I was having this issue as well with a StandardSpecular surface shader in OpenGL mode so I went digging through the builtin shaders source and found this on all their passes:

    #pragma target 3.0
    // TEMPORARY: GLES2.0 temporarily disabled to prevent errors spam on devices without textureCubeLodEXT

    when I added '#pragma target 3.0' the issue seemed to be resolved. I hope this helps.
     
  18. visoft-tov

    visoft-tov

    Joined:
    Aug 6, 2015
    Posts:
    5
    #pragma target 3.0 is already there. Maybe you mean #pragma target 2.0?
     
  19. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Can anyone confirm if this issue is fixed in Unity 5.3?
     
  20. visoft-tov

    visoft-tov

    Joined:
    Aug 6, 2015
    Posts:
    5
    No, it's not. But I have good news. The bug report I filled on this just got confirmed, so we can hope it will get resolved.
     
  21. visoft-tov

    visoft-tov

    Joined:
    Aug 6, 2015
    Posts:
    5
    Bad news. Just got the answer:
     
  22. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    Regarding the Reflection Probe for iOS that by default iOS is set to "Simple" in QualitySetting window which the Realtime Reflection Probe toggle is disabled.

    So just set the iOS to "Better" (or higher quality) or enabled the Realtime Reflection Probe in Simple setting, that should make the Reflection Probe works in iOS. I know it is little tricky.
     
  23. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    387
    In that quote you you quote someone saying
    I'm not sure what that means really... Does that mean you cannot have reflective materials in WebGL? If not do you know what settings I need to set and where to make them work? I cannot see any settings anywhere about 'Smooth' reflections...
     
  24. wastvedt

    wastvedt

    Joined:
    Oct 6, 2012
    Posts:
    25
    @visoft.tov Did you ever find out exactly what *smooth* reflections are, and how to enable/disable them? In your understanding, if my reflecting object is just a flat surface, should this work? Thanks!
     
  25. staraban_unity

    staraban_unity

    Joined:
    Apr 12, 2022
    Posts:
    3
    Hello. Unity could you confirm that realtime reflection probes is not working/not supported in WebGL platform right now? Or it is a bug. I had the same bugs in 2019 LTS right now.
    In Unity 5 this bug (https://issuetracker.unity3d.com/issues/webgl-realtime-reflection-probes-dont-work-only-baked) was closed as By Design. But there is not clear information in documentation about this. The only info I see is here
    https://docs.unity3d.com/Manual/webgl-graphics.html
    It said that WebGL should support real-time reflection probes in webgl.

    Same bug was reported here
    https://answers.unity.com/questions/1534418/reflection-probe-failing-to-reflect-in-webgl.html

    Could you clarify, is it supported or not. And if supported when it will be fixed and in what version? Thanks.
     
    Last edited: Apr 12, 2022
    awsapps likes this.