Hello,

Preface: I realize this question comes about because I've never really learned 
OpenGL/GLSL from the ground up and am likely missing some simple concepts, but 
I mostly have been coasting by at the osg middleware level and have been doing 
OK so far.

If I want to do some simple post-processing I can create a render-to-texture 
camera and render to the framebuffer.  I can attach a texture to the 
framebuffer and then create another "screen" camera to render that texture to 
the screen.  I can add a GLSL shader program to this texture so that before the 
texture gets rendered to the screen it gets an effect added to it using the 
shaders.  

When I use shaders attached to 3-D model nodes in the scene itself, the meaning 
of the vertex and frag shaders is easy to understand->the vertices of the 3-D 
model are the vertices referenced in the vertex shader.  However, When I render 
my scene to a texture and then do a simple pass-through vertex and frag shader 
combo, what is the meaning of the vertices in this scenario?  I had assumed 
that once you render your scene to a texture, all knowledge of the original 
scene's geometry and vertex locations has been lost, is this true?  If so, then 
what vertices am I dealing with?  It's easy enough to follow along with 
examples and to use a simple pass-through vertex shader, but I'd like to 
understand this better because I now want to insert a geometry shader in 
between the vertex and frag shaders and again I'm not sure whether to use 
point, line, or triangle in my geometry shader as the primitive type because I 
thought that the geometry and primitives of the original scene would b
 e lost after rendering to texture.  

What am I missing here?  Any clarification is most welcome.

-Ethan

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to