The original

  • DFdx represents the value of the right pixel in the pixel block minus the value of the left pixel in the prime block, while dFdy represents the value of the bottom pixel minus the value of the top pixel.

Partial derivatives and MIpmaps

  • Partial derivative functions are the basis of the implementation of textured MipMaps

Flat Shader Normal Vector Calculation

normalize(  cross(dFdx(pos),  dFdy(pos))  );
Copy the code