1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0028762: Visualization, Ray tracing - Implement depth-of-field effect

Graphic3d_RenderingParams - introduced new parameters CameraFocalPlaneDist and CameraApertureRadius managing DOF effect.
TKOpenGl - added new ray generation logic to RaytraceBase.fs.
vrenderparams command - added -focal and -aperture parameters.
OpenGl_View.hxx - function for ray generating was split into two functions (ray tracing and path tracing).
OpenGl_View_Raytrace.cxx - fixed interaction between adaptive sampling and stereo camera
This commit is contained in:
duv
2017-06-27 11:22:31 +03:00
committed by bugmaster
parent 475c2302d4
commit b27ab03d09
9 changed files with 588 additions and 45 deletions

View File

@@ -68,6 +68,8 @@ public:
RadianceClampingValue (30.0),
RebuildRayTracingShaders (Standard_False),
NbRayTracingTiles (16 * 16),
CameraApertureRadius (0.0f),
CameraFocalPlaneDist (1.0f),
ToneMappingMethod (Graphic3d_ToneMappingMethod_Disabled),
Exposure (0.f),
WhitePoint (1.f),
@@ -119,6 +121,8 @@ public:
Standard_ShortReal RadianceClampingValue; //!< maximum radiance value used for clamping radiance estimation.
Standard_Boolean RebuildRayTracingShaders; //!< forces rebuilding ray tracing shaders at the next frame
Standard_Integer NbRayTracingTiles; //!< total number of screen tiles used in adaptive sampling mode (PT only)
Standard_ShortReal CameraApertureRadius; //!< aperture radius of perspective camera used for depth-of-field, 0.0 by default (no DOF) (path tracing only)
Standard_ShortReal CameraFocalPlaneDist; //!< focal distance of perspective camera used for depth-of field, 1.0 by default (path tracing only)
Graphic3d_ToneMappingMethod ToneMappingMethod; //!< specifies tone mapping method for path tracing, Graphic3d_ToneMappingMethod_Disabled by default
Standard_ShortReal Exposure; //!< exposure value used for tone mapping (path tracing), 0.0 by default