Mipmapping

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Calv!n
Posts: 10
Joined: Mon Aug 13, 2007 2:18 am
Contact:

Mipmapping

Post by Calv!n »

Ok, so I'm not sure what the deal with mipmapping on psp is, but it seems to have its own special way of doing things.

First off let me say I've been searching through the forums thoroughly to find any help and it looks like mipmapping has be a recurring problem.

I'm using 3 different texture levels. 128x128, 64x64, and 32x32. Each texture has a different color with its texel width/height stamped on the textures. I did this to help visually see the mipmapping taking affect, but the only texture I'm seeing is the 32x32.

My code:

Code: Select all

		sceGuColor(0xffffffff);
		sceGuPatchDivide(u, v);
		
		sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGB);
		sceGuTexFilter(GU_LINEAR_MIPMAP_LINEAR, GU_LINEAR_MIPMAP_LINEAR);
		sceGuTexScale(1.0f, 1.0f);
		sceGuTexOffset(0.0f, 0.0f);
		sceGuTexWrap(GU_REPEAT, GU_REPEAT);
		
		sceGuTexLevelMode(GU_TEXTURE_SLOPE, 0.0f);
		sceGuTexSlope(0.3f);
		
		sceGuTexMode(GU_PSM_8888, 2, 0, 0);
		
		selectTgaTexture(texture_128);
		sceGuTexImage(0, texture_128->imageWidth, texture_128->imageHeight, texture_128->imageWidth, texture_128->image);
		
		selectTgaTexture(texture_64);
		sceGuTexImage(1, texture_64->imageWidth, texture_64->imageHeight, texture_64->imageWidth, texture_64->image);
		
		selectTgaTexture(texture_32);
		sceGuTexImage(2, texture_32->imageWidth, texture_32->imageHeight, texture_32->imageWidth, texture_32->image);
		
		sceGumDrawBezier(GU_VERTEX_32BITF|GU_TEXTURE_32BITF|GU_TRANSFORM_3D, 4, 4, 0, bpatchArray[i].nodes);
It would be a great help if someone could explain to me what is incorrect and why. Thanks for the forums and the help. :)
a_noob
Posts: 97
Joined: Sun Sep 17, 2006 8:33 am
Location: _start: jr 0xDEADBEEF

Post by a_noob »

sceGuTexLevelMode(GU_TEXTURE_SLOPE, 0.0f);

I know that that line may cause problems, because the 0.0f means use 0% of the slope, so in effect it would never change. However when I tried making my own small sample the mip mapping still didn't work. Also what does selectTgaTexture do?? Thats all I can see. Hmm maybe someone else has a better answer.

Code: Select all

.øOº'ºOø.
'ºOo.oOº'
Post Reply