RenderTexture.useMipMap

…doesn’t seem to work!

I’ve created a rendertexture like so:

		RT = new RenderTexture( 1024, 1024, 24, RenderTextureFormat.ARGB32, RenderTextureReadWrite.sRGB );
		RT.useMipMap = true;
		Mat.SetTexture("_MainTex",RT);
		OSCam.targetTexture = RT;

but it doesn’t work!

In my Update loop, I have the following:

		if ( !RT.useMipMap )
		{
			RT.useMipMap = true;
			Debug.Log ("! "+RT.width+", "+RT.height);
		}

which always executes.

What am I doing wrong? I’m on iOS Pro, Unity 3.5.7f6.

If I add “RT.mipMapBias” at all, it crashes Unity entirely…

Lost!

Any ideas?

Sorry all - have to push this. Usually there’s an answer somewhere on Google, but not on this one! As RenderTextures are only really used as targets for Cameras, this is either a bug in Unity, or I’m doing something wrong.

Help! Aras? Rej? Dreamora?? :stuck_out_tongue:

Sorry, folks - TTT again. Is my inability to turn on MipMaps on Rendertextures a bug in Unity?

Is this likely to be the longest thread with only one author? Someone from Unity? Can you help me?

what platform are you running on? It is not like all of them do support rt mipmapping.
Judging from code (the current version though, not 3.5)
dx11 - have it
dx9 - checks D3DCAPS2_CANAUTOGENMIPMAP
gl - checks lots of stuff (but for most of it it will print to log about disabling rt mipmaps - at the beginning where it dumps ext etc)

Key platforms are Macbook Pro (gl), iPhone 4S and iPad 3 (GLES 2.0)

Are they not supported on those platforms? I can’t find any info to suggest that’s the case with any of 'em…

1 Like