Metal generate_mipmaps troubles Topic is solved

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
cloud
Gremlin
Posts: 196
Joined: Tue Aug 08, 2006 6:45 pm
x 14

Metal generate_mipmaps troubles

Post by cloud »

Hi there,
tried updating to the latest 2.2 today and found a compositor I wrote before seems not to work anymore, I tracked it down to the mipmaps not being generated.

Code: Select all

   
    texture rtMippedDepthBuffer target_width target_height PFG_R32_FLOAT mipmaps 5
      
        target rtMippedDepthBuffer
	{
		pass render_quad
		{
            load { all dont_care }
            quad_normals   camera_far_corners_view_space

            material CopyAndLinearizeDepth
			input 0 gBufferDepthBuffer
        }
		
		pass generate_mipmaps
		{
			// compute_hq won't work on Mac use MetalTexture::_autogenerateMipmaps instead
			mipmap_method api_default
		}
	}
my CopyAndLinearizeDepth is working I checked with readMip( depthTexture, samplerBilinear, uv0, 0 ) but none of the lods come out, has something changed in the generate_mipmaps code recently?

much thanks
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5299
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1279
Contact:

Re: Metal generate_mipmaps troubles

Post by dark_sylinc »

This is very likely a bug. I'll check when I get back from vacations
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5299
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1279
Contact:

Re: Metal generate_mipmaps troubles

Post by dark_sylinc »

Fixed.
You were missing the "automipmaps" keyword when creating the texture. However I realized your case is the most common, so auto mipmaps is now the default, and it can be disabled by using the no_automipmaps keyword.

We will also now warn to Ogre.log if automipmaps flag is not present.

Thanks for the report.
Post Reply