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

Missing blendmodes #45

Open
4 tasks
grandchild opened this issue Jun 25, 2018 · 0 comments
Open
4 tasks

Missing blendmodes #45

grandchild opened this issue Jun 25, 2018 · 0 comments

Comments

@grandchild
Copy link
Contributor

grandchild commented Jun 25, 2018

Some blendmodes are still unsupported:

  • XOR
  • Every other line
  • Every other pixel
  • Buffer

XOR

XOR is tricky in WebGL 1.0, which has no bitwise integer operations. There are involved algorithms which emulate xor.

Every other *

Every other line/pixel is also not straightforward, because we need pixel-coordinate access. This code

mix(color, getSrcColor(), float(uint(dot(v_position, u_resolution-1.0)) & 1u))

(which is only valid in GLSL ES 3 / WebGl 2.0) produces different output across browsers -- and always incorrect (artifacts along the diagonal).
If there's a way we could have not only 0-1-valued texture coordinates but also correct pixel/texel-coordinates, then we'd be done with these.

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