Sooo, I want to sample mipmaps in a compute shader via "sampleGrad".

Does anyone know what the state-of-the-art is for deriving ddx and ddy for uv-coords in a compute shader?

I don't want to store the UV's derivatives in a G-buffer if possible.

#rendering #glsl #slang #hlsl #shader #gpgpu #vulkan #opengl

The answer to this question appears to be chapter 7 of Ray Tracing Gems II.

In the context of ray-tracing the correct search-terms are "ray differentials" and "ray cones".

#raytracing #texture #uvmaps