Arvtesh / UnityFx.Outline

Screen-space outlines for Unity3d.
MIT License
1.27k stars 90 forks source link

Outline not working in WebGL 1.0 builds #45

Closed AGM-GR closed 2 years ago

AGM-GR commented 3 years ago

Setting Unity project as a WebGl project and the Graphic Api as WebGL 1.0, the outline works on editor but not in build. Also not working with Auto Graphic API in a machine that uses WebGL 1.0 so the problem could be a Shader implementation not compatible with the WebGL 1.0 restrictions.

imagen imagen

Unity: 2020.3.16f1 URP: 10.5.1 UnityFX.Outline: Current repository version (1988f71ed252ed31f3b2a22e604d76337eeb7f91)

Example project: OutlineWebGl1Bug.zip

Arvtesh commented 3 years ago

I'll take a look, thanks.

Arvtesh commented 2 years ago

It's a WebGL 1.0 shader restrictions indeed. In WebGL 1.0 loop index be initialized to a non-constant value. So these lines are the problem: image I added the fix for v0.8.5.