Mip mapping

From JPCT
Revision as of 22:23, 6 October 2009 by Admin (Talk | contribs)

Jump to: navigation, search

Mip mapping

jPCT supports mip mapping for the software as well as for the hardware renderer. It's enabled by default for latter and disabled for the former.


Mip mapping and the hardware renderer

jPCT supports, what the actual hardware supports. Usually, this is per pixel mip mapping. It improves image quality by reducing texture aliasing and usually improves performance, which is why it's on by default. The mip maps are generated by the engine itself, there's no need (and no way) to create them within your application.


Mip mapping and the software renderer

For quite a long time, there was no mip mapping for the software renderer available. Then, an extension was written that wasn't part of the core, which made per polygon mip mapping possible. The drawbacks were that performance suffered somehow (depending on the scene's complexity) and that the mip mapping was always "one frame behind", i.e. the mip maps were based on the last, not on the current frame. With 1.19, this extension isn't needed anymore (which is why it has been removed from the download page). jPCT now supports a similar per polygon approach out of the box. This approach doesn't suffer from a performance penalty and is calculated directly for the current frame. Enable it by setting Config.mipmap to true. jPCT will create the mip maps the first time that the texture is used. This may cause a small hick up when it happens. Future versions may improve this in one way or another. Keep in mind that the generated mip maps require some more memory than the texture alone.

A picture to illustrate the difference, albeit it's best experienced in motion: Mipmapping.jpg