Blender V4.3
device/metal/bvh.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2021-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#pragma once
6
7#ifdef WITH_METAL
8
9# include "bvh/bvh.h"
10# include "bvh/params.h"
11# include "device/memory.h"
12
13# include <Metal/Metal.h>
14
16
17class BVHMetal : public BVH {
18 public:
19 API_AVAILABLE(macos(11.0))
20 id<MTLAccelerationStructure> accel_struct = nil;
21
22 API_AVAILABLE(macos(11.0))
23 id<MTLAccelerationStructure> null_BLAS = nil;
24
25 API_AVAILABLE(macos(11.0))
26 vector<id<MTLAccelerationStructure>> blas_array;
27
28 API_AVAILABLE(macos(11.0))
29 vector<id<MTLAccelerationStructure>> unique_blas_array;
30
31 Device *device = nullptr;
32
33 bool motion_blur = false;
34
35 bool build(Progress &progress, id<MTLDevice> device, id<MTLCommandQueue> queue, bool refit);
36
37 BVHMetal(const BVHParams &params,
38 const vector<Geometry *> &geometry,
39 const vector<Object *> &objects,
40 Device *device);
41 virtual ~BVHMetal();
42
43 bool build_BLAS(Progress &progress, id<MTLDevice> device, id<MTLCommandQueue> queue, bool refit);
44 bool build_BLAS_mesh(Progress &progress,
45 id<MTLDevice> device,
46 id<MTLCommandQueue> queue,
47 Geometry *const geom,
48 bool refit);
49 bool build_BLAS_hair(Progress &progress,
50 id<MTLDevice> device,
51 id<MTLCommandQueue> queue,
52 Geometry *const geom,
53 bool refit);
54 bool build_BLAS_pointcloud(Progress &progress,
55 id<MTLDevice> device,
56 id<MTLCommandQueue> queue,
57 Geometry *const geom,
58 bool refit);
59 bool build_TLAS(Progress &progress, id<MTLDevice> device, id<MTLCommandQueue> queue, bool refit);
60
61 API_AVAILABLE(macos(11.0))
62 void set_accel_struct(id<MTLAccelerationStructure> new_accel_struct);
63};
64
66
67#endif /* WITH_METAL */
struct Object Object
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
void refit(btStridingMeshInterface *triangles, const btVector3 &aabbMin, const btVector3 &aabbMax)
void build(btStridingMeshInterface *triangles, bool useQuantizedAabbCompression, const btVector3 &bvhAabbMin, const btVector3 &bvhAabbMax)
Definition bvh/bvh.h:66
#define CCL_NAMESPACE_END
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]