From 7b8f1d03f769baaa10aaf3e63ecf5e907f694984 Mon Sep 17 00:00:00 2001 From: gralkapk Date: Wed, 10 Jul 2024 12:01:49 +0200 Subject: [PATCH] currently no need for occlusion ray --- plugins/optix_hpg/CMakeLists.txt | 22 +++++++++---------- .../optix_hpg/src/optix/SphereGeometry.cpp | 12 +++++----- plugins/optix_hpg/src/optix/SphereGeometry.h | 4 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/plugins/optix_hpg/CMakeLists.txt b/plugins/optix_hpg/CMakeLists.txt index b35b10cc24..ada3beb257 100644 --- a/plugins/optix_hpg/CMakeLists.txt +++ b/plugins/optix_hpg/CMakeLists.txt @@ -64,16 +64,16 @@ if (optix_hpg_PLUGIN_ENABLED) ${ptx_include_dirs} SOURCES cuda_resources/sphere.cu) - embed_ptx( - OUTPUT_TARGET - embedded_sphere_occlusion_programs - PTX_LINK_LIBRARIES - glm::glm - OptiX::OptiX - PTX_INCLUDE_DIRECTORIES - ${ptx_include_dirs} - SOURCES - cuda_resources/sphere_occlusion.cu) + #embed_ptx( + # OUTPUT_TARGET + # embedded_sphere_occlusion_programs + # PTX_LINK_LIBRARIES + # glm::glm + # OptiX::OptiX + # PTX_INCLUDE_DIRECTORIES + # ${ptx_include_dirs} + # SOURCES + # cuda_resources/sphere_occlusion.cu) embed_ptx( OUTPUT_TARGET embedded_mesh_programs @@ -100,7 +100,7 @@ if (optix_hpg_PLUGIN_ENABLED) $ $ $ - $ + #$ $ $) diff --git a/plugins/optix_hpg/src/optix/SphereGeometry.cpp b/plugins/optix_hpg/src/optix/SphereGeometry.cpp index a3412cea84..23bb795fbf 100644 --- a/plugins/optix_hpg/src/optix/SphereGeometry.cpp +++ b/plugins/optix_hpg/src/optix/SphereGeometry.cpp @@ -12,7 +12,7 @@ namespace megamol::optix_hpg { extern "C" const char embedded_sphere_programs[]; -extern "C" const char embedded_sphere_occlusion_programs[]; +//extern "C" const char embedded_sphere_occlusion_programs[]; } // namespace megamol::optix_hpg @@ -62,12 +62,12 @@ void megamol::optix_hpg::SphereGeometry::init(Context const& ctx) { {{MMOptixModule::MMOptixNameKind::MMOPTIX_NAME_INTERSECTION, "sphere_intersect"}, {MMOptixModule::MMOptixNameKind::MMOPTIX_NAME_CLOSESTHIT, "sphere_closesthit"}, {MMOptixModule::MMOptixNameKind::MMOPTIX_NAME_BOUNDS, "sphere_bounds"}}); - sphere_occlusion_module_ = MMOptixModule(embedded_sphere_occlusion_programs, ctx.GetOptiXContext(), + /*sphere_occlusion_module_ = MMOptixModule(embedded_sphere_occlusion_programs, ctx.GetOptiXContext(), &ctx.GetModuleCompileOptions(), &ctx.GetPipelineCompileOptions(), MMOptixModule::MMOptixProgramGroupKind::MMOPTIX_PROGRAM_GROUP_KIND_HITGROUP, {{MMOptixModule::MMOptixNameKind::MMOPTIX_NAME_INTERSECTION, "sphere_intersect"}, {MMOptixModule::MMOptixNameKind::MMOPTIX_NAME_CLOSESTHIT, "sphere_closesthit_occlusion"}, - {MMOptixModule::MMOptixNameKind::MMOPTIX_NAME_BOUNDS, "sphere_bounds_occlusion"}}); + {MMOptixModule::MMOptixNameKind::MMOPTIX_NAME_BOUNDS, "sphere_bounds_occlusion"}});*/ ++program_version; @@ -186,10 +186,10 @@ bool megamol::optix_hpg::SphereGeometry::assertData(geocalls::MultiParticleDataC sbt_records_.push_back(sbt_record); // occlusion stuff - SBTRecord sbt_record_occlusion; + /*SBTRecord sbt_record_occlusion; OPTIX_CHECK_ERROR(optixSbtRecordPackHeader(sphere_occlusion_module_, &sbt_record_occlusion)); sbt_record_occlusion.data = sbt_record.data; - sbt_records_.push_back(sbt_record_occlusion); + sbt_records_.push_back(sbt_record_occlusion);*/ ++sbt_version; } @@ -257,7 +257,7 @@ bool megamol::optix_hpg::SphereGeometry::get_data_cb(core::Call& c) { } program_groups_[0] = sphere_module_; - program_groups_[1] = sphere_occlusion_module_; + //program_groups_[1] = sphere_occlusion_module_; out_geo->set_handle(&_geo_handle); out_geo->set_program_groups(program_groups_.data(), program_groups_.size(), program_version); diff --git a/plugins/optix_hpg/src/optix/SphereGeometry.h b/plugins/optix_hpg/src/optix/SphereGeometry.h index 4bc606ea38..30186e131e 100644 --- a/plugins/optix_hpg/src/optix/SphereGeometry.h +++ b/plugins/optix_hpg/src/optix/SphereGeometry.h @@ -57,11 +57,11 @@ class SphereGeometry : public core::Module { MMOptixModule sphere_module_; - MMOptixModule sphere_occlusion_module_; + //MMOptixModule sphere_occlusion_module_; std::vector> sbt_records_; - std::array program_groups_; + std::array program_groups_; CUdeviceptr _geo_buffer = 0;