1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0030476: Visualization, Path Tracing - Adaptive Screen Sampling leads to unstable results

OpenGl_View::runPathtrace() has been extended with alternative multi-pass
Adaptive Screen Sampling mode, not relying on atomic floating point operations.
Although atomic operations on floats allows single-pass rendering,
such operations leads to instability in case of different calculation order.
Atomic float operations are also currently supported only by single GPU vendor.

Fixed GLSL compilation on Intel drivers (follow ARB_shader_image_load_store
specs rather than EXT_shader_image_load_store).

Graphic3d_RenderingParams::AdaptiveScreenSamplingAtomic option has been added
to activate 1-pass Adaptive Screen Sampling mode when supported by hardware.

vfps command has been extended with -duration argument allowing to limit command execution time.
vactivate command has been extended with -noUpdate argument.
This commit is contained in:
kgv
2019-02-11 18:00:35 +03:00
committed by apn
parent 66d1cdc65d
commit e084dbbc20
18 changed files with 488 additions and 147 deletions

View File

@@ -592,6 +592,7 @@ protected: //! @name data types related to ray-tracing
// images used by ISS mode
OpenGl_RT_uRenderImage,
OpenGl_RT_uTilesImage,
OpenGl_RT_uOffsetImage,
OpenGl_RT_uTileSize,
OpenGl_RT_uVarianceScaleFactor,
@@ -608,6 +609,7 @@ protected: //! @name data types related to ray-tracing
OpenGl_RT_OutputImage = 0,
OpenGl_RT_VisualErrorImage = 1,
OpenGl_RT_TileOffsetsImage = 2,
OpenGl_RT_TileSamplesImage = 3
};
//! Tool class for management of shader sources.
@@ -691,6 +693,9 @@ protected: //! @name data types related to ray-tracing
//! Enables/disables adaptive screen sampling for path tracing.
Standard_Boolean AdaptiveScreenSampling;
//! Enables/disables 1-pass atomic mode for AdaptiveScreenSampling.
Standard_Boolean AdaptiveScreenSamplingAtomic;
//! Enables/disables environment map for background.
Standard_Boolean UseEnvMapForBackground;
@@ -712,6 +717,7 @@ protected: //! @name data types related to ray-tracing
UseBindlessTextures (Standard_False),
TwoSidedBsdfModels (Standard_False),
AdaptiveScreenSampling (Standard_False),
AdaptiveScreenSamplingAtomic (Standard_False),
UseEnvMapForBackground (Standard_False),
RadianceClampingValue (30.0),
DepthOfField (Standard_False),
@@ -1008,6 +1014,9 @@ protected: //! @name fields related to ray-tracing
//! Texture containing offsets of sampled screen tiles (2 textures are used in stereo mode).
//! Used if adaptive screen sampling is activated.
Handle(OpenGl_Texture) myRaytraceTileOffsetsTexture[2];
//! Texture containing amount of extra per-tile samples (2 textures are used in stereo mode).
//! Used if adaptive screen sampling is activated.
Handle(OpenGl_Texture) myRaytraceTileSamplesTexture[2];
//! Vertex buffer (VBO) for drawing dummy quad.
OpenGl_VertexBuffer myRaytraceScreenQuad;