KhronosGroup / KhronosGroup/WebGL

Drawing WebGL with different contexts attributes inconsistent

Open
#3,008 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
2.9k
Forks
703
Avg merge
2d 9h
Merged PRs (30d)
4

Description

I tried creating a WebGL canvas setting `premultipliedAlpha` and `alpha` to various settings, clearing a color, and then drawing the result to a 2D canvas

https://jsfiddle.net/greggman/setm6axu/

Firefox seems to have a bug if premultiplied alpha is set to false although this issue isn't covered in the WebGL spec directly since it's canvas 2d behavior. Should the WebGL tests have a test like this?

Also note while Safari passes the test it fails to display the WebGL canvas correctly but there is no way from JavaScript's POV to test this.

Contributor guide

Open the contributing guide

Research direction

Start with the linked JSFiddle and reproduce the behavior using different WebGL context attributes, especially alpha and premultipliedAlpha, before drawing to a 2D canvas. Review the WebGL test area to determine whether this behavior is covered and whether a reproducible automated assertion is possible; done means the coverage decision and any test expectations are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.