XNA UK User Group
A helping hand for bedroom coders throughout the land.

Pipeline Processor For Resizing Textures


posted by leaf
Wed, Aug 15 2007

Downloads: 1,485
File size: 36.7kB
Views: 2,448
Pipeline Processor For Resizing Textures
Filed under: ,

This is an example content pipeline texture processor that will resize non power of 2 sized textures to the next nearest power of 2 size. For example if you give it a texture of size 70x70 then it will scale the texture to size 128x128. The texture can then be used with mipmaps and/or compressed to a DXT format. Note, it would be better to make sure that your textures are already the right size as scaling them increases texture memory for no improvement in quality. For that reason this processor will output a warning whenever it has to scale a texture.

There are simple derived Model and Material processors provided too so that you can use the resizing texture processor for models that reference textures.