Hi Harash,

Render you scene to a depth texture and then compute the normals from
this in a second pass in the shader.

Robert.

On Mon, Feb 25, 2008 at 3:20 PM, Harash Sharma <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi All,
>
>
>
>    In my OSG application, I want to find the normal vector corresponding to
> each pixel position. It means that after rendering if an image pixel (i,j)
> comes from an object  plane P, I need to find the Normal vector to P. One of
> the ways would be to use LineSegmentIntersector to find the intersecting
> plane for pixel (i,j), given the Line of Sight. But doing this for all
> pixels in the field of view would be a very slow process.
>
>
>
>    It would be very kind if anyone could tell if a faster mechanism to do
> this is there in OSG and give a pointer to it. Thanks in advance.
>
>
>
> Regards
>
>
>
> Harash.
>
>
>
>  ________________________________
> Looking for last minute shopping deals? Find them fast with Yahoo! Search.
> _______________________________________________
>  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