Skip to content

Missing blendmodes #45

Description

@grandchild

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions