Marty McFly's Advanced Depth of Field (standalone)

  • Elimina
More
8 years 1 month ago - 8 years 1 month ago #61 by Elimina Replied by Elimina on topic Marty McFly's Advanced Depth of Field (standalone)

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
Last edit: 8 years 1 month ago by Elimina.
The following user(s) said Thank You: GTAFan

Please Log in or Create an account to join the conversation.

  • themaxmeister
More
8 years 1 month ago #62 by themaxmeister Replied by themaxmeister on topic Marty McFly's Advanced Depth of Field (standalone)
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?

Please Log in or Create an account to join the conversation.

  • NotWorthy
More
7 years 7 months ago - 7 years 7 months ago #63 by NotWorthy Replied by NotWorthy on topic Marty McFly's Advanced Depth of Field (standalone)

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
Last edit: 7 years 7 months ago by NotWorthy.

Please Log in or Create an account to join the conversation.

  • Marty McFly
  • Topic Author
More
7 years 7 months ago #64 by Marty McFly Replied by Marty McFly on topic Marty McFly's Advanced Depth of Field (standalone)
Wtf one can edit the shaders of this game?

Please Log in or Create an account to join the conversation.

  • NotWorthy
More
7 years 6 months ago #65 by NotWorthy Replied by NotWorthy on topic Marty McFly's Advanced Depth of Field (standalone)

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.
The following user(s) said Thank You: SiriusHours

Please Log in or Create an account to join the conversation.

  • Akeley
More
7 years 4 months ago #66 by Akeley Replied by Akeley on topic Marty McFly's Advanced Depth of Field (standalone)
Hello everybody, new poster/ReShader here

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
More
7 years 4 months ago #67 by Marty McFly Replied by Marty McFly on topic Marty McFly's Advanced Depth of Field (standalone)
Hmm I see. Autofocus works even when depth buffer input is not ideal and I remember that I had to change quite some things (in preprocessor, not in code) for manual focus to work as expected. In the ReShade UI in the pre processor section, put the far plane to 10000 or higher. Then (dof) set infinitefocus to 1.0, manual focus depth to say 0.3, near blur curve to 1000.0. Now only areas in the distance should be blurred. Tweak blur radius and far blur curve as you see fit.

Please Log in or Create an account to join the conversation.

  • OtisInf
More
7 years 4 months ago #68 by OtisInf Replied by OtisInf on topic Marty McFly's Advanced Depth of Field (standalone)
Hey Marty, you asked me to reply here about the bokeh blur bleed, so here it is :) I made two screenshots. (3.0.5, shader downloaded through reshade from repo)

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
More
7 years 4 months ago #69 by OtisInf Replied by OtisInf on topic Marty McFly's Advanced Depth of Field (standalone)
@Akeley:
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
More
7 years 4 months ago - 7 years 4 months ago #70 by Marty McFly Replied by Marty McFly on topic Marty McFly's Advanced Depth of Field (standalone)
Well, leak cannot be fully reduced, mostly because color channel is antialiased and depth one is not, so there are tiiiiny differences, those show up for insane values in bokeh curve. And as this ball is very close to the camera, it might be that the outer area is slightly out of focus as well because the closer the focus is to the camera, the smaller the focus range. So you're focusing the center of the ball but the outer area of it is slightly behind. One tradeoff of a focusing that doesn't have a focus area but one infinitely small focus range.
Last edit: 7 years 4 months ago by Marty McFly.

Please Log in or Create an account to join the conversation.

  • OtisInf
More
7 years 4 months ago #71 by OtisInf Replied by OtisInf on topic Marty McFly's Advanced Depth of Field (standalone)
I thought of that, the thing is that the matso DoF has this same problem but the gp65cj042 one absolutely not. Bokeh in these is completely different, but they share the same CoC calculations, if I'm not mistaken.

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
More
7 years 4 months ago - 7 years 4 months ago #72 by Marty McFly Replied by Marty McFly on topic Marty McFly's Advanced Depth of Field (standalone)
The thing is, my DoF uses the exact same masking as GP DOF. Even stronger actually. I suppose the way GP makes the highlights (amplifying everything above a threshold) stand out is ideal for hiding bleeding, idk.

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
Last edit: 7 years 4 months ago by Marty McFly.
The following user(s) said Thank You: piltrafus, OtisInf

Please Log in or Create an account to join the conversation.

  • OtisInf
More
7 years 4 months ago #73 by OtisInf Replied by OtisInf on topic Marty McFly's Advanced Depth of Field (standalone)
That last one is great and exactly what I was after :)! The newest masking bits, they're only in the ENB dof version?

Please Log in or Create an account to join the conversation.

  • piltrafus
More
7 years 3 months ago #74 by piltrafus Replied by piltrafus on topic Marty McFly's Advanced Depth of Field (standalone)
Dear Mr McFly,
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.
The following user(s) said Thank You: Marty McFly

Please Log in or Create an account to join the conversation.

  • Marty McFly
  • Topic Author
More
7 years 3 months ago #75 by Marty McFly Replied by Marty McFly on topic Marty McFly's Advanced Depth of Field (standalone)
Thanks for your support! Requested has been noted, I'll get to it as soon as I'm up and running again ;)

Please Log in or Create an account to join the conversation.

  • hunt1hunt
More
7 years 2 months ago - 7 years 2 months ago #76 by hunt1hunt Replied by hunt1hunt on topic Marty McFly's Advanced Depth of Field (standalone)
Thanks a lot Marty;how to make a water reflection shader in reshade3.0?real want to follow you to study......just like you have do in mmge3.0 :P :P
Last edit: 7 years 2 months ago by hunt1hunt.

Please Log in or Create an account to join the conversation.

  • Marty McFly
  • Topic Author
More
7 years 2 months ago #77 by Marty McFly Replied by Marty McFly on topic Marty McFly's Advanced Depth of Field (standalone)
There is a lot of data to use on ENB which is not available on ReShade.

Please Log in or Create an account to join the conversation.

  • B4rr3l
More
6 years 10 months ago #78 by B4rr3l Replied by B4rr3l on topic Marty McFly's Advanced Depth of Field (standalone)
I'm having dreams of this beauty working in BF2 as it should :(

Please Log in or Create an account to join the conversation.

  • NattyDread
More
6 years 10 months ago - 6 years 10 months ago #79 by NattyDread Replied by NattyDread on topic Marty McFly's Advanced Depth of Field (standalone)
Marty can you expose #define DOF_RENDERRESMULT somewhere in the UI? I realize it requires a reload to update but maybe it can be mentioned in the tooltip.

I was wondering why my DoF looked jaggy at times and then remembered that we had this option in Reshade 2.
Last edit: 6 years 10 months ago by NattyDread.

Please Log in or Create an account to join the conversation.

  • Marty McFly
  • Topic Author
More
6 years 10 months ago - 6 years 10 months ago #80 by Marty McFly Replied by Marty McFly on topic Marty McFly's Advanced Depth of Field (standalone)
You're referring to the github version, right? Well, that one is an ugly copytogether of this one, Matso's and the rest which was not done by me so I'm unsure what's going on in that file. Need to rework the stuff at some point anyways, did a lot of cool updates on the ENBSeries version of ADoF.
Last edit: 6 years 10 months ago by Marty McFly.

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.