pygfx / pyshader

Write modern GPU shaders in Python!
BSD 2-Clause "Simplified" License
73 stars 1 forks source link

Fix implementation of variables #56

Closed almarklein closed 4 years ago

almarklein commented 4 years ago

Previously, we used SSA for variables where possible, which I believed to have performance benefits, which is likely not the case, because compiling glsl to spirv uses OpVariable for variables. It also had some minor other advantages, but resolving which variables names could be done with SSA and which needed variables is tricky and error-prone. So this changes that.

Some side effects: