float3 fReflect = tex2Dproj(sReflect, i.Uv).rgb;
float3 fRefract = tex2Dproj(sRefract, i.Uv).rgb;
float3 fColorWA = { 0.13f, 0.13f, 0.68f };
float3 fColorRR = lerp(fRefract, fReflect, 0.4f);
return float4(lerp(fColorRR, fColorWA, 0.3f), 1.0f);
Looking for suggestions for water shader.
Greetings.
Ive been working recently on a water effect.
I am to the point where i have a reflection map and refraction map for my water.
Im looking for suggestion on how to use/blend them.
i have two shots : here and here.
and im using (HLSL) :
I dont fell like its looking particulary good.
Any tips/pointers on how i should use both "maps" would be appreciated.
Im trying to get somekind of clear tropical water.
Thanks you.
For this line:
"float3 fColorRR = lerp(fRefract, fReflect, 0.4f);"
I'd replace 0.4f with a Fresnel approximation equation, e.g. (1-cos(N dot V))^5
"float3 fColorRR = lerp(fRefract, fReflect, 0.4f);"
I'd replace 0.4f with a Fresnel approximation equation, e.g. (1-cos(N dot V))^5
Thanks for the suggestion.
In the equation (1-cos(N dot V))^5
N stand for the normal vector, correct?
What does V stand for?
Sorry but im not very familiar with Fresnel approximation equation(s).
In the equation (1-cos(N dot V))^5
N stand for the normal vector, correct?
What does V stand for?
Sorry but im not very familiar with Fresnel approximation equation(s).
Quote:Original post by superpig
Normalised Eye->Surface vector, IIRC.
:) You were first.
Note, that although our explanations are different, they're both correct, because of cosinus nature.
Yes as they said using a proper Fresnel aprox can grealy improve the look.
I would suggest the use of a normal map for additional wave detail. It can greatly improve the look of the wave without too much cost.
I would suggest the use of a normal map for additional wave detail. It can greatly improve the look of the wave without too much cost.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement