openlayers
openlayers copied to clipboard
WebGL Vector Layer example error on some browser/device combinations since v10.1.0
Describe the bug Affects the same browser/device/ANGLE setups as in #15297
To Reproduce
With affected combinations both
https://openlayers.org/en/v10.1.0/examples/webgl-vector-layer.html
and
https://openlayers.org/en/main/examples/webgl-vector-layer.html
throw
and there is no output for either layer.
On other browsers/devices these work as expected (flickering in v10.1.0 is fixed in main).
Thanks for the report, could you please copy here the result of http://webglreport.com/ for your browser/hardware?
Ok, I think it's probably related to the maximum varying vectors seen in:
The ShaderBuilder uses 9 varying (at least) for stroke shaders, some of these should be packed to avoid this error.
For instance, doing:
vec2 v_measureStartEnd;
instead of
float v_measureStart;
float v_measureEnd;
should save one slot.
With default flag settings:
Going to about://flags and changing ANGLE backend from default to D3D11 fixes this (Max Varying Vectors increases to 30) but that is not something an end user should be expected to do.
@mike-000 could you please let me know if this issue is still relevant? Thank you
It is still happening in https://openlayers.org/en/main/examples/webgl-vector-layer.html on system/browser combinations which default to D3D9, where it can be fixed via the about://flags/#use-angle workaround. The affected systems are not Windows 11 compatible so the problem should resolve itself with the end of support for Windows 10.
Ok, then I might not invest the time to work around this. I also fear that packing two values in one attribute might result in a precision loss.