Welcome, Guest.
Username: Password: Remember me

TOPIC: KOTOR II, depth of field does not work

KOTOR II, depth of field does not work 1 year 2 months ago #1

  • AndreyKva
  • AndreyKva's Avatar
  • Offline
  • My life is a macaroni dream.
  • Posts: 10
I'm using MasterEffect (the latest version) and the depth of field option doesn't work. The game has a depth buffer, and ambient occlusion works, but DoF strangely doesn't. Any ideas?

Some images:

MasterEffect with ReShade turned on, using the DoF settings at the bottom


Depth Buffer


Ambient occulation enabled


Some more details:
The game is 32-bit and uses OpenGL.
There are also some artifacts with the bloom that produce a weird, lens-flare looking effect, I will post pictures if asked.

My DOF settings:
/*==============================================================================*/
//DEPTH OF FIELD - GLOBAL PARAMETERS
#define DOF_METHOD 1 //[1 to 4] 1: Ring DOF(Petka/martinsh) 2: Magic DOF 3: GP65CJ042 DOF 4: Matso DOF
#define DOF_FOCUSPOINT float2(0.5,0.5) //[0.0 to 1.0] Screen coordinates of focus point. First value is horizontal, second value is vertical position. 0 is left/upper, 1 is right/lower.
#define DOF_NEARBLURCURVE 0.4 //[0.4 to X] Power of blur of closer-than-focus areas.
#define DOF_FARBLURCURVE 0.4 //[0.4 to X] Elementary, my dear Watson: Blur power of areas behind focus plane.
#define DOF_BLURRADIUS 5.0 //[5.0 to 50.0] Blur radius approximately in pixels. Radius, not diameter.
#define DOF_MANUALFOCUS 0 //[0 or 1] Enables manual focus.
#define DOF_MANUALFOCUSDEPTH 0.0 //[0.0 to 1.0] Manual focus depth. 0.0 means camera is focus plane, 1.0 means sky is focus plane.

//DEPTH OF FIELD - RING DOF
#define iRingDOFSamples 6 //[5 to 30] Samples on the first ring. The other rings around have more samples
#define iRingDOFRings 4 //[1 to 8] Ring count
#define fRingDOFThreshold 2.5 //[0.8 to 2.0] Threshold for bokeh brightening. Above this value, everything gets much much brighter. 1.0 is maximum value for LDR games like GTASA, higher values work only on HDR games like Skyrim etc.
#define fRingDOFGain 0.1 //[0.1 to 2.0] Amount of brightening for pixels brighter than threshold.
#define fRingDOFBias 0.2 //[0.1 to 2.0] bokeh bias.
#define fRingDOFFringe 0.0 //[0.0 to 1.0] Amount of chromatic abberation

Also, a bit off topic, but could someone suggest me a good ReShade preset? I have the one I'm using, which I pretty much made myself, but it is a bit bland and simplistic, and I'm getting tired of it.
My favorite film is G-Force.
Last Edit: 1 year 2 months ago by AndreyKva.
The administrator has disabled public write access.

KOTOR II, depth of field does not work 1 year 2 months ago #2

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2452
  • Thank you received: 1392
Try to lower your focus point to focus the character. Something like:
#define DOF_FOCUSPOINT float2(0.5,0.7)
Cheers, crosire =)
The administrator has disabled public write access.

KOTOR II, depth of field does not work 1 year 2 months ago #3

  • AndreyKva
  • AndreyKva's Avatar
  • Offline
  • My life is a macaroni dream.
  • Posts: 10
I tried that, it can't be it. The issue doesn't look like it lies with the focus point or anything, it's just that the Depth of Field simply doesn't work. I tried it with some DX11 and DX9 games, and the DoF works, but just in this game, it doesn't. Maybe it has something to do with OpenGL?
My favorite film is G-Force.
The administrator has disabled public write access.

KOTOR II, depth of field does not work 1 year 2 months ago #4

  • Kleio420
  • Kleio420's Avatar
  • Online
  • Posts: 216
  • Thank you received: 28
AndreyKva wrote:
I tried that, it can't be it. The issue doesn't look like it lies with the focus point or anything, it's just that the Depth of Field simply doesn't work. I tried it with some DX11 and DX9 games, and the DoF works, but just in this game, it doesn't. Maybe it has something to do with OpenGL?
i have never gotten AO to work fully let alone dof effect i think there is something up with the depth buffer in this game also remember the game uses msaa which i think is turned on by default
The administrator has disabled public write access.

KOTOR II, depth of field does not work 1 year 1 month ago #5

  • robgrab
  • robgrab's Avatar
  • Offline
  • Posts: 122
  • Thank you received: 21
It definitely works for me. I'm sure it's just a matter of tweaking your settings. Also make sure to disable AA.
The administrator has disabled public write access.

KOTOR II, depth of field does not work 1 year 1 month ago #6

I've been trying to get this to work too! I'm glad I'm not the only one.

Like you mentioned Andrey, Ambient Occlusion works wonders in this game. And the strange thing is that much earlier versions of reshade had working Depth of Field. There is a link on the Deadly Stream forums that you can click here to see an old build with working DoF.

I wonder what could have changed. Could it simply be the ordering of the shaders?
The administrator has disabled public write access.