[SOLVED] MasterEffect Tilt Shift ignores Depth Buffer?

  • Posts: 3
5 years 4 months ago #1 by utz
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).

Please Log in or Create an account to join the conversation.

  • Posts: 3723
5 years 4 months ago #2 by crosire
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.

Please Log in or Create an account to join the conversation.

  • Posts: 3
5 years 4 months ago #3 by utz
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.

Please Log in or Create an account to join the conversation.

  • Posts: 3723
5 years 4 months ago #4 by crosire
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.
The following user(s) said Thank You: utz

Please Log in or Create an account to join the conversation.