I am more than pleased that you find this wiki page useful, you are very welcome!
Thank you for your comments and impovements, your video looks great!
Habib
I am more than pleased that you find this wiki page useful, you are very welcome!
Thank you for your comments and impovements, your video looks great!
Habib
I just wanted to say thank you for this wonderful source of information!
I am using the lake shader and found it perfect for my needs. I made a few very small and trivial adjustments for my use case:
Instead of using a fixed lightSourceDir, I've added a variable for that so that the position of the sun can be changed:
float3 SunPosition;
// previously: float3 lightSourceDir = normalize(float3(0.1f,0.6f,0.5f));
float3 lightSourceDir = normalize(SunPosition);
float3 halfvec = normalize(eyeVector+lightSourceDir+float3(perturbation.x*specPerturb,perturbation.y*specPerturb,0));
I also needed to make a small change since I didn't want the water to be at the origin. So I added another float3 variable "float3 xWaterPos;" and inserted it in the line that calculated the eyeVector:
float3 eyeVector = normalize(xCamPos - xWaterPos - PSIn.Position3D);
The result can be seen in this video: http://www.youtube.com/watch?v=l4gK-T_KxdM
Thanks again and kind regards from Belgium,
Davy
The first idea I can think about right now would be similar to foam generation.
The basic way is using a foam texture that is mixed into the final color of the water surface depending on other parameters. This is usually done by the pixel shader, and you can set what should the amount of foam/algae depend on, for example: time, position or the height of the water level (if it is based on a height-field).
A little bit more detailed description of the method:
http://habib.wikidot.com/techniques#foam
Dear Habib,
Do you know of any suggestion/way to make algae grow on the surface over a given time?
Thx,
Shine
IMHO this page should be divided into multiple smaller ones to help to gain better understanding.