[osg-users] How to properly transfer texture coordinates in geometric shaders in Shader #130 version?

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Sun Dec 13 03:19:16 PST 2020


Hi,

have a look here MuseOpenIG/Plugin-GPUVegetation at master ·
CCSI-CSSI/MuseOpenIG · GitHub
<https://github.com/CCSI-CSSI/MuseOpenIG/tree/master/Plugin-GPUVegetation> ...
This is code for generating forests with geometry shaders. It might give
you better clue

On Sun, Dec 13, 2020 at 7:08 AM mirr... at gmail.com <mirro187 at gmail.com>
wrote:

> sorry, the screenshot is wrong. It should be  samplerU.
> I'm basically not sure how to get texture coordinates into
> Shader::FRAGMENT  in Geometric shaders.
>
>
> 在2020年12月10日星期四 UTC+8 下午11:13:21<gwal... at gmail.com> 写道:
>
>> What error are you getting?
>> I do see an undefined "samplerY" in there.
>>
>> On Wednesday, December 9, 2020 at 9:03:47 PM UTC-5 mirr... at gmail.com
>> wrote:
>>
>>> env is win10 osg3.6.4 GTX1660
>>> [image: QQ图片20201210095944.jpg]
>>>
>>> osg::ref_ptr<osg::Program> createProgram()
>>> {
>>>     osg::Program *program = new osg::Program();
>>>     program->addShader(new osg::Shader(osg::Shader::VERTEX,vertSource));
>>>     program->addShader(new
>>> osg::Shader(osg::Shader::GEOMETRY,geomSource));
>>>     program->addShader(new
>>> osg::Shader(osg::Shader::FRAGMENT,fragSource));
>>>     program->setParameter(GL_GEOMETRY_VERTICES_OUT_EXT, 3);
>>>     program->setParameter(GL_GEOMETRY_INPUT_TYPE_EXT, GL_TRIANGLES);
>>>     program->setParameter(GL_GEOMETRY_OUTPUT_TYPE_EXT,  GL_TRIANGLES  );
>>>     return program;
>>> }
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscribe at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/89abc9a3-66bf-4248-8e3d-3dfd23235622n%40googlegroups.com
> <https://groups.google.com/d/msgid/osg-users/89abc9a3-66bf-4248-8e3d-3dfd23235622n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
trajce nikolov nick

-- 
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/CAO-%2BzinF1fFZnS3QkT9VTgScKQ4XVF1oVB_L9vQRZT-reQvAEA%40mail.gmail.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20201213/28d7750a/attachment.html>


More information about the osg-users mailing list