Blender  V3.3
Public Member Functions | Public Attributes | List of all members
Shader Class Reference

#include <shader.h>

Inheritance diagram for Shader:
Node

Public Member Functions

 Shader ()
 
 ~Shader ()
 
bool is_constant_emission (float3 *emission)
 
void set_graph (ShaderGraph *graph)
 
void tag_update (Scene *scene)
 
void tag_used (Scene *scene)
 
bool has_surface_link () const
 
bool need_update_geometry () const
 
- Public Member Functions inherited from Node
 Node (const NodeType *type, ustring name=ustring())
 
virtual ~Node ()=0
 
void set (const SocketType &input, bool value)
 
void set (const SocketType &input, int value)
 
void set (const SocketType &input, uint value)
 
void set (const SocketType &input, float value)
 
void set (const SocketType &input, float2 value)
 
void set (const SocketType &input, float3 value)
 
void set (const SocketType &input, const char *value)
 
void set (const SocketType &input, ustring value)
 
void set (const SocketType &input, const Transform &value)
 
void set (const SocketType &input, Node *value)
 
template<class ValueType , typename std::enable_if_t< std::is_enum_v< ValueType >> * = nullptr>
void set (const SocketType &input, const ValueType &value)
 
void set (const SocketType &input, array< bool > &value)
 
void set (const SocketType &input, array< int > &value)
 
void set (const SocketType &input, array< float > &value)
 
void set (const SocketType &input, array< float2 > &value)
 
void set (const SocketType &input, array< float3 > &value)
 
void set (const SocketType &input, array< ustring > &value)
 
void set (const SocketType &input, array< Transform > &value)
 
void set (const SocketType &input, array< Node * > &value)
 
bool get_bool (const SocketType &input) const
 
int get_int (const SocketType &input) const
 
uint get_uint (const SocketType &input) const
 
float get_float (const SocketType &input) const
 
float2 get_float2 (const SocketType &input) const
 
float3 get_float3 (const SocketType &input) const
 
ustring get_string (const SocketType &input) const
 
Transform get_transform (const SocketType &input) const
 
Nodeget_node (const SocketType &input) const
 
const array< bool > & get_bool_array (const SocketType &input) const
 
const array< int > & get_int_array (const SocketType &input) const
 
const array< float > & get_float_array (const SocketType &input) const
 
const array< float2 > & get_float2_array (const SocketType &input) const
 
const array< float3 > & get_float3_array (const SocketType &input) const
 
const array< ustring > & get_string_array (const SocketType &input) const
 
const array< Transform > & get_transform_array (const SocketType &input) const
 
const array< Node * > & get_node_array (const SocketType &input) const
 
bool has_default_value (const SocketType &input) const
 
void set_default_value (const SocketType &input)
 
bool equals_value (const Node &other, const SocketType &input) const
 
void copy_value (const SocketType &input, const Node &other, const SocketType &other_input)
 
void set_value (const SocketType &input, const Node &other, const SocketType &other_input)
 
bool equals (const Node &other) const
 
void hash (MD5Hash &md5)
 
size_t get_total_size_in_bytes () const
 
bool is_a (const NodeType *type)
 
bool socket_is_modified (const SocketType &input) const
 
bool is_modified () const
 
void tag_modified ()
 
void clear_modified ()
 
void print_modified_sockets () const
 
const NodeOwnerget_owner () const
 
void set_owner (const NodeOwner *owner_)
 
int reference_count () const
 
void reference ()
 
void dereference ()
 
void clear_reference_count ()
 

Public Attributes

NODE_DECLARE ShaderGraphgraph
 
float prev_volume_step_rate
 
bool need_update_uvs
 
bool need_update_attribute
 
bool need_update_displacement
 
bool has_volume_connected
 
bool has_surface
 
bool has_surface_emission
 
bool has_surface_transparent
 
bool has_surface_raytrace
 
bool has_volume
 
bool has_displacement
 
bool has_surface_bssrdf
 
bool has_bump
 
bool has_bssrdf_bump
 
bool has_surface_spatial_varying
 
bool has_volume_spatial_varying
 
bool has_volume_attribute_dependency
 
bool has_integrator_dependency
 
AttributeRequestSet attributes
 
uint id
 
- Public Attributes inherited from Node
ustring name
 
const NodeTypetype
 
InternalNode internal
 
LeafNode leaf
 

Additional Inherited Members

- Protected Member Functions inherited from Node
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 ()
 
- Static Protected Member Functions inherited from Node
template<typename T >
static Tget_socket_value (const Node *node, const SocketType &socket)
 
- Protected Attributes inherited from Node
const NodeOwnerowner
 
int ref_count {0}
 
SocketModifiedFlags socket_modified
 

Detailed Description

Definition at line 66 of file scene/shader.h.

Constructor & Destructor Documentation

◆ Shader()

Shader::Shader ( )

◆ ~Shader()

Shader::~Shader ( )

Definition at line 215 of file scene/shader.cpp.

References graph.

Member Function Documentation

◆ has_surface_link()

bool Shader::has_surface_link ( ) const
inline

◆ is_constant_emission()

bool Shader::is_constant_emission ( float3 emission)

◆ need_update_geometry()

bool Shader::need_update_geometry ( ) const

◆ set_graph()

void Shader::set_graph ( ShaderGraph graph)

◆ tag_update()

void Shader::tag_update ( Scene scene)

◆ tag_used()

void Shader::tag_used ( Scene scene)

Member Data Documentation

◆ attributes

AttributeRequestSet Shader::attributes

◆ graph

NODE_DECLARE ShaderGraph* Shader::graph

◆ has_bssrdf_bump

bool Shader::has_bssrdf_bump

◆ has_bump

bool Shader::has_bump

◆ has_displacement

bool Shader::has_displacement

◆ has_integrator_dependency

bool Shader::has_integrator_dependency

◆ has_surface

bool Shader::has_surface

◆ has_surface_bssrdf

bool Shader::has_surface_bssrdf

◆ has_surface_emission

bool Shader::has_surface_emission

◆ has_surface_raytrace

bool Shader::has_surface_raytrace

◆ has_surface_spatial_varying

bool Shader::has_surface_spatial_varying

◆ has_surface_transparent

bool Shader::has_surface_transparent

◆ has_volume

bool Shader::has_volume

◆ has_volume_attribute_dependency

bool Shader::has_volume_attribute_dependency

◆ has_volume_connected

bool Shader::has_volume_connected

◆ has_volume_spatial_varying

bool Shader::has_volume_spatial_varying

◆ id

uint Shader::id

◆ need_update_attribute

bool Shader::need_update_attribute

Definition at line 90 of file scene/shader.h.

Referenced by need_update_geometry(), Shader(), and tag_update().

◆ need_update_displacement

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().

◆ need_update_uvs

bool Shader::need_update_uvs

Definition at line 89 of file scene/shader.h.

Referenced by need_update_geometry(), Shader(), and Film::update_passes().

◆ prev_volume_step_rate

float Shader::prev_volume_step_rate

Definition at line 86 of file scene/shader.h.

Referenced by Shader(), and tag_update().


The documentation for this class was generated from the following files: