Skip to content

[CRIT] Invalid blend state apply #140

@eXponenta

Description

@eXponenta

BlendMode MUST BE applied for each combination of blend modes.

But this is not happens when a src = ZERO.
Combination [ZERO, ONE_MINUS_SRC_ALPHA] known as DST_OUT composition operation and used as inverse mask on framebuffer (for producing holes) with soft edge.

https://github.com/oframe/ogl/blob/master/src/core/Program.js#L134
https://github.com/oframe/ogl/blob/master/src/core/Program.js#L141
https://github.com/oframe/ogl/blob/master/src/core/Program.js#L119

This wrong, because only transparent filed can be used for checked for setting blend state.

Any changes of this is BREAKING and need publish new major version.

Demo:
https://OglBugState.exponenta.repl.co

src:
https://replit.com/@eXponenta/OglBugState#script.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions