Ceil or Floor in Mip-Mapping

Started by
2 comments, last by Demirug 18 years ago
Hello, Does anyone know whether the AutoGenerateMipMap method ceil´s or floor´s values ? F.ex. a filter kerl of 2x2 contains a summed value of 1, giving 1/4 = 0.25, but stored in an 8-bit texture, what is the result ?
Advertisement
Fist of all, I don't know(And I do not think anyone here knows the answere)! The best would rounding up the values but why do you want to know? If you need mipmaps that use the ceil or floor you can make your won. If you tell us what your problem really is or why you need to know this we can be more helpful.
I am using autogenerated mip-maps to filter low values in a texture and was wondering, whether they would be floored or ceiled ie. disappear or never go below one (since its an 8-bit texture).
It seems to me that they disappear with autogeneration, but I´m not sure, so I tried testing another texture (also 8-bit) with known values using TextureLoader.Filter, but there the values seems to be ceiled. I´m using Linear filters in both cases, I would love it if someone knows for certain and wants to tell me :D
The answer is “It depends”. The method how GPUs have to generate mipmaps is not defined and that means that any Chip can do what it wants. Unfortunately this means that you can not be sure that any other chip out there will do it in the same way as the chip you are currently use.

This topic is closed to new replies.

Advertisement