Skip to content

Images render differently when using Virtual WebGL #375

@emilykl

Description

@emilykl

k.calc_fig() generates different image output in some cases when the Virtual WebGL script is included, and I'm not sure why that's the case.

Some of the differences are subtle (a few pixels shifted) and others are more obvious (different line colors, visual artifacts).

This is a problem most immediately because the Plotly.js image pipeline expects images to render the same pixel-for-pixel with or without Virtual WebGL. So we can't use Kaleido v1 in the Plotly.js image test pipeline until this is resolved (or until we change the pipeline).

If that's an unrealistic expectation, we can change the pipeline, but it seems to have been working up to this point using Kaleido v0.

To reproduce

Below is a zip file demonstrating some examples. The images/ directory contains png images of a number of charts with and without virtual WebGL. mocks/ contains the JSON chart specifications, and generate.py can be used to generate the images (delete everything from images/ before regenerating).

virtual-webgl-bug.zip

Examples

Here is a table showing a few examples of differences:

Without Virtual WebGL With Virtual WebGL
gl2d_parcoords_coloraxis Image gl2d_parcoords_coloraxis Image
gl2d_parcoords_rgba_colorscale Image gl2d_parcoords_rgba_colorscale Image
gl3d_directions-streamtube2 Image gl3d_directions-streamtube2 Image
gl3d_isosurface_xycaps_volume_slices Image gl3d_isosurface_xycaps_volume_slices Image

Metadata

Metadata

Assignees

Labels

P1needs immediate attention

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions