Skip to content

[shader-ast] Bitwise shift operation #434

@sylee957

Description

@sylee957

I can't find bitwise shift operators >>, << in shader-ast.
Is it not implemented yet?
I'm trying the workaround

export const lshift = <T extends "int" | "uint" | IVec | UVec>(
  a: Term<T>,
  b: IntTerm | UintTerm
) => op2("<<", a, b) as Op2<T>;
export const rshift = <T extends "int" | "uint" | IVec | UVec>(
  a: Term<T>,
  b: IntTerm | UintTerm
) => op2(">>", a, b) as Op2<T>;

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