HI Dario,

On 25 March 2013 10:00, Dario Minieri <[email protected]> wrote:
> I would to implement the possibility to make a black&white vision and/or 
> grayscale vision. It's possible to implement this feature modifying the 
> camera properties only and not the geometry? Any suggestions are appreciated.

You can use a fragment shaders to compute the greyscale for the
geometry you have, but unless you have a very simple scene with simple
state usage it'll be rather involved.

The other route is to render the whole scene graph to a RGB texture
then do a second rendering pass that takes the resulting texture as
input and uses a shader to compute the greyscale from the RGB texture
input.  The osgdisortion example illustrates how you can set up a
render to texture and then re-render the resulting texture, all you
need to do different is to use a regular quad rather an one with
distorted tex coordinates and use a custom shader to the rgb ->
greyscale.

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

Reply via email to