Hi Bawenang,

At a quick glance, I can see the problem mix problem. Thanks for reporting
it.

With regard to the sky dome, you'll have to add the fogging code into the
skydome shader, it can be found in the resources. The skydome was only
really there for the example program and they've all be chosen to blend
nicely with the fogging colour, obviously this doesn't suit all
applications.

However, one problem with fogging the sky dome is that all of the sky with
be fogged, essentially creating a flat colour since the sky dome (in the
example app) will always be a fixed distance, moving with the camera.

K.



On 7 October 2011 09:08, Bawenang Rukmoko <ben...@cs.its.ac.id> wrote:

> Hi,
>
> I've found some artifacts on the above water for scene shader.
>
> 1. When I tried implementing billboard tree with some transparent pixels,
> the transparent parts look not quite transparent. Like shown in the first
> picture.
>
> I believe it's because of these lines in the osgOcean_ocean_scene.frag:
>
> Code:
>        float fogFactor = computeFogFactor( osgOcean_AboveWaterFogDensity,
> gl_FogFragCoord );
>        final_color = mix( osgOcean_AboveWaterFogColor, final_color,
> fogFactor );
>
>
>
> And when I added a line in that shader like this:
>
> Code:
>        float fogFactor = computeFogFactor( osgOcean_AboveWaterFogDensity,
> gl_FogFragCoord );
>        final_color = mix( osgOcean_AboveWaterFogColor, final_color,
> fogFactor );
>        final_color.a = textureColor.a;
>
>
>
> It worked like in the second picture.
>
> 2. I believe the fog is only implemented to the objects but not the sky
> dome (as can be seen in the third picture). How do I make it also work with
> the sky dome? Thanks.
>
>
>
> Thank you!
>
> Cheers,
> Bawenang
>
> ------------------------
> &quot;There's no place like 127.0.0.1&quot;
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=43245#43245
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to