inktomi wrote:
> Hi,
> 
> This is similar to the topic of this thread, so I'm going to post it here as 
> well.. what if I want to color the terrain based on where the camera is 
> positioned in relation to the terrain rather than at the pre-processing stage?
> 
> For example, in the HangGlider example, maybe I want to tint the terrain red 
> when you're getting too close.
> 
> Thank you!
> 
> Cheers,
> Matthew


I'm no expert but I believe that what you are describing can only be done with 
shaders.  Shaders can grab the image before it is rendered to the screen and 
apply changes to color based on, among other things, the geometry of the scene. 
 I am just about to dive into learning about shaders in osg myself and am 
reading these for starters:
http://www.lighthouse3d.com/tutorials/glsl-tutorial/pipeline-overview/
and
http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/ShadersIntroduction

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





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

Reply via email to