Missing smaller mip levels

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Shem
Kobold
Posts: 26
Joined: Fri Feb 16, 2018 9:32 am

Missing smaller mip levels

Post by Shem » Tue May 01, 2018 9:55 am

Hi Ogers,

I have an RTT texture with mipmaps on, which looks faded the more the camera zooms out.

This is how it's created:

Code: Select all

	m_Texture = m_tmgr->createManual(m_TexName, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
		TEX_TYPE_2D, w, h, 5, PF_A8R8G8B8, Ogre::TU_RENDERTARGET, NULL, false, 4);
This is the texture being set in the material:

Code: Select all

			Mat->getTechnique(0)->getPass(0)->setSceneBlending(SBT_TRANSPARENT_ALPHA);
			//Create the logo specific material using the texture file
			TextureUnitState* ptus = Mat->getTechnique(0)->getPass(0)->createTextureUnitState(NewTexName);
			if (ptus != NULL)
			{
				ptus->setTextureAddressingMode(Ogre::TextureUnitState::TextureAddressingMode::TAM_CLAMP);
				ptus->setTextureFiltering(Ogre::FilterOptions::FO_ANISOTROPIC, Ogre::FilterOptions::FO_ANISOTROPIC, Ogre::FilterOptions::FO_LINEAR);
				ptus->setTextureAnisotropy(16);
If I add:

Code: Select all

ptus->setTextureMipmapBias(-1);
The fading starts further away.

I have tried using MIP_UNLIMITED & | Ogre::TU_AUTOMIPMAP at texture creation but that doesn't help.

Anyone have an idea what's going on?

Possibly related to:
viewtopic.php?t=82118

I'm using oger 1.10 & GL3+ & win7&10

Thanks Shem
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 909
Joined: Sun Mar 30, 2014 2:51 pm
x 197
Contact:

Re: Missing smaller mip levels

Post by paroj » Tue May 01, 2018 12:06 pm

a screenshot would help understanding your problem
0 x

Shem
Kobold
Posts: 26
Joined: Fri Feb 16, 2018 9:32 am

Re: Missing smaller mip levels

Post by Shem » Tue May 01, 2018 1:46 pm

Hi Paroj, I feel I'm in good hands now.

Below are the different zoom snaps.

https://ibb.co/dGfC67
https://ibb.co/mpb8eS

(They're small so zoom out to view them)

Thanks in advance
Shem
0 x

Shem
Kobold
Posts: 26
Joined: Fri Feb 16, 2018 9:32 am

Re: Missing smaller mip levels

Post by Shem » Wed May 02, 2018 7:15 am

Sooo, Had to work around that problem by blitting the rtt texture to a 2d mipmaped texture (none rtt) and that seem to work but off course performance is suffering for it.
0 x

Post Reply