I wonder how the GU should be set to handle a DXT texture with mipmap.
Using a 1 level (no mipmap) DXT texture works, using normal 8888 textures at different size and setttign the mipmap levels works but I did not find how to set the different mipmaps textuers for 1 DXT..
What I mean is :
To handle normal 8888 texture and mipmap you can do :
Code: Select all
sceGuTexMode(GU_PSM_8888,2,0,0); // 2 levels mipmap
sceGuTexImage(0,128,128,128,texture128);
sceGuTexImage(1,64,64,64,texture64);
sceGuTexImage(2,32,32,32,texture32);
sceGuTexFunc(GU_TFX_REPLACE,GU_TCC_RGB);
sceGuTexFilter(GU_LINEAR_MIPMAP_LINEAR,GU_LINEAR_MIPMAP_LINEAR);
I tried this but it doesn't work well (looks like bad offset + texture size), only the biggest (0) texture is ok
Code: Select all
// dxt5 mipmapped, DXT5 texture is 512*512 and 3 level mipmap
sceGuTexFilter(GU_LINEAR_MIPMAP_LINEAR,GU_LINEAR_MIPMAP_LINEAR);
sceGuTexMode(10, 3, 0, 0);
sceGuTexImage(3, TEXTURE_WIDTH/8, TEXTURE_HEIGHT/8, TEXTURE_WIDTH/8, textureDXT5);
sceGuTexImage(2, TEXTURE_WIDTH/4, TEXTURE_HEIGHT/4, TEXTURE_WIDTH/4,textureDXT5);
sceGuTexImage(1, TEXTURE_WIDTH/2, TEXTURE_HEIGHT/2, TEXTURE_WIDTH/2, textureDXT5;
sceGuTexImage(0, TEXTURE_WIDTH, TEXTURE_HEIGHT, TEXTURE_WIDTH, textureDXT5);
(Note : I use PSPTex to generate the psptex DXT5 file)