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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

problem with reflection probe in webgl

Discussion in 'WebGL' started by dahuilang, Oct 2, 2015.

  1. dahuilang

    dahuilang

    Joined:
    Jun 5, 2014
    Posts:
    32
    i use reflection probe in webgl, but the result is very diffent in editor and browser

    unity version 5.1.1f1
    [ in editor ]
    editor.png

    [ in firfox 40.0.3 ]
    webgl.png

    [ in chrome 47.0.2508.0 (64-bit) ]
    webgl-chrome.png

    [ here is my code ]
    Vector3 newPos = new Vector3(centerPosition.x, 1.071f, centerPosition.z);
    GameObject probeGameObject = new GameObject("reflectionProbe");

    probeGameObject.transform.position = newPos;

    ReflectionProbe probeComponent = probeGameObject.AddComponent<ReflectionProbe>() as ReflectionProbe;

    probeComponent.mode = UnityEngine.Rendering.ReflectionProbeMode.Realtime;
    probeComponent.refreshMode = UnityEngine.Rendering.ReflectionProbeRefreshMode.EveryFrame;
    probeComponent.timeSlicingMode = UnityEngine.Rendering.ReflectionProbeTimeSlicingMode.NoTimeSlicing;
    probeComponent.boxProjection = true;
    probeComponent.size = new Vector3(10, 10, 10);
    probeComponent.resolution = 256;

    【question 】
    dose webgl support reflection probe or which version can support?if so ,how to get correct result like in editor
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    It's not totally unexpected but it is definitely a bug :)

    - do you get any error in the browser log ?
    - Is it the same with 5.2?

    if you could submit a bug report with your project that would be great.
     
  3. dahuilang

    dahuilang

    Joined:
    Jun 5, 2014
    Posts:
    32
    yes ,it is the same with 5.2

    Warning: Rendering to mipmap levels other than zero is not supported on this device

    Error: WebGL: A texture is going to be rendered as if it were black, as per the OpenGL ES 2.0.24 spec section 3.8.2, because it is a cube map texture, with a minification filter not requiring a mipmap, and is not cube complete (as defined in section 3.7.10).
     
  4. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    That error message is currently shown more often then it should be, and can be ignored most of the times.

    This will be fixed in 5.3.

    The second error does look like it may be related to the problem. But, as @Marco Trivellato wrote, please file a bug report with a repro case, and post the case number here - then we can take a look and figure out what is going on.
     
  5. belamessex

    belamessex

    Joined:
    May 12, 2015
    Posts:
    12
    has this been worked out? i'm just about to release a webgl game, but the standard asset shader "glass bump/distort..." is flickering between black and its normal state. I've tested on both mac and windows with chrome, safari and firefox. Weird thing is... only seems to happen on firefox while using windows. Also mouse input is bizarre on firefox+windows, but fine everywhere else. I figure it's a bug.
     
  6. Udit_N

    Udit_N

    Joined:
    Mar 9, 2015
    Posts:
    17
    Built a webGL demo with 5.3.1, but still getting the unusual reflections, attaching the firefox and editor images herewith. Did anyone find any solution on it? please help ASAP edtor.jpg FF.jpg
     
  7. sumpfkraut

    sumpfkraut

    Joined:
    Jan 18, 2013
    Posts:
    241
    i have a similar problem with reflection probes and WebGL. (Unity 5.3.2)

    Screenshot from Unity Editor:
    reflection_editor.png

    Screrenshot from Firefox:
    reflection_firefox.png
     
  8. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    There seems to be a bug in Firefox, thought I need to check whether that is Windows-specific or not.

    Have you submitted a bug report ? If so, what's the bug number ?
     
  9. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Could you please submit a bug report with that project ?
     
  10. sumpfkraut

    sumpfkraut

    Joined:
    Jan 18, 2013
    Posts:
    241
    Well, i tried to make a new scene only with the required objects in it.
    It looks a bit diffrent then my screenshots, but it's the same problem.
    Nr: 765924
     
  11. MaT227

    MaT227

    Joined:
    Jul 3, 2012
    Posts:
    628
    Hi there, I am using Unity 5.4.1p3 and when I am creating a reflection probe in WebGL on Chrome and Firefox I am having this warning : Warning: Rendering to mipmap levels other than zero is not supported on this device

    Is this a normal behaviour ? Is there a way to avoid that ? @Marco-Trivellato @jonas-echterhoff

    Thanks a lot.
     
  12. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    This is expected. See https://docs.unity3d.com/Manual/webgl-graphics.html: