| View previous topic :: View next topic |
| Author |
Message |
Downsider002
Joined: 10 Jun 2009 Posts: 3
|
Posted: Thu Jun 11, 2009 10:52 am Post subject: Rendering depth buffer and blending it to a texture? |
|
|
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 |
|
 |
jojojoris
Joined: 30 Mar 2008 Posts: 261
|
Posted: Thu Jun 11, 2009 11:54 pm Post subject: |
|
|
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 |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Fri Jun 12, 2009 6:03 am Post subject: |
|
|
| You might try searching the threads here - I remember an old thread on using the depth buffer. |
|
| Back to top |
|
 |
Downsider002
Joined: 10 Jun 2009 Posts: 3
|
Posted: Fri Jun 12, 2009 1:09 pm Post subject: |
|
|
| Thanks for the info. I'll look around! |
|
| Back to top |
|
 |
|