Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CRIT] Invalid blend state apply #140

Open
eXponenta opened this issue May 25, 2022 · 0 comments
Open

[CRIT] Invalid blend state apply #140

eXponenta opened this issue May 25, 2022 · 0 comments

Comments

@eXponenta
Copy link
Contributor

eXponenta commented May 25, 2022

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

@eXponenta eXponenta changed the title [CRIT] Invalid state apply [CRIT] Invalid blend state apply May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant