Blender
V3.3
|
#include <shader.h>
Additional Inherited Members | |
![]() | |
template<typename T > | |
void | set_if_different (const SocketType &input, T value) |
void | set_if_different (const SocketType &input, Node *value) |
template<typename T > | |
void | set_if_different (const SocketType &input, array< T > &value) |
void | set_if_different (const SocketType &input, array< Node * > &value) |
void | dereference_all_used_nodes () |
![]() | |
template<typename T > | |
static T & | get_socket_value (const Node *node, const SocketType &socket) |
![]() | |
const NodeOwner * | owner |
int | ref_count {0} |
SocketModifiedFlags | socket_modified |
Definition at line 66 of file scene/shader.h.
Shader::Shader | ( | ) |
Definition at line 184 of file scene/shader.cpp.
References DISPLACE_BUMP, graph, has_bssrdf_bump, has_bump, has_displacement, has_integrator_dependency, has_surface, has_surface_bssrdf, has_surface_emission, has_surface_raytrace, has_surface_spatial_varying, has_surface_transparent, has_volume, has_volume_attribute_dependency, has_volume_connected, has_volume_spatial_varying, need_update_attribute, need_update_displacement, need_update_uvs, NULL, and prev_volume_step_rate.
Shader::~Shader | ( | ) |
Definition at line 215 of file scene/shader.cpp.
References graph.
|
inline |
Definition at line 147 of file scene/shader.h.
References has_displacement, and has_surface.
Referenced by ShaderNode::attributes(), ImageTextureNode::attributes(), EnvironmentTextureNode::attributes(), AnisotropicBsdfNode::attributes(), PrincipledBsdfNode::attributes(), GeometryNode::attributes(), TextureCoordinateNode::attributes(), HairInfoNode::attributes(), PointInfoNode::attributes(), NormalMapNode::attributes(), TangentNode::attributes(), and VectorDisplacementNode::attributes().
Definition at line 220 of file scene/shader.cpp.
References graph, ShaderNode::input(), ShaderInput::link, node, ShaderGraph::nodes, NULL, ShaderGraph::output(), ShaderOutput::parent, SHADER_SPECIAL_TYPE_OUTPUT_AOV, and Node::type.
Referenced by ShaderManager::device_update_common().
bool Shader::need_update_geometry | ( | ) | const |
Definition at line 379 of file scene/shader.cpp.
References need_update_attribute, need_update_displacement, and need_update_uvs.
void Shader::set_graph | ( | ShaderGraph * | graph | ) |
Definition at line 266 of file scene/shader.cpp.
References ShaderGraph::compute_displacement_hash(), DISPLACE_BUMP, ShaderGraph::displacement_hash, graph, has_volume_connected, ShaderNode::input(), ShaderInput::link, need_update_displacement, NULL, ShaderGraph::output(), and ShaderGraph::remove_proxy_nodes().
Referenced by ShaderManager::add_default(), and xml_read_shader_graph().
Definition at line 298 of file scene/shader.cpp.
References AttributeRequestSet::add(), ATTR_STD_POSITION_UNDISPLACED, attributes, Scene::background, AttributeRequestSet::clear(), DISPLACE_BOTH, Scene::geometry_manager, Background::get_shader(), graph, LightManager::has_background_light(), has_displacement, has_surface, has_surface_emission, has_volume, Scene::light_manager, AttributeRequestSet::modified(), GeometryManager::need_flags_update, ObjectManager::need_flags_update, need_update_attribute, LightManager::need_update_background, need_update_displacement, node, ShaderGraph::nodes, Scene::object_manager, output, ShaderGraph::output(), prev_volume_step_rate, Scene::procedural_manager, scene, GeometryManager::SHADER_ATTRIBUTE_MODIFIED, GeometryManager::SHADER_DISPLACEMENT_MODIFIED, Scene::shader_manager, LightManager::SHADER_MODIFIED, ShaderManager::SHADER_MODIFIED, Node::tag_modified(), ProceduralManager::tag_update(), GeometryManager::tag_update(), LightManager::tag_update(), and ShaderManager::tag_update().
Referenced by ShaderManager::add_default(), and xml_read_shader_graph().
Definition at line 368 of file scene/shader.cpp.
References Node::reference_count(), scene, Scene::shader_manager, ShaderManager::SHADER_MODIFIED, Node::tag_modified(), and ShaderManager::tag_update().
AttributeRequestSet Shader::attributes |
Definition at line 118 of file scene/shader.h.
Referenced by GeometryManager::device_update_attributes(), Geometry::need_attribute(), Geometry::needed_attributes(), and tag_update().
NODE_DECLARE ShaderGraph* Shader::graph |
Definition at line 71 of file scene/shader.h.
Referenced by SVMCompiler::compile(), ImageTextureNode::cull_tiles(), LightManager::device_update_background(), GeometryManager::device_update_displacement_images(), SVMShaderManager::device_update_shader(), ShaderManager::get_kernel_features(), Scene::get_max_closure_count(), is_constant_emission(), set_graph(), Shader(), tag_update(), and ~Shader().
bool Shader::has_bssrdf_bump |
Definition at line 111 of file scene/shader.h.
Referenced by SVMCompiler::compile(), ShaderManager::device_update_common(), SVMCompiler::generate_closure_node(), and Shader().
bool Shader::has_bump |
Definition at line 110 of file scene/shader.h.
Referenced by SVMCompiler::compile(), ShaderManager::device_update_common(), SVMCompiler::generate_closure_node(), and Shader().
bool Shader::has_displacement |
Definition at line 108 of file scene/shader.h.
Referenced by SVMCompiler::compile(), SVMCompiler::compile_type(), GeometryManager::device_update_displacement_images(), GeometryManager::displace(), fill_shader_input(), has_surface_link(), Geometry::has_true_displacement(), read_shader_output(), Shader(), and tag_update().
bool Shader::has_integrator_dependency |
Definition at line 115 of file scene/shader.h.
Referenced by SVMCompiler::compile(), SVMCompiler::generate_node(), Shader(), and Integrator::tag_update().
bool Shader::has_surface |
Definition at line 103 of file scene/shader.h.
Referenced by UVMapNode::attributes(), SVMCompiler::compile(), SVMCompiler::compile_type(), ShaderManager::device_update_common(), has_surface_link(), Shader(), and tag_update().
bool Shader::has_surface_bssrdf |
Definition at line 109 of file scene/shader.h.
Referenced by SVMCompiler::compile(), SVMCompiler::generate_closure_node(), and Shader().
bool Shader::has_surface_emission |
Definition at line 104 of file scene/shader.h.
Referenced by SVMCompiler::compile(), ShaderManager::device_update_common(), LightManager::device_update_distribution(), SVMCompiler::generate_closure_node(), Light::has_contribution(), LightManager::object_usable_as_light(), Shader(), Object::tag_update(), tag_update(), and Geometry::tag_update().
bool Shader::has_surface_raytrace |
Definition at line 106 of file scene/shader.h.
Referenced by SVMCompiler::compile(), ShaderManager::device_update_common(), SVMCompiler::generate_node(), and Shader().
bool Shader::has_surface_spatial_varying |
Definition at line 112 of file scene/shader.h.
Referenced by SVMCompiler::compile(), SVMCompiler::generate_node(), Shader(), and LightManager::test_enabled_lights().
bool Shader::has_surface_transparent |
Definition at line 105 of file scene/shader.h.
Referenced by SVMCompiler::compile(), ShaderManager::device_update_common(), SVMCompiler::generate_closure_node(), Hair::need_shadow_transparency(), and Shader().
bool Shader::has_volume |
Definition at line 107 of file scene/shader.h.
Referenced by ShaderNode::attributes(), PointDensityTextureNode::attributes(), PrincipledVolumeNode::attributes(), TextureCoordinateNode::attributes(), VolumeInfoNode::attributes(), AttributeNode::attributes(), SVMCompiler::compile(), SVMCompiler::compile_type(), Object::compute_volume_step_size(), GeometryManager::create_volume_mesh(), ShaderManager::device_update_common(), Shader(), and tag_update().
bool Shader::has_volume_attribute_dependency |
Definition at line 114 of file scene/shader.h.
Referenced by SVMCompiler::compile(), Object::compute_volume_step_size(), ShaderManager::device_update_common(), SVMCompiler::generate_node(), and Shader().
bool Shader::has_volume_connected |
Definition at line 100 of file scene/shader.h.
Referenced by ShaderManager::device_update_common(), ShaderManager::get_kernel_features(), set_graph(), and Shader().
bool Shader::has_volume_spatial_varying |
Definition at line 113 of file scene/shader.h.
Referenced by SVMCompiler::compile(), Object::compute_volume_step_size(), ShaderManager::device_update_common(), SVMCompiler::generate_node(), and Shader().
uint Shader::id |
Definition at line 121 of file scene/shader.h.
Referenced by RenderStats::collect_profiling(), ShaderManager::device_update(), and ShaderManager::get_shader_id().
bool Shader::need_update_attribute |
Definition at line 90 of file scene/shader.h.
Referenced by need_update_geometry(), Shader(), and tag_update().
bool Shader::need_update_displacement |
Definition at line 91 of file scene/shader.h.
Referenced by need_update_geometry(), set_graph(), Shader(), and tag_update().
bool Shader::need_update_uvs |
Definition at line 89 of file scene/shader.h.
Referenced by need_update_geometry(), Shader(), and Film::update_passes().
float Shader::prev_volume_step_rate |
Definition at line 86 of file scene/shader.h.
Referenced by Shader(), and tag_update().