DOF extra & ALF effect 3/13 2015

share shaders here
  • Author
  • Message
Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: DOF extra & ALF effect 7/9 update

Insomnia
you just hit the bull's eye!
It is quite performance heavy though, I only got 15 fps with DoF quality 7.
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube

Offline
*blah-blah-blah maniac*
Posts: 552
Joined: 11 Apr 2012, 03:24

Re: DOF extra & ALF effect 7/9 update

Is the link on page 1, the most uptoday version?
_________________
i5-6600k -- Nvidia GTX 970 -- 16Gb ram @3200mhz

Offline
*sensei*
Posts: 372
Joined: 28 Jul 2013, 23:26

Re: DOF extra & ALF effect 7/9 update

So this bokeh shape thing intrigues me...

What if you would take a regular bokeh shape like a round/octagon and have it's shape deformed ranging out of the center, sized by the distance to player and intensity... it could be interesting in mimicking stuff camera's do.

I've been trying out to get bokeh similar to this, without luck, or quality just too low... would require down and upscaling texture and whatnot, all neat things we aren't able to do unfortunately (extreme example, but I suppose you get it). For some reason cannot link the picture.

http://hqdesktop.net/wallpapers/l/1920x ... _17059.jpg

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: DOF extra & ALF effect 7/9 update

What do you mean by deformed shaped? It's size is already based on the distance to the focusing depth.

Actually, I was trying to improve bokeh dof before I did the weatherFX.

There are at least one method to both increase quality and performance comparing to current tab based bokeh.
unfortunately, most on them need to mix multiple textures, very much like bloom. Boris and Marty Macfly told me to use split screen to pass extra textures but I haven't got time on that. I suppose I'll pick it up since the WeatherFX is almost finished.

Another problem about split screen is that if I save 4 half res texture in full res tex, wouldn't that means the infocus area will also have reduced resolution?
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube

Offline
*sensei*
Posts: 372
Joined: 28 Jul 2013, 23:26

Re: DOF extra & ALF effect 7/9 update

kingeric1992 wrote:What do you mean by deformed shaped? It's size is already based on the distance to the focusing depth.

Actually, I was trying to improve bokeh dof before I did the weatherFX.

There are at least one method to both increase quality and performance comparing to current tab based bokeh.
unfortunately, most on them need to mix multiple textures, very much like bloom. Boris and Marty Macfly told me to use split screen to pass extra textures but I haven't got time on that. I suppose I'll pick it up since the WeatherFX is almost finished.

Another problem about split screen is that if I save 4 half res texture in full res tex, wouldn't that means the infocus area will also have reduced resolution?
I mean, in camera the shape of the bokeh deforms to the edges of the lens (ie round would become more oval).

This technique here can very well replace current tab based bokeh shape. You can just replace the whole bokeh with this texture and shape the texture based on variables (depth, distance from focus plane, distance from center, intensity, etc) then pass if over a nice Gaussian to smooth it out. Not sure if it will work and/or how it will look, would be interesting. I suppose drawing the textures in a correct way would be challenging... you'll have to somehow mix them or you'll get low intensity overwriting high intensity just because they are processed later (next line of pixels). Maybe multiply alpha channel by intensity, or something. Or only start drawing above X and let below X just pass gaussian blur.

Not sure, I haven't given it much thought yet, this is basically the thought of just now :)

Cheers

Offline
User avatar
*blah-blah-blah maniac*
Posts: 530
Joined: 30 Jan 2012, 13:18

Re: DOF extra & ALF effect 7/9 update

GP dof has a nice H V gaussian blur packed in 2 passes so it's very fast and you can achieve a good smoothening.

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: DOF extra & ALF effect 7/9 update

prod80

You mean like lens distorted bokeh in the edge? It could probably be done without introducing additional textures, just need to add some computation based on positions.
The custom shape effect is still tab based. It Just checks input texture to determine weather to display a tab, which is definitely not a good solution.

Marty McFly

I knew, but gaussian doesn't has those bokeh shapes and it is still different from lens blur.
The method I mentioned utilize separable property(like gaussian) and still has distinguishable shapes.

off topic:
Does anyone knows how to do fft(fast Fourier transform) in hlsl? I found some glsl examples but still can't figure that out.
It can do a lot of effects like shaped bokeh, ALF, bloom, blur/sharpen fillters.
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube

Offline
*sensei*
Posts: 372
Joined: 28 Jul 2013, 23:26

Re: DOF extra & ALF effect 7/9 update

kingeric1992 wrote: Does anyone knows how to do fft(fast Fourier transform) in hlsl? I found some glsl examples but still can't figure that out.
Some random crap by Intel
https://software.intel.com/en-us/articl ... irectx-10/

FFT is described in GPU Gems 2 as well with HLSL example
http://http.developer.nvidia.com/GPUGem ... ter48.html

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: DOF extra & ALF effect 7/9 update

here is the test result of separable bokeh
Image
1280x1024@ 60 fps
tabs: 65 x 65 = 4225
compute: 2 * (65 + 65) = 260

tab based bokeh in GP's .fx (quality = 7)
Image
1280x1024@ 30 fps
tabs: 7 x 8 x 4 = 224
compute: 224
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube

Offline
User avatar
Posts: 78
Joined: 08 Nov 2013, 07:42
Location: Taiwan

Re: DOF extra & ALF effect 7/9 update

The separable bokeh just...WOW... :shock:
Looks really like the bokeh effect taken from Canon's D series.
_________________
Observing the world with aesthetic taste.
Post Reply