Viewing items tagged with: OpenGL

Please Log In or Register

Transform Feedback


MipMap Textures with Anisotropy in OpenFrameworks 008

If you have worked with meshes and textures in OpenGL, than you probably have experienced aliasing on textures bound to meshes. Unfortunately OpenFrameworks 008 only supports mip mapping of textures that have compression on them. I usually work with straight jpgs or pngs for my textures, so that is not an option. Recently some friends over at Incredible Machines brought up the issue, so I thought it might be useful to post. Both for other people and myself.

Below is an example of a texture without mip mapping. Notice the jaggedness on the checkered image. It is more apparent when there is a sharp angle from the vertex to the camera.
Regular ofTexture

Now here is the mip mapped version of the texture. Notice how it appears more anti-aliased. (Click to enlarge.)
Mip Mapped ofTexture

Anisotropy limits how much “aliasing” is applied between the mip maps. A value of 1 will do nothing, as the value increases so does the appearance of anti-aliasing.
I wrote a convenience function that is based on ofTexture, but includes the mip map and anisotropy functions.

MORE INFO