Ogre material lod: How do i set it up?

870 views Asked by At

I have an Ogre material and, since i'm not happy with the GPU filtering, i want to make a manual mipmapping, i.e, i create all the textures, and then i set up a lod-based strategy to load the correct texture.

The problem is: it doensn't matter which strategy i use, neither the lod_value, my material does not change the texture. What should i do? I'm reading the manual but it really didn't help.

Here is my code:

material shader/content
 {
    lod_values 100.0

    technique t1
    {
        lod_index 0
        pass
        {
          scene_blend alpha_blend
          depth_write off

          texture_unit
          {
            filtering none
            texture menu_image.png
          }
        }
    }

    technique t2
    {
        lod_index 1
        pass
        {
          scene_blend alpha_blend
          depth_write off

          texture_unit
          {
            filtering none
            texture menutest.png
          }
        }
    }   
 }
1

There are 1 answers

0
RJFalconer On

What you have posted seems correct.

Which image shows? I assume menu_image.png.

Things to try:

  • Are you sure menutest.png is loaded along with your other ogre assets?
  • Are there any relevant messages in your ogre logs?
  • What version of Ogre are you using? Try lod_distances instead of lod_values
  • Could there be code modifying the material/techniques at runtime?