Hi,

Got a basic distortion/shader program working to do edge blending and
gamma correction for multi-projector systems. Also includes changes to
Tim's basic distortion code to handle reading in a mesh file created by
external programs for a cylindrical screen Now the question is where to
place the shader program.

Looking over the Docs section for effects and shaders and not sure this
is the most practical way to go.  Essentially, want to post render the
texture created at the end of the frame and apply the edge blending and
gamma correction AFTER all the pixels have been drawn -- the gamma in
particular needs to be handled after the pixel value is set.

The program works just fine on some modified examples from the OSG
directories. Tried a couple of ideas over the weekend with little or no
success. So two questions for the shader gurus...

1) how to use the osg::Uniform to link the rendered texture to the
shader WITHOUT the need to create an xml file.  Understand the syntax,
just a question of where and how to access the FBO, and

2) that is part of the second question.  Given we have the access to the
FBO set as something like 

 osg::Uniform* baseTexture = new osg::Uniform("a_link_to_FBO",0);
        stateset->addUniform(baseTexture);

then where to place the shader as an "in-line" piece of code to post
process the image in the FBO.

Any hints or suggestions are most welcomed.  No chance this will make
the current release under review, but once this is working the
distortion code and supporting tools should be ready for a more public
showing.

Thanks
John    


------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to