I know that branching in shaders is generally bad, but Aras mentioned in this thread that as long as the branching is 'static' the GPU can branch effectively. So my understanding of static branching is that if the condition is constant for the entire 'Draw' / Dispatch of a shader, it is considered static. With that in mind, can anybody confirm that this psuedo code would conform to static branching and thus not incur a performance hit? Code (CSharp): void shader_kernel(uint3 id : SV_DispatchThreadID) { float cumulative_complex_calculation = 0; for (uint i = 0; i < len; ++i) { ShaderObject t = ObjectBuffer[i]; if (t.Ignore == false) { // complex calculation cumulative_complex_calculation++; } } Output[id] = value_from_complex_calculation; } This code will run id.x by id.y times (over a texture) and the ObjectBuffer does not change during a single dispatch.