How to add that foam effect to water on a projected grid?



Can someone please give me a hint? Is it just a reflected texture of the skybox or am I not aware of hidden functionality of the water effect?

Well, the foam is somehow generated by the fogState. Haven't figured out exactly, but I got some foam!

You can edit the shader(s) so that the foam is created whether you have fog or not… Though I am not sure how it relates as it is now.

I think ProjectedGrid adds it.  You can even edit the ProjectedGrid class and change the foam texture if u wanted to.  If you wanted to remove the foam, you might be able to comment out the lines that add the texture.



The foam should already be there if you're using the source in the CVS.  It worked perfectly the first time I did it.  If it's not there and you have the source from CVS, recheck if ProjectedGrid is looking in the right place for the texture.



I'm not at my dev computer right now, so I can't give you any line numbers or anything.

My mistake, the texture gets added as a declaration in WaterRenderPass (the static string declarations), and actually applied in initialize()