How do I make depth-of-field resolution-independent? (see screenshots)

My project makes heavy use of depth-of-field post processing, currently from the default pipeline. I notice, however, that the level of blur is tied to screen resolution:

It’s important to me to have the same experience regardless of the user’s screen resolution. Any ideas on how I can achieve this? Thanks in advance.

It’s alike the problem in this thread:

The solution was to make the blur kernel depend on the texture size.

1 Like

Let me add that your screenshots are pretty ?

@Evgeni_Popov I wonder if there are anything we could do for window independent setup ? maybe a new mode to not break back compat ?

1 Like

Ha thx. Here’s the project for a little more context fyi: CameraSim 3D

Please let me know if you do anything to address this under the hood, otherwise I’ll try the solution from @Evgeni_Popov’s thread.

cc @PirateJC and @PatrickRyan as they love photos :slight_smile:

@sebavan I’ve updated our internal issue about improving DoF

1 Like

@Evgeni_Popov How can I follow any progress made on DoF?

This is an internal issue, so it’s not visible to the outside world.

We’ll be sure to make an announcement when the PR is ready, but don’t hold your breath, as it’s not on the priority list, and we also have to prepare the new Babylon version to come (by the end of this month).

Yep, understood. I don’t know how I could help, but I’d be eager to since DoF is central to my app.

If you can, you could try to implement another algorithm that would fix the problems identified in:

It would require a bit of research to find a suitable algorithm, and then to implement it, though.

1 Like