1

私は Ogre マテリアルを持っていますが、GPU フィルタリングに満足していないので、手動でミップマッピングを作成したいと考えています。つまり、すべてのテクスチャを作成し、lod ベースの戦略を設定して正しいテクスチャをロードします。

問題は、どの戦略を使用しても、lod_value を使用しても、マテリアルがテクスチャを変更しないことです。私は何をすべきか?マニュアルを読んでいますが、本当に役に立ちませんでした。

これが私のコードです:

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
          }
        }
    }   
 }
4

1 に答える 1

1

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?
于 2012-06-26T15:11:41.577 に答える