rendergather / osgocean

Automatically exported from code.google.com/p/osgocean
GNU Lesser General Public License v3.0
0 stars 0 forks source link

crest foam not showing transparent areas #45

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run "oceanExample.exe"
2. press W (uppercase W) several times until the waves are big enough to show 
the white caps on top of them (crest foam).

What is the expected output? What do you see instead?

the white cap doesn't show the transparent areas that correspond to the 
original texture file (sea_foam.png)

What version of the product are you using? On what operating system?
 the latest. windows

Please provide any additional information below.

I solved the problem replacing the following line in FFTOceanSurface.cpp:
 "final_color = mix( final_color, foam_color, alpha );\n"
with this one:
 "final_color = mix( final_color, foam_color, alpha * foam_color.a );\n"

suggestion: replace "foam_color.a" by "foam_color.a * .1" to attenuate the foam 
cap whiteness.

Original issue reported on code.google.com by bobblake...@gmail.com on 10 Jun 2015 at 6:32