Ogre 贴图全部为黑色

Your material has lighting enabled (it's the default if you don't add "lighting off" to the pass). Does your quad have correct normals added to each vertex and a lightsource in front of it?
With lighting on but no normals on a mesh, it will appear black.


就是默认.mertial文件里是,把灯光打开的,你要手动关掉。手动修改mertial文件

material MyMaterial1
{
  technique
  {
      pass
      {
          lighting off
          texture_unit
          {
              texture leaf.png
          }
      }
  }
}

但是,如果你是手动写的shader脚本,必须改为默认的lighting on,否则就会变成黑色。至于原因,日后再查。

猜你喜欢

转载自tuo-ba-ye.iteye.com/blog/2042223