Compute cube LOD based on Manhattan distance.
We previously computed the LOD of cube maps using the 3D Euclidean
distance between the intersections of the sampling rays of a quad with
the cube. This underestimates the gradient at the edges where these
rays intersect multiple faces. Instead use the Manhattan distance. This
may overestimate the footprint dimensions, but only leads to slight
blurring instead of aliasing.
Change-Id: I5ddbb39765462b1c55c4143b5806154cbdfe7130
Reviewed-on: https://swiftshader-review.googlesource.com/5173Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Reviewed-by:
Alexis Hétu <sugoi@google.com>
Tested-by:
Nicolas Capens <nicolascapens@google.com>
Showing
Please
register
or
sign in
to comment