Add Lacunarity and Normalize Inputs to the Noise Texture Node #110839
@ -930,7 +930,7 @@ static ShaderNode *add_node(Scene *scene,
|
||||
BL::ShaderNodeTexNoise b_noise_node(b_node);
|
||||
NoiseTextureNode *noise = graph->create_node<NoiseTextureNode>();
|
||||
noise->set_dimensions(b_noise_node.noise_dimensions());
|
||||
noise->set_normalize(b_noise_node.normalize());
|
||||
noise->set_use_normalize(b_noise_node.normalize());
|
||||
BL::TexMapping b_texture_mapping(b_noise_node.texture_mapping());
|
||||
get_tex_mapping(noise, b_texture_mapping);
|
||||
node = noise;
|
||||
|
@ -111,7 +111,7 @@ float noise_texture(
|
||||
shader node_noise_texture(int use_mapping = 0,
|
||||
matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||
string dimensions = "3D",
|
||||
int normalize = 0,
|
||||
int use_normalize = 0,
|
||||
vector3 Vector = vector3(0, 0, 0),
|
||||
float W = 0.0,
|
||||
float Scale = 5.0,
|
||||
|
@ -1120,7 +1120,7 @@ NODE_DEFINE(NoiseTextureNode)
|
||||
dimensions_enum.insert("4D", 4);
|
||||
SOCKET_ENUM(dimensions, "Dimensions", dimensions_enum, 3);
|
||||
|
||||
SOCKET_BOOLEAN(normalize, "Normalize", true);
|
||||
SOCKET_BOOLEAN(use_normalize, "Normalize", true);
|
||||
|
||||
SOCKET_IN_POINT(vector, "Vector", zero_float3(), SocketType::LINK_TEXTURE_GENERATED);
|
||||
SOCKET_IN_FLOAT(w, "W", 0.0f);
|
||||
@ -1168,7 +1168,7 @@ void NoiseTextureNode::compile(SVMCompiler &compiler)
|
||||
lacunarity_stack_offset,
|
||||
distortion_stack_offset,
|
||||
fac_stack_offset),
|
||||
compiler.encode_uchar4(color_stack_offset, dimensions, normalize));
|
||||
compiler.encode_uchar4(color_stack_offset, dimensions, use_normalize));
|
||||
|
||||
compiler.add_node(
|
||||
__float_as_int(w), __float_as_int(scale), __float_as_int(detail), __float_as_int(roughness));
|
||||
@ -1183,7 +1183,7 @@ void NoiseTextureNode::compile(OSLCompiler &compiler)
|
||||
{
|
||||
tex_mapping.compile(compiler);
|
||||
compiler.parameter(this, "dimensions");
|
||||
compiler.parameter(this, "normalize");
|
||||
compiler.parameter(this, "use_normalize");
|
||||
compiler.add(this, "node_noise_texture");
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ class NoiseTextureNode : public TextureNode {
|
||||
SHADER_NODE_CLASS(NoiseTextureNode)
|
||||
|
||||
NODE_SOCKET_API(int, dimensions)
|
||||
NODE_SOCKET_API(bool, normalize)
|
||||
NODE_SOCKET_API(bool, use_normalize)
|
||||
NODE_SOCKET_API(float, w)
|
||||
NODE_SOCKET_API(float, scale)
|
||||
NODE_SOCKET_API(float, detail)
|
||||
|
Loading…
Reference in New Issue
Block a user