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

Reply
 
Thread Tools Display Modes
Old 06-12-10, 03:53 PM   #1
lhs_azevedo
Nub
 
Join Date: Jun 2010
Posts: 2
Downloads: 0
Uploads: 0
Water droplets

Hi captains! This is my first post

SH5 have beautyfull water droplets fx, but my 9500gt can not handle , so it is possible to hack SH4 and use this fx?

"SH4 Install Dir/data/Shaders/filters" has a file called "WaterDropsPS.fx":
Code:
#include <data/Shaders/Filters/common.inc>

float Intensity:register(c0);
float4 VapourColor:register(c1);

struct PS_IN                                 
{              
    float2 Tex0    : TEXCOORD0;                    
}; 

   
float4 main( PS_IN In ) : COLOR              
{
    float invF = saturate(Intensity - 0.5);
    float invF2 = saturate(Intensity);
    
    float4 frontiere = tex2D(customTex0, In.Tex0);
    
    float alpha;
    float alpha2;
    //alpha = step(frontiere.g,invF);
    alpha2 = step(frontiere.r,invF2);
    
    //alpha = invF*frontiere.g;
    
    if (invF>0.5)
        alpha = lerp(1, frontiere.g , (1-invF)*2);
    else
        alpha = lerp(0, frontiere.g , invF*2);
    
    //alpha2 = invF2*frontiere.r;
    /*
    if (invF2>0.5)
        alpha2 = lerp(0, frontiere.r , (1-invF2)*2);
    else
        alpha2 = lerp(1, frontiere.r , invF2*2);
        */

    //return float4(alpha, alpha, alpha, 1);
    //return float4(alpha2, alpha2, alpha2, 1);
        
    float4 DispColor;
    
    float2 turb = tex2D(customTex1, float2(In.Tex0.x, In.Tex0.y-elapsedTime*0.3)*2).xy;
    turb=turb-0.5;
    turb*=0.3;
    
    //DispColor = tex2Dbias (map, float4(In.Tex0+turb*invF, 0, 2));    
    DispColor = tex2Dbias (map, float4(In.Tex0+turb, 0, 2));    
    //return DispColor;
    
    float4 Color;
    
    Color = tex2Dbias (map, float4(In.Tex0, 0, 4));    
    Color = lerp(Color, float4(VapourColor.xyz, 1), VapourColor.w*invF2);
    
    Color = lerp(Color, DispColor, alpha);
    //return Color;    
    Color = lerp(tex2D(map, In.Tex0), Color, alpha2);
    //Color = lerp(Color, tex2D(map, In.Tex0), alpha2);
    
    return Color;
}
and "SH4 Install Dir/dat/misc has a file called "WaterDroplets.dds":
(original size 32x32)

Probabily SH5 will have an "Waterdrops.fx" file and images too.
If someone upload, I can test.

Sorry my bad english
lhs_azevedo is offline   Reply With Quote
Old 06-14-10, 08:50 AM   #2
Pintea
Sparky
 
Join Date: Jan 2010
Posts: 152
Downloads: 6
Uploads: 0
Default

Hi,

How do you know the droplets are causing performance problems ?
Have you tried using low graphics settings ? If this doesn't work, check out my post here :
http://www.subsim.com/radioroom/show...25#post1297525
http://www.subsim.com/radioroom/show...25&postcount=5
Pintea is offline   Reply With Quote
Old 06-14-10, 11:27 AM   #3
lhs_azevedo
Nub
 
Join Date: Jun 2010
Posts: 2
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Pintea View Post
Hi,

How do you know the droplets are causing performance problems ?
Have you tried using low graphics settings ? If this doesn't work, check out my post here :
http://www.subsim.com/radioroom/show...25#post1297525
http://www.subsim.com/radioroom/show...25&postcount=5
The droplets are not causing problems, the whole game is slow but I was wondering if you can put (the droplets) in SH4.

Thx for your reply!
lhs_azevedo is offline   Reply With Quote
Old 06-14-10, 03:21 PM   #4
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Check the Water drops in Baza_FX.dat
You could build a pretty close copy for SH4.
You'll need Urfishes S3D adjustments for particles to view the settings.
Then just adjust a SH4 compatable version.
  Reply With Quote
Reply

Tags
droplets, drops, effects, periscope, water

Thread Tools
Display Modes

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:58 AM.


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