laurentlb/shader-minifier

Typing of expressions

Opened this issue · 1 comments

We should propagate the type information and be able to know the type of any expression.

Some use-cases:

  • Allow structs with fields like "x", "ra", without having the swizzle-related transformations
  • Optimize expressions like 0. * x (it can be 0 or vec2(0))

Issues that this may help close: #242 #290 #315 #376 #383 #395 #429

Another use-case: full function overloading support on the input side