X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FOpenGl%2FOpenGl_View.hxx;h=cc9a56490e259f34b4ed729b125b9251983f05e1;hp=b3189742612f48474f5e330fdc83833e9b9f7476;hb=66d1cdc65d647794a70615615b84a0659b807433;hpb=e607bd3e6b8ec33bb0cf13422322cd740d203996 diff --git a/src/OpenGl/OpenGl_View.hxx b/src/OpenGl/OpenGl_View.hxx index b318974261..cc9a56490e 100644 --- a/src/OpenGl/OpenGl_View.hxx +++ b/src/OpenGl/OpenGl_View.hxx @@ -593,6 +593,8 @@ protected: //! @name data types related to ray-tracing // images used by ISS mode OpenGl_RT_uRenderImage, OpenGl_RT_uOffsetImage, + OpenGl_RT_uTileSize, + OpenGl_RT_uVarianceScaleFactor, // maximum radiance value OpenGl_RT_uMaxRadiance, @@ -603,12 +605,9 @@ protected: //! @name data types related to ray-tracing //! Defines OpenGL image samplers. enum ShaderImageNames { - OpenGl_RT_OutputImageLft = 0, - OpenGl_RT_OutputImageRgh = 1, - OpenGl_RT_VisualErrorImageLft = 2, - OpenGl_RT_VisualErrorImageRgh = 3, - OpenGl_RT_TileOffsetsImageLft = 4, - OpenGl_RT_TileOffsetsImageRgh = 5 + OpenGl_RT_OutputImage = 0, + OpenGl_RT_VisualErrorImage = 1, + OpenGl_RT_TileOffsetsImage = 2, }; //! Tool class for management of shader sources. @@ -697,12 +696,6 @@ protected: //! @name data types related to ray-tracing //! Maximum radiance value used for clamping radiance estimation. Standard_ShortReal RadianceClampingValue; - - //! Number of tiles in X dimension (in adaptive sampling mode). - Standard_Integer NbTilesX; - - //! Number of tiles in Y dimension (in adaptive sampling mode). - Standard_Integer NbTilesY; //! Enables/disables depth-of-field effect (path tracing, perspective camera). Standard_Boolean DepthOfField; @@ -721,8 +714,6 @@ protected: //! @name data types related to ray-tracing AdaptiveScreenSampling (Standard_False), UseEnvMapForBackground (Standard_False), RadianceClampingValue (30.0), - NbTilesX (16), - NbTilesY (16), DepthOfField (Standard_False), ToneMappingMethod (Graphic3d_ToneMappingMethod_Disabled) { } }; @@ -854,7 +845,9 @@ protected: //! @name methods related to ray-tracing const Handle(OpenGl_ShaderObject)& theFragShader); //! Initializes OpenGL/GLSL shader programs. - Standard_Boolean initRaytraceResources (const Handle(OpenGl_Context)& theGlContext); + Standard_Boolean initRaytraceResources (const Standard_Integer theSizeX, + const Standard_Integer theSizeY, + const Handle(OpenGl_Context)& theGlContext); //! Releases OpenGL/GLSL shader programs. void releaseRaytraceResources (const Handle(OpenGl_Context)& theGlContext, @@ -884,7 +877,8 @@ protected: //! @name methods related to ray-tracing const int theWinSizeY); //! Binds ray-trace textures to corresponding texture units. - void bindRaytraceTextures (const Handle(OpenGl_Context)& theGlContext); + void bindRaytraceTextures (const Handle(OpenGl_Context)& theGlContext, + int theStereoView); //! Unbinds ray-trace textures from corresponding texture unit. void unbindRaytraceTextures (const Handle(OpenGl_Context)& theGlContext); @@ -914,9 +908,13 @@ protected: //! @name methods related to ray-tracing Standard_Boolean runPathtrace (const Standard_Integer theSizeX, const Standard_Integer theSizeY, Graphic3d_Camera::Projection theProjection, - OpenGl_FrameBuffer* theReadDrawFbo, const Handle(OpenGl_Context)& theGlContext); + //! Runs path tracing (global illumination) kernel. + Standard_Boolean runPathtraceOut (Graphic3d_Camera::Projection theProjection, + OpenGl_FrameBuffer* theReadDrawFbo, + const Handle(OpenGl_Context)& theGlContext); + //! Redraws the window using OpenGL/GLSL ray-tracing or path tracing. Standard_Boolean raytrace (const Standard_Integer theSizeX, const Standard_Integer theSizeY,