SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 02-26-13, 04:09 AM   #19
Echolot
Seasoned Skipper
 
Join Date: Mar 2010
Location: Berlin, Germany
Posts: 718
Downloads: 575
Uploads: 0
Default

To remove the underwater depth of field effect change data/Shaders/HDR/DOF_PS.fx:

Quote:
#include <data/shaders/hdr/common.inc>
float2 g_focalDistance : register(c0);

struct PS_IN
{
float2 Tex0 : TEXCOORD0;
};

float4 main( PS_IN In ) : COLOR
{
float depth = tex2D(tex1, In.Tex0).r;
float interp = saturate ( abs( depth - g_focalDistance.x ) / g_focalDistance.y ) ;

float3 color = tex2D(tex0, In.Tex0).rgb;
//return float4(depth, depth, depth, 1);
//return float4(interp, interp, interp, 1);
return float4(color, interp);
}
to:

Quote:
#include <data/shaders/hdr/common.inc>
float2 g_focalDistance : register(c0);

struct PS_IN
{
float2 Tex0 : TEXCOORD0;
};

float4 main( PS_IN In ) : COLOR
{
float depth = tex2D(tex1, In.Tex0).r;
float interp = saturate;

float3 color = tex2D(tex0, In.Tex0).rgb;
//return float4(depth, depth, depth, 1);
//return float4(interp, interp, interp, 1);
return float4(color, interp);
}
(by vickers03).

Download here.

Before



After



Regards.

Echolt.
Echolot is offline   Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.