![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
06-12-10, 03:53 PM
|
#1 |
|
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;
}
(original size 32x32)Probabily SH5 will have an "Waterdrops.fx" file and images too. If someone upload, I can test. Sorry my bad english |
|
|
| Tags |
| droplets, drops, effects, periscope, water |
|
|
