Shader Optimization Part 1

November 6, 2018
5m
Unity 3DShadersOptimization
  1. The process of shader optimization can seem like trial and error... in fact, that's how it is most of the time.

  2. Most of the time shader optimizations could be boiled down to educated guesses because each time a shader gets compiled, the GPU driver of that specific hardware is what converts your code into actual machine code, therefore, the machine code generated will be different for each GPU and the driver itself might perform some optimizations on top of your's which won't be available on another GPU, thereby making it difficult to have a standard way of writing optimal shader code.