Adjusting to Pixel Centers
All starting points for Z,R,G,B,A are adjusted as if the starting point (x,y) was at a pixel center (X.5, Y.5)
- X,Y started at Vmin(X,Y). Compute adjustment values that would place these at these at the next higher pixel center
- adjx = ceiling(X+0.5) - (X+0.5)
- if frac(X) = 0.5, then adjx = 0
- if frac(X) = 0.2 then adjx = 0.3
- Similar calculation for Y
Actual starting value for Z
- Zs = Vmin(Z) + adjy*dz/dx + adjx*dz/dx