Code: Select all
sceGuAmbient(0xFF000000);
sceGuLightColor(0, GU_DIFFUSE, 0xFFFFFFFF);
sceGuEnable(GU_LIGHTING);
sceGuEnable(GU_LIGHT0);
sceGuEnable(GU_TEXTURE_2D);
sceGuEnable(GU_BLEND);
[snip...]
sceGuLight(0, GU_POINTLIGHT, GU_DIFFUSE, (ScePspFVector3*)&m_pCamera->GetWorldMatrix().GetRow(3));
[snip...]
sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA);
sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0);
Anyways, now onto the current problem. When I render my models, I need to have vertex colors set (GU_COLOR_XXXX in the vertex format) or my model doesn't appear with the above blending/color settings. The reason for this appears to be that the PSP is assuming that if there's no vertex color, the color is 0 (Note with blending disabled, the model turns black, so I'm about 99% sure this is the case).
I was just wondering, is there a way to set what the default vertex color for a mesh should be if GU_COLOR_XXXX isn't applied? I'd prefer to save the 4 bytes per vertex, as most if not all of the meshes in my project won't be using anything other than 0xFFFFFFFF and it seems like a waste.
Thanks guys.