Sign in to follow this  
sune

Ceil or Floor in Mip-Mapping

Recommended Posts

sune    122
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 ?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
sune    122
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

Share this post


Link to post
Share on other sites
Demirug    884
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this