Skip to content

GLSL Gotchas

mattdesl edited this page Feb 22, 2013 · 11 revisions

There are some gotchas to be aware of when working with GLSL on various platforms.

Mac OSX

  • Array declaration is broken on Snow Leopard[1]

ES (Android, iOS, WebGL)

  • Be mindful of step() as it may create branching (although it really shouldn't). Benchmark with smoothstep() to see if performance improves.
  • Ternary operator may not be supported on certain Android devices[1]
  • 'For' loops may cause problems on certain Android devices[1]
Clone this wiki locally