31template<
typename T>
struct VolumeGridTraits {
35 using BlenderType = void;
43 using TreeType = void;
50template<>
struct VolumeGridTraits<bool> {
51 using BlenderType = bool;
53 using TreeType = openvdb::BoolTree;
56 static bool to_openvdb(
const bool &value)
60 static bool to_blender(
const bool &value)
66template<>
struct VolumeGridTraits<
int> {
67 using BlenderType =
int;
69 using TreeType = openvdb::Int32Tree;
72 static int to_openvdb(
const int &value)
76 static int to_blender(
const int &value)
82template<>
struct VolumeGridTraits<
float> {
83 using BlenderType =
float;
85 using TreeType = openvdb::FloatTree;
88 static float to_openvdb(
const float &value)
92 static float to_blender(
const float &value)
98template<>
struct VolumeGridTraits<
float3> {
99 using BlenderType =
float3;
101 using TreeType = openvdb::Vec3STree;
104 static openvdb::Vec3f to_openvdb(
const float3 &value)
106 return openvdb::Vec3f(*value);
108 static float3 to_blender(
const openvdb::Vec3f &value)
110 return float3(value.asV());
114template<
typename T>
using OpenvdbTreeType =
typename VolumeGridTraits<T>::TreeType;
115template<
typename T>
using OpenvdbGridType = openvdb::Grid<OpenvdbTreeType<T>>;
@ VOLUME_GRID_VECTOR_FLOAT
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int