ingowald / optix7course

Apache License 2.0
452 stars 80 forks source link

Fix casting error from int to OPTIX_DENOISER_ALPHA_MODE_ALPHA_AS_AOV #33

Closed gmarcusm closed 2 years ago

gmarcusm commented 2 years ago

When compiling with gcc 9.4.0, denoiser examples 11 and 12 fail with:

error: invalid conversion from ‘int’ to ‘OptixDenoiserAlphaMode’ [-fpermissive]
      denoiserParams.denoiseAlpha = 1;

Use the actual enumeration type OPTIX_DENOISER_ALPHA_MODE_ALPHA_AS_AOV instead, which fixes the error and is more verbose.

ingowald commented 2 years ago

Thank you! Weirdly enough I never saw that error, but good to see it fixed!