Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/shader.h
| Show All 32 Lines | |||||
| #include "util/util_string.h" | #include "util/util_string.h" | ||||
| #include "util/util_thread.h" | #include "util/util_thread.h" | ||||
| #include "util/util_types.h" | #include "util/util_types.h" | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| class Device; | class Device; | ||||
| class DeviceScene; | class DeviceScene; | ||||
| class DeviceRequestedFeatures; | |||||
| class Mesh; | class Mesh; | ||||
| class Progress; | class Progress; | ||||
| class Scene; | class Scene; | ||||
| class ShaderGraph; | class ShaderGraph; | ||||
| struct float3; | struct float3; | ||||
| enum ShadingSystem { SHADINGSYSTEM_OSL, SHADINGSYSTEM_SVM }; | enum ShadingSystem { SHADINGSYSTEM_OSL, SHADINGSYSTEM_SVM }; | ||||
| ▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | public: | ||||
| * Therefore, has_volume_connected stores whether some volume sub-tree | * Therefore, has_volume_connected stores whether some volume sub-tree | ||||
| * was connected before optimization. */ | * was connected before optimization. */ | ||||
| bool has_volume_connected; | bool has_volume_connected; | ||||
| /* information about shader after compiling */ | /* information about shader after compiling */ | ||||
| bool has_surface; | bool has_surface; | ||||
| bool has_surface_emission; | bool has_surface_emission; | ||||
| bool has_surface_transparent; | bool has_surface_transparent; | ||||
| bool has_surface_raytrace; | |||||
| bool has_volume; | bool has_volume; | ||||
| bool has_displacement; | bool has_displacement; | ||||
| bool has_surface_bssrdf; | bool has_surface_bssrdf; | ||||
| bool has_bump; | bool has_bump; | ||||
| bool has_bssrdf_bump; | bool has_bssrdf_bump; | ||||
| bool has_surface_spatial_varying; | bool has_surface_spatial_varying; | ||||
| bool has_volume_spatial_varying; | bool has_volume_spatial_varying; | ||||
| bool has_volume_attribute_dependency; | bool has_volume_attribute_dependency; | ||||
| ▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | public: | ||||
| /* get shader id for mesh faces */ | /* get shader id for mesh faces */ | ||||
| int get_shader_id(Shader *shader, bool smooth = false); | int get_shader_id(Shader *shader, bool smooth = false); | ||||
| /* add default shaders to scene, to use as default for things that don't | /* add default shaders to scene, to use as default for things that don't | ||||
| * have any shader assigned explicitly */ | * have any shader assigned explicitly */ | ||||
| static void add_default(Scene *scene); | static void add_default(Scene *scene); | ||||
| /* Selective nodes compilation. */ | /* Selective nodes compilation. */ | ||||
| void get_requested_features(Scene *scene, DeviceRequestedFeatures *requested_features); | uint get_kernel_features(Scene *scene); | ||||
| static void free_memory(); | static void free_memory(); | ||||
| float linear_rgb_to_gray(float3 c); | float linear_rgb_to_gray(float3 c); | ||||
| string get_cryptomatte_materials(Scene *scene); | string get_cryptomatte_materials(Scene *scene); | ||||
| void tag_update(Scene *scene, uint32_t flag); | void tag_update(Scene *scene, uint32_t flag); | ||||
| Show All 11 Lines | protected: | ||||
| AttributeIDMap unique_attribute_id; | AttributeIDMap unique_attribute_id; | ||||
| static thread_mutex lookup_table_mutex; | static thread_mutex lookup_table_mutex; | ||||
| static vector<float> beckmann_table; | static vector<float> beckmann_table; | ||||
| static bool beckmann_table_ready; | static bool beckmann_table_ready; | ||||
| size_t beckmann_table_offset; | size_t beckmann_table_offset; | ||||
| void get_requested_graph_features(ShaderGraph *graph, | uint get_graph_kernel_features(ShaderGraph *graph); | ||||
| DeviceRequestedFeatures *requested_features); | |||||
| thread_spin_lock attribute_lock_; | thread_spin_lock attribute_lock_; | ||||
| float3 xyz_to_r; | float3 xyz_to_r; | ||||
| float3 xyz_to_g; | float3 xyz_to_g; | ||||
| float3 xyz_to_b; | float3 xyz_to_b; | ||||
| float3 rgb_to_y; | float3 rgb_to_y; | ||||
| }; | }; | ||||
| CCL_NAMESPACE_END | CCL_NAMESPACE_END | ||||
| #endif /* __SHADER_H__ */ | #endif /* __SHADER_H__ */ | ||||