👻 Helper Pixels: The Hidden Cost of ddx and ddy
The rules for using ddx and ddy safely, and helper pixels: the extra, invisible fragment shader runs that 2×2 groups need. See them on your own GPU.
The rules for using ddx and ddy safely, and helper pixels: the extra, invisible fragment shader runs that 2×2 groups need. See them on your own GPU.
In a busy scene, many pixels get shaded several times before the final colour wins. See a heat map of how often each pixel’s shader runs, and how draw order and a depth pre-pass cut the waste.
A graphics card runs shaders in groups of 32 or 64 that all execute the same instruction at once. See what that means for if statements, and how GPUs hide slow memory by juggling groups.