Search Unity

Question Does WebGL support the Forward+ renderer in URP?

Discussion in 'Web' started by sirjordank, Feb 9, 2023.

  1. sirjordank

    sirjordank

    Joined:
    May 11, 2013
    Posts:
    3
    Anyone know or have any experience with this? The only thing I could find after scouring through the docs was a bullet point in the URP manual: "Mobile platforms: 32 Lights. OpenGL ES 3.0 and earlier: 16 Lights."

    https://docs.unity3d.com/Packages/c...al/rendering/forward-plus-rendering-path.html

    To me that seems to imply that WebGL 2 (OpenGL ES 3.0) is supposed to be supported but for the life of me I can't seem to get it to work. My game builds and runs but almost nothing is rendered/shaded properly.
     
  2. in0finite

    in0finite

    Joined:
    Oct 23, 2017
    Posts:
    20
    It doesn't work for me (URP 14.0.8). It can't even display a single Cube in an empty scene.

    When the build starts, I get errors like this:
    Code (CSharp):
    1.  
    2. WebGL warning: linkProgram: Failed to link, leaving the following log:
    3. ...
    4. C:\fakepath(914,3-15): error X3511: unable to unroll loop, loop does not appear to terminate in a timely manner (132 iterations) or unrolled loop is too large, use the [unroll(n)] attribute to force an exact higher number
    5.  
    6. Warning: D3D shader compilation failed with skip optimization flags. (ps_5_0)
    7.  
    8. Failed to create D3D Shaders
    9.  
    10. Note: Creation of internal variant of shader 'Universal Render Pipeline/Lit' failed.
    11.  
    12. Compiled shader: Universal Render Pipeline/Lit, pass: ForwardLit, stage: all, keywords _ADDITIONAL_LIGHT_SHADOWS _FORWARD_PLUS _MAIN_LIGHT_SHADOWS _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION
    13.  
    14. Shader Universal Render Pipeline/Lit, subshader 0, pass 0, stage all: variant _ADDITIONAL_LIGHT_SHADOWS _FORWARD_PLUS _MAIN_LIGHT_SHADOWS _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION not found.
    15.  
    It seems that it can't compile loops (which are used by Forward+ shaders).
     
  3. in0finite

    in0finite

    Joined:
    Oct 23, 2017
    Posts:
    20
    @brendanduncan_u3d Sorry for tagging, but can someone explain does Forward+ renderer supports WebGL or not ?

    Documentation says it supports OpenGL ES 3.0, which should include WebGL 2.0, right ?

    Thanks for your time.