Re: [osg-users] Layered rendering with a geometry shader
Hi, Most of my testing was with a ShapeDrawable with a sphere, and that uses quad strips. However, I've also tried it with some of OSG's test models, such as spaceship.osgt, and that specific example only uses triangles and is broken, too. Cheers, Chris -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76135#76135 ___ 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
Hi Chris, I work almost exclusively with nvidia hardware, but I remember having a similar problem, that turned out to be related to using triangle strips. Maybe you can work around by pushing the geometry trough the optimizer to break triangle strips into triangles? Laurens. On Mon, May 20, 2019 at 11:18 PM Chris Djali wrote: > Hi, > > I've been playing around with this, and have an annoying issue. On my > machine, which runs Windows and has a Radeon Vega 56, using three viewports > with geometry shader instancing makes some triangles go missing in the > second and third viewports. This happens in my own application and in a > slightly modified version of the example. It works fine if I do everything > in a single invocation, or run it on another machine, though, so I'm > guessing it's a driver bug. I'd report it, but I've not found a place where > AMD accepts issue reports in the form of a minimal executable reproducing > the issue rather than a description of the bug and the name of the software > it happens with. Does anyone have a link or contact at AMD so I can report > this properly? > > Cheers, > Chris > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=76119#76119 > > > > > > ___ > 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
Ohmagawd, I have no idea what you guys are talking about, but... You're from the OpenMW team? I'm in love with Morrowind and played the TES3MP fork recently. I'm currently building a Skyrim clone in OSG. https://www.youtube.com/watch?v=DN_G0YQd7qE https://github.com/otse/MESSIAH/blob/master/src/nof/mesh.cc Thank you! Cheers, Adoring fan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76128#76128 ___ 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
Hi, I've been playing around with this, and have an annoying issue. On my machine, which runs Windows and has a Radeon Vega 56, using three viewports with geometry shader instancing makes some triangles go missing in the second and third viewports. This happens in my own application and in a slightly modified version of the example. It works fine if I do everything in a single invocation, or run it on another machine, though, so I'm guessing it's a driver bug. I'd report it, but I've not found a place where AMD accepts issue reports in the form of a minimal executable reproducing the issue rather than a description of the bug and the name of the software it happens with. Does anyone have a link or contact at AMD so I can report this properly? Cheers, Chris -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76119#76119 ___ 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
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
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
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
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
[osg-users] Layered rendering with a geometry shader
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