13# include <OSL/oslexec.h>
136 OSL::ShaderGroupRef surface;
137 OSL::ShaderGroupRef bump;
138 OSL::ShaderGroupRef displacement;
139 OSL::ShaderGroupRef volume;
141 map<Device *, OSLCache> osl_cache;
258 template<std::
size_t n>
unsigned long long int uint64_t
unordered_map< ustring, uint64_t > AttributeIDMap
string get_cryptomatte_materials(Scene *scene)
size_t thin_film_table_offset_
float3 rec709_to_scene_linear(const float3 c)
static unique_ptr< ShaderManager > create(const int shadingsystem)
void device_update_common(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress)
SceneLinearSpace scene_linear_space
virtual void device_free(Device *device, DeviceScene *dscene, Scene *scene)=0
size_t ensure_bsdf_table_impl(DeviceScene *dscene, Scene *scene, const float *table, const size_t n)
void device_update_pre(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress)
AttributeIDMap unique_attribute_id
float linear_rgb_to_gray(const float3 c)
virtual uint64_t get_attribute_id(ustring name)
void init_xyz_transforms()
SceneLinearSpace get_scene_linear_space()
virtual void device_update_specific(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress)=0
thread_spin_lock attribute_lock_
void compute_thin_film_table(const Transform &xyz_to_rgb)
int get_shader_id(Shader *shader, bool smooth=false)
unordered_map< const float *, size_t > bsdf_tables
void device_update_post(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress)
void tag_update(Scene *scene, const uint32_t flag)
void device_free_common(Device *device, DeviceScene *dscene, Scene *scene)
static thread_mutex lookup_table_mutex
uint get_kernel_features(Scene *scene)
size_t ensure_bsdf_table(DeviceScene *dscene, Scene *scene, const float(&table)[n])
static void add_default(Scene *scene)
uint get_graph_kernel_features(ShaderGraph *graph)
vector< float > thin_film_table
bool has_surface_spatial_varying
bool has_surface_link() const
bool need_update_attribute
bool has_volume_attribute_dependency
bool need_update_geometry() const
void set_graph(unique_ptr< ShaderGraph > &&graph)
bool emission_is_constant
float prev_volume_step_rate
bool need_update_displacement
EmissionSampling emission_sampling
bool shadow_transparency_needs_realloc
bool has_surface_raytrace
AttributeRequestSet attributes
bool has_surface_transparent
void tag_update(Scene *scene)
NODE_DECLARE unique_ptr< ShaderGraph > graph
bool prev_has_surface_shadow_transparency
bool has_surface_shadow_transparency() const
bool has_volume_connected
void tag_used(Scene *scene)
bool has_volume_spatial_varying
#define CCL_NAMESPACE_END
#define NODE_SOCKET_API(type_, name)
color xyz_to_rgb(float x, float y, float z)
@ VOLUME_NUM_INTERPOLATION
@ VOLUME_INTERPOLATION_LINEAR
@ VOLUME_INTERPOLATION_CUBIC
@ VOLUME_SAMPLING_DISTANCE
@ VOLUME_SAMPLING_EQUIANGULAR
@ VOLUME_SAMPLING_MULTIPLE_IMPORTANCE
Node(const NodeType *type, ustring name=ustring())
tbb::spin_mutex thread_spin_lock