Derivative shaders are not without faults. They introduce a specific class of bugs that are notoriously difficult to debug.
This is the default use case. When sampling a texture manually (e.g., within a procedural function), the GPU cannot automatically determine the correct mip level. Derivatives allow the shader to calculate texture coordinate derivatives ( ddx(uv) , ddy(uv) ), enabling correct anisotropic filtering and preventing the dreaded "shimmering" artifacts on distant surfaces. derivative shader
In standard rendering, the GPU processes pixels in small called "quads". Even if you are only interested in one specific pixel, the hardware calculates its three neighbors simultaneously. This allows the GPU to look at the difference between the values in those pixels to determine a "slope." Derivative shaders are not without faults