Mipmap HW Generation Non-Power-Two
Posted: Tue Jul 12, 2016 4:50 am
Hey,
the following line disables mipmap hardware generation for non power-of-two texture sizes in the 1.10 branch (d3d9):
From: https://bitbucket.org/sinbad/ogre/src/f ... e.cpp-1677
However, the manual creation of mipmaps (which is caused by this line) seems to be the most expansive task for me when loading larger textures (e.g. 1364x638 and beyond). Note: I didn't chose non-power-of-two textures... I just have to deal with it...
I removed this check so mipmaps get hw created for non-power-of-two sizes and it seems to work perfectly for me.
System is: Win10 + Ogre 1.10 + Nvidia GTX 660
Is it possible this exclusion for non-power-of-two textures is rather obsolete by now?
Due to its great influence on loading time, I would like to suggest:
1) Consider enabling hw generation (=remove the exclusion). In case any target GPU past e.g. 2010 can do it just fine?
2) May be provide a config option to enable or disable hw mipmaps for non-power-of-two textures..
Thanks!
the following line disables mipmap hardware generation for non power-of-two texture sizes in the 1.10 branch (d3d9):
Code: Select all
// Hacky override - many (all?) cards seem to not be able to autogen on
// textures which are not a power of two
// Can we even mipmap on 3D textures? Well
if ((mWidth & mWidth-1) || (mHeight & mHeight-1) || (mDepth & mDepth-1))
return false;
However, the manual creation of mipmaps (which is caused by this line) seems to be the most expansive task for me when loading larger textures (e.g. 1364x638 and beyond). Note: I didn't chose non-power-of-two textures... I just have to deal with it...
I removed this check so mipmaps get hw created for non-power-of-two sizes and it seems to work perfectly for me.
System is: Win10 + Ogre 1.10 + Nvidia GTX 660
Is it possible this exclusion for non-power-of-two textures is rather obsolete by now?
Due to its great influence on loading time, I would like to suggest:
1) Consider enabling hw generation (=remove the exclusion). In case any target GPU past e.g. 2010 can do it just fine?
2) May be provide a config option to enable or disable hw mipmaps for non-power-of-two textures..
Thanks!