MipMap distance
-
- Posts: 197
- Joined: Fri Jul 01, 2005 2:50 am
MipMap distance
With mip mapping, is there a way to set the distance away a texel has to be to change to the next mipmap? At the moment the texture is getting too blurry too soon, so I'd like to push the distance back.
Hi,
I've been beating my head over the usage of sceGuTexLevelMode(int, float). Does anyone have any tips on what those two arguments are? I'm having a similar problem with the lower mip levels getting too blurry.
My initial guess was that the int was to specify a mip level and the float some mip bias. But then I looked at some of the ge register list at http://wiki.ps2dev.org/psp:ge_register_list and saw that there is only one 16 bit value stored for each of the two arguments. Should they really be int and float? Seems suspect to me.
Since there is only one set of 16-bit values stored, I'm assuming that this isn't set per mip level but instead strored globally.
Any ideas on how to set these values sanely? What is the default?
Thanks!
I've been beating my head over the usage of sceGuTexLevelMode(int, float). Does anyone have any tips on what those two arguments are? I'm having a similar problem with the lower mip levels getting too blurry.
My initial guess was that the int was to specify a mip level and the float some mip bias. But then I looked at some of the ge register list at http://wiki.ps2dev.org/psp:ge_register_list and saw that there is only one 16 bit value stored for each of the two arguments. Should they really be int and float? Seems suspect to me.
Since there is only one set of 16-bit values stored, I'm assuming that this isn't set per mip level but instead strored globally.
Any ideas on how to set these values sanely? What is the default?
Thanks!
-
- Posts: 197
- Joined: Fri Jul 01, 2005 2:50 am
I got some sort of mipmapping working for my ODE port : http://forums.ps2dev.org/viewtopic.php?t=3944
but I didn't use sceGuTexLevelMode(), because it would either make it too far away or too near.
I'm pretty sure that the int is for the index to the mipmap, and the float is the weighting that it gives it. What you may want to try is binding the values to buttons, so X and O change the int and [] and ^ change the float value. This way you can test out every value and see which one works best.
but I didn't use sceGuTexLevelMode(), because it would either make it too far away or too near.
I'm pretty sure that the int is for the index to the mipmap, and the float is the weighting that it gives it. What you may want to try is binding the values to buttons, so X and O change the int and [] and ^ change the float value. This way you can test out every value and see which one works best.
The correct mipmap level to use is based on the size of the triangle you are rendering and the number of pixels it uses from the texturemap.
Say your triangle covers 30 screen pixels, then ideally it will use 30 texture pixels too.
You can use the 2d cross product to find out these areas.
Alternatively, as many people do, base the mipmap level on the z of the triangle.
Jim
Say your triangle covers 30 screen pixels, then ideally it will use 30 texture pixels too.
You can use the 2d cross product to find out these areas.
Alternatively, as many people do, base the mipmap level on the z of the triangle.
Jim
Thanks for the replies...but I'm still a bit lost on how those values are used. I played with binding the variables to the joystick before and it really makes no sense.
Another confusing thing is that when you call sceGuTexScale (float, float); with anything other than sceGuTexScale (1.0f, 1.0f); the mip bias is very different and blurrier in the lower mip levels. Very strange.
Thanks.
Another confusing thing is that when you call sceGuTexScale (float, float); with anything other than sceGuTexScale (1.0f, 1.0f); the mip bias is very different and blurrier in the lower mip levels. Very strange.
Thanks.