question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DOF only works as last pass

See original GitHub issue

I’m not sure if this is a bug or something I’m missing. After looking around, I could only find an old question on SO without any answers.

Here’s a demo based on @Mugen87 DOF example that he fixed earlier: https://jsfiddle.net/mirohristov/w4L0u1b8/20/

        composer.addPass( bokehPass ); // dof doesn't work here 
        composer.addPass( effectGrayScale );
        composer.addPass( effectSobel );
        //composer.addPass( bokehPass ); // dof works only as last shader

In this example it doesn’t matter much if it’s last or not but when adding film grain, sharpen, or bloom it does. Thanks!

Three.js version
  • r113

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Mugen87commented, Feb 14, 2020

BokehPass set needsSwap to false. That means the result of the buffer is not available in the read buffer for the subsequent post processing pass. This is done for performance reasons since usually this DOF pass is used on its own or at the end of the pass chain. So adding the following line of code should solve the issue:

bokehPass.needsSwap = true;

Updated fiddle: https://jsfiddle.net/5nxy0tqp/

0reactions
makccommented, Feb 15, 2020

real time graphics was built on math that was not academically correct. until PBR people came )

Read more comments on GitHub >

github_iconTop Results From Across the Web

Another LastPass Security Incident - Reddit
lastpass only prompts if the main web address is the same as the one in the saved password, so if a phishing site...
Read more >
How to Set Up Your New LastPass Account
Learn how to set up your LastPass account.
Read more >
If You've Ever Used LastPass, You Should Change All Your ...
The password manager, LastPass, has been breached by hackers, which means your master passwords could be for sale.
Read more >
LastPass Review: Great password management for a price
LastPass offers a smooth, consistent password management experience across platforms -- but only if you pay for it.
Read more >
1Password vs LastPass | Password Manager Comparison
But LastPass is still cheaper for family use, while its free version can still meet the needs of mobile-only or desktop-only users.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found