mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
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%).
This commit is contained in:
@@ -305,7 +305,7 @@ Standard_Boolean OpenGl_RaytraceGeometry::ProcessAcceleration()
|
||||
|
||||
Standard_Integer aVerticesOffset = 0;
|
||||
Standard_Integer aElementsOffset = 0;
|
||||
Standard_Integer aBVHNodesOffset = 0;
|
||||
Standard_Integer aBVHNodesOffset = BVH()->Length();
|
||||
|
||||
for (Standard_Integer aNodeIdx = 0; aNodeIdx < aBVH->Length(); ++aNodeIdx)
|
||||
{
|
||||
|
Reference in New Issue
Block a user