-
Notifications
You must be signed in to change notification settings - Fork 2
Home
XorDev edited this page Aug 18, 2021
·
1 revision
Hello! Here's a quick demo for my bokeh shader, which is an extension of my 1-Pass Blur shader.
Instead of averaging the blur samples linearly, I apply an exponential curve to the sample's color first, sum up the samples and then reverse the curve with a logarithm. It's a relatively lightweight addition to the shader, but it makes a bit of a difference to the look.
Essentially this makes brighter pixels have more weight just like it appears in real lenses.
Note: This demo uses a lot of texture samples (500!) at a high resolution making it quite slow on low-end devices. This is more of a proof-of-concept than an asset you can slap in your project (try lowering the samples if you use it). Perhaps this can be done in 2 passes?