Open sylee957 opened 10 months ago
I'm really surprised these weren't included yet, I will have to add a few more variations (function overrides) for these, but in general, yes, the above is the correct approach...
The 2 relevant commits, just for reference:
https://github.com/thi-ng/umbrella/commit/a986766c93e11faa16a6d455b1a2ff6502dfd847
https://github.com/thi-ng/umbrella/commit/a78d31350df80151daa4c6b2492442bb5d1aa219
Unfortunately, I still see some problems for types if one operand is signed and the other operand is unsigned
I found this from specification:
One operand can be signed while the other is unsigned.
const a = sym("int");
const b = sym("uint");
lshift(a, b);
const a = sym("uint");
const b = sym("int");
lshift(a, b);
And I think that same applies for vectors, such as
const a = sym("uvec2");
const b = sym("int");
lshift(a, b);
const a = sym("uvec2");
const b = sym("ivec2");
lshift(a, b);
I can't find bitwise shift operators
>>, <<
in shader-ast. Is it not implemented yet? I'm trying the workaround