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 

Rendering depth buffer and blending it to a texture?

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



Joined: 10 Jun 2009
Posts: 3

PostPosted: Thu Jun 11, 2009 10:52 am    Post subject: Rendering depth buffer and blending it to a texture? Reply with quote

Okay.

So I've got a decent looking flashlight loading and displaying, but I've got a problem. It doesn't exactly fade when it reaches distant walls, so I thought, why not take the depth buffer and blend it with the texture? This seemed like the best way to go about doing it.

Unfortunately, I don't know:

1) How to render the depth buffer
2) The best way to blend it with the existing texture

Can anybody help me out here?
Back to top
View user's profile Send private message
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Thu Jun 11, 2009 11:54 pm    Post subject: Reply with quote

When you set up the GU you allocates the Depth Buffer.

Can't you read that buffer since you have the pointer to the depth buffer?
_________________
Code:
int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri Jun 12, 2009 6:03 am    Post subject: Reply with quote

You might try searching the threads here - I remember an old thread on using the depth buffer.
Back to top
View user's profile Send private message AIM Address
Downsider002



Joined: 10 Jun 2009
Posts: 3

PostPosted: Fri Jun 12, 2009 1:09 pm    Post subject: Reply with quote

Thanks for the info. I'll look around!
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 -> PSP 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