forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Blending Mode and Pixel Test

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
Richard L.



Joined: 02 Jun 2005
Posts: 2
Location: Puget Sound, WA

PostPosted: Thu Jun 02, 2005 9:27 am    Post subject: Blending Mode and Pixel Test Reply with quote



Let's say I have a circular mask and a rectangle as shown in the picture above. I'm looking for a blending mode and pixel test mode that would allow me to render both the mask and the rectangle so that only the area of the rectangle covered by the mask is shown. I'm fairly new at this, so I would appreciate any suggestions.
Back to top
View user's profile Send private message
TheBrooster



Joined: 01 Jun 2005
Posts: 16

PostPosted: Thu Jun 02, 2005 8:10 pm    Post subject: Dest Alpha test Reply with quote

You could render the MASK into the alpha channel then render the rectange using dest alpha test. I am not sure if this is supported within any of the homebrew libs, but it shouldn't been too hard to do.

Draw order becomes an issue when you do this as to get the correct result you should really start with a blank alpha channel, write the MASK in then the rectange. If there is stuff in the alpha channel already you may have to clear it, which in itself may provide its own issues.
Back to top
View user's profile Send private message
TheBrooster



Joined: 01 Jun 2005
Posts: 16

PostPosted: Thu Jun 02, 2005 11:33 pm    Post subject: Reply with quote

Or you could achieve the same effect by using Z, may be easier.
Back to top
View user's profile Send private message
Richard L.



Joined: 02 Jun 2005
Posts: 2
Location: Puget Sound, WA

PostPosted: Fri Jun 03, 2005 1:04 am    Post subject: Reply with quote

Thanks for the replies. I will give it a shot.
Back to top
View user's profile Send private message
TheBrooster



Joined: 01 Jun 2005
Posts: 16

PostPosted: Fri Jun 03, 2005 5:56 am    Post subject: Reply with quote

No worries. Post back here with your results - I would be curious to see how you get on.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group