occt: master e2da917a

Author Committer Branch Timestamp Parent
dbp bugmaster master 2015-01-14 08:04:27 master 71595c29
Affected Issues  0025703: Visualization, TKOpenGl - Decrease number of samplers used in ray-tracing mode
Changeset 0025703: Visualization - Decrease number of samplers used in ray-tracing mode

This patch eliminates 3 samplers used in ray-tracing mode:

//! Texture buffer of data records of bottom-level BVH nodes.
Handle(OpenGl_TextureBufferArb) myObjectNodeInfoTexture;
//! Texture buffer of minimum points of bottom-level BVH nodes.
Handle(OpenGl_TextureBufferArb) myObjectMinPointTexture;
//! Texture buffer of maximum points of bottom-level BVH nodes.
Handle(OpenGl_TextureBufferArb) myObjectMaxPointTexture;

Serialized data contained in corresponding texture buffers were added to global scene buffers:

//! Texture buffer of data records of high-level BVH nodes.
Handle(OpenGl_TextureBufferArb) mySceneNodeInfoTexture;
 //! Texture buffer of minimum points of high-level BVH nodes.
Handle(OpenGl_TextureBufferArb) mySceneMinPointTexture;
//! Texture buffer of maximum points of high-level BVH nodes.
Handle(OpenGl_TextureBufferArb) mySceneMaxPointTexture;

This modifications leads also to small performance improvement (~2%) due to higher texture cache efficiency. Some modifications in traversal function (GLSL code) also improve performance (~3%).
mod - src/OpenGl/OpenGl_SceneGeometry.cxx Diff File
mod - src/OpenGl/OpenGl_Workspace.hxx Diff File
mod - src/OpenGl/OpenGl_Workspace_Raytrace.cxx Diff File
mod - src/Shaders/RaytraceBase.fs Diff File