[osg-users] transfer data to shader with osg::texture

Wojciech Lewandowski w.p.lewandowski at gmail.com
Wed Oct 5 05:38:07 PDT 2016


Hi Liu,

You got me interested and I created a repro of your problem. I will send it
in followup mail (to be sure this message passes in case zip attachments
were prohibited and message got blocked).

I think you see a genuine issue.

I have found that texture1D seems to be a problem. When I used texture2D
instead it works. One extra note, though. With GL_RGBA16 no one works
correctly. So internal format needs to be a float format (GL_RGBA16F_ARB,
GL_RGBA32F_ARB, GL_RGB16F_ARB, GL_RGB32F_ARB).

Cheers,
Wojtek

2016-10-05 14:20 GMT+02:00 liu ming <81792534 at qq.com>:

> yes,I am getting 0 and 1 in geometry shader,but my input values are :
>
>
> Code:
>  *ptr1=osg::Vec3( 0.0,0.0,0.0);
>                         *ptr1++;
>                         *ptr1= osg::Vec3( 40.0,0.0,0.0);
>                         *ptr1++;
>                         *ptr1=osg::Vec3( 20.0,0.0,20.0);
>
>
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=68869#68869
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20161005/a0d3edcd/attachment-0003.htm>


More information about the osg-users mailing list