diff options
author | Patrick Mours <pmours@nvidia.com> | 2019-09-12 15:50:06 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-13 12:50:11 +0300 |
commit | a2b52dc5716a97e5413acbd6eefc9ce3788b6456 (patch) | |
tree | 7e6d6c17b73671e67c1f7fbdadd821b4541f820f /intern/cycles/bvh/bvh.cpp | |
parent | 53932f1f068501bfb095c407a7777a964dc5ec1c (diff) |
Cycles: add Optix device backend
This uses hardware-accelerated raytracing on NVIDIA RTX graphics cards.
It is still currently experimental. Most features are supported, but a few
are still missing like baking, branched path tracing and using CPU memory.
https://wiki.blender.org/wiki/Reference/Release_Notes/2.81/Cycles#NVIDIA_RTX
For building with Optix support, the Optix SDK must be installed. See here for
build instructions:
https://wiki.blender.org/wiki/Building_Blender/CUDA
Differential Revision: https://developer.blender.org/D5363
Diffstat (limited to 'intern/cycles/bvh/bvh.cpp')
-rw-r--r-- | intern/cycles/bvh/bvh.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp index b6a4aba74b5..16c721da06a 100644 --- a/intern/cycles/bvh/bvh.cpp +++ b/intern/cycles/bvh/bvh.cpp @@ -26,6 +26,9 @@ #include "bvh/bvh_build.h" #include "bvh/bvh_node.h" +#ifdef WITH_OPTIX +# include "bvh/bvh_optix.h" +#endif #ifdef WITH_EMBREE # include "bvh/bvh_embree.h" #endif @@ -51,6 +54,8 @@ const char *bvh_layout_name(BVHLayout layout) return "NONE"; case BVH_LAYOUT_EMBREE: return "EMBREE"; + case BVH_LAYOUT_OPTIX: + return "OPTIX"; case BVH_LAYOUT_ALL: return "ALL"; } @@ -116,6 +121,12 @@ BVH *BVH::create(const BVHParams ¶ms, #else break; #endif + case BVH_LAYOUT_OPTIX: +#ifdef WITH_OPTIX + return new BVHOptiX(params, meshes, objects); +#else + break; +#endif case BVH_LAYOUT_NONE: case BVH_LAYOUT_ALL: break; |