Help! How to create this effect DOF in enb?

  • Author
  • Message
Offline
Posts: 8
Joined: 15 Jun 2017, 04:53

Help! How to create this effect DOF in enb?

Hi! I'm very interested how to create DOF effect as on this screenshot? The effect itself was made in Reshade, with the help of Matso DOF. Is it possible to repeat it in ENB? And How?
Image

I also want to ask, let's say I want to make the background white, fill it with white, and ahead is my character outside the fill. Is it possible to do this at the ENB? And How?

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

Re: Help! How to create this effect DOF in enb?

ENBSeries many years only exclusive for certain games, so you can't do anything with it for Tomb Raider or any other game which not supported. In case of supported games, yes you can, with knoledge of course only and by yourself, because community here is not helpful about things which can't be popular. There is a depth buffer and via it you can make a mask of any kind for any objects which far than certain range. Or if image is static, you can capture depth, reload is as modified texture and mask such depth. In Skyrim mod you can by mouse position pick depth and apply mask by it's value. And again, these all require knowledge and for any help you need to provide a lot of details at least, but nobody guarantee any help, as you can see forum is almost empty and i am lazy or busy.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
Posts: 8
Joined: 15 Jun 2017, 04:53

Re: Help! How to create this effect DOF in enb?

ENBSeries wrote:ENBSeries many years only exclusive for certain games, so you can't do anything with it for Tomb Raider or any other game which not supported. In case of supported games, yes you can, with knoledge of course only and by yourself, because community here is not helpful about things which can't be popular. There is a depth buffer and via it you can make a mask of any kind for any objects which far than certain range. Or if image is static, you can capture depth, reload is as modified texture and mask such depth. In Skyrim mod you can by mouse position pick depth and apply mask by it's value. And again, these all require knowledge and for any help you need to provide a lot of details at least, but nobody guarantee any help, as you can see forum is almost empty and i am lazy or busy.
I'm not talking about Tomb Raider. I gave an example of the effect of a bokeh shift. I want to implement it in Skyrim. I could install Reshade, but he doesn't work with the ENB. I achieved the white background effect using DOF noise, but unfortunately the background is only partly white. Noise does not fill all white. Unfortunately my knowledge is not too great. I just can make small adjustments, but no more.




Here are some examples of the effects that I want to create, I need any clues, I will be very grateful.(Sorry for big post)

Image
Image
Image
Last edited by Crotusus on 17 Jun 2017, 05:30, edited 2 times in total.

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

Re: Help! How to create this effect DOF in enb?

It's not hard, just need to find last function in pixel shader and before "return" in it set returned value to 1.0 when depth is bigger than certain value. Something like this:

Code: Select all

float	valdepth=tex2D(SamplerDepth, IN.txcoord.xy).x;
valdepth=1.0/(max(1.0-valdepth, 0.00000000001));
if (valdepth>tempF1.x) res.xyz=1.0; //white
return res;
and tweak temporary variable 1 by keys ('1' with pageup/pagedown) or in editor, to adjust distance by which depth is clipped and colors are white.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
Posts: 8
Joined: 15 Jun 2017, 04:53

Re: Help! How to create this effect DOF in enb?

ENBSeries wrote:It's not hard, just need to find last function in pixel shader and before "return" in it set returned value to 1.0 when depth is bigger than certain value. Something like this:

Code: Select all

float	valdepth=tex2D(SamplerDepth, IN.txcoord.xy).x;
valdepth=1.0/(max(1.0-valdepth, 0.00000000001));
if (valdepth>tempF1.x) res.xyz=1.0; //white
return res;
and tweak temporary variable 1 by keys ('1' with pageup/pagedown) or in editor, to adjust distance by which depth is clipped and colors are white.
Well, thanks, but about the shift DOF, do you have any ideas?(It's funny to talk a Russian person with a Russian person on English:D)

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

Re: Help! How to create this effect DOF in enb?

Simply grab dof shader, any of it, change direction of blurring to one only, that's all. I can't help better, because there are many shader files with dof and all are different and need changes individually. Can be tdirs, TexCoordOffset from what i see in one shader by Matso. Guess if changing this line:

Code: Select all

float2 tdirs[4] = { float2(1.0, 0.0), float2(0.0, 1.0), float2(0.707, 0.707), float2(-0.707, 0.707) };
To this one:

Code: Select all

float2 tdirs[4] = { float2(1.0, 0.0), float2(1.0, 0.0), float2(0.707, 0.0), float2(-0.707, 0.0 };
Will give horizontal blurring only
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
Posts: 8
Joined: 15 Jun 2017, 04:53

Re: Help! How to create this effect DOF in enb?

ENBSeries wrote:Simply grab dof shader, any of it, change direction of blurring to one only, that's all. I can't help better, because there are many shader files with dof and all are different and need changes individually. Can be tdirs, TexCoordOffset from what i see in one shader by Matso. Guess if changing this line:

Code: Select all

float2 tdirs[4] = { float2(1.0, 0.0), float2(0.0, 1.0), float2(0.707, 0.707), float2(-0.707, 0.707) };
To this one:

Code: Select all

float2 tdirs[4] = { float2(1.0, 0.0), float2(1.0, 0.0), float2(0.707, 0.0), float2(-0.707, 0.0 };
Will give horizontal blurring only
Hmm.. Grab DOF shader? Where from? In Enb there are no DOF shaders. And is it possible, if I take the file DOF.fx from Reshade and add it to the ENB? Or I will copy the necessary lines of DOF.fx and add them to the Enbeffectprepass.fx

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

Re: Help! How to create this effect DOF in enb?

I don't think ReShade code compatible in any way, it require a lot of coding to port it. Better find on Nexus existing enbeffectprepass.fx shaders of dof or here in effects section. I can give you one, but have no permission from Matso to do so. To make my own is wasting of time because others already exists
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
Posts: 8
Joined: 15 Jun 2017, 04:53

Re: Help! How to create this effect DOF in enb?

ENBSeries wrote:I don't think ReShade code compatible in any way, it require a lot of coding to port it. Better find on Nexus existing enbeffectprepass.fx shaders of dof or here in effects section. I can give you one, but have no permission from Matso to do so. To make my own is wasting of time because others already exists
I have enbeffectprepass.fx. I don't understand in which section to write your code.

Offline
User avatar
*sensei*
Posts: 341
Joined: 27 Dec 2011, 21:33
Location: Poland, Gdańsk

Re: Help! How to create this effect DOF in enb?

Use Marty McFly Skyrim\F4 DOF and change its aspect ratio and rotation in the in-game shader settings.

EDIT: Nevermind, the rotation doesn't actually rotate the image like that, it only rotates the pixels that are inside the bokeh shapes. But aspect ratio works for starters.
_________________
OS: Windows 10
CPU: AMD R5 3600
RAM: Corsair DDR4 16GB 3200MHz Vengeance
GPU: AMD Radeon 5700 XT
Sound Card: X-FI Titanium HD
Mobo: ASRock X370 Pro4
Monitor: M340CLZ 34" 3440x1440 100HZ AMD FREE Sync Curved Monitor
Post Reply