|
|
|
@ -28,14 +28,15 @@ float4 main_fp_nomrt (float2 iTexCoord : TEXCOORD0,
|
|
|
|
|
float3 noiseCoord : TEXCOORD1,
|
|
|
|
|
uniform sampler2D RT : register(s0),
|
|
|
|
|
uniform sampler2D NormalMap : register(s1),
|
|
|
|
|
uniform sampler2D CausticMap : register(s2),
|
|
|
|
|
uniform float4 tintColour) : COLOR
|
|
|
|
|
uniform sampler2D CausticMap : register(s2)) : COLOR
|
|
|
|
|
{
|
|
|
|
|
float4 normal = tex2D(NormalMap, noiseCoord) * 2 - 1;
|
|
|
|
|
|
|
|
|
|
return tex2D(RT, iTexCoord + normal.xy * 0.015) +
|
|
|
|
|
(tex2D(CausticMap, noiseCoord) / 5) +
|
|
|
|
|
tintColour ;
|
|
|
|
|
float4 col = tex2D(RT, iTexCoord + normal.xy * 0.015) +
|
|
|
|
|
(tex2D(CausticMap, noiseCoord) / 5);
|
|
|
|
|
col.xyz = lerp(col.xyz, float3(0.15, 0.40, 0.40), 0.4);
|
|
|
|
|
return col;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -45,8 +46,7 @@ float4 main_fp (float2 iTexCoord : TEXCOORD0,
|
|
|
|
|
uniform sampler2D RT : register(s0),
|
|
|
|
|
uniform sampler2D NormalMap : register(s1),
|
|
|
|
|
uniform sampler2D CausticMap : register(s2),
|
|
|
|
|
uniform sampler2D DepthMap : register(s3),
|
|
|
|
|
uniform float4 tintColour) : COLOR
|
|
|
|
|
uniform sampler2D DepthMap : register(s3)) : COLOR
|
|
|
|
|
{
|
|
|
|
|
float4 normal = tex2D(NormalMap, noiseCoord) * 2 - 1;
|
|
|
|
|
|
|
|
|
@ -54,8 +54,8 @@ float4 main_fp (float2 iTexCoord : TEXCOORD0,
|
|
|
|
|
depth = saturate(depth / 2000.f);
|
|
|
|
|
|
|
|
|
|
float4 color = tex2D(RT, iTexCoord + normal.xy * 0.015) +
|
|
|
|
|
(tex2D(CausticMap, noiseCoord) / 5) +
|
|
|
|
|
tintColour;
|
|
|
|
|
(tex2D(CausticMap, noiseCoord) / 5);
|
|
|
|
|
color.xyz = lerp(color.xyz, float3(0.15, 0.40, 0.40), 0.4);
|
|
|
|
|
|
|
|
|
|
return lerp(color, float4(0, 0.65, 0.65, 1), depth);
|
|
|
|
|
return lerp(color, float4(0.15, 0.40, 0.40, 1), depth);
|
|
|
|
|
}
|
|
|
|
|