The Shader Permutation Problem – Part 1: How Did We Get Here? (2021)
Great article. I struggle to understand when it is fine to create another `if(feature_enabled)` with feature_enabled being a bool uniform I pass into the shader and when to split said shader into two.<p>Even after writing a bunch of them, I still don&#x27;t have formed an intuition as to when to where that threshold lies...<p>...and going further whether it makes sense to always execute that feature and make feature_enabled a float multiplier of that effect&#x27;s intensity instead.<p>I wonder if there is a better answer than the blanket &quot;benchmark and iterate&quot;