• entries
    13
  • comments
    55
  • views
    20318

Bokeh to the Future

Sign in to follow this  

1111 views

Hi!

Wasted an entire week trying to salvage this plan I had for a new depth of field shader. To up the performance, I came up with this really awkward mipmapping scheme, because for some reason I was convinced the weighted blending filter needed wasn't separable. A few minutes reconsidering this just now and it turns out a two pass method is perfectly feasible - so a quick rewrite later and I have this:

019_a.png

This version gets rid of the worst bleeding artifacts in both the near and far field by adjusting any texel's circle-of-confusion radius based on the depth values of neighboring (and occluding) texels.

019_b.png

I apply a basic dilation filter to bring out the brighter values, but I think I'm probably going to have to render some small point sprites to really have those distinct iris blade patterns pop out.

[media]

[/media]

Sign in to follow this  


4 Comments


Recommended Comments

I hate and love your posts.

 

First, I hate them because they are so amazing and it makes me wish I worked with you on a team!

 

Second, I love them because they are so amazing and it makes me wish I workded with you on a team!

 

Seriously though, some great work. My only issue is that I cant tell where the DoF is coming from for its central focus. Perhaps you could create a scene with two objects in varying distance that are on the far sides of each of the screen. Then, you can change the focus to the far object (say on the left) and watch the DoF shift. Then, you can change the focus to the near object (say on the right) and watch the shift.

 

Still, I enjoy reading every post because they always come with sexy pictures/video!

Share this comment


Link to comment

Thanks for the love and the hate, Riu. tongue.png

 

Here's a vid that shows a gradual shift of focus from the front to the back of the scene:

 

[media]https://www.youtube.com/watch?v=Dd9VQxDpF9Q[/media]

Share this comment


Link to comment

Wow! It is nice to see you have got it done after all that time spent on it and it looks wow!

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now