Skip to content

Commit

Permalink
MDL_renderer: Updated to new MDL SDK 2023 (367100.2992).
Browse files Browse the repository at this point in the history
Loads nv_openimageio image loader plugin by default.
USE_OPENIMGEIO_PLUGIN define in config.h can toggle between nv_openimageio and nv_freeimage plugins at compile time.
(The MDL-SDK doesn't build the nv_freeimage library by default, needs to set MDL_BUILD_FREEIMAGE_PLUGIN variable.)
Adapted code to interface changes: get_body_[texture|light_profile|bsdf_measurement]_count() => get_[texture| light_profile|bsdf_measurement]_is_body_resource(i)
Added GUI to rotate the spherical environment light with Euler angles.
Added GUI to latch the current client windiow size to the render resolution.
Updated data/scene_mdl_vMaterials.txt to MDL vMaterials 2.2. (Now knows of all vMaterials 1.7, 2.0, 2.1, 2.2.)
Changed system option prefixScreenshot to reflect the name of the system description file, not the renderer.
intro examples:
Enabled OptiX IR for all supported OptiX SDK versions.
Simplified OptiX denoiser parameter default initialization, covering all OptiX SDK versions.
Added --nopbo (-n) option to intro examples' usage message.
  • Loading branch information
droettger committed Jun 22, 2023
1 parent 37f2255 commit c9557ee
Show file tree
Hide file tree
Showing 29 changed files with 472 additions and 86 deletions.
62 changes: 32 additions & 30 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/MDL_renderer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ set(USE_OPTIX_IR FALSE)
set(OPTIX_MODULE_EXTENSION ".ptx")
set(OPTIX_PROGRAM_TARGET "--ptx")

if (OptiX76_FOUND OR OptiX75_FOUND)
if (OptiX77_FOUND OR OptiX76_FOUND OR OptiX75_FOUND)
# Define USE_OPTIX_IR and change the target to OptiX IR if the combination of OptiX SDK and CUDA Toolkit versions supports this mode.
if ((${CUDAToolkit_VERSION_MAJOR} GREATER 11) OR ((${CUDAToolkit_VERSION_MAJOR} EQUAL 11) AND (${CUDAToolkit_VERSION_MINOR} GREATER_EQUAL 7)))
set(USE_OPTIX_IR TRUE)
Expand Down
3 changes: 3 additions & 0 deletions apps/MDL_renderer/inc/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ class Application
float m_clockFactor; // "clockFactor"
bool m_useDirectLighting;

TypeLight m_typeEnv; // The type of the light in m_lightsGUI[0]. Used to determine the miss shader.
float m_rotationEnvironment[3]; // The Euler rotation angles for the spherical environment light.

std::string m_prefixScreenshot; // "prefixScreenshot", allows to set a path and the prefix for the screenshot filename. spp, data, time and extension will be appended.

TonemapperGUI m_tonemapperGUI; // "gamma", "whitePoint", "burnHighlights", "crushBlacks", "saturation", "brightness"
Expand Down
7 changes: 7 additions & 0 deletions apps/MDL_renderer/shaders/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,11 @@
// For very resource-heavy materials, experiment with bigger values.
#define NUM_TEXTURE_RESULTS 16

// Switch the MDL-SDK image plugin between OpenImageIo and FreeImage.
// The open-source MDL-SDK 2023 (367100.2992) release on github.com switched to the OpenImageIO plugin by default
// and doesn't build the FreeImage plugin unless the CMake variable MDL_BUILD_FREEIMAGE_PLUGIN is enabled.
// 0 = Load plugin library nv_freeimage.
// 1 = Load plugin library nv_openimageio.
#define USE_OPENIMAGEIO_PLUGIN 1

#endif // CONFIG_H
3 changes: 1 addition & 2 deletions apps/MDL_renderer/shaders/hit.cu
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,7 @@ extern "C" __global__ void __anyhit__radiance_cutout()
getTransforms(optixGetTransformListHandle(0), objectToWorld, worldToObject); // Single instance level transformation list only.

// Object space vertex attributes at the hit point.
float3 po = attr0.vertex * alpha + attr1.vertex * theBarycentrics.x + attr2.vertex * theBarycentrics.y;

float3 po = attr0.vertex * alpha + attr1.vertex * theBarycentrics.x + attr2.vertex * theBarycentrics.y;
float3 ns = attr0.normal * alpha + attr1.normal * theBarycentrics.x + attr2.normal * theBarycentrics.y;
float3 ng = cross(attr1.vertex - attr0.vertex, attr2.vertex - attr0.vertex);
float3 tg = attr0.tangent * alpha + attr1.tangent * theBarycentrics.x + attr2.tangent * theBarycentrics.y;
Expand Down
2 changes: 2 additions & 0 deletions apps/MDL_renderer/shaders/per_ray_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ struct PerRayData

float3 radiance; // Radiance along the current path segment.
float pdf; // The last BSDF sample's pdf, tracked for multiple importance sampling.

float3 throughput; // The current path troughput. Starts white and gets modulated with bsdf_over_pdf with each sample.

unsigned int flags; // Bitfield with flags. See FLAG_* defines above for its contents.

float3 sigma_t; // Extinction coefficient in a homogeneous medium.
Expand Down
42 changes: 40 additions & 2 deletions apps/MDL_renderer/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Application::Application(GLFWwindow* window, const Options& options)
, m_epsilonFactor(500.0f)
, m_clockFactor(1000.0f)
, m_useDirectLighting(true)
, m_typeEnv(NUM_LIGHT_TYPES)
, m_mouseSpeedRatio(10.0f)
, m_idGroup(0)
, m_idInstance(0)
Expand Down Expand Up @@ -203,6 +204,10 @@ Application::Application(GLFWwindow* window, const Options& options)
m_tonemapperGUI.saturation = 1.0f;
m_tonemapperGUI.brightness = 1.0f;

m_rotationEnvironment[0] = 0.0f;
m_rotationEnvironment[1] = 0.0f;
m_rotationEnvironment[2] = 0.0f;

// System wide parameters are loaded from this file to keep the number of command line options small.
const std::string filenameSystem = options.getSystem();
if (!loadSystemDescription(filenameSystem))
Expand Down Expand Up @@ -256,9 +261,9 @@ Application::Application(GLFWwindow* window, const Options& options)

// ===== RAYTRACER

const TypeLight typeEnv = (!m_lightsGUI.empty()) ? m_lightsGUI[0].typeLight : NUM_LIGHT_TYPES; // NUM_LIGHT_TYPES means not an environment light either.
m_typeEnv = (!m_lightsGUI.empty()) ? m_lightsGUI[0].typeLight : NUM_LIGHT_TYPES; // NUM_LIGHT_TYPES means not an environment light either.

m_raytracer = std::make_unique<Raytracer>(m_maskDevices, typeEnv, m_interop, tex, pbo, m_sizeArena, m_peerToPeer);
m_raytracer = std::make_unique<Raytracer>(m_maskDevices, m_typeEnv, m_interop, tex, pbo, m_sizeArena, m_peerToPeer);

// If the raytracer could not be initialized correctly, return and leave Application invalid.
if (!m_raytracer->m_isValid)
Expand Down Expand Up @@ -705,12 +710,45 @@ void Application::guiWindow()
m_raytracer->updateState(m_state);
refresh = true;
}
if (m_typeEnv == TYPE_LIGHT_ENV_SPHERE)
{
if (ImGui::DragFloat3("Environment Rotation", m_rotationEnvironment, 1.0f, 0.0f, 360.0f))
{
const dp::math::Quatf xRot(dp::math::Vec3f(1.0f, 0.0f, 0.0f), dp::math::degToRad(m_rotationEnvironment[0]));
const dp::math::Quatf yRot(dp::math::Vec3f(0.0f, 1.0f, 0.0f), dp::math::degToRad(m_rotationEnvironment[1]));
const dp::math::Quatf zRot(dp::math::Vec3f(0.0f, 0.0f, 1.0f), dp::math::degToRad(m_rotationEnvironment[2]));
m_lightsGUI[0].orientation = xRot * yRot * zRot;

const dp::math::Quatf xRotInv(dp::math::Vec3f(1.0f, 0.0f, 0.0f), dp::math::degToRad(-m_rotationEnvironment[0]));
const dp::math::Quatf yRotInv(dp::math::Vec3f(0.0f, 1.0f, 0.0f), dp::math::degToRad(-m_rotationEnvironment[1]));
const dp::math::Quatf zRotInv(dp::math::Vec3f(0.0f, 0.0f, 1.0f), dp::math::degToRad(-m_rotationEnvironment[2]));
m_lightsGUI[0].orientationInv = zRotInv * yRotInv * xRotInv;

m_lightsGUI[0].matrix = dp::math::Mat44f(m_lightsGUI[0].orientation, dp::math::Vec3f(0.0f, 0.0f, 0.0f));
m_lightsGUI[0].matrixInv = dp::math::Mat44f(m_lightsGUI[0].orientationInv, dp::math::Vec3f(0.0f, 0.0f, 0.0f));

m_raytracer->updateLight(0, m_lightsGUI[0]);
refresh = true;
}
}
if (ImGui::Combo("Camera", (int*) &m_typeLens, "Pinhole\0Fisheye\0Spherical\0\0"))
{
m_state.typeLens = m_typeLens;
m_raytracer->updateState(m_state);
refresh = true;
}
if (ImGui::Button("Match Resolution"))
{
// Match the rendering resolution to the current client window size.
m_resolution.x = std::max(1, m_width);
m_resolution.y = std::max(1, m_height);

m_camera.setResolution(m_resolution.x, m_resolution.y);
m_rasterizer->setResolution(m_resolution.x, m_resolution.y);
m_state.resolution = m_resolution;
m_raytracer->updateState(m_state);
refresh = true;
}
if (ImGui::InputInt2("Resolution", &m_resolution.x, ImGuiInputTextFlags_EnterReturnsTrue)) // This requires RETURN to apply a new value.
{
m_resolution.x = std::max(1, m_resolution.x);
Expand Down
25 changes: 18 additions & 7 deletions apps/MDL_renderer/src/Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ Device::Device(const int ordinal,

options.logCallbackFunction = &callbackLogger;
options.logCallbackData = this; // This allows per device logs. It's currently printing the device ordinal.
options.logCallbackLevel = 3; // Keep at warning level to suppress the disk cache messages.
options.logCallbackLevel = 3; // Keep at warning level (3) to suppress the disk cache messages.
//options.validationMode = OPTIX_DEVICE_CONTEXT_VALIDATION_MODE_ALL;

OPTIX_CHECK( m_api.optixDeviceContextCreate(m_cudaContext, &options, &m_optixContext) );

Expand Down Expand Up @@ -352,9 +353,9 @@ Device::Device(const int ordinal,
m_mco.debugLevel = OPTIX_COMPILE_DEBUG_LEVEL_FULL; // Full debug. Never profile kernels with this setting!
#else
m_mco.optLevel = OPTIX_COMPILE_OPTIMIZATION_LEVEL_3; // All optimizations, is the default.
// Keep generated line info for Nsight Compute profiling. (NVCC_OPTIONS use --generate-line-info in CMakeLists.txt)
// Keep generated line info. (NVCC_OPTIONS use --generate-line-info in CMakeLists.txt)
#if (OPTIX_VERSION >= 70400)
m_mco.debugLevel = OPTIX_COMPILE_DEBUG_LEVEL_MINIMAL;
m_mco.debugLevel = OPTIX_COMPILE_DEBUG_LEVEL_MINIMAL; // PERF Must use OPTIX_COMPILE_DEBUG_LEVEL_MODERATE to profile code with Nsight Compute!
#else
m_mco.debugLevel = OPTIX_COMPILE_DEBUG_LEVEL_LINEINFO;
#endif
Expand All @@ -376,7 +377,7 @@ Device::Device(const int ordinal,
m_pco.exceptionFlags = OPTIX_EXCEPTION_FLAG_NONE;
#endif
m_pco.pipelineLaunchParamsVariableName = "sysData";
#if (OPTIX_VERSION != 70000)
#if (OPTIX_VERSION >= 70100)
// New in OptiX 7.1.0.
// This renderer supports triangles and cubic B-splines.
m_pco.usesPrimitiveTypeFlags = OPTIX_PRIMITIVE_TYPE_FLAGS_TRIANGLE | OPTIX_PRIMITIVE_TYPE_FLAGS_ROUND_CUBIC_BSPLINE;
Expand Down Expand Up @@ -925,7 +926,7 @@ void Device::initPipeline()
unsigned int cssCCTree = ssp.cssCC; // Should be 0. No continuation callables in this pipeline. // maxCCDepth == 0
unsigned int cssCHOrMSPlusCCTree = std::max(ssp.cssCH, ssp.cssMS) + cssCCTree;

const unsigned int maxDCDepth = 2; // The __direct_callable__light_mesh_mdl calls other direct callables from MDL expressions.
const unsigned int maxDCDepth = 2; // The __direct_callable__light_mesh calls other direct callables from MDL expressions.

// Arguments

Expand Down Expand Up @@ -1142,6 +1143,15 @@ void Device::updateLight(const int idLight, const LightGUI& lightGUI)
LightDefinition& light = m_lights[idLight];

// Curently only these material parameters affecting the light can be changed inside the GUI.
memcpy(light.matrix, (~lightGUI.matrix).getPtr(), sizeof(float) * 12);
memcpy(light.matrixInv, (~lightGUI.matrixInv).getPtr(), sizeof(float) * 12);

const dp::math::Mat33f rotation(lightGUI.orientation);
const dp::math::Mat33f rotationInv(lightGUI.orientationInv);

memcpy(light.ori, (~rotation).getPtr(), sizeof(float) * 9);
memcpy(light.oriInv, (~rotationInv).getPtr(), sizeof(float) * 9);

light.emission = lightGUI.colorEmission * lightGUI.multiplierEmission;
light.spotAngleHalf = dp::math::degToRad(lightGUI.spotAngle * 0.5f);
light.spotExponent = lightGUI.spotExponent;
Expand Down Expand Up @@ -2094,7 +2104,8 @@ void Device::compileMaterial(mi::neuraylib::ITransaction* transaction,
DeviceShaderConfiguration dsc = {};

// Set all callable indices to the invalid value -1.
// The MDL code generator will generate all functions (sample, evaluate, pdf).
// The MDL code generator will generate all functions by default (sample, evaluate, pdf),
// but pdf functions are disabled with backend set_option("enable_pdf", "off")
// This is only containing the direct callables which are required inside the pipeline of this unidirectional path tracer.

dsc.idxCallInit = -1;
Expand Down Expand Up @@ -2289,7 +2300,7 @@ void Device::compileMaterial(mi::neuraylib::ITransaction* transaction,
dsc.idxCallHairEval = appendProgramGroupMDL(indexShader, name + std::string("_evaluate"));
}

m_deviceShaderConfigurations.push_back(dsc);
m_deviceShaderConfigurations.push_back(dsc);

MY_ASSERT(m_modulesMDL.size() == m_deviceShaderConfigurations.size());
}
Expand Down
42 changes: 32 additions & 10 deletions apps/MDL_renderer/src/Raytracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1345,15 +1345,15 @@ class Resource_callback
switch (resource->get_kind())
{
case mi::neuraylib::IValue::VK_TEXTURE:
if (res_idx < m_target_code->get_body_texture_count())
if (m_target_code->get_texture_is_body_resource(res_idx))
return res_idx;
break;
case mi::neuraylib::IValue::VK_LIGHT_PROFILE:
if (res_idx < m_target_code->get_body_light_profile_count())
if (m_target_code->get_light_profile_is_body_resource(res_idx))
return res_idx;
break;
case mi::neuraylib::IValue::VK_BSDF_MEASUREMENT:
if (res_idx < m_target_code->get_body_bsdf_measurement_count())
if (m_target_code->get_bsdf_measurement_is_body_resource(res_idx))
return res_idx;
break;
default:
Expand Down Expand Up @@ -1626,11 +1626,19 @@ bool Raytracer::initMDL(const std::vector<std::string>& searchPaths)
}

// Load plugins.
#if USE_OPENIMAGEIO_PLUGIN
if (load_plugin(m_neuray.get(), "nv_openimageio" MI_BASE_DLL_FILE_EXT) != 0)
{
std::cerr << "FATAL: Failed to load nv_openimageio plugin\n";
return false;
}
#else
if (load_plugin(m_neuray.get(), "nv_freeimage" MI_BASE_DLL_FILE_EXT) != 0)
{
std::cerr << "FATAL: Failed to load nv_freeimage plugin\n";
return false;
}
#endif

if (load_plugin(m_neuray.get(), "dds" MI_BASE_DLL_FILE_EXT) != 0)
{
Expand Down Expand Up @@ -1716,6 +1724,16 @@ bool Raytracer::initMDL(const std::vector<std::string>& searchPaths)
// return false;
//}

// PERF Disable code generation for distribution pdf functions.
// The unidirectional light transport in this renderer never calls them.
// The sample and evaluate functions return the necessary pdf values.
if (m_mdl_backend->set_option("enable_pdf", "off") != 0)
{
std::cerr << "WARNING: Raytracer::initMDL() Setting backend option enable_pdf to off failed.\n";
// Not a fatal error if this cannot be set.
// return false;
}

m_image_api = m_neuray->get_api_component<mi::neuraylib::IImage_api>();

return true;
Expand Down Expand Up @@ -2065,7 +2083,11 @@ void Raytracer::initMaterialMDL(MaterialMDL* material)
// Split into separate functions to make the Neuray handles and transaction scope lifetime handling automatic.
// When the function was successful, the Compile_result contains all information required to setup the device resources.
const bool valid = compileMaterial(transaction, material, res);

if (!valid)
{
std::cerr << "ERROR: Raytracer::initMaterialMDL() compileMaterial() failed. Material invalid.\n";
}

material->setIsValid(valid);

if (valid)
Expand Down Expand Up @@ -2378,25 +2400,25 @@ bool Raytracer::compileMaterial(mi::neuraylib::ITransaction* transaction, Materi

// Initialize with body resources always being required.
// Mind that the zeroth resource is the invalid resource.
if (res.target_code->get_body_texture_count() > 0)
for (mi::Size i = 1, n = res.target_code->get_texture_count(); i < n; ++i)
{
for (mi::Size i = 1, n = res.target_code->get_body_texture_count(); i < n; ++i)
if (res.target_code->get_texture_is_body_resource(i))
{
res.textures.emplace_back(res.target_code->get_texture(i), res.target_code->get_texture_shape(i));
}
}

if (res.target_code->get_body_light_profile_count() > 0)
for (mi::Size i = 1, n = res.target_code->get_light_profile_count(); i < n; ++i)
{
for (mi::Size i = 1, n = res.target_code->get_body_light_profile_count(); i < n; ++i)
if (res.target_code->get_light_profile_is_body_resource(i))
{
res.light_profiles.emplace_back(res.target_code->get_light_profile(i));
}
}

if (res.target_code->get_body_bsdf_measurement_count() > 0)
for (mi::Size i = 1, n = res.target_code->get_bsdf_measurement_count(); i < n; ++i)
{
for (mi::Size i = 1, n = res.target_code->get_body_bsdf_measurement_count(); i < n; ++i)
if (res.target_code->get_bsdf_measurement_is_body_resource(i))
{
res.bsdf_measurements.emplace_back(res.target_code->get_bsdf_measurement(i));
}
Expand Down
2 changes: 1 addition & 1 deletion apps/intro_denoiser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ set(USE_OPTIX_IR FALSE)
set(OPTIX_MODULE_EXTENSION ".ptx")
set(OPTIX_PROGRAM_TARGET "--ptx")

if (OptiX76_FOUND OR OptiX75_FOUND)
if (OptiX77_FOUND OR OptiX76_FOUND OR OptiX75_FOUND)
# Define USE_OPTIX_IR and change the target to OptiX IR if the combination of OptiX SDK and CUDA Toolkit versions supports this mode.
if ((${CUDAToolkit_VERSION_MAJOR} GREATER 11) OR ((${CUDAToolkit_VERSION_MAJOR} EQUAL 11) AND (${CUDAToolkit_VERSION_MINOR} GREATER_EQUAL 7)))
set(USE_OPTIX_IR TRUE)
Expand Down
17 changes: 6 additions & 11 deletions apps/intro_denoiser/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2473,17 +2473,12 @@ void Application::initDenoiser()
m_d_stateDenoiser, m_sizesDenoiser.stateSizeInBytes,
m_d_scratchDenoiser, m_scratchSizeInBytes) );

m_paramsDenoiser = {}; // Make sure all fields are nulled. OptiX 7.2.0 added the field CUdeviceptr hdrAverageColor.

// Don't denoise alpha.
#if OPTIX_VERSION >= 70500
m_paramsDenoiser.denoiseAlpha = OPTIX_DENOISER_ALPHA_MODE_COPY;
#else
m_paramsDenoiser.denoiseAlpha = 0;
#endif

// Show the denoised image only.
m_paramsDenoiser.blendFactor = 0.0f;
// Make sure all existing fields are nulled!
// denoiseAlpha = 0 (== OPTIX_DENOISER_ALPHA_MODE_COPY)
// blendFactor = 0.0f; // Shows the denoised image.
// OptiX 7.2.0 added the field CUdeviceptr hdrAverageColor.
// OptiX 7.5.0 changed denoiseAlpha from int to enum OptixDenoiserAlphaMode.
m_paramsDenoiser = {};

CU_CHECK( cuMemAlloc(&m_paramsDenoiser.hdrIntensity, sizeof(float)) );

Expand Down
1 change: 1 addition & 0 deletions apps/intro_denoiser/src/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ void Options::printUsage(std::string const& argv0)
" ? | help | --help Print this usage message and exit.\n"
" -w | --width <int> Width of the client window (512)\n"
" -h | --height <int> Height of the client window (512)\n"
" -n | --nopbo Disable OpenGL interop.\n"
" -l | --light Add an area light to the scene.\n"
" -m | --miss <0|1|2> Select the miss shader (0 = black, 1 = white, 2 = HDR texture.\n"
" -e | --env <filename> Filename of a spherical HDR texture. Use with --miss 2.\n"
Expand Down
2 changes: 1 addition & 1 deletion apps/intro_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ set(USE_OPTIX_IR FALSE)
set(OPTIX_MODULE_EXTENSION ".ptx")
set(OPTIX_PROGRAM_TARGET "--ptx")

if (OptiX76_FOUND OR OptiX75_FOUND)
if (OptiX77_FOUND OR OptiX76_FOUND OR OptiX75_FOUND)
# Define USE_OPTIX_IR and change the target to OptiX IR if the combination of OptiX SDK and CUDA Toolkit versions supports this mode.
if ((${CUDAToolkit_VERSION_MAJOR} GREATER 11) OR ((${CUDAToolkit_VERSION_MAJOR} EQUAL 11) AND (${CUDAToolkit_VERSION_MINOR} GREATER_EQUAL 7)))
set(USE_OPTIX_IR TRUE)
Expand Down
1 change: 1 addition & 0 deletions apps/intro_driver/src/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ void Options::printUsage(std::string const& argv0)
" ? | help | --help Print this usage message and exit.\n"
" -w | --width <int> Width of the client window (512)\n"
" -h | --height <int> Height of the client window (512)\n"
" -n | --nopbo Disable OpenGL interop.\n"
" -l | --light Add an area light to the scene.\n"
" -m | --miss <0|1|2> Select the miss shader (0 = black, 1 = white, 2 = HDR texture.\n"
" -e | --env <filename> Filename of a spherical HDR texture. Use with --miss 2.\n"
Expand Down
2 changes: 1 addition & 1 deletion apps/intro_motion_blur/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ set(USE_OPTIX_IR FALSE)
set(OPTIX_MODULE_EXTENSION ".ptx")
set(OPTIX_PROGRAM_TARGET "--ptx")

if (OptiX76_FOUND OR OptiX75_FOUND)
if (OptiX77_FOUND OR OptiX76_FOUND OR OptiX75_FOUND)
# Define USE_OPTIX_IR and change the target to OptiX IR if the combination of OptiX SDK and CUDA Toolkit versions supports this mode.
if ((${CUDAToolkit_VERSION_MAJOR} GREATER 11) OR ((${CUDAToolkit_VERSION_MAJOR} EQUAL 11) AND (${CUDAToolkit_VERSION_MINOR} GREATER_EQUAL 7)))
set(USE_OPTIX_IR TRUE)
Expand Down
1 change: 1 addition & 0 deletions apps/intro_motion_blur/src/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ void Options::printUsage(std::string const& argv0)
" ? | help | --help Print this usage message and exit.\n"
" -w | --width <int> Width of the client window (512)\n"
" -h | --height <int> Height of the client window (512)\n"
" -n | --nopbo Disable OpenGL interop.\n"
" -l | --light Add an area light to the scene.\n"
" -m | --miss <0|1|2> Select the miss shader (0 = black, 1 = white, 2 = HDR texture.\n"
" -e | --env <filename> Filename of a spherical HDR texture. Use with --miss 2.\n"
Expand Down
2 changes: 1 addition & 1 deletion apps/intro_runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ set(USE_OPTIX_IR FALSE)
set(OPTIX_MODULE_EXTENSION ".ptx")
set(OPTIX_PROGRAM_TARGET "--ptx")

if (OptiX76_FOUND OR OptiX75_FOUND)
if (OptiX77_FOUND OR OptiX76_FOUND OR OptiX75_FOUND)
# Define USE_OPTIX_IR and change the target to OptiX IR if the combination of OptiX SDK and CUDA Toolkit versions supports this mode.
if ((${CUDAToolkit_VERSION_MAJOR} GREATER 11) OR ((${CUDAToolkit_VERSION_MAJOR} EQUAL 11) AND (${CUDAToolkit_VERSION_MINOR} GREATER_EQUAL 7)))
set(USE_OPTIX_IR TRUE)
Expand Down
Loading

0 comments on commit c9557ee

Please sign in to comment.