Grand Theft Auto IV DOF problem [ReShade 2.0.3f1]
- Kubo
- Topic Author
Less
More
7 years 11 months ago - 7 years 11 months ago #1
by Kubo
Grand Theft Auto IV DOF problem [ReShade 2.0.3f1] was created by Kubo
Hi, i have a problem with autofocus, seems make dof stop working.
I'm working on my graphics mod for a few months, and before 2.0 came out i was using 1.1.
In v1.1 dof and autofocus work great. I'm reading some topics about dof problems but no one solve mine.
So, dof works, but when i set autofocus=1 seems not working anymore, some examples:
#1
#2
#3
This is my dof setting (it's a "just for test if it works" setting):
#define USE_DEPTHOFFIELD 1 //[DOF] //-
//>Global Parameters<\\
#define DOF_METHOD 4 //[1:5] //-1: Ring DOF(Petka/martinsh) 2: Magic DOF 3: GP65CJ042 DOF 4: Matso DOF 5: Marty McFly Advanced DOF
#define DOF_AUTOFOCUS 1 //[0:1] //-Enables automated focus recognition based on samples around autofocus center.
#define DOF_MOUSEDRIVEN_AF 0 //[0:1] //-Enables mouse driven auto-focus. If 1 the AF focus point is read from the mouse coordinates, otherwise the DOF_FOCUSPOINT is used.
#define DOF_FOCUSPOINT float2(0.5,0.5) //[0.0:1.0] //-X and Y coordinates of autofocus center. Axes start from upper left screen corner.
#define DOF_FOCUSSAMPLES 6 //[3:10] //-Amount of samples around the focus point for smoother focal plane detection.
#define DOF_FOCUSRADIUS 0.05 //[0.02:0.20] //-Radius of samples around the focus point.
#define DOF_NEARBLURCURVE 0.50 //[0.50:1000.00] //-Curve of blur closer than focal plane. Higher means less blur.
#define DOF_FARBLURCURVE 0.05 //[0.05:5.00] //-Curve of blur behind focal plane. Higher means less blur.
#define DOF_MANUALFOCUSDEPTH 0.02 //[0.00:1.00] //-Depth of focal plane when autofocus is off. 0.0 means camera, 1.0 means infinite distance.
#define DOF_INFINITEFOCUS 1.00 //[0.01:1.00] //-Distance at which depth is considered as infinite. 1.0 is standard. Low values only produce out of focus blur when focus object is very close to the camera. Recommended for gaming.
#define DOF_BLURRADIUS 15.0 //[2.0:100.0] //-Maximal blur radius in pixels.
#define DOF_RENDERRESMULT 1.0 //[0.5:1.0] //-Scaling factor
#define DOF_ToggleKey RESHADE_TOGGLE_KEY //[undef] //-
//>MATSO DOF Settings<\\
#define bMatsoDOFChromaEnable 1 //[0:1] //-Enables Chromatic Abberation.
#define bMatsoDOFBokehEnable 1 //[0:1] //-Enables Bokeh weighting do define bright light spots and increase bokeh shape definiton.
#define fMatsoDOFChromaPow 1.4 //[0.2:3.0] //-Amount of chromatic abberation color shifting.
#define fMatsoDOFBokehCurve 1.0 //[0.5:20.0] //-Bokeh curve.
#define fMatsoDOFBokehLight 0.012 //[0.000:2.000] //-Bokeh brightening factor.
#define iMatsoDOFBokehQuality 2 //[1:10] //-Blur quality as control value over tap count.
#define fMatsoDOFBokehAngle 0 //[0:360] //-Rotation angle of bokeh shape.
And this my global.cfg setting:
#define RESHADE_PRESET GTA_IV
//>User<\\
#define RESHADE_START_ENABLED 1 //[0:1] //-Controls whether to start with effects on or off.
#define RESHADE_SCREENSHOT_KEY VK_SNAPSHOT //[undef] //-Sets the key for taking screenshots. Default is the PrintScreen key.
#define RESHADE_SCREENSHOT_FORMAT png //[undef] //-Sets the screenshot image format.
#define RESHADE_TOGGLE_KEY VK_SCROLL //[undef] //-Sets the global key to toggle effects on and off.
//>User Interface<\\
#define RESHADE_SHOW_FPS 0 //[0:1] //-Controls the display of a simple FPS counter.
#define RESHADE_SHOW_CLOCK 0 //[0:1] //-Controls the display of a simple realtime clock.
#define RESHADE_SHOW_STATISTICS 0 //[0:1] //-Controls the display of the detailed developer statistics.
#define RESHADE_SHOW_TOGGLE_MESSAGES 0 //[0:1] //-Controls the display of an info message when the toggle key is pressed.
//>Depth Settings<\\
#define RESHADE_DEPTH_LINEARIZATION 1 //[0:1] //-Set this to zero for games without depth buffer access or if you do not use any depth dependent effects.
#define RESHADE_DEPTH_LINEARIZATION_FAR_PLANE 1000.0 //[0.0:100000.0] //-The far clipping plane distance.
#define RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN 0 //[0:1] //-Set this to one for games where the depth buffer is upside down.
#define RESHADE_DEPTH_INPUT_IS_REVERSED 1 //[0:1] //-Set this to one for games using a reversed depth buffer.
#define RESHADE_DEPTH_INPUT_IS_LOGARITHMIC 1 //[0:1] //-Set this to one for games using a logarithmic depth buffer.
Sorry for my bad english and thanks in advance for replies:)
I take this opportunity to congratulate crosire, ganossa and others for their work.
I'm working on my graphics mod for a few months, and before 2.0 came out i was using 1.1.
In v1.1 dof and autofocus work great. I'm reading some topics about dof problems but no one solve mine.
So, dof works, but when i set autofocus=1 seems not working anymore, some examples:
#1
#2
#3
This is my dof setting (it's a "just for test if it works" setting):
Warning: Spoiler!
#define USE_DEPTHOFFIELD 1 //[DOF] //-
//>Global Parameters<\\
#define DOF_METHOD 4 //[1:5] //-1: Ring DOF(Petka/martinsh) 2: Magic DOF 3: GP65CJ042 DOF 4: Matso DOF 5: Marty McFly Advanced DOF
#define DOF_AUTOFOCUS 1 //[0:1] //-Enables automated focus recognition based on samples around autofocus center.
#define DOF_MOUSEDRIVEN_AF 0 //[0:1] //-Enables mouse driven auto-focus. If 1 the AF focus point is read from the mouse coordinates, otherwise the DOF_FOCUSPOINT is used.
#define DOF_FOCUSPOINT float2(0.5,0.5) //[0.0:1.0] //-X and Y coordinates of autofocus center. Axes start from upper left screen corner.
#define DOF_FOCUSSAMPLES 6 //[3:10] //-Amount of samples around the focus point for smoother focal plane detection.
#define DOF_FOCUSRADIUS 0.05 //[0.02:0.20] //-Radius of samples around the focus point.
#define DOF_NEARBLURCURVE 0.50 //[0.50:1000.00] //-Curve of blur closer than focal plane. Higher means less blur.
#define DOF_FARBLURCURVE 0.05 //[0.05:5.00] //-Curve of blur behind focal plane. Higher means less blur.
#define DOF_MANUALFOCUSDEPTH 0.02 //[0.00:1.00] //-Depth of focal plane when autofocus is off. 0.0 means camera, 1.0 means infinite distance.
#define DOF_INFINITEFOCUS 1.00 //[0.01:1.00] //-Distance at which depth is considered as infinite. 1.0 is standard. Low values only produce out of focus blur when focus object is very close to the camera. Recommended for gaming.
#define DOF_BLURRADIUS 15.0 //[2.0:100.0] //-Maximal blur radius in pixels.
#define DOF_RENDERRESMULT 1.0 //[0.5:1.0] //-Scaling factor
#define DOF_ToggleKey RESHADE_TOGGLE_KEY //[undef] //-
//>MATSO DOF Settings<\\
#define bMatsoDOFChromaEnable 1 //[0:1] //-Enables Chromatic Abberation.
#define bMatsoDOFBokehEnable 1 //[0:1] //-Enables Bokeh weighting do define bright light spots and increase bokeh shape definiton.
#define fMatsoDOFChromaPow 1.4 //[0.2:3.0] //-Amount of chromatic abberation color shifting.
#define fMatsoDOFBokehCurve 1.0 //[0.5:20.0] //-Bokeh curve.
#define fMatsoDOFBokehLight 0.012 //[0.000:2.000] //-Bokeh brightening factor.
#define iMatsoDOFBokehQuality 2 //[1:10] //-Blur quality as control value over tap count.
#define fMatsoDOFBokehAngle 0 //[0:360] //-Rotation angle of bokeh shape.
And this my global.cfg setting:
Warning: Spoiler!
#define RESHADE_PRESET GTA_IV
//>User<\\
#define RESHADE_START_ENABLED 1 //[0:1] //-Controls whether to start with effects on or off.
#define RESHADE_SCREENSHOT_KEY VK_SNAPSHOT //[undef] //-Sets the key for taking screenshots. Default is the PrintScreen key.
#define RESHADE_SCREENSHOT_FORMAT png //[undef] //-Sets the screenshot image format.
#define RESHADE_TOGGLE_KEY VK_SCROLL //[undef] //-Sets the global key to toggle effects on and off.
//>User Interface<\\
#define RESHADE_SHOW_FPS 0 //[0:1] //-Controls the display of a simple FPS counter.
#define RESHADE_SHOW_CLOCK 0 //[0:1] //-Controls the display of a simple realtime clock.
#define RESHADE_SHOW_STATISTICS 0 //[0:1] //-Controls the display of the detailed developer statistics.
#define RESHADE_SHOW_TOGGLE_MESSAGES 0 //[0:1] //-Controls the display of an info message when the toggle key is pressed.
//>Depth Settings<\\
#define RESHADE_DEPTH_LINEARIZATION 1 //[0:1] //-Set this to zero for games without depth buffer access or if you do not use any depth dependent effects.
#define RESHADE_DEPTH_LINEARIZATION_FAR_PLANE 1000.0 //[0.0:100000.0] //-The far clipping plane distance.
#define RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN 0 //[0:1] //-Set this to one for games where the depth buffer is upside down.
#define RESHADE_DEPTH_INPUT_IS_REVERSED 1 //[0:1] //-Set this to one for games using a reversed depth buffer.
#define RESHADE_DEPTH_INPUT_IS_LOGARITHMIC 1 //[0:1] //-Set this to one for games using a logarithmic depth buffer.
Sorry for my bad english and thanks in advance for replies:)
I take this opportunity to congratulate crosire, ganossa and others for their work.
Last edit: 7 years 11 months ago by Kubo.
Please Log in or Create an account to join the conversation.
- Marty McFly
Less
More
7 years 11 months ago #2
by Marty McFly
Replied by Marty McFly on topic Grand Theft Auto IV DOF problem [ReShade 2.0.3f1]
#define DOF_FARBLURCURVE 0.05 //[0.05:5.00] //-Curve of blur behind focal plane. Higher means less blur.
#define DOF_MANUALFOCUSDEPTH 0.02 //[0.00:1.00] //-Depth of focal plane when autofocus is off. 0.0 means camera, 1.0 means infinite distance.
Issue right there. Such a low far blur curve makes blur build up almost instantly to maximum behind focal plane. And the second value ensures that the focus depth is almost at the camera itself so you have a sharp area until like 20cm from the camera away and then blur kicks in with almost instantly full power.
The following user(s) said Thank You: Kubo
Please Log in or Create an account to join the conversation.
- Kubo
- Topic Author
Less
More
7 years 11 months ago - 7 years 11 months ago #3
by Kubo
Replied by Kubo on topic Grand Theft Auto IV DOF problem [ReShade 2.0.3f1]
Thanks for reply. My problem is when autofocus is on, why the image is not blurred anymore? Or at least blurred behind the focus?
Also putting "RESHADE_DEPTH_INPUT_IS_REVERSED" and "RESHADE_DEPTH_INPUT_IS_LOGARITHMIC" to 1 autofocus seems not working:/
In v1.1 it worked perfectly.
Also putting "RESHADE_DEPTH_INPUT_IS_REVERSED" and "RESHADE_DEPTH_INPUT_IS_LOGARITHMIC" to 1 autofocus seems not working:/
In v1.1 it worked perfectly.
Last edit: 7 years 11 months ago by Kubo.
Please Log in or Create an account to join the conversation.
- Marty McFly
Less
More
7 years 11 months ago #4
by Marty McFly
Replied by Marty McFly on topic Grand Theft Auto IV DOF problem [ReShade 2.0.3f1]
Changes (not by me) in linearizing depth algorithm. Enable depth buffer output and try to tweak the depth buffer values until you have a smooth gradient from black (close) to white (far).
The following user(s) said Thank You: Kubo
Please Log in or Create an account to join the conversation.
- Kubo
- Topic Author
Less
More
7 years 11 months ago #5
by Kubo
Replied by Kubo on topic Grand Theft Auto IV DOF problem [ReShade 2.0.3f1]
In DisplayDepth there are no values, with "depth buffer values" you mean "RESHADE_DEPTH_LINEARIZATION_FAR_PLANE" in global.cfg?
For now my screen is fully black with DisplayDepth enabled.
For now my screen is fully black with DisplayDepth enabled.
Please Log in or Create an account to join the conversation.
- kurtferro
Less
More
7 years 11 months ago #6
by kurtferro
Replied by kurtferro on topic Grand Theft Auto IV DOF problem [ReShade 2.0.3f1]
//>Depth Settings<\\
#define RESHADE_DEPTH_LINEARIZATION 1 //[0:1] //-Set this to zero for games without depth buffer access or if you do not use any depth dependent effects.
#define RESHADE_DEPTH_LINEARIZATION_FAR_PLANE 1000.0 //[0.0:100000.0] //-The far clipping plane distance.
#define RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN 0 //[0:1] //-Set this to one for games where the depth buffer is upside down.
#define RESHADE_DEPTH_INPUT_IS_REVERSED 0 //[0:1] //-Set this to one for games using a reversed depth buffer.
#define RESHADE_DEPTH_INPUT_IS_LOGARITHMIC 0 //[0:1] //-Set this to one for games using a logarithmic depth buffer.
in Global.cfg test all option
#define RESHADE_DEPTH_LINEARIZATION 1 //[0:1] //-Set this to zero for games without depth buffer access or if you do not use any depth dependent effects.
#define RESHADE_DEPTH_LINEARIZATION_FAR_PLANE 1000.0 //[0.0:100000.0] //-The far clipping plane distance.
#define RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN 0 //[0:1] //-Set this to one for games where the depth buffer is upside down.
#define RESHADE_DEPTH_INPUT_IS_REVERSED 0 //[0:1] //-Set this to one for games using a reversed depth buffer.
#define RESHADE_DEPTH_INPUT_IS_LOGARITHMIC 0 //[0:1] //-Set this to one for games using a logarithmic depth buffer.
in Global.cfg test all option
The following user(s) said Thank You: Kubo
Please Log in or Create an account to join the conversation.
- Kubo
- Topic Author
Less
More
7 years 11 months ago #7
by Kubo
Replied by Kubo on topic Grand Theft Auto IV DOF problem [ReShade 2.0.3f1]
Ty, i'll try
Please Log in or Create an account to join the conversation.
- SiriusHours
Less
More
7 years 7 months ago #8
by SiriusHours
Replied by SiriusHours on topic Grand Theft Auto IV DOF problem [ReShade 2.0.3f1]
you still having issues?
Please Log in or Create an account to join the conversation.