KhronosGroup / KhronosGroup/WebGL

premultiplyAlpha behavior does not specify overflow handling.

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

Description

When premultiplyAlpha=true is specified, it is possible for applications to write pixels that have color component values greater than the value of the alpha channel. This may cause color values to overflow when divided by alpha (e.g. when toDataURL is called). The spec does not currently specify how this case should be handled.

The correct behaviour should probably be to clamp.

Contributor guide

Open the contributing guide

Research direction

Review the WebGL specification sections covering premultiplyAlpha and toDataURL, then trace how pixel color components and alpha are described during conversion. Define and document the overflow behavior, including whether clamping is required, and update any relevant specification text or tests identified there.

Written by the indexing model from the issue text.

Assessment

Domain
computer-graphics
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.