Welcome, Guest.
Username: Password: Remember me

TOPIC: [SOLVED] MasterEffect Tilt Shift ignores Depth Buffer?

MasterEffect Tilt Shift ignores Depth Buffer? 1 year 11 months ago #1

  • utz
  • utz's Avatar
  • Offline
  • Posts: 3
  • Thank you received: 1
The depth buffer visualization shows the UI/HUD in black and the rest of the screen in white. So far so good. Unfortunately the tilt shift effect is applied to the whole image including the gui which makes it useless for playing.
Is this normal behaviour and how can I make it respect the depth buffer?

Game is Neverwinter Nights 2 (directx 9).
The administrator has disabled public write access.

MasterEffect Tilt Shift ignores Depth Buffer? 1 year 11 months ago #2

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2451
  • Thank you received: 1391
TiltShift does not make use of the depthbuffer.
And it showing the GUI is actually really bad, because it's supposed to show the depth information of the game scene.
Cheers, crosire =)
The administrator has disabled public write access.

MasterEffect Tilt Shift ignores Depth Buffer? 1 year 11 months ago #3

  • utz
  • utz's Avatar
  • Offline
  • Posts: 3
  • Thank you received: 1
Ok the depth buffer not showing the scene is a different problem.
Is there no quick fix to make tilt shift ignore the gui? If the depth buffer already recognizes it, isn't it possible to add a treshold where the tilt shift is applied? I'm not familiar with shader coding so excuse my ignorance.
The administrator has disabled public write access.

MasterEffect Tilt Shift ignores Depth Buffer? 1 year 11 months ago #4

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2451
  • Thank you received: 1391
Replace line 3378
color.a = TS_BlurAmount;
with
color.a = TS_BlurAmount * saturate(tex2D(SamplerDepth, IN.txcoord).x);

Be aware that this exploits the wrong depth information, will only work in this particular game and may not work anymore in future versions of ReShade.
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: utz