This is probably a weird question, but...
is there a difference between:
sceGuClearColor(0xff000000);
sceGuClearColor(0xaa000000);
and
sceGuClearColor(0x00000000);
Assuming we call sceGuClear(); after that of course...
In other words, can we use an alpha value in the "clear" color so that a call to sceGuClear doesn't actually erase the screen (but instead creates a semi transparent effect), or is the alpha value entirely useless in there?
My tests seem to show that the alpha value is not used but I am wondering if it is another issue in my code so I just want a confirmation.
I would for example expect sceGuClearColor(0x00000000); followed by sceGuClear to have no visual effect at all, but apparently it does clear the screen to black (0xff000000).
sceGuClear and alpha
-
- Posts: 107
- Joined: Sat Jan 13, 2007 11:50 am
To be short, alpha is not ignored, but it is also not factored in.
ClearColor is basically just fills the current buffer with what ever color you specify, no blending or math is done, just a fill. Which is why it will never only partially clear. So the difference between 0x00000000 and 0xaa000000 is that the buffer will have one or the other value, and unless you are blending alpha channels it will never effect you.
To achieve a partial clear do sceGuClear as normal but remove the color bit from the argument, then for the first call in your render loop/thread/pipeline render your self a quad the size of the screen with alpha and the proper blending modes of course.
ClearColor is basically just fills the current buffer with what ever color you specify, no blending or math is done, just a fill. Which is why it will never only partially clear. So the difference between 0x00000000 and 0xaa000000 is that the buffer will have one or the other value, and unless you are blending alpha channels it will never effect you.
To achieve a partial clear do sceGuClear as normal but remove the color bit from the argument, then for the first call in your render loop/thread/pipeline render your self a quad the size of the screen with alpha and the proper blending modes of course.
Code: Select all
.øOº'ºOø.
'ºOo.oOº'
-
- Posts: 107
- Joined: Sat Jan 13, 2007 11:50 am