I’m rendering to a dx9texture node, setting # of mipmaps to anything other than 1, results in non-generated mipmaps
[i.e., subsequent passes using any mip level below the first for that texture, returns random garbage from texture memory as it’s still reading memory that would be allocated for mip levels, but nothing has been put there by VVVV](i.e., subsequent passes using any mip level below the first for that texture, returns random garbage from texture memory as it’s still reading memory that would be allocated for mip levels, but nothing has been put there by VVVV).
It doesn’t matter what texture format I set the rendertarget to, i get the same result.
right. no mipmaps are being generated for dx9texture. generating an additional mipmap would mean to render the scene a second time. we havent tried that yet because we thought it would be too slow anyway.
Mip levels should not require rerendering the scene, only for the top mip level of the texture to be progressively scaled down for each mip level. There are several built in in functions in DX9 to take care of this, such as…
also the MipLevels parameter of D3DXCreateTextureFromFileInMemoryEx
I believe there are a couple of other methods for creating miplevels for textures residing in memory.
right. i just had a testrun and it really seems to make sense, in a simple case automipmapgeneration doesn’t visibly harm performance even for a 2048x2048 texture.
so what i did is: dx9texture, gditexture, dynamictextures and screenshottexture now have D3DUSAGE_AUTOGENMIPMAP set when ALL miplevels are selected.
i also tried to use IDirect3DBaseTexture9::GenerateMipSubLevels to only create selected miplevels but that gracefully crashes with no indication why. so i left that out for now…