New optimized DOF code for K-ENB Extensive & Kountervibe

share shaders here
  • Author
  • Message
Offline
Posts: 16
Joined: 27 Jul 2013, 18:05

New optimized DOF code for K-ENB Extensive & Kountervibe

For testing.

New DOF code for K ENB Extensive & Kountervibe ENB Extensive (0.195 or higher).
Highly optimized.
Should be almost pixel-perfect with the original shaders (but much faster).



My mini-changelog for K ENB Extensive DOF code:
- Exposed MaxDepthOfFieldQuality parameter to GUI
- DOF quality can be decreased by EAdaptiveQualityFactor - optional, depends on enblocal.ini.
- DOF quality depends on discRadius variable - code uses dynamic branching, so if most pixels are in focus you get huge speed gain (and this is the most frequent scenario).
- Highly optimized code: average number of instructions per sample went down from 44 to 21 with much less pressure on transcendental instructions.


Future work:
- Better (more smooth and optimized) quality selection per blur radius.

http://www.arsil.user.icpnet.pl/downloa ... FA%201.zip
arsil "dot" user "dot" icpnet "dot" pl "slash" download "slash" enb-dof-optimized - ALFA 1 "dot" zip

My test scene (lot of grass, trees, etc.) (QUALITY 7):
- original code : 19.6 fps
- optimized code: 28.5 fps

Offline
User avatar
*blah-blah-blah maniac*
Posts: 1938
Joined: 05 Mar 2012, 02:08

Re: New optimized DOF code for K-ENB Extensive & Kountervibe

Weird that you haven't gotten any feedback on this :|
Will try it out and compare it to the original code and see how it works ;)

Offline
User avatar
*master*
Posts: 128
Joined: 01 Apr 2012, 09:44

Re: New optimized DOF code for K-ENB Extensive & Kountervibe

What code do i need to use this DOF with other ENB's, if thats even possible? (aka stuff in enbeffect.fx)
_________________
"Jon Battle-Born: You know whats wrong with Skyrim these days? Everyone is obsessed with breasts"

Offline
Posts: 16
Joined: 27 Jul 2013, 18:05

Re: New optimized DOF code for K-ENB Extensive & Kountervibe

JawZ
Thanks! Looking forward to receiving your feedback
Normally I would PM Oyama, but I can't due to my user level on this forum

Samurai_Smartie
Sorry, can't help you. I am not an expert on various ENB presets. I can only guess, that "enbeffectprepass.fx" is pretty interchangeable.
_________________
Intel i7-3770K, 16 GB RAM, Geforce 770 OC 4GB, 256 GB SSD 840 Pro, Asus XONAR DSX, Dell U2711, Win8 Pro 64-bit

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17559
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: New optimized DOF code for K-ENB Extensive & Kountervibe

Samurai_Smartie
enbeffectprepass.fx shader is compatible with most versions, but if you use very old which don't have support of this file, then it will be tricky to convert and definetly impossible without knowledge of shader programming.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

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

Re: New optimized DOF code for K-ENB Extensive & Kountervibe

What does adaptive quality do?
_________________
i5-6600k -- Nvidia GTX 970 -- 16Gb ram @3200mhz

Offline
User avatar
*blah-blah-blah maniac*
Posts: 1938
Joined: 05 Mar 2012, 02:08

Re: New optimized DOF code for K-ENB Extensive & Kountervibe

arsil;

It takes a bit of more time than I thought to actually try this :P But will do so now and include a bit of info on this in the Guide I'm putting together, yet again.
You could try reaching him over at the nexus until such time that you can PM him here, though now he is off taking car off of personal stuff out in the real world.


evok99;

Exactly what the words says it does, it adapts the quality based on your settings and performance. Haven't tried it yet so unsure if it changes quality by performance or just by the Quality setting in the enblocal.ini file.

Offline
Posts: 16
Joined: 27 Jul 2013, 18:05

Re: New optimized DOF code for K-ENB Extensive & Kountervibe

--JawZ-- wrote: It takes a bit of more time than I thought to actually try this :P But will do so now and include a bit of info on this in the Guide I'm putting together, yet again.
You could try reaching him over at the nexus until such time that you can PM him here, though now he is off taking car off of personal stuff out in the real world.
No worry:) I think Boris gave me required rights, so I can PM him. I just haven't had enough time for a couple of days:(
--JawZ-- wrote: Haven't tried it yet so unsure if it changes quality by performance or just by the Quality setting in the enblocal.ini file.
It changes quality by how far the current FPS is from the desired one. By default it is disabled (in K-ENB & Kountervibe). I enabled it manually in my enblocal and it works. My modified shader drops various number of samples if FPS target is far from desired one. In most cases it should be almost invisible (especially on default DOF quality - 3).
_________________
Intel i7-3770K, 16 GB RAM, Geforce 770 OC 4GB, 256 GB SSD 840 Pro, Asus XONAR DSX, Dell U2711, Win8 Pro 64-bit

Offline
User avatar
*blah-blah-blah maniac*
Posts: 1938
Joined: 05 Mar 2012, 02:08

Re: New optimized DOF code for K-ENB Extensive & Kountervibe

Ah great, well I know the feeling.

Ah so I wasn't stretching when saying it was performance related, good to know :)

Offline
User avatar
*master*
Posts: 128
Joined: 01 Apr 2012, 09:44

Re: New optimized DOF code for K-ENB Extensive & Kountervibe

Been playing Dragonborn with this for a good 2 days, using static DOF and quality 1.
No problems to report, the rendering time is usually around 0.0020 seconds.

Theres a little bug with certain objects who seem to have wrong depth information.
Image
Image
Image

But i guess thats more a problem of the game asset than of the code.

/edit
coc DLC2ThirskMeadHallExterior01
_________________
"Jon Battle-Born: You know whats wrong with Skyrim these days? Everyone is obsessed with breasts"
Post Reply