openlayers icon indicating copy to clipboard operation
openlayers copied to clipboard

WebGL Vector Layer example error on some browser/device combinations since v10.1.0

Open mike-000 opened this issue 1 year ago • 6 comments

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 image 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).

mike-000 avatar Aug 27 '24 09:08 mike-000

Thanks for the report, could you please copy here the result of http://webglreport.com/ for your browser/hardware?

jahow avatar Aug 27 '24 11:08 jahow

Ok, I think it's probably related to the maximum varying vectors seen in: image

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.

jahow avatar Aug 27 '24 11:08 jahow

With default flag settings: image

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 avatar Aug 27 '24 11:08 mike-000

@mike-000 could you please let me know if this issue is still relevant? Thank you

jahow avatar Mar 10 '25 12:03 jahow

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.

mike-000 avatar Mar 10 '25 13:03 mike-000

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.

jahow avatar Mar 11 '25 09:03 jahow