Skip to content

Empty filter produces WebGL warnings / render issues when many plots share a single renderer #201

@fspoettel

Description

@fspoettel

When many plots share a single renderer instance, calling .filter() with an empty array [] produces WebGL warnings. In Firefox, this borks the plot for any subsequent render, see reproduction and video below, Chrome also has some render issues.

# Firefox
WebGL warning: activeTexture: `texture` (0x84bf) must be >= TEXTURE0 (0x84c0).
WebGL warning: uniform setter: This uniform location is a sampler, but -1 is not a valid texture unit. 
# Chrome
WebGL: INVALID_ENUM: activeTexture: texture unit out of range
[.WebGL-0x128005be000] GL_INVALID_VALUE: Sampler uniform value out of range.

Reproduction: https://stackblitz.com/edit/vitejs-vite-mdmiba?file=src%2Fmain.js

Screen.Recording.2024-11-29.at.13.55.25.mov

This only happens when both are true: filter is called with an empty array and a shared renderer instance is used. If each plot uses its own WebGL context, this does not happen. If [undefined] is passed as a filter, this does not happen.

This is potentially related to #165. Not related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions