Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

GPU instancing performance problems

Discussion in 'WebGL' started by jhangstoerfer, Nov 23, 2018.

  1. jhangstoerfer


    Dec 2, 2016
    We stumbled upon some performance issues with our WebGL application. With GPU instancing enabled on a shader it will freeze the whole application for 2-5 seconds everytime you move the camera in the scene. This only occurs in the finished WebGL build and not in the editor.

    Here is a screenshot from the WebGL browser profiler. The saved profiler data is also attached on this post.

    Some info on my machine and where and with what I reproduced it:
    Firefox 63.0.3 64Bit
    Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz, 2901 MHz
    32GB Ram
    NVIDIA Quadro M2200

    Unity 2017.4.15f1
    Unity 2018.2.9f1
    Standard Shader
    Mobile/Diffuse Shader
    Custom Shader

    The steps to reproduce are:
    1. Place a lot of cubes in the scene with the same material
    2. Turn on GPU Instancing on the Material
    3. Build the WebGL application
    4. Rotate or move the camera (I just used a fly controller)

    Is this a known issue? Should I just file a bug report and wait for an answer through that?

    Attached Files:

  2. ivank


    Nov 16, 2013
    Interesting; I am having the same problem with Unity 2017.4.14 WebGL scene embedded into the Chrome69 browser on Win10.

    I have just a single building in the center of other way empty scene. When I move the camera around, its motion gets frozen few times unless the full circle around the building is completed. Then the camera moves smoothly.

    When part of the building is "hidden" by script and replaced by another part not yet shown, the problem with freezing camera motion repeats until whole circle around the object is completed again.

    Not sure if it has something to do with GPU instancing - I suspected maybe some global illumination/light baking settings are responsible.
    Will have to do some testing...