From: duv Date: Fri, 17 Jul 2015 15:15:44 +0000 (+0300) Subject: Fix for CR26432 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=41f4dabdc6ddf678644256d32bd39d3501ddd9e2;p=occt-copy.git Fix for CR26432 --- diff --git a/src/OpenGl/OpenGl_View_Raytrace.cxx b/src/OpenGl/OpenGl_View_Raytrace.cxx index 15b17afea2..8941e7aa97 100644 --- a/src/OpenGl/OpenGl_View_Raytrace.cxx +++ b/src/OpenGl/OpenGl_View_Raytrace.cxx @@ -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 (myRNG.NextInt() >> 2)); + theGlContext->core20fwd->glDrawArrays (GL_TRIANGLES, 0, 6); ++myAccumFrames; glFinish();