Hi,
I’m trying to understand the penalty to the frame as a whole if some parts of the screen render faster than others based on branching code in the same shader.
This is about a screen space reflections algorithm, but it could be anything. Assume that everything on the screen is rendered with the same shader, but some areas of the image start to use heavier features that involve iteration, like if there’s a puddle.
I understand that pixels are processed in parallel in cells of X * X pixels, and that any slow pixel in a cell will force fast pixels to wait for the slow pixel.
But what about the cells themselves? If the puddles only appear in e.g. 5% of the cells, does this force the remaining 95% of the cells in the image to wait for the puddles? Or is the bottleneck purely about fast and slow pixels inside the same cell?
Again, it’s important to remember that this is all the same shader, but some if them will activate an “if (puddleStrength > 0)” branch, and go into iterative SSR processing just on those pixels.
Any input would be much appreciated!