The things that we are making in this graphics class are overwhelming. I had never thought of the cool things that we can do.
In this assignment, I created a depth buffer to make a cool effect. I needed to make a depth buffer of our own because the depth buffer in the graphics hardware cannot be accessed.
In this assignment, I created a depth buffer to make a cool effect. I needed to make a depth buffer of our own because the depth buffer in the graphics hardware cannot be accessed.
I used this depth for creating a blending effect. For doing this, I checked the distance from the camera (i.e. the depth). If the difference between current pixel's depth and previous pixel's was too low then I added transparency to it (value of alpha depended on the difference ).
This is how the effect looks.
Here's the link to my code: Download Code
No comments:
Post a Comment