From 5157f06bcdfe360fed3c26336f082fef0046f72f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 10 Mar 2009 17:47:54 +0000 Subject: [PATCH] From Konstantin Matveyev, submitted by Valery Bickov: "There is error in WoW shader, you can see it by this simple example: osgviewer cessna.osg --wowvx-42 --clear-color 0,0,0 Clear color may be choosed any with at least one component equals to 0 or 1. In my case I see weird blinking between normal image and image with depth map at right side on the screen." --- src/osgViewer/View.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osgViewer/View.cpp b/src/osgViewer/View.cpp index 66bb0ba52..786cebbc4 100644 --- a/src/osgViewer/View.cpp +++ b/src/osgViewer/View.cpp @@ -1603,9 +1603,9 @@ void View::setUpViewForWoWVxDisplay(unsigned int screenNum, unsigned char wow_co " float pos = gl_FragCoord.x/256.0; " \ " float blue = texture1D(wow_header, pos).b; " \ " if ( blue < 0.5) " \ - " gl_FragColor.b -=0.5; " \ + " gl_FragColor.b = 0.0; " \ " else " \ - " gl_FragColor.b += 0.5; " \ + " gl_FragColor.b = 1.0; " \ " } " \ " } " );