Today, I wrote a shader for foveated rendering uisng Prof. Neyret’s QuadTree: https://www.shadertoy.com/view/Ml3SDf

The basic idea is: 

  1. Calculate the depth of the QuadTree using the distance between the current coordinate to the foveat region
  2. Use the depth as the mipmap level to sample from the texture

Code below: