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
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Missing smaller mip levels

Post 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
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Missing smaller mip levels

Post by paroj »

a screenshot would help understanding your problem
Shem
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Re: Missing smaller mip levels

Post 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
Shem
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

Re: Missing smaller mip levels

Post 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.
Post Reply