From 648d8e8c69c9669a021dac06785ba45721357feb Mon Sep 17 00:00:00 2001 From: StasJ Date: Mon, 27 Nov 2023 22:07:23 -0700 Subject: [PATCH] Fix ospray clipping --- lib/render/VolumeOSPRay.cpp | 2 +- lib/render/VolumeRenderer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/render/VolumeOSPRay.cpp b/lib/render/VolumeOSPRay.cpp index 057bbb8e79..e1f07843c6 100644 --- a/lib/render/VolumeOSPRay.cpp +++ b/lib/render/VolumeOSPRay.cpp @@ -208,7 +208,7 @@ int VolumeOSPRay::LoadData(const Grid *grid) ospSetObjectAsData(group, "geometry", OSP_GEOMETRIC_MODEL, _ospIsoModel); else ospSetObjectAsData(group, "volume", OSP_VOLUMETRIC_MODEL, _ospVolumeModel); - if (p->GetValueLong("osp_enable_clipping", false)) ospSetObjectAsData(group, "clippingGeometry", OSP_GEOMETRIC_MODEL, clipModel); + if (p->GetValueLong("osp_enable_clipping", true)) ospSetObjectAsData(group, "clippingGeometry", OSP_GEOMETRIC_MODEL, clipModel); // ospSetObjectAsData(group, "geometry", OSP_GEOMETRIC_MODEL, clipModel); ospCommit(group); ospRelease(clipModel); diff --git a/lib/render/VolumeRenderer.cpp b/lib/render/VolumeRenderer.cpp index a7cf3afdf3..8d3b60c719 100644 --- a/lib/render/VolumeRenderer.cpp +++ b/lib/render/VolumeRenderer.cpp @@ -111,7 +111,7 @@ int VolumeRenderer::_paintGL(bool fast) CheckCache(_cache.osp_force_regular, p->GetValueLong("osp_force_regular", 0)); CheckCache(_cache.osp_test_volume, p->GetValueLong("osp_test_volume", 0)); CheckCache(_cache.osp_decompose, p->GetValueLong("osp_decompose", 0)); - CheckCache(_cache.osp_enable_clipping, p->GetValueLong("osp_enable_clipping", 0)); + CheckCache(_cache.osp_enable_clipping, p->GetValueLong("osp_enable_clipping", 1)); if (_initializeAlgorithm() < 0) return -1; if (_loadData() < 0) return -1;