elm-explorations / elm-explorations/webgl

Add premultiply option for texture loading

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Elm
Stars
123
Forks
17
PR merge metrics
No merged PRs in 30d

Description

In order to alpha blend textures correctly, their color channel needs to be premultiplied by the alpha channel. I believe WebGL supports doing this when loading textures but that feature isn't exposed in this package.

For that reason I think `premultiply : Bool` should be added as an additional field available when calling `WebGL.Texture.loadWith`. For `WebGL.Texture.load` the default value will be `False`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.