Re: [osg-users] Removing objects with shared GL state from scene graph

2019-05-15 Thread Chris Djali
Hi,

It looks like this has fallen off the radar again as it's been a month. I'd 
still rather fix this in a robust way rather than making a guess as to the most 
sensible approach and creating maintenance problems down the line.

Thank you!

Cheers,
Chris

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





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


Re: [osg-users] Layered rendering with a geometry shader

2019-05-15 Thread Chris Djali
Thanks Voerman. I'd looked through the examples for other things, but not for 
multiple viewports, so missed that. It seems to be a good starting point once I 
switched the GLSL extension from the NV variant to the ARB one. Despite not 
being core until OpenGL 4.1, it looks like multiple viewports are available on 
nearly all hardware supporting geometry shaders, so I don't think I'm even 
going to have to worry about not supporting as much hardware as I wanted to.

Regarding more conventional batching, we have to deal with stupid assets, such 
as crates implemented as six individual faces each with their own texture. We 
don't have the rights to fix and redistribute these assets, so any possible 
solution is going to need stuff like texture atlassing on load. We've got a 
high-level outline for something that should work, but there are a lot of 
moving parts to meddle with, so it's beign put off for now.

Cheers,
Chris

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





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


Re: [osg-users] Layered rendering with a geometry shader

2019-05-15 Thread Wojciech Lewandowski
Hi Chris,

This is the idea I wanted to try myself some day but the day for this never
came. I probably would attempt the method described here
https://stackoverflow.com/questions/25058627/is-it-possible-to-render-an-object-from-multiple-views-in-a-single-pass
(see
answer with 4 likes).

Cheers,
Wojtek Lewandowski


śr., 15 maj 2019 o 01:42 Chris Djali  napisał(a):

> Hi,
>
> I'm investigating using a geometry shader to render multiple shadow map
> cascades in one pass in OpenMW. While I've heard conflicting (but mostly
> negative) accounts of how much additional performance this can bring, I
> reckon it's likely to help, as OpenMW uses a ridiculous quantity of tiny
> drawables, causing a ridiculous number of draw calls when RTT passes are
> used, and there's no easy batching implementation as user/game scripts can
> add, remove, replace and relocate object with no notice. There are
> solutions in the works for this, but layered rendering may be low-hanging
> fruit that can be done in the meantime.
>
> Anyway, onto the problem at hand...
>
> In order to do this, I need to bind a layered depth texture as a render
> target. When I looked into doing this in OSG, the two threads I found
> claimed it wasn't possible yet, but as they were from a long time ago, it's
> possible support has been implemented since them. Can this be done yet? I'd
> rather not have to spend a long time investigating only to determine that
> it's still impossible.
>
> Thank you!
>
> Cheers,
> Chris
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76104#76104
>
>
>
>
>
> ___
> 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


Re: [osg-users] Layered rendering with a geometry shader

2019-05-15 Thread Voerman, L.
Hi Chris,
I did something similar a using multiple viewports, and created the
osgshadermultiviewport example to preserve some of the work I did.
It might be dependent on nvidia hardware (the extention strings suggest
so).
I do remember some discussion about layered framebuffer attachments, but
don't remember if it's been resolved.
I suppose it would be useful to try to port the example from multiviewport
to multilayer - this might also change the range of hardware that can be
used -
and can be used to see if the multilayer (depth) buffer works .
Laurens.

On Wed, May 15, 2019 at 1:25 AM Chris Djali  wrote:

> Hi,
>
> I'm investigating using a geometry shader to render multiple shadow map
> cascades in one pass in OpenMW. While I've heard conflicting (but mostly
> negative) accounts of how much additional performance this can bring, I
> reckon it's likely to help, as OpenMW uses a ridiculous quantity of tiny
> drawables, causing a ridiculous number of draw calls when RTT passes are
> used, and there's no easy batching implementation as user/game scripts can
> add, remove, replace and relocate object with no notice. There are
> solutions in the works for this, but layered rendering may be low-hanging
> fruit that can be done in the meantime.
>
> Anyway, onto the problem at hand...
>
> In order to do this, I need to bind a layered depth texture as a render
> target. When I looked into doing this in OSG, the two threads I found
> claimed it wasn't possible yet, but as they were from a long time ago, it's
> possible support has been implemented since them. Can this be done yet? I'd
> rather not have to spend a long time investigating only to determine that
> it's still impossible.
>
> Thank you!
>
> Cheers,
> Chris
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76104#76104
>
>
>
>
>
> ___
> 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


Re: [osg-users] Layered rendering with a geometry shader

2019-05-15 Thread Robert Osfield
Hi Chris,

On Wed, 15 May 2019 at 00:32, Chris Djali  wrote:
> I'm investigating using a geometry shader to render multiple shadow map 
> cascades in one pass in OpenMW. While I've heard conflicting (but mostly 
> negative) accounts of how much additional performance this can bring, I 
> reckon it's likely to help, as OpenMW uses a ridiculous quantity of tiny 
> drawables, causing a ridiculous number of draw calls when RTT passes are 
> used, and there's no easy batching implementation as user/game scripts can 
> add, remove, replace and relocate object with no notice. There are solutions 
> in the works for this, but layered rendering may be low-hanging fruit that 
> can be done in the meantime.

Both OpenGL and OSG suffer from lots of small grained drawables. so
avoiding lots of drawables can be crucial to improving performance.
This may be resolvable at the high level in your application with
exsiting OSG features, or tackled by subclass from vsg::Drawable or
vsg::Geometry to provide a custom drawImplementation() that is able to
juggle the dynamic changes in a more lightweight way.  For instance if
you can keep the vertex arrays pretty constant but add/remove
PrimitiveSet in a dynamic way then should be avoid much of the cost of
the alternative of lots separate drawables.

> Anyway, onto the problem at hand...
>
> In order to do this, I need to bind a layered depth texture as a render 
> target. When I looked into doing this in OSG, the two threads I found claimed 
> it wasn't possible yet, but as they were from a long time ago, it's possible 
> support has been implemented since them. Can this be done yet? I'd rather not 
> have to spend a long time investigating only to determine that it's still 
> impossible.

I don't know enough of what you are thinking of to be able to make any
suggestions here, it's too open ended.

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