]> OCCT Git - occt-copy.git/commitdiff
Fix for CR26432
authorduv <duv@opencascade.com>
Fri, 17 Jul 2015 15:15:44 +0000 (18:15 +0300)
committeromy <omy@opencascade.com>
Mon, 31 Aug 2015 11:15:19 +0000 (14:15 +0300)
src/OpenGl/OpenGl_View_Raytrace.cxx

index 15b17afea27a98396d46745b92d4898d125aed20..8941e7aa97885d97076219a86840eaac9665f23a 100644 (file)
@@ -2429,6 +2429,10 @@ Standard_Boolean OpenGl_View::runRaytraceShaders (const Graphic3d_CView&
         myRaytraceProgram->SetUniform (theGlContext,
           myUniformLocations[0][OpenGl_RT_uSampleWeight], 1.f / (myAccumFrames + 1));
 
+        // Set random number generator seed
+        myRaytraceProgram->SetUniform (theGlContext,
+          myUniformLocations[0][OpenGl_RT_uFrameRndSeed], static_cast<Standard_Integer> (myRNG.NextInt() >> 2));
+
         theGlContext->core20fwd->glDrawArrays (GL_TRIANGLES, 0, 6);
         ++myAccumFrames;
         glFinish();