Instancing in WebGL builds on Windows causes several second lag spikes
As discussed on the Unity forums in the thread Webgl performance and getProgramParameter, shader instancing is not well supported in WebGL builds running in browsers on Windows.
I'm currently using fairly few Polyline components, configured like so:
This causes significant lag spikes (several seconds) on Windows WebGL, especially early (but not immediately and not exclusively) after the build has started playing.
To remove the lag spikes, I wrapped line 121 of the ShaderBuilder in #if !UNITY_WEBGL, and regenerated the shaders through the Shapes settings window.
Until instancing works better on browsers, an "enable instancing" checkbox or similar would be preferable to editing Shapes' code directly for WebGL builds, I think~