Marty McFly's Advanced Depth of Field (standalone)
- Elimina
GTAFan wrote: Only one question: will that give me lag??
I have no idea what your system can and cannot handle. I gave you the settings I use to give the most performance while still maintaining a high quality look. You will just have to try it out. I do not know what I could do further to help, besides setting the focus point to 1 and the focus radius to 0.0
Please Log in or Create an account to join the conversation.
- themaxmeister
I've inquired about this topic before, and the answer seemed to be that it was possible (?). I was referred to this link reshade.me/forum/shader-discussion/69-ac...-frames?limitstart=0 but unfortunately, I'm new at this, and I don't understand much of it.
Would a slower focus even be possible?
Please Log in or Create an account to join the conversation.
- NotWorthy
themaxmeister wrote: Hey Marty, quick question (I imagine it's been asked before, but I can't find a definitive answer): Would it be possible to add an autofocus fade, or a focus delay? I've always been a reshade guy myself, and it's the one thing I still envy about ENB users; it's being able to have a good auto-focus dof. With reshade, I have to choose between a fixed dof, or an instant autofocus that is often quite distracting.
I've inquired about this topic before, and the answer seemed to be that it was possible (?). I was referred to this link reshade.me/forum/shader-discussion/69-ac...-frames?limitstart=0 but unfortunately, I'm new at this, and I don't understand much of it.
Would a slower focus even be possible?
I think it would be possible if you stored the data of the last focus distance in texture - as for all i know textures are the only data you can keep till the next frame render - that's how an easy motionblur is made - using the stored frame from before - why not store the focus distance in a few pixels of a small workaround texture.
Now from a different barrel:
I went again and raped your brilliant coede once more Marty, and added some fancyness to Assasin's Creed Rogue's flora rendering - tell me what you think
And full album Here
Please Log in or Create an account to join the conversation.
- Marty McFly
- Topic Author
Please Log in or Create an account to join the conversation.
- NotWorthy
Marty McFly wrote: Wtf one can edit the shaders of this game?
Just Reshade
The DepthBuffer becomes blank when you have the (absolute must) HUD minimap on, which sucks cause i can't use your wonderful MXAO -
Then i fiddled with your ADOF replacing the depth calculation data with a raw mask that made the bokeh work around the playfield minus the hud which i excluded with my mighty manual photoshop skills, like so:
Then it Hit me = why not use this POWER of selective bokehing and make some cool effect on a specific area - and my choice was the flora - so i isolated anything intensly green to a seperate texture/sampler, leaving everything else black, applied your (amaizingly) fast Dof shader on it with a negative fADOF_ShapeCurvatureAmount so it would look like little stars - and added that to the base image, and presto - fuzzy greenhouse in a game which graphics are past their prime while still retaining above 50fps.
It's a lucky thing the game uses little if any green on anything other than the grass and trees, i rarely see my fuzzy bokeh leaves showing up on soldier uniforms (RARELY!).
All thanks to your ingenious work Marty - keep up the good job - and as long as i have you - is the new MXAO with the skylighting up for grabs anywhere - i love what i see in the demo pics.
P.S. I'm no pro when it comes to graphical coding and it boggles my mind and i'm too stupid to read it from the code - how do you manage to draw such crisp shapes or even texture instances in response to one pixel mathing the requirements to trigger drawing something that extends the scope of just that one position - the shader goes pixel by pixel - and all the data about what to do with that pixel has to come from the pixels point of view, so how for example a pixel knows to be the lower-right corner of a bokeh 64x64 mask if the pixel that decided that there should be a bokeh mask (because it was bright enough) was -32 x -32 away? Do you really have to make an outgrowing loop checking all pixels in the maximu radius or is there another trick to it? Thanks in reply for the answer.
Please Log in or Create an account to join the conversation.
- Akeley
I`m currently trying to use ADoF in Skyrim SE and would greatly appreciate help (or at least an explanation) - regarding some issues I`m having.
I`m a DoF fanatic, but also a weirdo: I prefer the static one instead of autofocusing. Up till now I was using Static Mode in Dynavision mod in old Skyrim - it wasn`t pretty but it kinda worked for me. But now I migrated to Special Edition and also tried some ENBs for the first time. This led me to ENB`s version of ADoF - its quality blew my mind, sadly ENB for SE seems to have a heavy hit on fps even before enabling any fx. So I did some more searching and ended up here.
Standalone ADoF for ReShade seems just what doctor`s ordered for my predicament - it`s amazing and easy on fps. I hit some snags, however:
- I tried the Autofocus On first. Not my favourite method, but what the hell, this ADoF is so beautiful that I could live with it. However while it`s all good when looking at some big solid objects or ground,/walls/etc things go awry when focusing on stuff like trees or barriers or other kinda "see through" objects- an intolerable flicker kicks in and spoils the mood. I guess it has something to do with autofocus detection, however a huge amount of value tweaking didn`t help to resolve it. I wonder if this is an unavoidable issue or am I just doing something wrong?
-after this I tried Autofocus Off, with hope of achieving that aforementioned Static DoF effect (distant blur which gradually clears as you approach). This ended up in complete failure despite spending again huge amount of time trying different values. Most of the time everything was just blurred far/near and the best I managed was a state where far objects are clear but get blurred as I approach them. Which is exactly opposite of my intentions
I`m in a sort of despair mode at the moment - can`t live without this ADoF thingy anymore and can`t play with it because of the above issues. I sincerely hope this is just because of me being a complete noob who`s just stumbling in the dark changing some parameters. But even if this is how things are and there`s no easy solution I would also appreciate an explanation, so I could just move on and stop fiddling with the config in vain hope of fixing it (and contemplate the brute-force solution: buying a 1080 and moving to ENB
For the record: I installed ReShade 3.05 for Skyrim SE then downloaded the ADoF package from page 1 of this thread and moved the files to SE/ReShade dir. I`m on Win 8.1 x64, i7 2600K and 980 Ti.
Please Log in or Create an account to join the conversation.
- Marty McFly
- Topic Author
Please Log in or Create an account to join the conversation.
- OtisInf
Bokeh curve set to minimum: almost no bleed from the in-focus ball into the black background (but there's still bleed but it's very minor)
Bokeh curve set to 15: this amplifies the thing I was talking about: the bleed of in-focus pixels into the blurred background: the in-focus pixels of the ball bleed into the background, which shouldn't happen, as they're in-focus.
Of course here, a bokeh of 15 is hideous, but I just chose it to make the effect show.
I think a masking is required when applying the bokeh pass for in-focus pixels so they're excluded but not sure whether this is already done or not.
Please Log in or Create an account to join the conversation.
- OtisInf
In the Reshade 'settings' tab, at the 'preprocessor' part, be sure to specify 1 for logarithmic depth buffer and 1 for inversed depth buffer. (the logarithmic part I'm certain of, the inversed part, pretty certain).
Please Log in or Create an account to join the conversation.
- Marty McFly
- Topic Author
Please Log in or Create an account to join the conversation.
- OtisInf
As I have no idea how bokeh is implemented I don't know what could be done about this. It is a shame really as the rest of the DoF is perfect and for screenshots this 'halo' effect is quite jarring at times, even with a small bokeh curve value (so the 'solution' is to set to 0 but you then lose all bokeh! )
Please Log in or Create an account to join the conversation.
- Marty McFly
- Topic Author
EDIT: So I've made some research. Without premultiplying, masking is very hard to do, for the sole reason that the shader simply doesn't react the way it should. You can multiply the focus areas with 0 and still get bleeding.
I've ported and reworked ADOF on Skyrim SE ENB, issue applies there as well. See here:
This is GP masking with my bokeh weighting at 10. Heavy bleeding.
abload.de/img/screenshot130ofssd.png
This is the masking of ReShade ADOF (almost 1:1 same to GP but discards more pixels). Less bleeding.
abload.de/img/screenshot131fas47.png
This is the masking of ReShade ADOF + when writing CoC to alpha channel before bokeh blur, I use interpolated minimum z of 4 samples, half a pixel offset to center texel.
Still a tiny bit bleeding at the lower part of the bow.
abload.de/img/screenshot1325gsaj.png
This is my newest masking without interpolated minimum z of 4 samples. A bit more bleeding.
abload.de/img/screenshot133v2s1k.png
Finally, my newest masking + the interpolated minimum z of 4 samples. Bleeding gone for good.
abload.de/img/screenshot134u5sp4.png
Please Log in or Create an account to join the conversation.
- OtisInf
Please Log in or Create an account to join the conversation.
- piltrafus
I've sent you some tokens to help you in your quest to find a new core for your machine. I hope you'll get all you need in no time.
Now, If you ever find the motivation I would greatly appreciate if you could port the last version of this advanced DOF back into reshade. I believe the latest advances where introduced in the ENB version. I'll love to get the version with the bokeh color bleed issue corrected.
Thanks a lot and good luck with the chip.
Please Log in or Create an account to join the conversation.
- Marty McFly
- Topic Author
Please Log in or Create an account to join the conversation.
- hunt1hunt
Please Log in or Create an account to join the conversation.
- Marty McFly
- Topic Author
Please Log in or Create an account to join the conversation.
- B4rr3l
Please Log in or Create an account to join the conversation.
- NattyDread
I was wondering why my DoF looked jaggy at times and then remembered that we had this option in Reshade 2.
Please Log in or Create an account to join the conversation.
- Marty McFly
- Topic Author
Please Log in or Create an account to join the conversation.