Skip to content

Commit

Permalink
currently no need for occlusion ray
Browse files Browse the repository at this point in the history
  • Loading branch information
gralkapk committed Jul 10, 2024
1 parent bbc9400 commit 7b8f1d0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
22 changes: 11 additions & 11 deletions plugins/optix_hpg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -100,7 +100,7 @@ if (optix_hpg_PLUGIN_ENABLED)
$<TARGET_OBJECTS:embedded_miss_programs>
$<TARGET_OBJECTS:embedded_miss_occlusion_programs>
$<TARGET_OBJECTS:embedded_sphere_programs>
$<TARGET_OBJECTS:embedded_sphere_occlusion_programs>
#$<TARGET_OBJECTS:embedded_sphere_occlusion_programs>
$<TARGET_OBJECTS:embedded_mesh_programs>
$<TARGET_OBJECTS:embedded_transitioncalculator_programs>)

Expand Down
12 changes: 6 additions & 6 deletions plugins/optix_hpg/src/optix/SphereGeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -186,10 +186,10 @@ bool megamol::optix_hpg::SphereGeometry::assertData(geocalls::MultiParticleDataC
sbt_records_.push_back(sbt_record);

// occlusion stuff
SBTRecord<device::SphereGeoData> sbt_record_occlusion;
/*SBTRecord<device::SphereGeoData> 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;
}
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions plugins/optix_hpg/src/optix/SphereGeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ class SphereGeometry : public core::Module {

MMOptixModule sphere_module_;

MMOptixModule sphere_occlusion_module_;
//MMOptixModule sphere_occlusion_module_;

std::vector<SBTRecord<device::SphereGeoData>> sbt_records_;

std::array<OptixProgramGroup, 2> program_groups_;
std::array<OptixProgramGroup, 1> program_groups_;

CUdeviceptr _geo_buffer = 0;

Expand Down

0 comments on commit 7b8f1d0

Please sign in to comment.