Page 1 of 1

Missing smaller mip levels

Posted: Tue May 01, 2018 9:55 am
by Shem
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

Re: Missing smaller mip levels

Posted: Tue May 01, 2018 12:06 pm
by paroj
a screenshot would help understanding your problem

Re: Missing smaller mip levels

Posted: Tue May 01, 2018 1:46 pm
by Shem
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

Re: Missing smaller mip levels

Posted: Wed May 02, 2018 7:15 am
by Shem
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.