There is no defensible reason why SIMD code should be harder to write than scalar code. GLSL has been around since 2004 and in GLSL it’s easier to write vector code than scalar code.
Actually, it’s ironic because shader-level vector code typically isn’t any faster than scalar code on modern GPUs. Modern GPUs just convert shader code to scalar and parallelize across vertices/fragments/compute work units.
-
-
Even though it’s not faster anymore, though, GLSL’s vector syntax is really great just for readability.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
It's not really true, there are a lot of instructions that work across lanes and can have huge benefits (shuffle and ballot for example). It might be for pixel shaders, but all others (including vertex and stuff, now changing to mesh shaders) are compute shaders underneath.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.