From 046b013f9ebf9d237e9f010aa1f08a85ea71db23 Mon Sep 17 00:00:00 2001
From: Henry Khaung Task 6: "Level sampling" with mipmaps for texture mapping
higher frequencies.
- I implemented level sampling by additionally finding the barycentric - coordinates for the sample point's neighbors. These neighbor - barycentric coordinates are used to calculate the level in the - `get_level` function. -
- -- These neighbor barycentric coordinates are first used to find the - rate of change of u and v in respect to x and y respectively. This - is so that we know which level in the mipmap to use. Larger - derivatives result in larger level values and therefore lower - resolutions. This is implemented in `get_level`. -
- -- Once we find which level to sample from, we can either use the two - methods from before: nearest or bilinear interpolation. For the - nearest level, L_NEAREST, we use the nearest level to sample from. - For L_LINEAR, we take two levels above and below the level returned - by `get_level` and interpolate them. We use either of the two - sampling methods and find the interpolated texture color from these - two levels. -
++ I implemented level sampling by additionally finding the barycentric coordinates for the sample point's neighbors. + These neighbor barycentric coordinates are used to calculate the level in the `get_level` function. + These neighbor barycentric coordinates are first used to find the rate of change of u and v in respect to x and y + respectively. This is so that we know which level in the mipmap to use. Larger derivatives result in larger level + values and therefore lower resolutions. This is implemented in `get_level`. +
++ We use the derivatives mentioned above and using the level calculation in lecture to find the level. +
++ Once we find which level to sample from, we can either use the two + methods from before: nearest or bilinear interpolation. With nearest level, L_NEAREST, we use the nearest level to sample from. + With L_LINEAR, we take two levels above and below the level returned + by `get_level` and interpolate them. +
+- With level sampling implemented, we can have 3 level sampling + With level sampling implemented, we can have in total 3 level sampling methods and 2 pixel sampling methods.
@@ -648,7 +651,7 @@