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 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
 

Tags
droplets, drops, effects, periscope, water


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 04:48 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.