Re: [osg-users] [osgPPU] CubeMap reflection

20 views
Skip to first unread message

Art Tevs

unread,
Oct 5, 2010, 9:18:39 AM10/5/10
to osg-...@lists.openscenegraph.org
Hi Vincent,

take a look into the osgreflection example shipped with OSG. One of this examples shows the cubemap reflection implementation. You cannot achieve reflection with osgPPU, since it does not know anything about your cameras or other stuff.

The cubemap exampel showed with osgPPU is just to show that you can also use CubeMap textures as input/output with osgPPU.

Cheers,
Art

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32393#32393

_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Robert Osfield

unread,
Oct 5, 2010, 9:24:54 AM10/5/10
to osg-...@lists.openscenegraph.org
Hi Art and Vincent,

On Tue, Oct 5, 2010 at 2:18 PM, Art Tevs <arti...@yahoo.de> wrote:
> take a look into the osgreflection example shipped with OSG. One of this examples shows the cubemap reflection implementation.

Just for clarification, the osgreflection examples use a multi-pass
stencil buffer based approach for planar reflections, while the
osgprerendercubemap uses a render texture based approach with a cube
map for reflections.

Robert.

Honnet Vincent

unread,
Oct 5, 2010, 10:31:08 AM10/5/10
to osg-...@lists.openscenegraph.org
Hi Art,

I agree, I couldn't get it working. The only way I found was to let
osgPPU process my computation until the normals and then use it as
output texture on the geometry that has the reflection and refraction
shader like one do in the example osgvertexprogram.

Vincent

Vincent Honnet

unread,
Oct 5, 2010, 10:35:59 AM10/5/10
to osg-...@lists.openscenegraph.org
Hi,

your are right Robert. I got something working by having a look to osgvertexprogram (for reflection/refraction, I just converted the ARB shader into a glsl one) and some other shader examples that process normals.

Thanks !
Vincent

...


Thank you!

Cheers,
Vincent

------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=32401#32401

Reply all
Reply to author
Forward
0 new messages