Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optix 8.0 Support #1

Open
wants to merge 3 commits into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions lib/denoiser/OptixDenoiserImpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,14 @@ OptixDenoiserImpl::OptixDenoiserImpl(int width,
return;
}

mDenoiserParams = {}; // zero initialize
mDenoiserParams.denoiseAlpha = 0; // don't denoise alpha
mDenoiserParams.hdrIntensity = 0; // optional average log intensity image of input image,
// helps with very dark/bright images
mDenoiserParams.blendFactor = 0.f; // show the denoised image only
mDenoiserParams.hdrAverageColor = 0; // used with OPTIX_DENOISER_MODEL_KIND_AOV
mDenoiserParams = {}; // zero initialize
mDenoiserParams.hdrIntensity = 0; // optional average log intensity image of input image,
// helps with very dark/bright images
mDenoiserParams.blendFactor = 0.f; // show the denoised image only
mDenoiserParams.hdrAverageColor = 0; // used with OPTIX_DENOISER_MODEL_KIND_AOV

// Don't denoise alpha
mDenoiserOptions.denoiseAlpha = OPTIX_DENOISER_ALPHA_MODE_COPY;

if (cudaMalloc(&mDenoisedOutput, sizeof(float4) * mWidth * mHeight) != cudaSuccess) {
*errorMsg = "Unable to allocate denoiser output buffer";
Expand Down
1 change: 1 addition & 0 deletions lib/denoiser/OptixDenoiserImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class OptixDenoiserImpl : public DenoiserImpl
unsigned char* mDenoiserState;
unsigned char* mScratch;
OptixDenoiserParams mDenoiserParams;
OptixDenoiserOptions mDenoiserOptions;
float* mDenoisedOutput;
float* mInputBeauty;
OptixDenoiserLayer mLayer;
Expand Down