21 PG_RGEN_INTERSECT_CLOSEST,
22 PG_RGEN_INTERSECT_SHADOW,
23 PG_RGEN_INTERSECT_SUBSURFACE,
24 PG_RGEN_INTERSECT_VOLUME_STACK,
25 PG_RGEN_INTERSECT_DEDICATED_LIGHT,
26 PG_RGEN_SHADE_BACKGROUND,
28 PG_RGEN_SHADE_SURFACE,
29 PG_RGEN_SHADE_SURFACE_RAYTRACE,
30 PG_RGEN_SHADE_SURFACE_MNEE,
33 PG_RGEN_SHADE_DEDICATED_LIGHT,
34 PG_RGEN_EVAL_DISPLACE,
35 PG_RGEN_EVAL_BACKGROUND,
36 PG_RGEN_EVAL_CURVE_SHADOW_TRANSPARENCY,
51static const int MISS_PROGRAM_GROUP_OFFSET = PG_MISS;
52static const int NUM_MISS_PROGRAM_GROUPS = 1;
53static const int HIT_PROGAM_GROUP_OFFSET = PG_HITD;
54static const int NUM_HIT_PROGRAM_GROUPS = 8;
55static const int CALLABLE_PROGRAM_GROUPS_BASE = PG_CALL_SVM_AO;
56static const int NUM_CALLABLE_PROGRAM_GROUPS = 2;
59enum { PIP_SHADE, PIP_INTERSECT, NUM_PIPELINES };
63 char header[OPTIX_SBT_RECORD_HEADER_SIZE];
66class OptiXDevice :
public CUDADevice {
70 OptixModule optix_module =
NULL;
71 OptixModule builtin_modules[2] = {};
72 OptixPipeline pipelines[NUM_PIPELINES] = {};
73 OptixProgramGroup groups[NUM_PROGRAM_GROUPS] = {};
74 OptixPipelineCompileOptions pipeline_options = {};
76 device_vector<SbtRecord> sbt_data;
77 device_only_memory<KernelParamsOptiX> launch_params;
80 OSLGlobals osl_globals;
86 OptixTraversableHandle tlas_handle = 0;
91 OptiXDevice(
const DeviceInfo &info, Stats &stats, Profiler &profiler,
bool headless);
96 string compile_kernel_get_common_cflags(
const uint kernel_features);
98 bool load_kernels(
const uint kernel_features)
override;
100 bool load_osl_kernels()
override;
102 bool build_optix_bvh(BVHOptiX *bvh,
103 OptixBuildOperation operation,
104 const OptixBuildInput &build_input,
107 void build_bvh(
BVH *bvh, Progress &progress,
bool refit)
override;
109 void release_bvh(
BVH *bvh)
override;
110 void free_bvh_memory_delayed();
112 void const_copy_to(
const char *name,
void *host,
size_t size)
override;
114 void update_launch_params(
size_t offset,
void *
data,
size_t data_size);
116 virtual unique_ptr<DeviceQueue> gpu_queue_create()
override;
118 void *get_cpu_osl_memory()
override;
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a vector
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void refit(btStridingMeshInterface *triangles, const btVector3 &aabbMin, const btVector3 &aabbMax)
#define CCL_NAMESPACE_END
ccl_device bool BVH_FUNCTION_FULL_NAME BVH(KernelGlobals kg, ccl_private const Ray *ray, ccl_private LocalIntersection *local_isect, int local_object, ccl_private uint *lcg_state, int max_hits)
int context(const bContext *C, const char *member, bContextDataResult *result)
CCL_NAMESPACE_BEGIN typedef std::mutex thread_mutex