Hi

Here is a screenshot.
http://www.student.itn.liu.se/~annca229/sharpedges.png 

We think we might have a solution that we found in a paper. The paper suggest 
this:
1. Render all solid objects in the scene.
2. Copy the depth values from the frame buffer to a depth texture.
3. Render particles (or in our case transparent slices) back-to-front with a 
pixel shader that reads the depth values from the depth texture.
   The shader lowers the fragment's alpha as necessary value to achieve soft 
clipping.

Our problem is that we don't know how to do the second step. 
Any suggestions or other ideas? 

//AK and Lotta

-----Ursprungligt meddelande-----
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För Robert Osfield
Skickat: den 23 oktober 2006 17:06
Till: osg users
Ämne: Re: [osg-users] Get rid of sharp edges between transparent and 
solidobjects?

Hi Charlotta,

Could you post screenshot?

Robert.

On 10/18/06, Charlotta Wadman <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi!
>
> We have a blending problem with sharp edges between transparent 
> textureslices and a solid box.
> We use shaders for the textureslices. The blending mode for the slices 
> is set to:
>
> osg::BlendFunc* bf = new osg::BlendFunc; bf -> 
> setFunction(osg::BlendFunc::SRC_ALPHA,
> osg::BlendFunc::ONE_MINUS_SRC_ALPHA);
>
> We have also set the renderingHint to transparent bin.
>
> The textureslices blends together correctly but how do we get rid of 
> the edges between the textureslices and the box?
>
> Grateful for any help.
>
> //Lotta and AK
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to