45 #define TEXTURE_MAPPING_DEFINE(TextureNode) \
46 SOCKET_POINT(tex_mapping.translation, "Translation", zero_float3()); \
47 SOCKET_VECTOR(tex_mapping.rotation, "Rotation", zero_float3()); \
48 SOCKET_VECTOR(tex_mapping.scale, "Scale", one_float3()); \
50 SOCKET_VECTOR(tex_mapping.min, "Min", make_float3(-FLT_MAX, -FLT_MAX, -FLT_MAX)); \
51 SOCKET_VECTOR(tex_mapping.max, "Max", make_float3(FLT_MAX, FLT_MAX, FLT_MAX)); \
52 SOCKET_BOOLEAN(tex_mapping.use_minmax, "Use Min Max", false); \
54 static NodeEnum mapping_axis_enum; \
55 mapping_axis_enum.insert("none", TextureMapping::NONE); \
56 mapping_axis_enum.insert("x", TextureMapping::X); \
57 mapping_axis_enum.insert("y", TextureMapping::Y); \
58 mapping_axis_enum.insert("z", TextureMapping::Z); \
59 SOCKET_ENUM(tex_mapping.x_mapping, "x_mapping", mapping_axis_enum, TextureMapping::X); \
60 SOCKET_ENUM(tex_mapping.y_mapping, "y_mapping", mapping_axis_enum, TextureMapping::Y); \
61 SOCKET_ENUM(tex_mapping.z_mapping, "z_mapping", mapping_axis_enum, TextureMapping::Z); \
63 static NodeEnum mapping_type_enum; \
64 mapping_type_enum.insert("point", TextureMapping::POINT); \
65 mapping_type_enum.insert("texture", TextureMapping::TEXTURE); \
66 mapping_type_enum.insert("vector", TextureMapping::VECTOR); \
67 mapping_type_enum.insert("normal", TextureMapping::NORMAL); \
68 SOCKET_ENUM(tex_mapping.type, "Type", mapping_type_enum, TextureMapping::TEXTURE); \
70 static NodeEnum mapping_projection_enum; \
71 mapping_projection_enum.insert("flat", TextureMapping::FLAT); \
72 mapping_projection_enum.insert("cube", TextureMapping::CUBE); \
73 mapping_projection_enum.insert("tube", TextureMapping::TUBE); \
74 mapping_projection_enum.insert("sphere", TextureMapping::SPHERE); \
75 SOCKET_ENUM(tex_mapping.projection, "Projection", mapping_projection_enum, TextureMapping::FLAT);
114 mat = tmat * rmat * smat;
119 mat = tmat * rmat * smat;
186 compile(compiler, offset_in, offset_out);
248 SOCKET_FLOAT(projection_blend,
"Projection Blend", 0.0f);
265 tiles.push_back_slow(1001);
278 params.animated = animated;
279 params.interpolation = interpolation;
280 params.extension = extension;
281 params.alpha_type = alpha_type;
282 params.colorspace = colorspace;
292 tiles.push_back_slow(1001);
304 if (tiles.size() < 2) {
310 if (vector_in->
link) {
312 if (
node->type == UVMapNode::get_node_type()) {
314 attribute = uvmap->get_attribute();
316 else if (
node->type == TextureCoordinateNode::get_node_type()) {
317 if (vector_in->
link !=
node->output(
"UV")) {
326 unordered_set<int> used_tiles;
331 foreach (
Node *
node, geom->get_used_shaders()) {
340 foreach (
int tile, tiles) {
341 if (used_tiles.count(tile)) {
345 tiles.steal_data(new_tiles);
378 const ustring known_colorspace = metadata.
colorspace;
383 if (compress_as_srgb) {
386 if (!alpha_out->
links.empty()) {
391 if (unassociate_alpha) {
415 for (
int i = 0; i < num_nodes; i++) {
417 node.x = tiles[2 * i];
419 if (2 * i + 1 < tiles.size()) {
420 node.z = tiles[2 * i + 1];
457 const bool is_float = metadata.
is_float();
459 const ustring known_colorspace = metadata.
colorspace;
463 "filename", filename, compress_as_srgb ?
u_colorspace_raw : known_colorspace);
472 const bool is_tiled = (filename.find(
"<UDIM>") != string::npos);
475 compiler.
parameter(
this,
"projection_blend");
476 compiler.
parameter(
"compress_as_srgb", compress_as_srgb);
478 compiler.
parameter(
"unassociate_alpha", !alpha_out->
links.empty() && unassociate_alpha);
479 compiler.
parameter(
"is_float", is_float);
480 compiler.
parameter(
"is_tiled", is_tiled);
481 compiler.
parameter(
this,
"interpolation");
484 compiler.
add(
this,
"node_image_texture");
544 params.animated = animated;
545 params.interpolation = interpolation;
547 params.alpha_type = alpha_type;
548 params.colorspace = colorspace;
578 const ustring known_colorspace = metadata.
colorspace;
583 if (compress_as_srgb) {
608 const bool is_float = metadata.
is_float();
610 const ustring known_colorspace = metadata.
colorspace;
614 "filename", filename, compress_as_srgb ?
u_colorspace_raw : known_colorspace);
621 compiler.
parameter(
this,
"interpolation");
622 compiler.
parameter(
"compress_as_srgb", compress_as_srgb);
624 compiler.
parameter(
"is_float", is_float);
625 compiler.
add(
this,
"node_environment_texture");
647 return (1.0f + lam[0] *
expf(lam[1] /
cosf(theta))) *
648 (1.0f + lam[2] *
expf(lam[3] * gamma) + lam[4] *
cosf(gamma) *
cosf(gamma));
660 float theta = spherical.
x;
661 float phi = spherical.
y;
663 sunsky->
theta = theta;
666 float theta2 = theta * theta;
667 float theta3 = theta2 * theta;
671 float chi = (4.0f / 9.0f -
T / 120.0f) * (
M_PI_F - 2.0f * theta);
672 sunsky->
radiance_x = (4.0453f *
T - 4.9710f) *
tanf(chi) - 0.2155f *
T + 2.4192f;
675 sunsky->
radiance_y = (0.00166f * theta3 - 0.00375f * theta2 + 0.00209f * theta) *
T2 +
676 (-0.02903f * theta3 + 0.06377f * theta2 - 0.03202f * theta + 0.00394f) *
T +
677 (0.11693f * theta3 - 0.21196f * theta2 + 0.06052f * theta + 0.25886f);
679 sunsky->
radiance_z = (0.00275f * theta3 - 0.00610f * theta2 + 0.00317f * theta) *
T2 +
680 (-0.04214f * theta3 + 0.08970f * theta2 - 0.04153f * theta + 0.00516f) *
T +
681 (0.15346f * theta3 - 0.26756f * theta2 + 0.06670f * theta + 0.26688f);
683 sunsky->
config_x[0] = (0.1787f *
T - 1.4630f);
684 sunsky->
config_x[1] = (-0.3554f *
T + 0.4275f);
685 sunsky->
config_x[2] = (-0.0227f *
T + 5.3251f);
686 sunsky->
config_x[3] = (0.1206f *
T - 2.5771f);
687 sunsky->
config_x[4] = (-0.0670f *
T + 0.3703f);
689 sunsky->
config_y[0] = (-0.0193f *
T - 0.2592f);
690 sunsky->
config_y[1] = (-0.0665f *
T + 0.0008f);
691 sunsky->
config_y[2] = (-0.0004f *
T + 0.2125f);
692 sunsky->
config_y[3] = (-0.0641f *
T - 0.8989f);
693 sunsky->
config_y[4] = (-0.0033f *
T + 0.0452f);
695 sunsky->
config_z[0] = (-0.0167f *
T - 0.2608f);
696 sunsky->
config_z[1] = (-0.0950f *
T + 0.0092f);
697 sunsky->
config_z[2] = (-0.0079f *
T + 0.2102f);
698 sunsky->
config_z[3] = (-0.0441f *
T - 1.6537f);
699 sunsky->
config_z[4] = (-0.0109f *
T + 0.0529f);
702 for (
int i = 5; i < 9; i++) {
721 float theta = spherical.
x;
722 float phi = spherical.
y;
725 turbidity =
clamp(turbidity, 0.0f, 10.0f);
730 sunsky->
theta = theta;
733 float solarElevation =
M_PI_2_F - theta;
738 (
double)turbidity, (
double)ground_albedo, (
double)solarElevation);
741 for (
int i = 0; i < 9; ++i) {
766 float pixel_bottom[3];
769 sun_elevation, sun_size, altitude, air_density, dust_density, pixel_bottom, pixel_top);
772 if (sun_rotation < 0.0f) {
775 sun_rotation =
M_2PI_F - sun_rotation;
821 SkyTextureNode::SkyTextureNode() :
TextureNode(get_node_type())
838 float clamped_altitude =
clamp(altitude, 1.0f, 59999.0f);
858 sun_elevation, clamped_altitude, air_density, dust_density, ozone_density);
934 float clamped_altitude =
clamp(altitude, 1.0f, 59999.0f);
954 sun_elevation, clamped_altitude, air_density, dust_density, ozone_density);
974 compiler.
add(
this,
"node_sky_texture");
1003 GradientTextureNode::GradientTextureNode() :
TextureNode(get_node_type())
1028 compiler.
parameter(
this,
"gradient_type");
1029 compiler.
add(
this,
"node_gradient_texture");
1041 dimensions_enum.
insert(
"1D", 1);
1042 dimensions_enum.
insert(
"2D", 2);
1043 dimensions_enum.
insert(
"3D", 3);
1044 dimensions_enum.
insert(
"4D", 4);
1045 SOCKET_ENUM(dimensions,
"Dimensions", dimensions_enum, 3);
1060 NoiseTextureNode::NoiseTextureNode() :
TextureNode(get_node_type())
1088 vector_stack_offset, w_stack_offset, scale_stack_offset, detail_stack_offset),
1090 roughness_stack_offset, distortion_stack_offset, fac_stack_offset, color_stack_offset));
1104 compiler.
add(
this,
"node_noise_texture");
1116 dimensions_enum.
insert(
"1D", 1);
1117 dimensions_enum.
insert(
"2D", 2);
1118 dimensions_enum.
insert(
"3D", 3);
1119 dimensions_enum.
insert(
"4D", 4);
1120 SOCKET_ENUM(dimensions,
"Dimensions", dimensions_enum, 3);
1153 VoronoiTextureNode::VoronoiTextureNode() :
TextureNode(get_node_type())
1187 vector_stack_offset, w_in_stack_offset, scale_stack_offset, smoothness_stack_offset),
1189 randomness_stack_offset,
1190 distance_stack_offset,
1191 color_stack_offset),
1192 compiler.
encode_uchar4(position_stack_offset, w_out_stack_offset, radius_stack_offset),
1210 compiler.
add(
this,
"node_voronoi_texture");
1232 IESLightNode::IESLightNode() :
TextureNode(get_node_type())
1234 light_manager =
NULL;
1250 if (light_manager) {
1255 void IESLightNode::get_slot()
1257 assert(light_manager);
1264 slot = light_manager->
add_ies(ies.string());
1299 compiler.
add(
this,
"node_ies_light");
1309 dimensions_enum.
insert(
"1D", 1);
1310 dimensions_enum.
insert(
"2D", 2);
1311 dimensions_enum.
insert(
"3D", 3);
1312 dimensions_enum.
insert(
"4D", 4);
1313 SOCKET_ENUM(dimensions,
"Dimensions", dimensions_enum, 3);
1324 WhiteNoiseTextureNode::WhiteNoiseTextureNode() :
ShaderNode(get_node_type())
1335 int vector_stack_offset = compiler.
stack_assign(vector_in);
1337 int value_stack_offset = compiler.
stack_assign(value_out);
1338 int color_stack_offset = compiler.
stack_assign(color_out);
1342 compiler.
encode_uchar4(vector_stack_offset, w_stack_offset),
1343 compiler.
encode_uchar4(value_stack_offset, color_stack_offset));
1349 compiler.
add(
this,
"node_white_noise_texture");
1361 dimensions_enum.
insert(
"1D", 1);
1362 dimensions_enum.
insert(
"2D", 2);
1363 dimensions_enum.
insert(
"3D", 3);
1364 dimensions_enum.
insert(
"4D", 4);
1365 SOCKET_ENUM(dimensions,
"Dimensions", dimensions_enum, 3);
1389 MusgraveTextureNode::MusgraveTextureNode() :
TextureNode(get_node_type())
1417 compiler.
encode_uchar4(musgrave_type, dimensions, vector_stack_offset, w_stack_offset),
1419 detail_stack_offset,
1420 dimension_stack_offset,
1421 lacunarity_stack_offset),
1422 compiler.
encode_uchar4(offset_stack_offset, gain_stack_offset, fac_stack_offset));
1434 compiler.
parameter(
this,
"musgrave_type");
1436 compiler.
add(
this,
"node_musgrave_texture");
1452 static NodeEnum bands_direction_enum;
1460 static NodeEnum rings_direction_enum;
1487 WaveTextureNode::WaveTextureNode() :
TextureNode(get_node_type())
1506 compiler.
encode_uchar4(wave_type, bands_direction, rings_direction, profile),
1534 compiler.
parameter(
this,
"bands_direction");
1535 compiler.
parameter(
this,
"rings_direction");
1538 compiler.
add(
this,
"node_wave_texture");
1561 MagicTextureNode::MagicTextureNode() :
TextureNode(get_node_type())
1592 compiler.
add(
this,
"node_magic_texture");
1614 CheckerTextureNode::CheckerTextureNode() :
TextureNode(get_node_type())
1646 compiler.
add(
this,
"node_checker_texture");
1658 SOCKET_INT(offset_frequency,
"Offset Frequency", 2);
1660 SOCKET_INT(squash_frequency,
"Squash Frequency", 2);
1680 BrickTextureNode::BrickTextureNode() :
TextureNode(get_node_type())
1737 compiler.
parameter(
this,
"offset_frequency");
1739 compiler.
parameter(
this,
"squash_frequency");
1740 compiler.
add(
this,
"node_brick_texture");
1756 static NodeEnum interpolation_enum;
1773 PointDensityTextureNode::PointDensityTextureNode() :
ShaderNode(get_node_type())
1802 params.interpolation = interpolation;
1812 const bool use_density = !density_out->
links.empty();
1813 const bool use_color = !color_out->
links.empty();
1815 if (use_density || use_color) {
1855 const bool use_density = !density_out->
links.empty();
1856 const bool use_color = !color_out->
links.empty();
1858 if (use_density || use_color) {
1869 compiler.
parameter(
this,
"interpolation");
1870 compiler.
add(
this,
"node_voxel_texture");
1890 NormalNode::NormalNode() :
ShaderNode(get_node_type())
1911 compiler.
add(
this,
"node_normal");
1937 MappingNode::MappingNode() :
ShaderNode(get_node_type())
1960 int vector_stack_offset = compiler.
stack_assign(vector_in);
1961 int location_stack_offset = compiler.
stack_assign(location_in);
1962 int rotation_stack_offset = compiler.
stack_assign(rotation_in);
1963 int scale_stack_offset = compiler.
stack_assign(scale_in);
1964 int result_stack_offset = compiler.
stack_assign(vector_out);
1970 vector_stack_offset, location_stack_offset, rotation_stack_offset, scale_stack_offset),
1971 result_stack_offset);
1976 compiler.
parameter(
this,
"mapping_type");
1977 compiler.
add(
this,
"node_mapping");
1992 RGBToBWNode::RGBToBWNode() :
ShaderNode(get_node_type())
2014 compiler.
add(
this,
"node_rgb_to_bw");
2019 const NodeType *ConvertNode::node_types[ConvertNode::MAX_TYPE][ConvertNode::MAX_TYPE];
2020 bool ConvertNode::initialized = ConvertNode::register_types();
2027 bool ConvertNode::register_types()
2029 const int num_types = 8;
2039 for (
size_t i = 0; i < num_types; i++) {
2042 ustring from_value_name(
"value_" + from_name.string());
2044 for (
size_t j = 0; j < num_types; j++) {
2047 ustring to_value_name(
"value_" + to_name.string());
2049 string node_name =
"convert_" + from_name.string() +
"_to_" + to_name.string();
2062 assert(from < MAX_TYPE);
2063 assert(to < MAX_TYPE);
2080 else if (autoconvert)
2089 value_color(other.value_color),
2090 value_string(other.value_string)
2129 if (prev->
type == node_types[to][
from]) {
2208 compiler.
add(
this,
"node_convert_from_float");
2210 compiler.
add(
this,
"node_convert_from_int");
2212 compiler.
add(
this,
"node_convert_from_color");
2214 compiler.
add(
this,
"node_convert_from_vector");
2216 compiler.
add(
this,
"node_convert_from_point");
2218 compiler.
add(
this,
"node_convert_from_normal");
2234 return (normal_in && normal_in->
link &&
2274 compiler.
add_node(normal_offset, tangent_offset, param3_offset, param4_offset);
2315 AnisotropicBsdfNode::AnisotropicBsdfNode() :
BsdfNode(get_node_type())
2322 if (
shader->has_surface) {
2325 if (!tangent_in->
link)
2345 compiler.
parameter(
this,
"distribution");
2346 compiler.
add(
this,
"node_anisotropic_bsdf");
2373 GlossyBsdfNode::GlossyBsdfNode() :
BsdfNode(get_node_type())
2383 distribution_orig = distribution;
2390 distribution = distribution_orig;
2394 if (integrator->get_filter_glossy() == 0.0f) {
2399 VLOG(1) <<
"Using sharp glossy BSDF.";
2408 VLOG(1) <<
"Using GGX glossy with filter glossy.";
2419 return !roughness_input->
link &&
2437 compiler.
parameter(
this,
"distribution");
2438 compiler.
add(
this,
"node_glossy_bsdf");
2466 GlassBsdfNode::GlassBsdfNode() :
BsdfNode(get_node_type())
2476 distribution_orig = distribution;
2483 distribution = distribution_orig;
2487 if (integrator->get_filter_glossy() == 0.0f) {
2492 VLOG(1) <<
"Using sharp glass BSDF.";
2501 VLOG(1) <<
"Using GGX glass with filter glossy.";
2512 return !roughness_input->
link &&
2530 compiler.
parameter(
this,
"distribution");
2531 compiler.
add(
this,
"node_glass_bsdf");
2559 RefractionBsdfNode::RefractionBsdfNode() :
BsdfNode(get_node_type())
2569 distribution_orig = distribution;
2576 distribution = distribution_orig;
2580 if (integrator->get_filter_glossy() == 0.0f) {
2585 VLOG(1) <<
"Using sharp refraction BSDF.";
2594 VLOG(1) <<
"Using GGX refraction with filter glossy.";
2605 return !roughness_input->
link &&
2621 compiler.
parameter(
this,
"distribution");
2622 compiler.
add(
this,
"node_refraction_bsdf");
2647 ToonBsdfNode::ToonBsdfNode() :
BsdfNode(get_node_type())
2662 compiler.
add(
this,
"node_toon_bsdf");
2681 VelvetBsdfNode::VelvetBsdfNode() :
BsdfNode(get_node_type())
2693 compiler.
add(
this,
"node_velvet_bsdf");
2712 DiffuseBsdfNode::DiffuseBsdfNode() :
BsdfNode(get_node_type())
2724 compiler.
add(
this,
"node_diffuse_bsdf");
2738 static NodeEnum subsurface_method_enum;
2742 "Subsurface Method",
2743 subsurface_method_enum,
2761 SOCKET_IN_FLOAT(transmission_roughness,
"Transmission Roughness", 0.0f);
2776 PrincipledBsdfNode::PrincipledBsdfNode() :
BsdfBaseNode(get_node_type())
2790 (emission_strength_in->
link || emission_strength != 0.0f)) {
2797 graph->add(emission_node);
2799 graph->relink(emission_strength_in, emission_node->input(
"Strength"));
2800 graph->relink(emission_in, emission_node->input(
"Color"));
2801 graph->relink(principled_out, new_out);
2802 graph->connect(emission_node->output(
"Emission"),
add->input(
"Closure1"));
2803 graph->connect(principled_out,
add->input(
"Closure2"));
2805 principled_out = new_out;
2810 if (emission_in->
link) {
2813 if (emission_strength_in->
link) {
2825 graph->add(transparent);
2827 graph->relink(alpha_in,
mix->input(
"Fac"));
2828 graph->relink(principled_out,
mix->output(
"Closure"));
2829 graph->connect(transparent->output(
"BSDF"),
mix->input(
"Closure1"));
2830 graph->connect(principled_out,
mix->input(
"Closure2"));
2846 if (
shader->has_surface) {
2849 if (!tangent_in->
link)
2886 int specular_offset = compiler.
stack_assign(p_specular);
2887 int roughness_offset = compiler.
stack_assign(p_roughness);
2888 int specular_tint_offset = compiler.
stack_assign(p_specular_tint);
2889 int anisotropic_offset = compiler.
stack_assign(p_anisotropic);
2891 int sheen_tint_offset = compiler.
stack_assign(p_sheen_tint);
2892 int clearcoat_offset = compiler.
stack_assign(p_clearcoat);
2893 int clearcoat_roughness_offset = compiler.
stack_assign(p_clearcoat_roughness);
2895 int transmission_offset = compiler.
stack_assign(p_transmission);
2896 int transmission_roughness_offset = compiler.
stack_assign(p_transmission_roughness);
2897 int anisotropic_rotation_offset = compiler.
stack_assign(p_anisotropic_rotation);
2898 int subsurface_radius_offset = compiler.
stack_assign(p_subsurface_radius);
2912 specular_offset, roughness_offset, specular_tint_offset, anisotropic_offset),
2914 sheen_offset, sheen_tint_offset, clearcoat_offset, clearcoat_roughness_offset));
2917 transmission_offset,
2918 anisotropic_rotation_offset,
2919 transmission_roughness_offset),
2954 input(
"Subsurface"),
2955 input(
"Subsurface Radius"),
2958 input(
"Specular Tint"),
2959 input(
"Anisotropic"),
2961 input(
"Sheen Tint"),
2963 input(
"Clearcoat Roughness"),
2965 input(
"Transmission"),
2966 input(
"Anisotropic Rotation"),
2967 input(
"Transmission Roughness"));
2972 compiler.
parameter(
this,
"distribution");
2973 compiler.
parameter(
this,
"subsurface_method");
2974 compiler.
add(
this,
"node_principled_bsdf");
2997 TranslucentBsdfNode::TranslucentBsdfNode() :
BsdfNode(get_node_type())
3009 compiler.
add(
this,
"node_translucent_bsdf");
3026 TransparentBsdfNode::TransparentBsdfNode() :
BsdfNode(get_node_type())
3038 compiler.
add(
this,
"node_transparent_bsdf");
3067 SubsurfaceScatteringNode::SubsurfaceScatteringNode() :
BsdfNode(get_node_type())
3083 compiler.
add(
this,
"node_subsurface_scattering");
3090 return (normal_in->
link &&
3109 EmissionNode::EmissionNode() :
ShaderNode(get_node_type())
3118 if (color_in->
link || strength_in->
link) {
3130 compiler.
add(
this,
"node_emission");
3138 if ((!color_in->
link && color ==
zero_float3()) || (!strength_in->
link && strength == 0.0f)) {
3158 BackgroundNode::BackgroundNode() :
ShaderNode(get_node_type())
3167 if (color_in->
link || strength_in->
link) {
3179 compiler.
add(
this,
"node_background");
3187 if ((!color_in->
link && color ==
zero_float3()) || (!strength_in->
link && strength == 0.0f)) {
3206 HoldoutNode::HoldoutNode() :
ShaderNode(get_node_type())
3220 compiler.
add(
this,
"node_holdout");
3244 AmbientOcclusionNode::AmbientOcclusionNode() :
ShaderNode(get_node_type())
3278 compiler.
add(
this,
"node_ambient_occlusion");
3332 AbsorptionVolumeNode::AbsorptionVolumeNode() :
VolumeNode(get_node_type())
3344 compiler.
add(
this,
"node_absorption_volume");
3363 ScatterVolumeNode::ScatterVolumeNode() :
VolumeNode(get_node_type())
3375 compiler.
add(
this,
"node_scatter_volume");
3386 SOCKET_IN_STRING(temperature_attribute,
"Temperature Attribute", ustring());
3404 PrincipledVolumeNode::PrincipledVolumeNode() :
VolumeNode(get_node_type())
3407 density_attribute = ustring(
"density");
3408 temperature_attribute = ustring(
"temperature");
3413 if (
shader->has_volume) {
3417 if (density_in->
link || density > 0.0f) {
3422 if (blackbody_in->
link || blackbody_intensity > 0.0f) {
3423 attributes->add_standard(temperature_attribute);
3469 compiler.
add_node(attr_density, attr_color, attr_temperature);
3475 density_attribute = ustring(
"geom:" + density_attribute.string());
3478 color_attribute = ustring(
"geom:" + color_attribute.string());
3481 temperature_attribute = ustring(
"geom:" + temperature_attribute.string());
3484 compiler.
add(
this,
"node_principled_volume");
3494 static NodeEnum parametrization_enum;
3507 "Absorption Coefficient",
3529 PrincipledHairBsdfNode::PrincipledHairBsdfNode() :
BsdfBaseNode(get_node_type())
3537 if (!
input(
"Random")->link) {
3560 int absorption_coefficient_ofs = compiler.
stack_assign(
input(
"Absorption Coefficient"));
3588 absorption_coefficient_ofs),
3612 compiler.
parameter(
this,
"parametrization");
3613 compiler.
add(
this,
"node_principled_hair_bsdf");
3640 HairBsdfNode::HairBsdfNode() :
BsdfNode(get_node_type())
3655 compiler.
add(
this,
"node_hair_bsdf");
3680 GeometryNode::GeometryNode() :
ShaderNode(get_node_type())
3687 if (
shader->has_surface) {
3688 if (!
output(
"Tangent")->links.empty()) {
3691 if (!
output(
"Pointiness")->links.empty()) {
3694 if (!
output(
"Random Per Island")->links.empty()) {
3717 out =
output(
"Position");
3718 if (!out->
links.empty()) {
3723 if (!out->
links.empty()) {
3728 if (!out->
links.empty()) {
3732 out =
output(
"True Normal");
3733 if (!out->
links.empty()) {
3737 out =
output(
"Incoming");
3738 if (!out->
links.empty()) {
3742 out =
output(
"Parametric");
3743 if (!out->
links.empty()) {
3747 out =
output(
"Backfacing");
3748 if (!out->
links.empty()) {
3752 out =
output(
"Pointiness");
3753 if (!out->
links.empty()) {
3763 out =
output(
"Random Per Island");
3764 if (!out->
links.empty()) {
3780 compiler.
parameter(
"bump_offset",
"dx");
3782 compiler.
parameter(
"bump_offset",
"dy");
3784 compiler.
parameter(
"bump_offset",
"center");
3786 compiler.
add(
this,
"node_geometry");
3795 out =
output(
"Backfacing");
3796 if (!out->
links.empty()) {
3827 TextureCoordinateNode::TextureCoordinateNode() :
ShaderNode(get_node_type())
3833 if (
shader->has_surface) {
3835 if (!
output(
"Generated")->links.empty())
3837 if (!
output(
"UV")->links.empty())
3842 if (
shader->has_volume) {
3844 if (!
output(
"Generated")->links.empty()) {
3871 out =
output(
"Generated");
3872 if (!out->
links.empty()) {
3891 if (!out->
links.empty()) {
3896 if (!out->
links.empty()) {
3907 if (!out->
links.empty()) {
3909 if (use_transform) {
3918 if (!out->
links.empty()) {
3923 if (!out->
links.empty()) {
3927 out =
output(
"Reflection");
3928 if (!out->
links.empty()) {
3941 compiler.
parameter(
"bump_offset",
"dx");
3943 compiler.
parameter(
"bump_offset",
"dy");
3945 compiler.
parameter(
"bump_offset",
"center");
3948 compiler.
parameter(
"is_background",
true);
3951 compiler.
parameter(
this,
"use_transform");
3953 compiler.
parameter(
"object_itfm", ob_itfm);
3957 compiler.
add(
this,
"node_texture_coordinate");
3974 UVMapNode::UVMapNode() :
ShaderNode(get_node_type())
3980 if (
shader->has_surface) {
3982 if (!
output(
"UV")->links.empty()) {
3983 if (attribute !=
"")
4010 if (!out->
links.empty()) {
4015 if (attribute !=
"")
4028 compiler.
parameter(
"bump_offset",
"dx");
4030 compiler.
parameter(
"bump_offset",
"dy");
4032 compiler.
parameter(
"bump_offset",
"center");
4036 compiler.
add(
this,
"node_uv_map");
4063 LightPathNode::LightPathNode() :
ShaderNode(get_node_type())
4071 out =
output(
"Is Camera Ray");
4072 if (!out->
links.empty()) {
4076 out =
output(
"Is Shadow Ray");
4077 if (!out->
links.empty()) {
4081 out =
output(
"Is Diffuse Ray");
4082 if (!out->
links.empty()) {
4086 out =
output(
"Is Glossy Ray");
4087 if (!out->
links.empty()) {
4091 out =
output(
"Is Singular Ray");
4092 if (!out->
links.empty()) {
4096 out =
output(
"Is Reflection Ray");
4097 if (!out->
links.empty()) {
4101 out =
output(
"Is Transmission Ray");
4102 if (!out->
links.empty()) {
4106 out =
output(
"Is Volume Scatter Ray");
4107 if (!out->
links.empty()) {
4111 out =
output(
"Ray Length");
4112 if (!out->
links.empty()) {
4116 out =
output(
"Ray Depth");
4117 if (!out->
links.empty()) {
4121 out =
output(
"Diffuse Depth");
4122 if (!out->
links.empty()) {
4126 out =
output(
"Glossy Depth");
4127 if (!out->
links.empty()) {
4131 out =
output(
"Transparent Depth");
4132 if (!out->
links.empty()) {
4136 out =
output(
"Transmission Depth");
4137 if (!out->
links.empty()) {
4144 compiler.
add(
this,
"node_light_path");
4163 LightFalloffNode::LightFalloffNode() :
ShaderNode(get_node_type())
4173 if (!out->
links.empty()) {
4182 if (!out->
links.empty()) {
4190 out =
output(
"Constant");
4191 if (!out->
links.empty()) {
4202 compiler.
add(
this,
"node_light_falloff");
4220 ObjectInfoNode::ObjectInfoNode() :
ShaderNode(get_node_type())
4227 if (!out->
links.empty()) {
4232 if (!out->
links.empty()) {
4236 out =
output(
"Object Index");
4237 if (!out->
links.empty()) {
4241 out =
output(
"Material Index");
4242 if (!out->
links.empty()) {
4247 if (!out->
links.empty()) {
4254 compiler.
add(
this,
"node_object_info");
4269 SOCKET_OUT_QUATERNION(rotation,
"Rotation");
4278 ParticleInfoNode::ParticleInfoNode() :
ShaderNode(get_node_type())
4284 if (!
output(
"Index")->links.empty())
4286 if (!
output(
"Random")->links.empty())
4288 if (!
output(
"Age")->links.empty())
4290 if (!
output(
"Lifetime")->links.empty())
4292 if (!
output(
"Location")->links.empty())
4295 if (!
output(
"Rotation")->links.empty())
4298 if (!
output(
"Size")->links.empty())
4300 if (!
output(
"Velocity")->links.empty())
4302 if (!
output(
"Angular Velocity")->links.empty())
4313 if (!out->
links.empty()) {
4318 if (!out->
links.empty()) {
4323 if (!out->
links.empty()) {
4327 out =
output(
"Lifetime");
4328 if (!out->
links.empty()) {
4332 out =
output(
"Location");
4333 if (!out->
links.empty()) {
4339 out =
output(
"Rotation");
4340 if (!out->
links.empty()) {
4346 if (!out->
links.empty()) {
4350 out =
output(
"Velocity");
4351 if (!out->
links.empty()) {
4355 out =
output(
"Angular Velocity");
4356 if (!out->
links.empty()) {
4364 compiler.
add(
this,
"node_particle_info");
4385 HairInfoNode::HairInfoNode() :
ShaderNode(get_node_type())
4391 if (
shader->has_surface) {
4394 if (!intercept_out->
links.empty())
4397 if (!
output(
"Random")->links.empty())
4408 out =
output(
"Is Strand");
4409 if (!out->
links.empty()) {
4413 out =
output(
"Intercept");
4414 if (!out->
links.empty()) {
4419 out =
output(
"Thickness");
4420 if (!out->
links.empty()) {
4424 out =
output(
"Tangent Normal");
4425 if (!out->
links.empty()) {
4435 if (!out->
links.empty()) {
4443 compiler.
add(
this,
"node_hair_info");
4460 VolumeInfoNode::VolumeInfoNode() :
ShaderNode(get_node_type())
4469 if (
shader->has_volume) {
4470 if (!
output(
"Color")->links.empty()) {
4473 if (!
output(
"Density")->links.empty()) {
4476 if (!
output(
"Flame")->links.empty()) {
4479 if (!
output(
"Temperature")->links.empty()) {
4490 if (!color_out->
links.empty()) {
4492 attr->set_attribute(ustring(
"color"));
4498 if (!density_out->
links.empty()) {
4500 attr->set_attribute(ustring(
"density"));
4506 if (!flame_out->
links.empty()) {
4508 attr->set_attribute(ustring(
"flame"));
4514 if (!temperature_out->
links.empty()) {
4516 attr->set_attribute(ustring(
"temperature"));
4518 graph->relink(temperature_out, attr->
output(
"Fac"));
4541 VertexColorNode::VertexColorNode() :
ShaderNode(get_node_type())
4547 if (!(
output(
"Color")->links.empty() &&
output(
"Alpha")->links.empty())) {
4548 if (layer_name !=
"")
4562 if (layer_name !=
"") {
4563 layer_id = compiler.
attribute(layer_name);
4586 compiler.
parameter(
"bump_offset",
"dx");
4589 compiler.
parameter(
"bump_offset",
"dy");
4592 compiler.
parameter(
"bump_offset",
"center");
4595 if (layer_name.empty()) {
4596 compiler.
parameter(
"layer_name", ustring(
"geom:vertex_color"));
4600 compiler.
parameter(
"name", (
string(
"geom:") + layer_name.c_str()).c_str());
4603 compiler.
parameter(
"layer_name", layer_name.c_str());
4607 compiler.
add(
this,
"node_vertex_color");
4622 ValueNode::ValueNode() :
ShaderNode(get_node_type())
4640 compiler.
parameter(
"value_value", value);
4641 compiler.
add(
this,
"node_value");
4656 ColorNode::ColorNode() :
ShaderNode(get_node_type())
4669 if (!color_out->
links.empty()) {
4679 compiler.
add(
this,
"node_value");
4695 AddClosureNode::AddClosureNode() :
ShaderNode(get_node_type())
4707 compiler.
add(
this,
"node_add_closure");
4716 if (!closure1_in->
link) {
4719 else if (!closure2_in->
link) {
4739 MixClosureNode::MixClosureNode() :
ShaderNode(get_node_type())
4751 compiler.
add(
this,
"node_mix_closure");
4761 if (closure1_in->
link == closure2_in->
link) {
4766 else if (!fac_in->
link) {
4772 else if (fac >= 1.0f) {
4793 MixClosureWeightNode::MixClosureWeightNode() :
ShaderNode(get_node_type())
4830 InvertNode::InvertNode() :
ShaderNode(get_node_type())
4839 if (!fac_in->
link) {
4841 if (!color_in->
link) {
4845 else if (fac == 0.0f) {
4865 compiler.
add(
this,
"node_invert");
4906 MixNode::MixNode() :
ShaderNode(get_node_type())
4933 compiler.
add(
this,
"node_mix");
4942 folder.
fold_mix(mix_type, use_clamp);
4961 CombineRGBNode::CombineRGBNode() :
ShaderNode(get_node_type())
4991 compiler.
add(
this,
"node_combine_rgb");
5009 CombineXYZNode::CombineXYZNode() :
ShaderNode(get_node_type())
5039 compiler.
add(
this,
"node_combine_xyz");
5057 CombineHSVNode::CombineHSVNode() :
ShaderNode(get_node_type())
5084 compiler.
add(
this,
"node_combine_hsv");
5100 GammaNode::GammaNode() :
ShaderNode(get_node_type())
5118 else if (folder.
is_one(gamma_in)) {
5138 compiler.
add(
this,
"node_gamma");
5156 BrightContrastNode::BrightContrastNode() :
ShaderNode(get_node_type())
5183 compiler.
add(
this,
"node_brightness");
5201 SeparateRGBNode::SeparateRGBNode() :
ShaderNode(get_node_type())
5208 for (
int channel = 0; channel < 3; channel++) {
5236 compiler.
add(
this,
"node_separate_rgb");
5254 SeparateXYZNode::SeparateXYZNode() :
ShaderNode(get_node_type())
5261 for (
int channel = 0; channel < 3; channel++) {
5289 compiler.
add(
this,
"node_separate_xyz");
5307 SeparateHSVNode::SeparateHSVNode() :
ShaderNode(get_node_type())
5316 for (
int channel = 0; channel < 3; channel++) {
5341 compiler.
add(
this,
"node_separate_hsv");
5361 HSVNode::HSVNode() :
ShaderNode(get_node_type())
5385 compiler.
add(
this,
"node_hsv");
5404 AttributeNode::AttributeNode() :
ShaderNode(get_node_type())
5415 if (!color_out->
links.empty() || !vector_out->
links.empty() || !fac_out->
links.empty() ||
5416 !alpha_out->
links.empty()) {
5420 if (
shader->has_volume) {
5441 if (!color_out->
links.empty() || !vector_out->
links.empty()) {
5442 if (!color_out->
links.empty()) {
5446 if (!vector_out->
links.empty()) {
5452 if (!fac_out->
links.empty()) {
5456 if (!alpha_out->
links.empty()) {
5465 compiler.
parameter(
"bump_offset",
"dx");
5467 compiler.
parameter(
"bump_offset",
"dy");
5469 compiler.
parameter(
"bump_offset",
"center");
5472 compiler.
parameter(
"name", (
string(
"geom:") + attribute.c_str()).c_str());
5474 compiler.
parameter(
"name", attribute.c_str());
5476 compiler.
add(
this,
"node_attribute");
5492 CameraNode::CameraNode() :
ShaderNode(get_node_type())
5510 compiler.
add(
this,
"node_camera");
5528 FresnelNode::FresnelNode() :
ShaderNode(get_node_type())
5547 compiler.
add(
this,
"node_fresnel");
5566 LayerWeightNode::LayerWeightNode() :
ShaderNode(get_node_type())
5577 if (!fresnel_out->
links.empty()) {
5586 if (!facing_out->
links.empty()) {
5598 compiler.
add(
this,
"node_layer_weight");
5614 WireframeNode::WireframeNode() :
ShaderNode(get_node_type())
5638 compiler.
parameter(
"bump_offset",
"dx");
5641 compiler.
parameter(
"bump_offset",
"dy");
5644 compiler.
parameter(
"bump_offset",
"center");
5646 compiler.
parameter(
this,
"use_pixel_size");
5647 compiler.
add(
this,
"node_wireframe");
5662 WavelengthNode::WavelengthNode() :
ShaderNode(get_node_type())
5677 compiler.
add(
this,
"node_wavelength");
5692 BlackbodyNode::BlackbodyNode() :
ShaderNode(get_node_type())
5714 compiler.
add(
this,
"node_blackbody");
5731 OutputNode::OutputNode() :
ShaderNode(get_node_type())
5741 if (displacement_in->
link) {
5750 compiler.
add(
this,
"node_output_surface");
5752 compiler.
add(
this,
"node_output_volume");
5754 compiler.
add(
this,
"node_output_displacement");
5783 MapRangeNode::MapRangeNode() :
ShaderNode(get_node_type())
5791 if (!result_out->
links.empty()) {
5794 graph->add(clamp_node);
5795 graph->relink(result_out, clamp_node->
output(
"Result"));
5796 graph->connect(result_out, clamp_node->
input(
"Value"));
5801 clamp_node->set_min(to_min);
5807 clamp_node->set_max(to_max);
5823 int value_stack_offset = compiler.
stack_assign(value_in);
5828 int steps_stack_offset = compiler.
stack_assign(steps_in);
5829 int result_stack_offset = compiler.
stack_assign(result_out);
5835 from_min_stack_offset, from_max_stack_offset, to_min_stack_offset, to_max_stack_offset),
5836 compiler.
encode_uchar4(range_type, steps_stack_offset, result_stack_offset));
5848 compiler.
add(
this,
"node_map_range");
5871 ClampNode::ClampNode() :
ShaderNode(get_node_type())
5894 int value_stack_offset = compiler.
stack_assign(value_in);
5897 int result_stack_offset = compiler.
stack_assign(result_out);
5901 compiler.
encode_uchar4(min_stack_offset, max_stack_offset, clamp_type),
5902 result_stack_offset);
5909 compiler.
add(
this,
"node_clamp");
5926 OutputAOVNode::OutputAOVNode() :
ShaderNode(get_node_type())
6024 MathNode::MathNode() :
ShaderNode(get_node_type())
6032 if (!result_out->
links.empty()) {
6035 clamp_node->set_min(0.0f);
6036 clamp_node->set_max(1.0f);
6037 graph->add(clamp_node);
6038 graph->relink(result_out, clamp_node->
output(
"Result"));
6039 graph->connect(result_out, clamp_node->
input(
"Value"));
6061 int value1_stack_offset = compiler.
stack_assign(value1_in);
6062 int value2_stack_offset = compiler.
stack_assign(value2_in);
6063 int value3_stack_offset = compiler.
stack_assign(value3_in);
6064 int value_stack_offset = compiler.
stack_assign(value_out);
6069 compiler.
encode_uchar4(value1_stack_offset, value2_stack_offset, value3_stack_offset),
6070 value_stack_offset);
6076 compiler.
add(
this,
"node_math");
6130 VectorMathNode::VectorMathNode() :
ShaderNode(get_node_type())
6161 int vector1_stack_offset = compiler.
stack_assign(vector1_in);
6162 int vector2_stack_offset = compiler.
stack_assign(vector2_in);
6163 int param1_stack_offset = compiler.
stack_assign(param1_in);
6170 int vector3_stack_offset = compiler.
stack_assign(vector3_in);
6174 compiler.
encode_uchar4(vector1_stack_offset, vector2_stack_offset, param1_stack_offset),
6175 compiler.
encode_uchar4(value_stack_offset, vector_stack_offset));
6176 compiler.
add_node(vector3_stack_offset);
6182 compiler.
encode_uchar4(vector1_stack_offset, vector2_stack_offset, param1_stack_offset),
6183 compiler.
encode_uchar4(value_stack_offset, vector_stack_offset));
6190 compiler.
add(
this,
"node_vector_math");
6219 VectorRotateNode::VectorRotateNode() :
ShaderNode(get_node_type())
6245 compiler.
parameter(
this,
"rotate_type");
6247 compiler.
add(
this,
"node_vector_rotate");
6275 VectorTransformNode::VectorTransformNode() :
ShaderNode(get_node_type())
6286 compiler.
encode_uchar4(transform_type, convert_from, convert_to),
6292 compiler.
parameter(
this,
"transform_type");
6293 compiler.
parameter(
this,
"convert_from");
6295 compiler.
add(
this,
"node_vector_transform");
6323 BumpNode::BumpNode() :
ShaderNode(get_node_type())
6354 compiler.
parameter(
this,
"use_object_space");
6355 compiler.
add(
this,
"node_bump");
6389 if (curves.size() == 0) {
6403 else if (!fac_in->
link && fac == 0.0f) {
6414 if (curves.size() == 0)
6427 for (
int i = 0; i < curves.size(); i++)
6433 if (curves.size() == 0)
6470 RGBCurvesNode::RGBCurvesNode() :
CurvesNode(get_node_type())
6507 VectorCurvesNode::VectorCurvesNode() :
CurvesNode(get_node_type())
6544 RGBRampNode::RGBRampNode() :
ShaderNode(get_node_type())
6550 if (ramp.size() == 0 || ramp.size() != ramp_alpha.size())
6554 float f =
clamp(fac, 0.0f, 1.0f) * (ramp.size() - 1);
6557 int i =
clamp((
int)f, 0, ramp.size() - 1);
6560 bool use_lerp = interpolate &&
t > 0.0f;
6575 if (ramp.size() == 0 || ramp.size() != ramp_alpha.size())
6589 for (
int i = 0; i < ramp.size(); i++)
6595 if (ramp.size() == 0 || ramp.size() != ramp_alpha.size())
6599 compiler.
parameter_array(
"ramp_alpha", ramp_alpha.data(), ramp_alpha.size());
6600 compiler.
parameter(
this,
"interpolate");
6602 compiler.
add(
this,
"node_rgb_ramp");
6617 SetNormalNode::SetNormalNode() :
ShaderNode(get_node_type())
6633 compiler.
add(
this,
"node_set_normal");
6660 char *node_memory = (
char *)
operator new(node_size + inputs_size);
6661 memset(node_memory, 0, node_size + inputs_size);
6670 memcpy(node_memory + node_size, (
char *)
from + node_size, inputs_size);
6690 size_t offset = memory - (
char *)
this;
6739 NormalMapNode::NormalMapNode() :
ShaderNode(get_node_type())
6746 if (attribute.empty()) {
6751 attributes->add(ustring((
string(attribute.c_str()) +
".tangent").c_str()));
6752 attributes->add(ustring((
string(attribute.c_str()) +
".tangent_sign").c_str()));
6766 int attr = 0, attr_sign = 0;
6769 if (attribute.empty()) {
6774 attr = compiler.
attribute(ustring((
string(attribute.c_str()) +
".tangent").c_str()));
6776 ustring((
string(attribute.c_str()) +
".tangent_sign").c_str()));
6792 if (attribute.empty()) {
6793 compiler.
parameter(
"attr_name", ustring(
"geom:tangent"));
6794 compiler.
parameter(
"attr_sign_name", ustring(
"geom:tangent_sign"));
6797 compiler.
parameter(
"attr_name", ustring((
string(attribute.c_str()) +
".tangent").c_str()));
6799 ustring((
string(attribute.c_str()) +
".tangent_sign").c_str()));
6804 compiler.
add(
this,
"node_normal_map");
6813 static NodeEnum direction_type_enum;
6833 TangentNode::TangentNode() :
ShaderNode(get_node_type())
6839 if (
shader->has_surface) {
6841 if (attribute.empty())
6844 attributes->add(ustring((
string(attribute.c_str()) +
".tangent").c_str()));
6859 if (attribute.empty())
6862 attr = compiler.
attribute(ustring((
string(attribute.c_str()) +
".tangent").c_str()));
6876 if (attribute.empty())
6877 compiler.
parameter(
"attr_name", ustring(
"geom:tangent"));
6879 compiler.
parameter(
"attr_name", ustring((
string(attribute.c_str()) +
".tangent").c_str()));
6882 compiler.
parameter(
this,
"direction_type");
6884 compiler.
add(
this,
"node_tangent");
6903 BevelNode::BevelNode() :
ShaderNode(get_node_type())
6923 compiler.
add(
this,
"node_bevel");
6948 DisplacementNode::DisplacementNode() :
ShaderNode(get_node_type())
6955 if ((
height - midlevel == 0.0f) || (scale == 0.0f)) {
6981 compiler.
add(
this,
"node_displacement");
7007 VectorDisplacementNode::VectorDisplacementNode() :
ShaderNode(get_node_type())
7023 if (attribute.empty()) {
7028 attributes->add(ustring((
string(attribute.c_str()) +
".tangent").c_str()));
7029 attributes->add(ustring((
string(attribute.c_str()) +
".tangent_sign").c_str()));
7044 int attr = 0, attr_sign = 0;
7047 if (attribute.empty()) {
7052 attr = compiler.
attribute(ustring((
string(attribute.c_str()) +
".tangent").c_str()));
7054 ustring((
string(attribute.c_str()) +
".tangent_sign").c_str()));
7072 if (attribute.empty()) {
7073 compiler.
parameter(
"attr_name", ustring(
"geom:tangent"));
7074 compiler.
parameter(
"attr_sign_name", ustring(
"geom:tangent_sign"));
7077 compiler.
parameter(
"attr_name", ustring((
string(attribute.c_str()) +
".tangent").c_str()));
7079 ustring((
string(attribute.c_str()) +
".tangent_sign").c_str()));
7084 compiler.
add(
this,
"node_vector_displacement");
typedef float(TangentPoint)[2]
KDTree *BLI_kdtree_nd_() new(unsigned int maxsize)
MINLINE float signf(float f)
void rgb_to_hsv(float r, float g, float b, float *r_h, float *r_s, float *r_v)
void hsv_to_rgb(float h, float s, float v, float *r_r, float *r_g, float *r_b)
static uint8 component(Color32 c, uint i)
@ NODE_VECTOR_MATH_NORMALIZE
@ NODE_VECTOR_MATH_LENGTH
@ NODE_VECTOR_MATH_CROSS_PRODUCT
@ NODE_VECTOR_MATH_MODULO
@ NODE_VECTOR_MATH_COSINE
@ NODE_VECTOR_MATH_REFLECT
@ NODE_VECTOR_MATH_REFRACT
@ NODE_VECTOR_MATH_DOT_PRODUCT
@ NODE_VECTOR_MATH_ABSOLUTE
@ NODE_VECTOR_MATH_DIVIDE
@ NODE_VECTOR_MATH_TANGENT
@ NODE_VECTOR_MATH_DISTANCE
@ NODE_VECTOR_MATH_FRACTION
@ NODE_VECTOR_MATH_PROJECT
@ NODE_VECTOR_MATH_MULTIPLY
@ NODE_VECTOR_MATH_MAXIMUM
@ NODE_VECTOR_MATH_FACEFORWARD
@ NODE_VECTOR_MATH_SUBTRACT
@ NODE_VECTOR_MATH_MINIMUM
@ NODE_MAPPING_TYPE_POINT
@ NODE_MAPPING_TYPE_VECTOR
@ NODE_MAPPING_TYPE_TEXTURE
@ NODE_MAPPING_TYPE_NORMAL
@ NODE_VECTOR_ROTATE_TYPE_AXIS
@ NODE_VECTOR_ROTATE_TYPE_AXIS_Z
@ NODE_VECTOR_ROTATE_TYPE_AXIS_X
@ NODE_VECTOR_ROTATE_TYPE_EULER_XYZ
@ NODE_VECTOR_ROTATE_TYPE_AXIS_Y
@ NODE_MAP_RANGE_SMOOTHERSTEP
@ NODE_MAP_RANGE_SMOOTHSTEP
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble z
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse BSDF
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
void constant_fold(const ConstantFolder &folder)
void attributes(Shader *shader, AttributeRequestSet *attributes)
void attributes(Shader *shader, AttributeRequestSet *attributes)
static AttributeStandard name_standard(const char *name)
void constant_fold(const ConstantFolder &folder)
void constant_fold(const ConstantFolder &folder)
void constant_fold(const ConstantFolder &folder)
BsdfBaseNode(const NodeType *node_type)
BsdfNode(const NodeType *node_type)
void compile(SVMCompiler &compiler, ShaderInput *param1, ShaderInput *param2, ShaderInput *param3=NULL, ShaderInput *param4=NULL)
void constant_fold(const ConstantFolder &folder)
void constant_fold(const ConstantFolder &folder)
void constant_fold(const ConstantFolder &folder)
static bool colorspace_is_data(ustring colorspace)
void constant_fold(const ConstantFolder &folder)
void constant_fold(const ConstantFolder &folder)
void constant_fold(const ConstantFolder &folder)
void make_constant_clamp(float value, bool clamp) const
void bypass(ShaderOutput *output) const
void bypass_or_discard(ShaderInput *input) const
void fold_mapping(NodeMappingType type) const
bool all_inputs_constant() const
bool try_bypass_or_make_constant(ShaderInput *input, bool clamp=false) const
bool is_zero(ShaderInput *input) const
bool is_one(ShaderInput *input) const
void fold_math(NodeMathType type) const
void make_constant(float value) const
ShaderOutput *const output
void fold_mix(NodeMix type, bool clamp) const
void fold_vector_math(NodeVectorMathType type) const
void constant_fold(const ConstantFolder &folder)
ConvertNode(SocketType::Type from, SocketType::Type to, bool autoconvert=false)
CurvesNode(const NodeType *node_type)
virtual void constant_fold(const ConstantFolder &)
void compile(SVMCompiler &compiler, int type, ShaderInput *value_in, ShaderOutput *value_out)
void constant_fold(const ConstantFolder &folder)
void constant_fold(const ConstantFolder &folder)
ImageParams image_params() const
ShaderNode * clone(ShaderGraph *graph) const
void attributes(Shader *shader, AttributeRequestSet *attributes)
int get_aov_offset(Scene *scene, string name, bool &is_color)
void constant_fold(const ConstantFolder &folder)
void attributes(Shader *shader, AttributeRequestSet *attributes)
virtual void get_uv_tiles(ustring map, unordered_set< int > &tiles)=0
void simplify_settings(Scene *scene)
bool has_integrator_dependency()
bool has_integrator_dependency()
void simplify_settings(Scene *scene)
void attributes(Shader *shader, AttributeRequestSet *attributes)
ShaderNode * clone(ShaderGraph *graph) const
int svm_slot(const int tile_index=0) const
ImageHandle add_image(const string &filename, const ImageParams ¶ms)
InterpolationType interpolation
ImageParams image_params() const
void attributes(Shader *shader, AttributeRequestSet *attributes)
void cull_tiles(Scene *scene, ShaderGraph *graph)
ShaderNode * clone(ShaderGraph *graph) const
void constant_fold(const ConstantFolder &folder)
int add_ies(const string &ies)
int add_ies_from_file(const string &filename)
void remove_ies(int slot)
void expand(ShaderGraph *graph)
void constant_fold(const ConstantFolder &folder)
void constant_fold(const ConstantFolder &folder)
void expand(ShaderGraph *graph)
void constant_fold(const ConstantFolder &folder)
void constant_fold(const ConstantFolder &folder)
void attributes(Shader *shader, AttributeRequestSet *attributes)
void add(ShaderNode *node, const char *name, bool isfilepath=false)
void parameter_array(const char *name, const float f[], int arraylen)
void parameter_texture_ies(const char *name, int svm_slot)
void parameter_texture(const char *name, ustring filename, ustring colorspace)
void parameter(ShaderNode *node, const char *name)
void parameter_color_array(const char *name, const array< float3 > &f)
void parameter_color(const char *name, float3 f)
static OSLNode * create(ShaderGraph *graph, size_t num_inputs, const OSLNode *from=NULL)
ShaderNode * clone(ShaderGraph *graph) const
void add_output(ustring name, SocketType::Type type)
char * input_default_value()
void add_input(ustring name, SocketType::Type type)
virtual void simplify_settings(Scene *scene)
void attributes(Shader *shader, AttributeRequestSet *attributes)
ImageParams image_params() const
~PointDensityTextureNode()
ShaderNode * clone(ShaderGraph *graph) const
void attributes(Shader *shader, AttributeRequestSet *attributes)
bool has_surface_bssrdf()
void compile(SVMCompiler &compiler, ShaderInput *metallic, ShaderInput *subsurface, ShaderInput *subsurface_radius, ShaderInput *specular, ShaderInput *roughness, ShaderInput *specular_tint, ShaderInput *anisotropic, ShaderInput *sheen, ShaderInput *sheen_tint, ShaderInput *clearcoat, ShaderInput *clearcoat_roughness, ShaderInput *ior, ShaderInput *transmission, ShaderInput *anisotropic_rotation, ShaderInput *transmission_roughness)
bool has_integrator_dependency()
void expand(ShaderGraph *graph)
void attributes(Shader *shader, AttributeRequestSet *attributes)
void attributes(Shader *shader, AttributeRequestSet *attributes)
void attributes(Shader *shader, AttributeRequestSet *attributes)
void constant_fold(const ConstantFolder &folder)
void constant_fold(const ConstantFolder &folder)
bool has_integrator_dependency()
void simplify_settings(Scene *scene)
ShaderGraph * current_graph
void add_node(ShaderNodeType type, int a=0, int b=0, int c=0)
void stack_clear_offset(SocketType::Type type, int offset)
int stack_assign_if_linked(ShaderInput *input)
uint encode_uchar4(uint x, uint y=0, uint z=0, uint w=0)
uint attribute_standard(ustring name)
void stack_link(ShaderInput *input, ShaderOutput *output)
uint closure_mix_weight_offset()
uint attribute(ustring name)
int stack_find_offset(int size)
int stack_assign(ShaderOutput *output)
void constant_fold(const ConstantFolder &folder)
void constant_fold(const ConstantFolder &folder)
void constant_fold(const ConstantFolder &folder)
ShaderNode * add(ShaderNode *node)
T * create_node(Args &&... args)
float linear_rgb_to_gray(float3 c)
ShaderInput * input(const char *name)
vector< ShaderOutput * > outputs
void remove_input(ShaderInput *input)
ShaderNodeSpecialType special_type
vector< ShaderInput * > inputs
ShaderOutput * output(const char *name)
virtual void compile(SVMCompiler &compiler)=0
virtual void attributes(Shader *shader, AttributeRequestSet *attributes)
vector< ShaderInput * > links
void attributes(Shader *shader, AttributeRequestSet *attributes)
void attributes(Shader *shader, AttributeRequestSet *attributes)
void compile_end(SVMCompiler &compiler, ShaderInput *vector_in, int vector_offset)
Transform compute_transform()
void compile(SVMCompiler &compiler, int offset_in, int offset_out)
int compile_begin(SVMCompiler &compiler, ShaderInput *vector_in)
TextureMapping tex_mapping
void attributes(Shader *shader, AttributeRequestSet *attributes)
void constant_fold(const ConstantFolder &folder)
void constant_fold(const ConstantFolder &folder)
void attributes(Shader *shader, AttributeRequestSet *attributes)
void constant_fold(const ConstantFolder &folder)
void attributes(Shader *shader, AttributeRequestSet *attributes)
void expand(ShaderGraph *graph)
void attributes(Shader *shader, AttributeRequestSet *attributes)
void compile(SVMCompiler &compiler, ShaderInput *param1, ShaderInput *param2)
VolumeNode(const NodeType *node_type)
void push_back_slow(const T &t)
CCL_NAMESPACE_BEGIN ustring u_colorspace_auto
static CCL_NAMESPACE_BEGIN const double alpha
struct @203::@204 surface
IMETHOD void random(Vector &a)
addDelta operator for displacement rotational velocity.
@ SHADER_SPECIAL_TYPE_PROXY
@ SHADER_SPECIAL_TYPE_GEOMETRY
@ SHADER_SPECIAL_TYPE_OUTPUT_AOV
@ SHADER_SPECIAL_TYPE_COMBINE_CLOSURE
@ SHADER_SPECIAL_TYPE_BUMP
@ SHADER_SPECIAL_TYPE_AUTOCONVERT
@ SHADER_SPECIAL_TYPE_OUTPUT
@ SHADER_SPECIAL_TYPE_CLOSURE
@ SHADER_SPECIAL_TYPE_OSL
IconTextureDrawCall normal
#define CCL_NAMESPACE_END
#define make_float2(x, y)
#define make_float4(x, y, z, w)
#define make_float3(x, y, z)
void KERNEL_FUNCTION_FULL_NAME() shader(KernelGlobals *kg, uint4 *input, float4 *output, int type, int filter, int i, int offset, int sample)
@ ATTR_STD_CURVE_INTERCEPT
@ ATTR_STD_GENERATED_TRANSFORM
@ ATTR_STD_VOLUME_TEMPERATURE
@ ATTR_STD_VOLUME_DENSITY
@ ATTR_STD_UV_TANGENT_SIGN
@ ATTR_STD_RANDOM_PER_ISLAND
static void add(GHash *messages, MemArena *memarena, const Message *msg)
static const pxr::TfToken roughness("roughness", pxr::TfToken::Immortal)
static const pxr::TfToken metallic("metallic", pxr::TfToken::Immortal)
color rgb_ramp_lookup(color ramp[], float at, int interpolate, int extrapolate)
#define SOCKET_IN_NORMAL(name, ui_name, default_value,...)
#define SOCKET_OUT_POINT(name, ui_name)
#define SOCKET_OUT_FLOAT(name, ui_name)
#define SOCKET_OUT_COLOR(name, ui_name)
#define SOCKET_FLOAT(name, ui_name, default_value,...)
#define SOCKET_INT(name, ui_name, default_value,...)
#define SOCKET_IN_COLOR(name, ui_name, default_value,...)
#define SOCKET_FLOAT_ARRAY(name, ui_name, default_value,...)
#define SOCKET_TRANSFORM(name, ui_name, default_value,...)
#define SOCKET_OUT_NORMAL(name, ui_name)
#define SOCKET_IN_FLOAT(name, ui_name, default_value,...)
#define SOCKET_IN_CLOSURE(name, ui_name,...)
#define SOCKET_OFFSETOF(T, name)
#define SOCKET_INT_ARRAY(name, ui_name, default_value,...)
#define SOCKET_VECTOR_ARRAY(name, ui_name, default_value,...)
#define SOCKET_IN_VECTOR(name, ui_name, default_value,...)
#define SOCKET_VECTOR(name, ui_name, default_value,...)
#define SOCKET_IN_POINT(name, ui_name, default_value,...)
#define SOCKET_COLOR_ARRAY(name, ui_name, default_value,...)
#define SOCKET_COLOR(name, ui_name, default_value,...)
#define SOCKET_OUT_VECTOR(name, ui_name)
#define SOCKET_IN_STRING(name, ui_name, default_value,...)
#define SOCKET_BOOLEAN(name, ui_name, default_value,...)
#define SOCKET_IN_BOOLEAN(name, ui_name, default_value,...)
#define SOCKET_STRING(name, ui_name, default_value,...)
#define SOCKET_ENUM(name, ui_name, values, default_value,...)
#define SOCKET_OUT_CLOSURE(name, ui_name)
static void sky_texture_precompute_hosek(SunSky *sunsky, float3 dir, float turbidity, float ground_albedo)
NODE_DEFINE(ImageTextureNode)
static float2 sky_spherical_coordinates(float3 dir)
static float sky_perez_function(float lam[6], float theta, float gamma)
#define TEXTURE_MAPPING_DEFINE(TextureNode)
static void sky_texture_precompute_preetham(SunSky *sunsky, float3 dir, float turbidity)
static void sky_texture_precompute_nishita(SunSky *sunsky, bool sun_disc, float sun_size, float sun_intensity, float sun_elevation, float sun_rotation, float altitude, float air_density, float dust_density)
void SKY_arhosekskymodelstate_free(SKY_ArHosekSkyModelState *state)
void SKY_nishita_skymodel_precompute_sun(float sun_elevation, float angular_diameter, float altitude, float air_density, float dust_density, float *r_pixel_bottom, float *r_pixel_top)
SKY_ArHosekSkyModelState * SKY_arhosek_xyz_skymodelstate_alloc_init(const double turbidity, const double albedo, const double elevation)
void insert(const char *x, int y)
vector< SocketType, std::allocator< SocketType > > inputs
void register_output(ustring name, ustring ui_name, SocketType::Type type)
static NodeType * add(const char *name, CreateFunc create, Type type=NONE, const NodeType *base=NULL)
vector< SocketType, std::allocator< SocketType > > outputs
void register_input(ustring name, ustring ui_name, SocketType::Type type, int struct_offset, const void *default_value, const NodeEnum *enum_values=NULL, const NodeType *node_type=NULL, int flags=0, int extra_flags=0)
float get_float(const SocketType &input) const
float3 get_float3(const SocketType &input) const
SKY_ArHosekSkyModelConfiguration configs[11]
vector< Geometry * > geometry
ImageManager * image_manager
ShaderManager * shader_manager
LightManager * light_manager
static bool is_float3(Type type)
static ustring type_name(Type type)
static void * zero_default_value()
ccl_device_noinline_cpu float3 svm_mix(NodeMix type, float fac, float3 c1, float3 c2)
ccl_device_inline float3 svm_brightness_contrast(float3 color, float brightness, float contrast)
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
CCL_NAMESPACE_BEGIN ccl_device float3 svm_mapping(NodeMappingType type, float3 vector, float3 location, float3 rotation, float3 scale)
CCL_NAMESPACE_BEGIN ccl_device void svm_vector_math(float *value, float3 *vector, NodeVectorMathType type, float3 a, float3 b, float3 c, float param1)
ccl_device float3 svm_math_blackbody_color(float t)
ccl_device float svm_math(NodeMathType type, float a, float b, float c)
ccl_device_inline float3 svm_math_gamma_color(float3 color, float gamma)
CCL_NAMESPACE_BEGIN ccl_device float fade(float t)
ccl_device float float_ramp_lookup(const float *ramp, float f, bool interpolate, bool extrapolate, int table_size)
@ NODE_ENVIRONMENT_MIRROR_BALL
@ NODE_ENVIRONMENT_EQUIRECTANGULAR
@ NODE_ATTR_OUTPUT_FLOAT_ALPHA
@ NODE_ATTR_OUTPUT_FLOAT3
@ NODE_CLOSURE_SET_WEIGHT
@ NODE_VERTEX_COLOR_BUMP_DX
@ NODE_CLOSURE_BACKGROUND
@ NODE_VECTOR_DISPLACEMENT
@ NODE_CLOSURE_SET_NORMAL
@ NODE_VERTEX_COLOR_BUMP_DY
@ NODE_MUSGRAVE_MULTIFRACTAL
@ NODE_MUSGRAVE_RIDGED_MULTIFRACTAL
@ NODE_MUSGRAVE_HYBRID_MULTIFRACTAL
@ NODE_MUSGRAVE_HETERO_TERRAIN
@ NODE_BUMP_OFFSET_CENTER
@ NODE_WAVE_BANDS_DIRECTION_Z
@ NODE_WAVE_BANDS_DIRECTION_DIAGONAL
@ NODE_WAVE_BANDS_DIRECTION_Y
@ NODE_WAVE_BANDS_DIRECTION_X
@ NODE_INFO_CURVE_IS_STRAND
@ NODE_INFO_CURVE_TANGENT_NORMAL
@ NODE_INFO_CURVE_THICKNESS
@ NODE_VECTOR_TRANSFORM_CONVERT_SPACE_OBJECT
@ NODE_VECTOR_TRANSFORM_CONVERT_SPACE_WORLD
@ NODE_VECTOR_TRANSFORM_CONVERT_SPACE_CAMERA
@ NODE_PRINCIPLED_HAIR_REFLECTANCE
@ NODE_PRINCIPLED_HAIR_DIRECT_ABSORPTION
@ NODE_PRINCIPLED_HAIR_PIGMENT_CONCENTRATION
@ NODE_TEXCO_VOLUME_GENERATED
@ NODE_TEXCO_DUPLI_GENERATED
@ SHADER_TYPE_DISPLACEMENT
@ NODE_VORONOI_N_SPHERE_RADIUS
@ NODE_VORONOI_DISTANCE_TO_EDGE
@ NODE_INFO_PAR_ANGULAR_VELOCITY
@ NODE_IMAGE_COMPRESS_AS_SRGB
@ NODE_IMAGE_ALPHA_UNASSOCIATE
@ NODE_TEX_VOXEL_SPACE_WORLD
@ NODE_TEX_VOXEL_SPACE_OBJECT
@ NODE_LP_ray_transmission
@ NODE_LP_ray_transparent
#define SVM_STACK_INVALID
#define NODE_GROUP_LEVEL_1
@ CLOSURE_BSDF_MICROFACET_GGX_REFRACTION_ID
@ CLOSURE_VOLUME_HENYEY_GREENSTEIN_ID
@ CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID
@ CLOSURE_BSSRDF_CUBIC_ID
@ CLOSURE_BSDF_HAIR_PRINCIPLED_ID
@ CLOSURE_BSSRDF_GAUSSIAN_ID
@ CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID
@ CLOSURE_BSDF_DIFFUSE_ID
@ CLOSURE_BSSRDF_BURLEY_ID
@ CLOSURE_BSDF_PRINCIPLED_ID
@ CLOSURE_BSDF_TRANSPARENT_ID
@ CLOSURE_BSDF_DIFFUSE_TOON_ID
@ CLOSURE_BSDF_MICROFACET_GGX_ID
@ CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID
@ CLOSURE_BSDF_MICROFACET_MULTI_GGX_ID
@ CLOSURE_BSDF_HAIR_TRANSMISSION_ID
@ CLOSURE_BSDF_SHARP_GLASS_ID
@ CLOSURE_BSDF_MICROFACET_BECKMANN_GLASS_ID
@ CLOSURE_BSSRDF_RANDOM_WALK_ID
@ CLOSURE_BSDF_REFRACTION_ID
@ CLOSURE_BSDF_MICROFACET_BECKMANN_ID
@ CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_ID
@ CLOSURE_BSSRDF_PRINCIPLED_ID
@ CLOSURE_BSSRDF_PRINCIPLED_RANDOM_WALK_ID
@ CLOSURE_BSDF_GLOSSY_TOON_ID
@ CLOSURE_VOLUME_ABSORPTION_ID
@ CLOSURE_BSDF_HAIR_REFLECTION_ID
@ CLOSURE_BSDF_TRANSLUCENT_ID
@ CLOSURE_BSDF_REFLECTION_ID
@ CLOSURE_BSDF_ASHIKHMIN_VELVET_ID
@ NODE_VECTOR_TRANSFORM_TYPE_NORMAL
@ NODE_VECTOR_TRANSFORM_TYPE_VECTOR
@ NODE_VECTOR_TRANSFORM_TYPE_POINT
@ NODE_BLEND_QUADRATIC_SPHERE
#define CLOSURE_WEIGHT_CUTOFF
@ NODE_WAVE_RINGS_DIRECTION_Y
@ NODE_WAVE_RINGS_DIRECTION_SPHERICAL
@ NODE_WAVE_RINGS_DIRECTION_X
@ NODE_WAVE_RINGS_DIRECTION_Z
@ NODE_LAYER_WEIGHT_FACING
@ NODE_LAYER_WEIGHT_FRESNEL
@ NODE_NORMAL_MAP_TANGENT
@ NODE_NORMAL_MAP_BLENDER_WORLD
@ NODE_NORMAL_MAP_BLENDER_OBJECT
@ NODE_LIGHT_FALLOFF_QUADRATIC
@ NODE_LIGHT_FALLOFF_LINEAR
@ NODE_LIGHT_FALLOFF_CONSTANT
static int blend(const Tex *tex, const float texvec[3], TexResult *texres)
ccl_device_inline uint __float_as_uint(float f)
ccl_device_inline int __float_as_int(float f)
ccl_device_inline float4 float3_to_float4(const float3 a)
ccl_device_inline int clamp(int a, int mn, int mx)
ccl_device_inline float distance(const float2 &a, const float2 &b)
ccl_device_inline float2 interp(const float2 &a, const float2 &b, float t)
ccl_device_inline float average(const float2 &a)
ccl_device_inline float3 one_float3()
ccl_device_inline float3 zero_float3()
bool string_endswith(const string &s, const string &end)
@ IMAGE_ALPHA_CHANNEL_PACKED
@ IMAGE_ALPHA_UNASSOCIATED
#define TEX_IMAGE_MISSING_R
#define TEX_IMAGE_MISSING_B
#define TEX_IMAGE_MISSING_G
ccl_device_inline size_t align_up(size_t offset, size_t alignment)
ccl_device_inline size_t divide_up(size_t x, size_t y)