Hi,
Hi Christian,
I have the Single Pass Stereo working with ARB_viewport_array and and
a shader (attached). The required support for GL_ARB_viewport_array is
on the osg-submissions list. I have not done any work on the culling
yet, as the eyes are sufficiently close together to get a decent
impression of performance. bringing in light render passes would
probably require a smart adaptation of the cull frustum.
The nvidia stereo_view_rendering seems to be to limiting for my
purposes, as I think it requires the display to be aligned with the
eyes, and we are working with head-tracked systems where the user is
able to rotate their head.
The big deal about this extension is that the vertex and geometry shader
isn't invoked twice. This might quite save a bit if you are limited at
the those stages. But thank you for the example.
Cheers
Sebastian
Regards, Laurens.
in the vertex shader do:
gl_Position = gl_ModelViewMatrix * gl_Vertex;
instead of
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
For the rest of the shaders I rely on the osg shadergenerator with
base shaders from osg-data.
new osg::Shader(osg::Shader::GEOMETRY, "#version 450\n" "#extension
GL_ARB_gpu_shader5 : enable\n" "layout (triangles, invocations = 2)
in;" "layout (triangle_strip, max_vertices = 3) out;" "uniform mat4
transform_block[2];" "in vec4 vbasecolor[];" "in vec2 vtexcoord[];"
"out vec4 basecolor;" "out vec2 texcoord;" "out int gl_Layer;" "void
main(void) {" " for (int i = 0; i < gl_in.length(); i++)" " {" "
basecolor = vec4(1,1,1,1);" " texcoord = vtexcoord[i];" " gl_Position
= transform_block[gl_InvocationID] * gl_in[i].gl_Position;" "
gl_ViewportIndex = gl_InvocationID;" " EmitVertex();" " }" "
EndPrimitive();" "}" );
On Thu, Jun 9, 2016 at 1:24 PM, Sebastian Messerschmidt
<[email protected]
<mailto:[email protected]>> wrote:
Hi Christian
Hi all,
has anybody looked at these new features of nVidia hardware?
Lens Matched Shading and Single Pass Stereo are using new
hardware and driver features that allow the GPU to perform
single pass transform+shading of up to 16 independent view
matrices.
Isn't the change-set of single pass stereo
(https://www.opengl.org/registry/specs/NV/stereo_view_rendering.txt)
shader only?
So basically we need the NV_viewport_array2 support on the
osg-side to implement it.
Btw.: How is the relationship between viewports and bound FBOs for
instance? Suppose I need to render to different MRTs for each
viewport? Can anyone point to a good example here?
This could accelerate OSG's stereo rendering, provided that
the features are exposed thorugh documented OpenGL extensions.
Also rendering of cubemaps for reflections and shadows could
be greatly accelerated (six views in one pass).
That would require some deeper changes in the culling/camera-setup
I suppose, as multiple frusta have to be taken into account per
draw-invocation.
Christian
Cheers
Sebstian
_______________________________________________
osg-users mailing list
[email protected]
<mailto:[email protected]>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org