Advertising (This ad goes away for registered users. You can Login or Register)

color keying

Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
Locked
ozzyyzzo
Posts: 1
Joined: Mon Feb 14, 2022 9:00 am

color keying

Post by ozzyyzzo »

Hello,
I'm new to psp coding ^^

I'm trying to get some color keying to work for my sprites without luck..

i'm using swizzled RGBA paletted textures 4BPP
the transparent color is kinda Pink such as red=255, green=0, blue=255, alpha=0 at index 0 into the palette.

my combine func is using GU_TCC_RGBA to take alpha component into account
like : sceGuTexFunc(combiningStates[currentCombine[0]], GU_TCC_RGBA);

and blending is enabled.

Unfortuntaly for some reason no transparency is occuring and alpha can be set to any value without any rendering difference

i've also tried to reject pixels with sceGuColorFunc(...)

sceGuEnable(GU_COLOR_TEST);
sceGuColorFunc(GU_NOTEQUAL, 0xff00ff, 0xff00ff00);

but doesn't work either..

texture parameters are defined like this :

sceGuClutMode(GU_PSM_8888, 0, 0xff, 0);
sceGuClutLoad(32, pBitmap->infos.palette);
sceGuTexImage(0, pBitmap->infos.width, pBitmap->infos.height, pBitmap->infos.width, pBitmap->infos.pData);
sceGuTexMode(GU_PSM_T4, 0, 0, 1 );
sceGuTexFilter(filteringStates[pBitmap->min],filteringStates[pBitmap->mag]);
sceGuTexWrap(tilingStates[pBitmap->u],tilingStates[pBitmap->v]);
sceGuTexFunc(currentCombine[0], GU_TCC_RGBA);
sceGuTexScale(1.0f, 1.0f);
sceGuTexOffset(0.0f, 0.0f);


any tip ?
Advertising
Locked

Return to “Programming and Security”