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

2020-12-14 Thread Chris Hanson
I just wanted to add that it is a popular opinion among the industry that
Geometry Shaders were ill-conceived architecturally and suffer unsolvable
performance-blocking issues. There are alternatives of various forms which
have their own complexities, but just in case you run into perf problems
with GS, you should be aware of the situation. Here's a discussion (related
to Vulkan, but architecturally the same situation) that a lot of people
seem to cite:

https://www.reddit.com/r/vulkan/comments/91q0qx/do_geometry_shaders_still_suck/

On Sun, Dec 13, 2020 at 4:19 AM Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi,
>
> have a look here MuseOpenIG/Plugin-GPUVegetation at master ·
> CCSI-CSSI/MuseOpenIG · GitHub
>  ...
> 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...@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 写道:
>>
>>> 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...@gmail.com
>>> wrote:
>>>
 env is win10 osg3.6.4 GTX1660
 [image: QQ图片20201210095944.jpg]

 osg::ref_ptr 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+unsubscr...@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
>> 
>> .
>>
>
>
> --
> 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+unsubscr...@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
> 
> .
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAGoufmbvyPcw4b6aoue4Frqh7jw%3Dya%2Bfvuap3r6dD6AO_LXpxQ%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2020-12-13 Thread Trajce Nikolov NICK
Hi,

have a look here MuseOpenIG/Plugin-GPUVegetation at master ·
CCSI-CSSI/MuseOpenIG · GitHub
 ...
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...@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 写道:
>
>> 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...@gmail.com
>> wrote:
>>
>>> env is win10 osg3.6.4 GTX1660
>>> [image: QQ图片20201210095944.jpg]
>>>
>>> osg::ref_ptr 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+unsubscr...@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
> 
> .
>


-- 
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+unsubscr...@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.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2020-12-12 Thread mirr...@gmail.com
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 写道:

> 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...@gmail.com 
> wrote:
>
>> env is win10 osg3.6.4 GTX1660
>> [image: QQ图片20201210095944.jpg]
>>
>> osg::ref_ptr 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+unsubscr...@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.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2020-12-10 Thread OpenSceneGraph Users
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...@gmail.com wrote:

> env is win10 osg3.6.4 GTX1660
> [image: QQ图片20201210095944.jpg]
>
> osg::ref_ptr 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/8eb46a8d-dd49-40e8-af7e-6061a6bb572an%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org