19 #include "util/color.h"
35 #define TEXTURE_MAPPING_DEFINE(TextureNode) \
36 SOCKET_POINT(tex_mapping.translation, "Translation", zero_float3()); \
37 SOCKET_VECTOR(tex_mapping.rotation, "Rotation", zero_float3()); \
38 SOCKET_VECTOR(tex_mapping.scale, "Scale", one_float3()); \
40 SOCKET_VECTOR(tex_mapping.min, "Min", make_float3(-FLT_MAX, -FLT_MAX, -FLT_MAX)); \
41 SOCKET_VECTOR(tex_mapping.max, "Max", make_float3(FLT_MAX, FLT_MAX, FLT_MAX)); \
42 SOCKET_BOOLEAN(tex_mapping.use_minmax, "Use Min Max", false); \
44 static NodeEnum mapping_axis_enum; \
45 mapping_axis_enum.insert("none", TextureMapping::NONE); \
46 mapping_axis_enum.insert("x", TextureMapping::X); \
47 mapping_axis_enum.insert("y", TextureMapping::Y); \
48 mapping_axis_enum.insert("z", TextureMapping::Z); \
49 SOCKET_ENUM(tex_mapping.x_mapping, "x_mapping", mapping_axis_enum, TextureMapping::X); \
50 SOCKET_ENUM(tex_mapping.y_mapping, "y_mapping", mapping_axis_enum, TextureMapping::Y); \
51 SOCKET_ENUM(tex_mapping.z_mapping, "z_mapping", mapping_axis_enum, TextureMapping::Z); \
53 static NodeEnum mapping_type_enum; \
54 mapping_type_enum.insert("point", TextureMapping::POINT); \
55 mapping_type_enum.insert("texture", TextureMapping::TEXTURE); \
56 mapping_type_enum.insert("vector", TextureMapping::VECTOR); \
57 mapping_type_enum.insert("normal", TextureMapping::NORMAL); \
58 SOCKET_ENUM(tex_mapping.type, "Type", mapping_type_enum, TextureMapping::TEXTURE); \
60 static NodeEnum mapping_projection_enum; \
61 mapping_projection_enum.insert("flat", TextureMapping::FLAT); \
62 mapping_projection_enum.insert("cube", TextureMapping::CUBE); \
63 mapping_projection_enum.insert("tube", TextureMapping::TUBE); \
64 mapping_projection_enum.insert("sphere", TextureMapping::SPHERE); \
65 SOCKET_ENUM(tex_mapping.projection, "Projection", mapping_projection_enum, TextureMapping::FLAT);
104 mat = tmat * rmat * smat;
109 mat = tmat * rmat * smat;
147 compiler.
add_node(NODE_TEXTURE_MAPPING, offset_in, offset_out);
155 compiler.
add_node(NODE_MIN_MAX, offset_out, offset_out);
176 compile(compiler, offset_in, offset_out);
238 SOCKET_FLOAT(projection_blend,
"Projection Blend", 0.0f);
255 tiles.push_back_slow(1001);
268 params.animated = animated;
269 params.interpolation = interpolation;
270 params.extension = extension;
271 params.alpha_type = alpha_type;
272 params.colorspace = colorspace;
282 tiles.push_back_slow(1001);
294 if (
tiles.size() < 2) {
300 if (vector_in->
link) {
302 if (
node->type == UVMapNode::get_node_type()) {
306 else if (
node->type == TextureCoordinateNode::get_node_type()) {
307 if (vector_in->
link !=
node->output(
"UV")) {
316 unordered_set<int> used_tiles;
321 foreach (
Node *
node, geom->get_used_shaders()) {
331 if (used_tiles.count(
tile)) {
335 tiles.steal_data(new_tiles);
368 const ustring known_colorspace = metadata.
colorspace;
373 if (compress_as_srgb) {
376 if (!alpha_out->
links.empty()) {
381 if (unassociate_alpha) {
405 for (
int i = 0; i < num_nodes; i++) {
409 if (2 * i + 1 <
tiles.size()) {
423 compiler.
add_node(NODE_TEX_IMAGE_BOX,
447 const bool is_float = metadata.
is_float();
449 const ustring known_colorspace = metadata.
colorspace;
453 "filename", filename, compress_as_srgb ?
u_colorspace_raw : known_colorspace);
462 const bool is_tiled = (filename.find(
"<UDIM>") != string::npos ||
463 filename.find(
"<UVTILE>") != string::npos) ||
467 compiler.
parameter(
this,
"projection_blend");
468 compiler.
parameter(
"compress_as_srgb", compress_as_srgb);
470 compiler.
parameter(
"unassociate_alpha", !alpha_out->
links.empty() && unassociate_alpha);
471 compiler.
parameter(
"is_float", is_float);
472 compiler.
parameter(
"is_tiled", is_tiled);
473 compiler.
parameter(
this,
"interpolation");
476 compiler.
add(
this,
"node_image_texture");
536 params.animated = animated;
537 params.interpolation = interpolation;
539 params.alpha_type = alpha_type;
540 params.colorspace = colorspace;
570 const ustring known_colorspace = metadata.
colorspace;
575 if (compress_as_srgb) {
579 compiler.
add_node(NODE_TEX_ENVIRONMENT,
600 const bool is_float = metadata.
is_float();
602 const ustring known_colorspace = metadata.
colorspace;
606 "filename", filename, compress_as_srgb ?
u_colorspace_raw : known_colorspace);
613 compiler.
parameter(
this,
"interpolation");
614 compiler.
parameter(
"compress_as_srgb", compress_as_srgb);
616 compiler.
parameter(
"is_float", is_float);
617 compiler.
add(
this,
"node_environment_texture");
639 return (1.0f + lam[0] *
expf(lam[1] /
cosf(theta))) *
640 (1.0f + lam[2] *
expf(lam[3] * gamma) + lam[4] *
cosf(gamma) *
cosf(gamma));
652 float theta = spherical.
x;
653 float phi = spherical.
y;
655 sunsky->
theta = theta;
658 float theta2 = theta * theta;
659 float theta3 = theta2 * theta;
663 float chi = (4.0f / 9.0f -
T / 120.0f) * (
M_PI_F - 2.0f * theta);
664 sunsky->
radiance_x = (4.0453f *
T - 4.9710f) *
tanf(chi) - 0.2155f *
T + 2.4192f;
667 sunsky->
radiance_y = (0.00166f * theta3 - 0.00375f * theta2 + 0.00209f * theta) *
T2 +
668 (-0.02903f * theta3 + 0.06377f * theta2 - 0.03202f * theta + 0.00394f) *
T +
669 (0.11693f * theta3 - 0.21196f * theta2 + 0.06052f * theta + 0.25886f);
671 sunsky->
radiance_z = (0.00275f * theta3 - 0.00610f * theta2 + 0.00317f * theta) *
T2 +
672 (-0.04214f * theta3 + 0.08970f * theta2 - 0.04153f * theta + 0.00516f) *
T +
673 (0.15346f * theta3 - 0.26756f * theta2 + 0.06670f * theta + 0.26688f);
675 sunsky->
config_x[0] = (0.1787f *
T - 1.4630f);
676 sunsky->
config_x[1] = (-0.3554f *
T + 0.4275f);
677 sunsky->
config_x[2] = (-0.0227f *
T + 5.3251f);
678 sunsky->
config_x[3] = (0.1206f *
T - 2.5771f);
679 sunsky->
config_x[4] = (-0.0670f *
T + 0.3703f);
681 sunsky->
config_y[0] = (-0.0193f *
T - 0.2592f);
682 sunsky->
config_y[1] = (-0.0665f *
T + 0.0008f);
683 sunsky->
config_y[2] = (-0.0004f *
T + 0.2125f);
684 sunsky->
config_y[3] = (-0.0641f *
T - 0.8989f);
685 sunsky->
config_y[4] = (-0.0033f *
T + 0.0452f);
687 sunsky->
config_z[0] = (-0.0167f *
T - 0.2608f);
688 sunsky->
config_z[1] = (-0.0950f *
T + 0.0092f);
689 sunsky->
config_z[2] = (-0.0079f *
T + 0.2102f);
690 sunsky->
config_z[3] = (-0.0441f *
T - 1.6537f);
691 sunsky->
config_z[4] = (-0.0109f *
T + 0.0529f);
694 for (
int i = 5; i < 9; i++) {
713 float theta = spherical.
x;
714 float phi = spherical.
y;
717 turbidity =
clamp(turbidity, 0.0f, 10.0f);
722 sunsky->
theta = theta;
725 float solarElevation =
M_PI_2_F - theta;
730 (
double)turbidity, (
double)ground_albedo, (
double)solarElevation);
733 for (
int i = 0; i < 9; ++i) {
758 float pixel_bottom[3];
761 sun_elevation, sun_size, altitude, air_density, dust_density, pixel_bottom, pixel_top);
764 if (sun_rotation < 0.0f) {
767 sun_rotation =
M_2PI_F - sun_rotation;
813 SkyTextureNode::SkyTextureNode() :
TextureNode(get_node_type())
830 float clamped_altitude =
clamp(altitude, 1.0f, 59999.0f);
850 sun_elevation, clamped_altitude, air_density, dust_density, ozone_density);
926 float clamped_altitude =
clamp(altitude, 1.0f, 59999.0f);
946 sun_elevation, clamped_altitude, air_density, dust_density, ozone_density);
966 compiler.
add(
this,
"node_sky_texture");
995 GradientTextureNode::GradientTextureNode() :
TextureNode(get_node_type())
1007 compiler.
add_node(NODE_TEX_GRADIENT,
1020 compiler.
parameter(
this,
"gradient_type");
1021 compiler.
add(
this,
"node_gradient_texture");
1033 dimensions_enum.
insert(
"1D", 1);
1034 dimensions_enum.
insert(
"2D", 2);
1035 dimensions_enum.
insert(
"3D", 3);
1036 dimensions_enum.
insert(
"4D", 4);
1037 SOCKET_ENUM(dimensions,
"Dimensions", dimensions_enum, 3);
1052 NoiseTextureNode::NoiseTextureNode() :
TextureNode(get_node_type())
1080 vector_stack_offset, w_stack_offset, scale_stack_offset, detail_stack_offset),
1082 roughness_stack_offset, distortion_stack_offset, fac_stack_offset, color_stack_offset));
1096 compiler.
add(
this,
"node_noise_texture");
1108 dimensions_enum.
insert(
"1D", 1);
1109 dimensions_enum.
insert(
"2D", 2);
1110 dimensions_enum.
insert(
"3D", 3);
1111 dimensions_enum.
insert(
"4D", 4);
1112 SOCKET_ENUM(dimensions,
"Dimensions", dimensions_enum, 3);
1145 VoronoiTextureNode::VoronoiTextureNode() :
TextureNode(get_node_type())
1176 compiler.
add_node(NODE_TEX_VORONOI, dimensions, feature, metric);
1179 vector_stack_offset, w_in_stack_offset, scale_stack_offset, smoothness_stack_offset),
1181 randomness_stack_offset,
1182 distance_stack_offset,
1183 color_stack_offset),
1184 compiler.
encode_uchar4(position_stack_offset, w_out_stack_offset, radius_stack_offset),
1202 compiler.
add(
this,
"node_voronoi_texture");
1224 IESLightNode::IESLightNode() :
TextureNode(get_node_type())
1226 light_manager =
NULL;
1242 if (light_manager) {
1247 void IESLightNode::get_slot()
1249 assert(light_manager);
1256 slot = light_manager->
add_ies(ies.string());
1291 compiler.
add(
this,
"node_ies_light");
1301 dimensions_enum.
insert(
"1D", 1);
1302 dimensions_enum.
insert(
"2D", 2);
1303 dimensions_enum.
insert(
"3D", 3);
1304 dimensions_enum.
insert(
"4D", 4);
1305 SOCKET_ENUM(dimensions,
"Dimensions", dimensions_enum, 3);
1316 WhiteNoiseTextureNode::WhiteNoiseTextureNode() :
ShaderNode(get_node_type())
1327 int vector_stack_offset = compiler.
stack_assign(vector_in);
1329 int value_stack_offset = compiler.
stack_assign(value_out);
1332 compiler.
add_node(NODE_TEX_WHITE_NOISE,
1334 compiler.
encode_uchar4(vector_stack_offset, w_stack_offset),
1335 compiler.
encode_uchar4(value_stack_offset, color_stack_offset));
1341 compiler.
add(
this,
"node_white_noise_texture");
1353 dimensions_enum.
insert(
"1D", 1);
1354 dimensions_enum.
insert(
"2D", 2);
1355 dimensions_enum.
insert(
"3D", 3);
1356 dimensions_enum.
insert(
"4D", 4);
1357 SOCKET_ENUM(dimensions,
"Dimensions", dimensions_enum, 3);
1381 MusgraveTextureNode::MusgraveTextureNode() :
TextureNode(get_node_type())
1409 compiler.
encode_uchar4(musgrave_type, dimensions, vector_stack_offset, w_stack_offset),
1411 detail_stack_offset,
1412 dimension_stack_offset,
1413 lacunarity_stack_offset),
1414 compiler.
encode_uchar4(offset_stack_offset, gain_stack_offset, fac_stack_offset));
1426 compiler.
parameter(
this,
"musgrave_type");
1428 compiler.
add(
this,
"node_musgrave_texture");
1444 static NodeEnum bands_direction_enum;
1452 static NodeEnum rings_direction_enum;
1479 WaveTextureNode::WaveTextureNode() :
TextureNode(get_node_type())
1507 compiler.
encode_uchar4(wave_type, bands_direction, rings_direction, profile),
1508 compiler.
encode_uchar4(vector_offset, scale_ofs, distortion_ofs),
1509 compiler.
encode_uchar4(detail_ofs, dscale_ofs, droughness_ofs, phase_ofs));
1529 compiler.
parameter(
this,
"bands_direction");
1530 compiler.
parameter(
this,
"rings_direction");
1533 compiler.
add(
this,
"node_wave_texture");
1556 MagicTextureNode::MagicTextureNode() :
TextureNode(get_node_type())
1587 compiler.
add(
this,
"node_magic_texture");
1609 CheckerTextureNode::CheckerTextureNode() :
TextureNode(get_node_type())
1625 compiler.
add_node(NODE_TEX_CHECKER,
1641 compiler.
add(
this,
"node_checker_texture");
1653 SOCKET_INT(offset_frequency,
"Offset Frequency", 2);
1655 SOCKET_INT(squash_frequency,
"Squash Frequency", 2);
1675 BrickTextureNode::BrickTextureNode() :
TextureNode(get_node_type())
1732 compiler.
parameter(
this,
"offset_frequency");
1734 compiler.
parameter(
this,
"squash_frequency");
1735 compiler.
add(
this,
"node_brick_texture");
1751 static NodeEnum interpolation_enum;
1768 PointDensityTextureNode::PointDensityTextureNode() :
ShaderNode(get_node_type())
1797 params.interpolation = interpolation;
1807 const bool use_density = !density_out->
links.empty();
1808 const bool use_color = !
color_out->links.empty();
1810 if (use_density || use_color) {
1850 const bool use_density = !density_out->
links.empty();
1851 const bool use_color = !
color_out->links.empty();
1853 if (use_density || use_color) {
1864 compiler.
parameter(
this,
"interpolation");
1865 compiler.
add(
this,
"node_voxel_texture");
1885 NormalNode::NormalNode() :
ShaderNode(get_node_type())
1906 compiler.
add(
this,
"node_normal");
1932 MappingNode::MappingNode() :
ShaderNode(get_node_type())
1955 int vector_stack_offset = compiler.
stack_assign(vector_in);
1956 int location_stack_offset = compiler.
stack_assign(location_in);
1957 int rotation_stack_offset = compiler.
stack_assign(rotation_in);
1958 int scale_stack_offset = compiler.
stack_assign(scale_in);
1959 int result_stack_offset = compiler.
stack_assign(vector_out);
1965 vector_stack_offset, location_stack_offset, rotation_stack_offset, scale_stack_offset),
1966 result_stack_offset);
1971 compiler.
parameter(
this,
"mapping_type");
1972 compiler.
add(
this,
"node_mapping");
1987 RGBToBWNode::RGBToBWNode() :
ShaderNode(get_node_type())
2009 compiler.
add(
this,
"node_rgb_to_bw");
2014 const NodeType *ConvertNode::node_types[ConvertNode::MAX_TYPE][ConvertNode::MAX_TYPE];
2015 bool ConvertNode::initialized = ConvertNode::register_types();
2022 bool ConvertNode::register_types()
2024 const int num_types = 8;
2034 for (
size_t i = 0; i < num_types; i++) {
2037 ustring from_value_name(
"value_" + from_name.string());
2039 for (
size_t j = 0; j < num_types; j++) {
2042 ustring to_value_name(
"value_" + to_name.string());
2044 string node_name =
"convert_" + from_name.string() +
"_to_" + to_name.string();
2057 assert(from < MAX_TYPE);
2058 assert(to < MAX_TYPE);
2075 else if (autoconvert)
2084 value_color(other.value_color),
2124 if (
prev->type == node_types[to][
from]) {
2203 compiler.
add(
this,
"node_convert_from_float");
2205 compiler.
add(
this,
"node_convert_from_int");
2207 compiler.
add(
this,
"node_convert_from_color");
2209 compiler.
add(
this,
"node_convert_from_vector");
2211 compiler.
add(
this,
"node_convert_from_point");
2213 compiler.
add(
this,
"node_convert_from_normal");
2229 return (normal_in && normal_in->
link &&
2269 compiler.
add_node(normal_offset, tangent_offset, param3_offset, param4_offset);
2310 AnisotropicBsdfNode::AnisotropicBsdfNode() :
BsdfNode(get_node_type())
2320 if (!tangent_in->
link)
2340 compiler.
parameter(
this,
"distribution");
2341 compiler.
add(
this,
"node_anisotropic_bsdf");
2368 GlossyBsdfNode::GlossyBsdfNode() :
BsdfNode(get_node_type())
2378 distribution_orig = distribution;
2385 distribution = distribution_orig;
2389 if (integrator->get_filter_glossy() == 0.0f) {
2403 VLOG_DEBUG <<
"Using GGX glossy with filter glossy.";
2414 return !roughness_input->
link &&
2432 compiler.
parameter(
this,
"distribution");
2433 compiler.
add(
this,
"node_glossy_bsdf");
2461 GlassBsdfNode::GlassBsdfNode() :
BsdfNode(get_node_type())
2471 distribution_orig = distribution;
2478 distribution = distribution_orig;
2482 if (integrator->get_filter_glossy() == 0.0f) {
2496 VLOG_DEBUG <<
"Using GGX glass with filter glossy.";
2507 return !roughness_input->
link &&
2525 compiler.
parameter(
this,
"distribution");
2526 compiler.
add(
this,
"node_glass_bsdf");
2554 RefractionBsdfNode::RefractionBsdfNode() :
BsdfNode(get_node_type())
2564 distribution_orig = distribution;
2571 distribution = distribution_orig;
2575 if (integrator->get_filter_glossy() == 0.0f) {
2580 VLOG_DEBUG <<
"Using sharp refraction BSDF.";
2589 VLOG_DEBUG <<
"Using GGX refraction with filter glossy.";
2600 return !roughness_input->
link &&
2616 compiler.
parameter(
this,
"distribution");
2617 compiler.
add(
this,
"node_refraction_bsdf");
2642 ToonBsdfNode::ToonBsdfNode() :
BsdfNode(get_node_type())
2657 compiler.
add(
this,
"node_toon_bsdf");
2676 VelvetBsdfNode::VelvetBsdfNode() :
BsdfNode(get_node_type())
2688 compiler.
add(
this,
"node_velvet_bsdf");
2707 DiffuseBsdfNode::DiffuseBsdfNode() :
BsdfNode(get_node_type())
2719 compiler.
add(
this,
"node_diffuse_bsdf");
2733 static NodeEnum subsurface_method_enum;
2735 subsurface_method_enum.
insert(
"random_walk_fixed_radius",
2739 "Subsurface Method",
2740 subsurface_method_enum,
2749 SOCKET_IN_FLOAT(subsurface_anisotropy,
"Subsurface Anisotropy", 0.0f);
2760 SOCKET_IN_FLOAT(transmission_roughness,
"Transmission Roughness", 0.0f);
2775 PrincipledBsdfNode::PrincipledBsdfNode() :
BsdfBaseNode(get_node_type())
2789 (emission_strength_in->
link || emission_strength != 0.0f)) {
2796 graph->add(emission_node);
2798 graph->relink(emission_strength_in, emission_node->input(
"Strength"));
2799 graph->relink(emission_in, emission_node->input(
"Color"));
2800 graph->relink(principled_out, new_out);
2801 graph->connect(emission_node->output(
"Emission"),
add->input(
"Closure1"));
2802 graph->connect(principled_out,
add->input(
"Closure2"));
2804 principled_out = new_out;
2809 if (emission_in->
link) {
2812 if (emission_strength_in->
link) {
2818 if (alpha_in->
link || alpha != 1.0f) {
2824 graph->add(transparent);
2826 graph->relink(alpha_in,
mix->input(
"Fac"));
2827 graph->relink(principled_out,
mix->output(
"Closure"));
2828 graph->connect(transparent->output(
"BSDF"),
mix->input(
"Closure1"));
2829 graph->connect(principled_out,
mix->input(
"Closure2"));
2848 if (!tangent_in->
link)
2882 compiler.
add_node(NODE_CLOSURE_SET_WEIGHT, weight);
2887 int specular_offset = compiler.
stack_assign(p_specular);
2888 int roughness_offset = compiler.
stack_assign(p_roughness);
2889 int specular_tint_offset = compiler.
stack_assign(p_specular_tint);
2890 int anisotropic_offset = compiler.
stack_assign(p_anisotropic);
2892 int sheen_tint_offset = compiler.
stack_assign(p_sheen_tint);
2893 int clearcoat_offset = compiler.
stack_assign(p_clearcoat);
2894 int clearcoat_roughness_offset = compiler.
stack_assign(p_clearcoat_roughness);
2896 int transmission_offset = compiler.
stack_assign(p_transmission);
2897 int transmission_roughness_offset = compiler.
stack_assign(p_transmission_roughness);
2898 int anisotropic_rotation_offset = compiler.
stack_assign(p_anisotropic_rotation);
2899 int subsurface_radius_offset = compiler.
stack_assign(p_subsurface_radius);
2900 int subsurface_ior_offset = compiler.
stack_assign(p_subsurface_ior);
2901 int subsurface_anisotropy_offset = compiler.
stack_assign(p_subsurface_anisotropy);
2903 compiler.
add_node(NODE_CLOSURE_BSDF,
2915 specular_offset, roughness_offset, specular_tint_offset, anisotropic_offset),
2917 sheen_offset, sheen_tint_offset, clearcoat_offset, clearcoat_roughness_offset));
2920 transmission_offset,
2921 anisotropic_rotation_offset,
2922 transmission_roughness_offset),
2935 compiler.
add_node(clearcoat_normal_offset,
2936 subsurface_radius_offset,
2937 subsurface_ior_offset,
2938 subsurface_anisotropy_offset);
2959 input(
"Subsurface"),
2960 input(
"Subsurface Radius"),
2961 input(
"Subsurface IOR"),
2962 input(
"Subsurface Anisotropy"),
2965 input(
"Specular Tint"),
2966 input(
"Anisotropic"),
2968 input(
"Sheen Tint"),
2970 input(
"Clearcoat Roughness"),
2972 input(
"Transmission"),
2973 input(
"Anisotropic Rotation"),
2974 input(
"Transmission Roughness"));
2979 compiler.
parameter(
this,
"distribution");
2980 compiler.
parameter(
this,
"subsurface_method");
2981 compiler.
add(
this,
"node_principled_bsdf");
3004 TranslucentBsdfNode::TranslucentBsdfNode() :
BsdfNode(get_node_type())
3016 compiler.
add(
this,
"node_translucent_bsdf");
3033 TransparentBsdfNode::TransparentBsdfNode() :
BsdfNode(get_node_type())
3045 compiler.
add(
this,
"node_transparent_bsdf");
3075 SubsurfaceScatteringNode::SubsurfaceScatteringNode() :
BsdfNode(get_node_type())
3090 compiler.
add(
this,
"node_subsurface_scattering");
3097 return (normal_in->
link &&
3116 EmissionNode::EmissionNode() :
ShaderNode(get_node_type())
3125 if (color_in->
link || strength_in->
link) {
3130 compiler.
add_node(NODE_CLOSURE_SET_WEIGHT,
color * strength);
3137 compiler.
add(
this,
"node_emission");
3165 BackgroundNode::BackgroundNode() :
ShaderNode(get_node_type())
3174 if (color_in->
link || strength_in->
link) {
3179 compiler.
add_node(NODE_CLOSURE_SET_WEIGHT,
color * strength);
3186 compiler.
add(
this,
"node_background");
3213 HoldoutNode::HoldoutNode() :
ShaderNode(get_node_type())
3221 compiler.
add_node(NODE_CLOSURE_SET_WEIGHT, value);
3227 compiler.
add(
this,
"node_holdout");
3251 AmbientOcclusionNode::AmbientOcclusionNode() :
ShaderNode(get_node_type())
3269 compiler.
add_node(NODE_AMBIENT_OCCLUSION,
3285 compiler.
add(
this,
"node_ambient_occlusion");
3305 NODE_CLOSURE_VOLUME,
3339 AbsorptionVolumeNode::AbsorptionVolumeNode() :
VolumeNode(get_node_type())
3351 compiler.
add(
this,
"node_absorption_volume");
3370 ScatterVolumeNode::ScatterVolumeNode() :
VolumeNode(get_node_type())
3382 compiler.
add(
this,
"node_scatter_volume");
3393 SOCKET_IN_STRING(temperature_attribute,
"Temperature Attribute", ustring());
3411 PrincipledVolumeNode::PrincipledVolumeNode() :
VolumeNode(get_node_type())
3414 density_attribute = ustring(
"density");
3415 temperature_attribute = ustring(
"temperature");
3429 if (blackbody_in->
link || blackbody_intensity > 0.0f) {
3430 attributes->add_standard(temperature_attribute);
3456 compiler.
add_node(NODE_PRINCIPLED_VOLUME,
3476 compiler.
add_node(attr_density, attr_color, attr_temperature);
3482 density_attribute = ustring(
"geom:" + density_attribute.string());
3485 color_attribute = ustring(
"geom:" + color_attribute.string());
3488 temperature_attribute = ustring(
"geom:" + temperature_attribute.string());
3491 compiler.
add(
this,
"node_principled_volume");
3501 static NodeEnum parametrization_enum;
3514 "Absorption Coefficient",
3536 PrincipledHairBsdfNode::PrincipledHairBsdfNode() :
BsdfBaseNode(get_node_type())
3544 if (!
input(
"Random")->link) {
3567 int absorption_coefficient_ofs = compiler.
stack_assign(
input(
"Absorption Coefficient"));
3599 compiler.
encode_uchar4(offset_ofs, ior_ofs, color_ofs, parametrization),
3604 coat_ofs, melanin_ofs, melanin_redness_ofs, absorption_coefficient_ofs),
3611 compiler.
encode_uchar4(tint_ofs, random_in_ofs, random_color_ofs, random_roughness_ofs),
3628 compiler.
parameter(
this,
"parametrization");
3629 compiler.
add(
this,
"node_principled_hair_bsdf");
3656 HairBsdfNode::HairBsdfNode() :
BsdfNode(get_node_type())
3671 compiler.
add(
this,
"node_hair_bsdf");
3696 GeometryNode::GeometryNode() :
ShaderNode(get_node_type())
3704 if (!
output(
"Tangent")->links.empty()) {
3707 if (!
output(
"Pointiness")->links.empty()) {
3710 if (!
output(
"Random Per Island")->links.empty()) {
3725 geom_node = NODE_GEOMETRY_BUMP_DX;
3726 attr_node = NODE_ATTR_BUMP_DX;
3729 geom_node = NODE_GEOMETRY_BUMP_DY;
3730 attr_node = NODE_ATTR_BUMP_DY;
3734 if (!
out->links.empty()) {
3739 if (!
out->links.empty()) {
3744 if (!
out->links.empty()) {
3749 if (!
out->links.empty()) {
3754 if (!
out->links.empty()) {
3759 if (!
out->links.empty()) {
3764 if (!
out->links.empty()) {
3769 if (!
out->links.empty()) {
3780 if (!
out->links.empty()) {
3796 compiler.
parameter(
"bump_offset",
"dx");
3798 compiler.
parameter(
"bump_offset",
"dy");
3800 compiler.
parameter(
"bump_offset",
"center");
3802 compiler.
add(
this,
"node_geometry");
3829 TextureCoordinateNode::TextureCoordinateNode() :
ShaderNode(get_node_type())
3837 if (!
output(
"Generated")->links.empty())
3839 if (!
output(
"UV")->links.empty())
3846 if (!
output(
"Generated")->links.empty()) {
3863 texco_node = NODE_TEX_COORD_BUMP_DX;
3864 attr_node = NODE_ATTR_BUMP_DX;
3865 geom_node = NODE_GEOMETRY_BUMP_DX;
3868 texco_node = NODE_TEX_COORD_BUMP_DY;
3869 attr_node = NODE_ATTR_BUMP_DY;
3870 geom_node = NODE_GEOMETRY_BUMP_DY;
3874 if (!
out->links.empty()) {
3893 if (!
out->links.empty()) {
3898 if (!
out->links.empty()) {
3909 if (!
out->links.empty()) {
3911 if (use_transform) {
3920 if (!
out->links.empty()) {
3925 if (!
out->links.empty()) {
3930 if (!
out->links.empty()) {
3943 compiler.
parameter(
"bump_offset",
"dx");
3945 compiler.
parameter(
"bump_offset",
"dy");
3947 compiler.
parameter(
"bump_offset",
"center");
3950 compiler.
parameter(
"is_background",
true);
3953 compiler.
parameter(
this,
"use_transform");
3955 compiler.
parameter(
"object_itfm", ob_itfm);
3959 compiler.
add(
this,
"node_texture_coordinate");
3976 UVMapNode::UVMapNode() :
ShaderNode(get_node_type())
3984 if (!
output(
"UV")->links.empty()) {
4004 texco_node = NODE_TEX_COORD_BUMP_DX;
4005 attr_node = NODE_ATTR_BUMP_DX;
4008 texco_node = NODE_TEX_COORD_BUMP_DY;
4009 attr_node = NODE_ATTR_BUMP_DY;
4012 if (!
out->links.empty()) {
4030 compiler.
parameter(
"bump_offset",
"dx");
4032 compiler.
parameter(
"bump_offset",
"dy");
4034 compiler.
parameter(
"bump_offset",
"center");
4038 compiler.
add(
this,
"node_uv_map");
4065 LightPathNode::LightPathNode() :
ShaderNode(get_node_type())
4074 if (!
out->links.empty()) {
4079 if (!
out->links.empty()) {
4084 if (!
out->links.empty()) {
4089 if (!
out->links.empty()) {
4094 if (!
out->links.empty()) {
4099 if (!
out->links.empty()) {
4104 if (!
out->links.empty()) {
4109 if (!
out->links.empty()) {
4114 if (!
out->links.empty()) {
4119 if (!
out->links.empty()) {
4124 if (!
out->links.empty()) {
4129 if (!
out->links.empty()) {
4134 if (!
out->links.empty()) {
4139 if (!
out->links.empty()) {
4146 compiler.
add(
this,
"node_light_path");
4165 LightFalloffNode::LightFalloffNode() :
ShaderNode(get_node_type())
4175 if (!
out->links.empty()) {
4176 compiler.
add_node(NODE_LIGHT_FALLOFF,
4184 if (!
out->links.empty()) {
4185 compiler.
add_node(NODE_LIGHT_FALLOFF,
4193 if (!
out->links.empty()) {
4194 compiler.
add_node(NODE_LIGHT_FALLOFF,
4204 compiler.
add(
this,
"node_light_falloff");
4223 ObjectInfoNode::ObjectInfoNode() :
ShaderNode(get_node_type())
4230 if (!
out->links.empty()) {
4235 if (!
out->links.empty()) {
4240 if (!
out->links.empty()) {
4245 if (!
out->links.empty()) {
4250 if (!
out->links.empty()) {
4255 if (!
out->links.empty()) {
4262 compiler.
add(
this,
"node_object_info");
4277 SOCKET_OUT_QUATERNION(rotation,
"Rotation");
4286 ParticleInfoNode::ParticleInfoNode() :
ShaderNode(get_node_type())
4292 if (!
output(
"Index")->links.empty())
4294 if (!
output(
"Random")->links.empty())
4296 if (!
output(
"Age")->links.empty())
4298 if (!
output(
"Lifetime")->links.empty())
4300 if (!
output(
"Location")->links.empty())
4303 if (!
output(
"Rotation")->links.empty())
4306 if (!
output(
"Size")->links.empty())
4308 if (!
output(
"Velocity")->links.empty())
4310 if (!
output(
"Angular Velocity")->links.empty())
4321 if (!
out->links.empty()) {
4326 if (!
out->links.empty()) {
4331 if (!
out->links.empty()) {
4336 if (!
out->links.empty()) {
4341 if (!
out->links.empty()) {
4348 if (!
out->links.empty()) {
4354 if (!
out->links.empty()) {
4359 if (!
out->links.empty()) {
4364 if (!
out->links.empty()) {
4372 compiler.
add(
this,
"node_particle_info");
4391 HairInfoNode::HairInfoNode() :
ShaderNode(get_node_type())
4400 if (!intercept_out->
links.empty())
4403 if (!
output(
"Length")->links.empty())
4406 if (!
output(
"Random")->links.empty())
4418 if (!
out->links.empty()) {
4423 if (!
out->links.empty()) {
4429 if (!
out->links.empty()) {
4435 if (!
out->links.empty()) {
4440 if (!
out->links.empty()) {
4445 if (!
out->links.empty()) {
4453 compiler.
add(
this,
"node_hair_info");
4469 PointInfoNode::PointInfoNode() :
ShaderNode(get_node_type())
4476 if (!
output(
"Random")->links.empty())
4488 if (!
out->links.empty()) {
4493 if (!
out->links.empty()) {
4498 if (!
out->links.empty()) {
4506 compiler.
add(
this,
"node_point_info");
4523 VolumeInfoNode::VolumeInfoNode() :
ShaderNode(get_node_type())
4533 if (!
output(
"Color")->links.empty()) {
4536 if (!
output(
"Density")->links.empty()) {
4539 if (!
output(
"Flame")->links.empty()) {
4542 if (!
output(
"Temperature")->links.empty()) {
4555 attr->set_attribute(ustring(
"color"));
4561 if (!density_out->
links.empty()) {
4563 attr->set_attribute(ustring(
"density"));
4569 if (!flame_out->
links.empty()) {
4571 attr->set_attribute(ustring(
"flame"));
4577 if (!temperature_out->
links.empty()) {
4579 attr->set_attribute(ustring(
"temperature"));
4581 graph->relink(temperature_out, attr->
output(
"Fac"));
4604 VertexColorNode::VertexColorNode() :
ShaderNode(get_node_type())
4610 if (!(
output(
"Color")->links.empty() &&
output(
"Alpha")->links.empty())) {
4611 if (layer_name !=
"")
4625 if (layer_name !=
"") {
4626 layer_id = compiler.
attribute(layer_name);
4635 node = NODE_VERTEX_COLOR_BUMP_DX;
4637 node = NODE_VERTEX_COLOR_BUMP_DY;
4639 node = NODE_VERTEX_COLOR;
4649 compiler.
parameter(
"bump_offset",
"dx");
4652 compiler.
parameter(
"bump_offset",
"dy");
4655 compiler.
parameter(
"bump_offset",
"center");
4658 if (layer_name.empty()) {
4659 compiler.
parameter(
"layer_name", ustring(
"geom:vertex_color"));
4663 compiler.
parameter(
"name", (
string(
"geom:") + layer_name.c_str()).c_str());
4666 compiler.
parameter(
"layer_name", layer_name.c_str());
4670 compiler.
add(
this,
"node_vertex_color");
4685 ValueNode::ValueNode() :
ShaderNode(get_node_type())
4703 compiler.
parameter(
"value_value", value);
4704 compiler.
add(
this,
"node_value");
4719 ColorNode::ColorNode() :
ShaderNode(get_node_type())
4734 compiler.
add_node(NODE_VALUE_V, value);
4742 compiler.
add(
this,
"node_value");
4758 AddClosureNode::AddClosureNode() :
ShaderNode(get_node_type())
4770 compiler.
add(
this,
"node_add_closure");
4779 if (!closure1_in->
link) {
4782 else if (!closure2_in->
link) {
4802 MixClosureNode::MixClosureNode() :
ShaderNode(get_node_type())
4814 compiler.
add(
this,
"node_mix_closure");
4824 if (closure1_in->
link == closure2_in->
link) {
4829 else if (!fac_in->
link) {
4835 else if (fac >= 1.0f) {
4856 MixClosureWeightNode::MixClosureWeightNode() :
ShaderNode(get_node_type())
4867 compiler.
add_node(NODE_MIX_CLOSURE,
4893 InvertNode::InvertNode() :
ShaderNode(get_node_type())
4902 if (!fac_in->
link) {
4904 if (!color_in->
link) {
4908 else if (fac == 0.0f) {
4928 compiler.
add(
this,
"node_invert");
4969 MixNode::MixNode() :
ShaderNode(get_node_type())
4996 compiler.
add(
this,
"node_mix");
5005 folder.
fold_mix(mix_type, use_clamp);
5030 CombineColorNode::CombineColorNode() :
ShaderNode(get_node_type())
5049 int green_stack_offset = compiler.
stack_assign(green_in);
5050 int blue_stack_offset = compiler.
stack_assign(blue_in);
5056 compiler.
encode_uchar4(red_stack_offset, green_stack_offset, blue_stack_offset),
5057 color_stack_offset);
5063 compiler.
add(
this,
"node_combine_color");
5081 CombineRGBNode::CombineRGBNode() :
ShaderNode(get_node_type())
5111 compiler.
add(
this,
"node_combine_rgb");
5129 CombineXYZNode::CombineXYZNode() :
ShaderNode(get_node_type())
5159 compiler.
add(
this,
"node_combine_xyz");
5177 CombineHSVNode::CombineHSVNode() :
ShaderNode(get_node_type())
5195 compiler.
add_node(NODE_COMBINE_HSV,
5204 compiler.
add(
this,
"node_combine_hsv");
5220 GammaNode::GammaNode() :
ShaderNode(get_node_type())
5238 else if (folder.
is_one(gamma_in)) {
5258 compiler.
add(
this,
"node_gamma");
5276 BrightContrastNode::BrightContrastNode() :
ShaderNode(get_node_type())
5294 compiler.
add_node(NODE_BRIGHTCONTRAST,
5303 compiler.
add(
this,
"node_brightness");
5327 SeparateColorNode::SeparateColorNode() :
ShaderNode(get_node_type())
5336 for (
int channel = 0; channel < 3; channel++) {
5352 int color_stack_offset = compiler.
stack_assign(color_in);
5354 int green_stack_offset = compiler.
stack_assign(green_out);
5355 int blue_stack_offset = compiler.
stack_assign(blue_out);
5358 NODE_SEPARATE_COLOR,
5361 compiler.
encode_uchar4(red_stack_offset, green_stack_offset, blue_stack_offset));
5367 compiler.
add(
this,
"node_separate_color");
5385 SeparateRGBNode::SeparateRGBNode() :
ShaderNode(get_node_type())
5392 for (
int channel = 0; channel < 3; channel++) {
5420 compiler.
add(
this,
"node_separate_rgb");
5438 SeparateXYZNode::SeparateXYZNode() :
ShaderNode(get_node_type())
5445 for (
int channel = 0; channel < 3; channel++) {
5473 compiler.
add(
this,
"node_separate_xyz");
5491 SeparateHSVNode::SeparateHSVNode() :
ShaderNode(get_node_type())
5500 for (
int channel = 0; channel < 3; channel++) {
5516 compiler.
add_node(NODE_SEPARATE_HSV,
5525 compiler.
add(
this,
"node_separate_hsv");
5545 HSVNode::HSVNode() :
ShaderNode(get_node_type())
5569 compiler.
add(
this,
"node_hsv");
5588 AttributeNode::AttributeNode() :
ShaderNode(get_node_type())
5600 !alpha_out->
links.empty()) {
5621 attr_node = NODE_ATTR_BUMP_DX;
5623 attr_node = NODE_ATTR_BUMP_DY;
5630 if (!vector_out->
links.empty()) {
5636 if (!fac_out->
links.empty()) {
5640 if (!alpha_out->
links.empty()) {
5649 compiler.
parameter(
"bump_offset",
"dx");
5651 compiler.
parameter(
"bump_offset",
"dy");
5653 compiler.
parameter(
"bump_offset",
"center");
5660 compiler.
add(
this,
"node_attribute");
5676 CameraNode::CameraNode() :
ShaderNode(get_node_type())
5694 compiler.
add(
this,
"node_camera");
5712 FresnelNode::FresnelNode() :
ShaderNode(get_node_type())
5731 compiler.
add(
this,
"node_fresnel");
5750 LayerWeightNode::LayerWeightNode() :
ShaderNode(get_node_type())
5761 if (!fresnel_out->
links.empty()) {
5762 compiler.
add_node(NODE_LAYER_WEIGHT,
5770 if (!facing_out->
links.empty()) {
5771 compiler.
add_node(NODE_LAYER_WEIGHT,
5782 compiler.
add(
this,
"node_layer_weight");
5798 WireframeNode::WireframeNode() :
ShaderNode(get_node_type())
5822 compiler.
parameter(
"bump_offset",
"dx");
5825 compiler.
parameter(
"bump_offset",
"dy");
5828 compiler.
parameter(
"bump_offset",
"center");
5830 compiler.
parameter(
this,
"use_pixel_size");
5831 compiler.
add(
this,
"node_wireframe");
5846 WavelengthNode::WavelengthNode() :
ShaderNode(get_node_type())
5861 compiler.
add(
this,
"node_wavelength");
5876 BlackbodyNode::BlackbodyNode() :
ShaderNode(get_node_type())
5900 compiler.
add(
this,
"node_blackbody");
5917 OutputNode::OutputNode() :
ShaderNode(get_node_type())
5927 if (displacement_in->
link) {
5936 compiler.
add(
this,
"node_output_surface");
5938 compiler.
add(
this,
"node_output_volume");
5940 compiler.
add(
this,
"node_output_displacement");
5969 MapRangeNode::MapRangeNode() :
ShaderNode(get_node_type())
5977 if (!result_out->
links.empty()) {
5980 graph->add(clamp_node);
5981 graph->relink(result_out, clamp_node->
output(
"Result"));
5982 graph->connect(result_out, clamp_node->
input(
"Value"));
5987 clamp_node->set_min(to_min);
5993 clamp_node->set_max(to_max);
6009 int value_stack_offset = compiler.
stack_assign(value_in);
6014 int steps_stack_offset = compiler.
stack_assign(steps_in);
6015 int result_stack_offset = compiler.
stack_assign(result_out);
6021 from_min_stack_offset, from_max_stack_offset, to_min_stack_offset, to_max_stack_offset),
6022 compiler.
encode_uchar4(range_type, steps_stack_offset, result_stack_offset));
6034 compiler.
add(
this,
"node_map_range");
6063 VectorMapRangeNode::VectorMapRangeNode() :
ShaderNode(get_node_type())
6081 int value_stack_offset = compiler.
stack_assign(vector_in);
6082 int from_min_stack_offset = compiler.
stack_assign(from_min_in);
6083 int from_max_stack_offset = compiler.
stack_assign(from_max_in);
6084 int to_min_stack_offset = compiler.
stack_assign(to_min_in);
6085 int to_max_stack_offset = compiler.
stack_assign(to_max_in);
6086 int steps_stack_offset = compiler.
stack_assign(steps_in);
6087 int result_stack_offset = compiler.
stack_assign(vector_out);
6090 NODE_VECTOR_MAP_RANGE,
6093 from_min_stack_offset, from_max_stack_offset, to_min_stack_offset, to_max_stack_offset),
6094 compiler.
encode_uchar4(steps_stack_offset, use_clamp, range_type, result_stack_offset));
6101 compiler.
add(
this,
"node_vector_map_range");
6124 ClampNode::ClampNode() :
ShaderNode(get_node_type())
6147 int value_stack_offset = compiler.
stack_assign(value_in);
6150 int result_stack_offset = compiler.
stack_assign(result_out);
6154 compiler.
encode_uchar4(min_stack_offset, max_stack_offset, clamp_type),
6155 result_stack_offset);
6162 compiler.
add(
this,
"node_clamp");
6179 OutputAOVNode::OutputAOVNode() :
ShaderNode(get_node_type())
6277 MathNode::MathNode() :
ShaderNode(get_node_type())
6285 if (!result_out->
links.empty()) {
6288 clamp_node->set_min(0.0f);
6289 clamp_node->set_max(1.0f);
6290 graph->add(clamp_node);
6291 graph->relink(result_out, clamp_node->
output(
"Result"));
6292 graph->connect(result_out, clamp_node->
input(
"Value"));
6314 int value1_stack_offset = compiler.
stack_assign(value1_in);
6315 int value2_stack_offset = compiler.
stack_assign(value2_in);
6316 int value3_stack_offset = compiler.
stack_assign(value3_in);
6317 int value_stack_offset = compiler.
stack_assign(value_out);
6322 compiler.
encode_uchar4(value1_stack_offset, value2_stack_offset, value3_stack_offset),
6323 value_stack_offset);
6329 compiler.
add(
this,
"node_math");
6384 VectorMathNode::VectorMathNode() :
ShaderNode(get_node_type())
6415 int vector1_stack_offset = compiler.
stack_assign(vector1_in);
6416 int vector2_stack_offset = compiler.
stack_assign(vector2_in);
6417 int param1_stack_offset = compiler.
stack_assign(param1_in);
6425 int vector3_stack_offset = compiler.
stack_assign(vector3_in);
6429 compiler.
encode_uchar4(vector1_stack_offset, vector2_stack_offset, param1_stack_offset),
6430 compiler.
encode_uchar4(value_stack_offset, vector_stack_offset));
6431 compiler.
add_node(vector3_stack_offset);
6437 compiler.
encode_uchar4(vector1_stack_offset, vector2_stack_offset, param1_stack_offset),
6438 compiler.
encode_uchar4(value_stack_offset, vector_stack_offset));
6445 compiler.
add(
this,
"node_vector_math");
6474 VectorRotateNode::VectorRotateNode() :
ShaderNode(get_node_type())
6487 compiler.
add_node(NODE_VECTOR_ROTATE,
6500 compiler.
parameter(
this,
"rotate_type");
6502 compiler.
add(
this,
"node_vector_rotate");
6530 VectorTransformNode::VectorTransformNode() :
ShaderNode(get_node_type())
6540 NODE_VECTOR_TRANSFORM,
6541 compiler.
encode_uchar4(transform_type, convert_from, convert_to),
6547 compiler.
parameter(
this,
"transform_type");
6548 compiler.
parameter(
this,
"convert_from");
6550 compiler.
add(
this,
"node_vector_transform");
6578 BumpNode::BumpNode() :
ShaderNode(get_node_type())
6609 compiler.
parameter(
this,
"use_object_space");
6610 compiler.
add(
this,
"node_bump");
6644 if (
curves.size() == 0) {
6658 else if (!fac_in->
link && fac == 0.0f) {
6683 for (
int i = 0; i <
curves.size(); i++)
6695 compiler.
parameter(
this,
"extrapolate");
6728 RGBCurvesNode::RGBCurvesNode() :
CurvesNode(get_node_type())
6766 VectorCurvesNode::VectorCurvesNode() :
CurvesNode(get_node_type())
6804 FloatCurveNode::FloatCurveNode() :
ShaderNode(get_node_type())
6819 float pos = (value - min_x) / (max_x - min_x);
6825 else if (!fac_in->
link && fac == 0.0f) {
6840 compiler.
add_node(NODE_FLOAT_CURVE,
6861 compiler.
parameter(
this,
"extrapolate");
6862 compiler.
add(
this,
"node_float_curve");
6883 RGBRampNode::RGBRampNode() :
ShaderNode(get_node_type())
6889 if (ramp.size() == 0 || ramp.size() != ramp_alpha.size())
6893 float f =
clamp(fac, 0.0f, 1.0f) * (ramp.size() - 1);
6896 int i =
clamp((
int)f, 0, ramp.size() - 1);
6906 float alpha =
float_ramp_lookup(ramp_alpha.data(), fac, use_lerp,
false, ramp_alpha.size());
6914 if (ramp.size() == 0 || ramp.size() != ramp_alpha.size())
6928 for (
int i = 0; i < ramp.size(); i++)
6934 if (ramp.size() == 0 || ramp.size() != ramp_alpha.size())
6938 compiler.
parameter_array(
"ramp_alpha", ramp_alpha.data(), ramp_alpha.size());
6939 compiler.
parameter(
this,
"interpolate");
6941 compiler.
add(
this,
"node_rgb_ramp");
6956 SetNormalNode::SetNormalNode() :
ShaderNode(get_node_type())
6965 compiler.
add_node(NODE_CLOSURE_SET_NORMAL,
6972 compiler.
add(
this,
"node_set_normal");
6999 char *node_memory = (
char *)
operator new(node_size + inputs_size);
7000 memset(node_memory, 0, node_size + inputs_size);
7009 memcpy(node_memory + node_size, (
char *)
from + node_size, inputs_size);
7029 size_t offset = memory - (
char *)
this;
7078 NormalMapNode::NormalMapNode() :
ShaderNode(get_node_type())
7103 int attr = 0, attr_sign = 0;
7111 attr = compiler.
attribute(ustring((
string(
attribute.c_str()) +
".tangent").c_str()));
7113 ustring((
string(
attribute.c_str()) +
".tangent_sign").c_str()));
7130 compiler.
parameter(
"attr_name", ustring(
"geom:tangent"));
7131 compiler.
parameter(
"attr_sign_name", ustring(
"geom:tangent_sign"));
7134 compiler.
parameter(
"attr_name", ustring((
string(
attribute.c_str()) +
".tangent").c_str()));
7136 ustring((
string(
attribute.c_str()) +
".tangent_sign").c_str()));
7141 compiler.
add(
this,
"node_normal_map");
7150 static NodeEnum direction_type_enum;
7170 TangentNode::TangentNode() :
ShaderNode(get_node_type())
7199 attr = compiler.
attribute(ustring((
string(
attribute.c_str()) +
".tangent").c_str()));
7214 compiler.
parameter(
"attr_name", ustring(
"geom:tangent"));
7216 compiler.
parameter(
"attr_name", ustring((
string(
attribute.c_str()) +
".tangent").c_str()));
7219 compiler.
parameter(
this,
"direction_type");
7221 compiler.
add(
this,
"node_tangent");
7240 BevelNode::BevelNode() :
ShaderNode(get_node_type())
7260 compiler.
add(
this,
"node_bevel");
7285 DisplacementNode::DisplacementNode() :
ShaderNode(get_node_type())
7292 if ((
height - midlevel == 0.0f) || (scale == 0.0f)) {
7306 compiler.
add_node(NODE_DISPLACEMENT,
7318 compiler.
add(
this,
"node_displacement");
7344 VectorDisplacementNode::VectorDisplacementNode() :
ShaderNode(get_node_type())
7379 int attr = 0, attr_sign = 0;
7387 attr = compiler.
attribute(ustring((
string(
attribute.c_str()) +
".tangent").c_str()));
7389 ustring((
string(
attribute.c_str()) +
".tangent_sign").c_str()));
7393 compiler.
add_node(NODE_VECTOR_DISPLACEMENT,
7408 compiler.
parameter(
"attr_name", ustring(
"geom:tangent"));
7409 compiler.
parameter(
"attr_sign_name", ustring(
"geom:tangent_sign"));
7412 compiler.
parameter(
"attr_name", ustring((
string(
attribute.c_str()) +
".tangent").c_str()));
7414 ustring((
string(
attribute.c_str()) +
".tangent_sign").c_str()));
7419 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_MULTIPLY_ADD
@ NODE_VECTOR_MATH_MINIMUM
@ NODE_MAP_RANGE_SMOOTHERSTEP
@ NODE_MAP_RANGE_SMOOTHSTEP
@ 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_MAPPING_TYPE_POINT
@ NODE_MAPPING_TYPE_VECTOR
@ NODE_MAPPING_TYPE_TEXTURE
@ NODE_MAPPING_TYPE_NORMAL
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 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 type
_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 Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a producing a negative Combine Generate a color from its and blue Hue Saturation Apply a color transformation in the HSV color model Specular Similar to the Principled BSDF node but uses the specular workflow instead of which functions by specifying the facing(along normal) reflection color. Energy is not conserved
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a producing a negative Combine Generate a color from its and blue Hue Saturation Apply a color transformation in the HSV color model Specular Similar to the Principled BSDF node but uses the specular workflow instead of metallic
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its hue
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between camera
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its saturation
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a producing a negative Combine Generate a color from its and blue Hue Saturation Apply a color transformation in the HSV color model Specular BSDF
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its and value channels Color Retrieve a color attribute
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
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 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 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)
void attributes(Shader *shader, AttributeRequestSet *attributes)
bool has_surface_bssrdf()
bool has_integrator_dependency()
void expand(ShaderGraph *graph)
void attributes(Shader *shader, AttributeRequestSet *attributes)
void compile(SVMCompiler &compiler, ShaderInput *metallic, ShaderInput *subsurface, ShaderInput *subsurface_radius, ShaderInput *subsurface_ior, ShaderInput *subsurface_anisotropy, 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)
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)
void constant_fold(const ConstantFolder &folder)
T * create_node(Args &&...args)
ShaderNode * add(ShaderNode *node)
float linear_rgb_to_gray(float3 c)
float3 rec709_to_scene_linear(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
bool has_surface_link() const
NODE_DECLARE ShaderGraph * graph
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 expand(ShaderGraph *graph)
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_device_noinline_cpu float3 svm_mix(NodeMix type, float fac, float3 c1, float3 c2)
ccl_device float3 svm_combine_color(NodeCombSepColorType type, float3 color)
ccl_device float3 svm_separate_color(NodeCombSepColorType type, float3 color)
ccl_device_inline float3 svm_brightness_contrast(float3 color, float brightness, float contrast)
CCL_NAMESPACE_BEGIN ustring u_colorspace_auto
#define CCL_NAMESPACE_END
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
struct @211::@212 surface
IMETHOD void random(Vector &a)
addDelta operator for displacement rotational velocity.
IconTextureDrawCall normal
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
ccl_global float * color_out
ccl_gpu_kernel_postfix ccl_global KernelWorkTile * tiles
ccl_global const KernelWorkTile * tile
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
@ NODE_ENVIRONMENT_MIRROR_BALL
@ NODE_ENVIRONMENT_EQUIRECTANGULAR
@ NODE_ATTR_OUTPUT_FLOAT_ALPHA
@ NODE_ATTR_OUTPUT_FLOAT3
@ 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
@ CLOSURE_BSDF_MICROFACET_GGX_REFRACTION_ID
@ CLOSURE_VOLUME_HENYEY_GREENSTEIN_ID
@ CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID
@ CLOSURE_BSSRDF_RANDOM_WALK_FIXED_RADIUS_ID
@ CLOSURE_BSDF_HAIR_PRINCIPLED_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_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_INFO_POINT_POSITION
@ 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
@ 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
CCL_NAMESPACE_BEGIN ccl_device float3 svm_mapping(NodeMappingType type, float3 vector, float3 location, float3 rotation, float3 scale)
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()
CCL_NAMESPACE_BEGIN ccl_device void svm_vector_math(ccl_private float *value, ccl_private float3 *vector, NodeVectorMathType type, float3 a, float3 b, float3 c, float param1)
ccl_device float svm_math(NodeMathType type, float a, float b, float c)
ccl_device float3 svm_math_blackbody_color_rec709(float t)
ccl_device_inline float3 svm_math_gamma_color(float3 color, float gamma)
bool add(void *owner, const AttributeIDRef &attribute_id, eAttrDomain domain, eCustomDataType data_type, const AttributeInit &initializer)
std::unique_ptr< IDProperty, IDPropertyDeleter > create(StringRefNull prop_name, int32_t value)
Allocate a new IDProperty of type IDP_INT, set its name and value.
void interpolate(const Span< T > src, const Span< int > indices, const Span< float > factors, MutableSpan< T > dst)
T clamp(const T &a, const T &min, const T &max)
T distance(const T &a, const T &b)
SymEdge< T > * prev(const SymEdge< T > *se)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken clearcoat("clearcoat", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken ior("ior", pxr::TfToken::Immortal)
static const pxr::TfToken g("g", pxr::TfToken::Immortal)
static const pxr::TfToken density("density", pxr::TfToken::Immortal)
static const pxr::TfToken roughness("roughness", pxr::TfToken::Immortal)
static const pxr::TfToken specular("specular", pxr::TfToken::Immortal)
static const pxr::TfToken rgb("rgb", 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)
smooth(Type::FLOAT, "mask_weight")
ccl_device_inline float float_ramp_lookup(KernelGlobals kg, int offset, float f, bool interpolate, bool extrapolate, int table_size)
@ 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
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)
static std::string value_string(const SpreadsheetRowFilter &row_filter, const eSpreadsheetColumnValueType data_type)
bool string_endswith(const string_view s, const string_view end)
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()
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)
@ 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)