Node: Gabor Noise Texture #110802

Open
Charlie Jolly wants to merge 68 commits from CharlieJolly/blender:gabor into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
7 changed files with 63 additions and 55 deletions
Showing only changes of commit 419279fa65 - Show all commits

View File

@ -36,7 +36,7 @@ struct GaborParams {
float rot_variance;
float tilt_randomness;
float cell_randomness;
float anistropy;
float anisotropy;
string mode;
vector direction;
};
@ -131,7 +131,7 @@ vector gabor_sample(GaborParams gp, vector3 cell, int seed, output float phi)
float cos_omega_t = cos(omega_t);
return mix(normalize(vector(cos_omega_t * sin_omega_p, sin_omega_t * sin_omega_p, cos_omega_p)),
normalize(gp.direction),
gp.anistropy);
gp.anisotropy);
}
vector3 gabor_cell_3d(output GaborParams gp, point cell, point cell_position)
@ -278,13 +278,13 @@ GaborParams gabor_parameters(vector direction,
float rot_variance,
float tilt_randomness,
float cell_randomness,
float anistropy,
float anisotropy,
string mode)
{
GaborParams gp;
gp.impulses = clamp(impulses, 0.0001, 32.0);
gp.rot_variance = rot_variance;
gp.anistropy = anistropy;
gp.anisotropy = anisotropy;
gp.mode = mode;
gp.direction = direction;
gp.phase = phase;
@ -310,7 +310,7 @@ float gabor_fractal_noise(FractalParams fp,
float amp = 1.0;
float maxamp = 0.0;
float sum = 0.0;
float octaves = fp.octaves;
float octaves = clamp(fp.octaves, 0.0, 15.0);
if (fp.roughness == 0.0) {
octaves = 0.0;
}
@ -359,7 +359,7 @@ float gabor_noise(point p,
float rot_variance,
float tilt_randomness,
float cell_randomness,
float anistropy,
float anisotropy,
string dimensions,
string mode,
int use_normalize,
@ -375,7 +375,7 @@ float gabor_noise(point p,
FractalParams fp;
fp.roughness = roughness;
fp.octaves = clamp(detail, 0.0, 15.0);
fp.octaves = detail;
fp.scl_lacunarity = scl_lacunarity;
fp.fre_lacunarity = fre_lacunarity;
fp.rot_lacunarity = rot_lacunarity;
@ -391,7 +391,7 @@ float gabor_noise(point p,
rot_variance,
tilt_randomness,
cell_randomness,
anistropy,
anisotropy,
mode);
float g = gabor_fractal_noise(fp, gp, p, scale, dimensions, periodic, use_origin_offset);
@ -439,7 +439,7 @@ shader node_gabor_texture(int use_mapping = 0,
float RotationVariance = 0.0,
float DirectionRandomness = 1.0,
vector3 Direction = vector(0, 0, 1),
float AnistropicFactor = 0.0,
float AnisotropicFactor = 0.0,
output float Value = 0.0)
{
vector3 p = Vector;
@ -465,7 +465,7 @@ shader node_gabor_texture(int use_mapping = 0,
RotationVariance,
DirectionRandomness,
CellRandomness,
AnistropicFactor,
AnisotropicFactor,
dimensions,
mode,
use_normalize,

View File

@ -30,7 +30,7 @@ typedef struct GaborParams {
float rot_variance;
float tilt_randomness;
float cell_randomness;
float anistropy;
float anisotropy;
int mode;
float3 direction;
} GaborParams;
@ -121,7 +121,7 @@ ccl_device float3 gabor_sample(GaborParams gp, float3 cell, int seed, ccl_privat
return mix(
normalize(make_float3(cos_omega_t * sin_omega_p, sin_omega_t * sin_omega_p, cos_omega_p)),
normalize(gp.direction),
gp.anistropy);
gp.anisotropy);
}
ccl_device float3 gabor_cell_3d(GaborParams gp, float3 cell, float3 cell_position)
@ -269,7 +269,7 @@ ccl_device float gabor_fractal_noise(FractalParams fp,
float amp = 1.0f;
float maxamp = 0.0f;
float sum = 0.0f;
float octaves = fp.octaves;
float octaves = clamp(fp.octaves, 0.0f, 15.0f);
if (fp.roughness == 0.0f) {
octaves = 0.0f;
}
@ -309,13 +309,13 @@ ccl_device GaborParams gabor_parameters(float3 direction,
float rot_variance,
float tilt_randomness,
float cell_randomness,
float anistropy,
float anisotropy,
int mode)
{
GaborParams gp;
gp.impulses = clamp(impulses, 0.0001f, 32.0f);
gp.rot_variance = rot_variance;
gp.anistropy = anistropy;
gp.anisotropy = anisotropy;
gp.mode = mode;
gp.direction = direction;
gp.phase = phase;
@ -349,7 +349,7 @@ ccl_device float gabor_noise(float3 p,
float rot_variance,
float tilt_randomness,
float cell_randomness,
float anistropy,
float anisotropy,
int dimensions,
int mode,
int normalize,
@ -362,7 +362,7 @@ ccl_device float gabor_noise(float3 p,
FractalParams fp;
fp.roughness = roughness;
fp.octaves = clamp(detail, 0.0f, 15.0f);
fp.octaves = detail;
fp.scl_lacunarity = scl_lacunarity;
fp.fre_lacunarity = fre_lacunarity;
fp.rot_lacunarity = rot_lacunarity;
@ -378,7 +378,7 @@ ccl_device float gabor_noise(float3 p,
rot_variance,
tilt_randomness,
cell_randomness,
anistropy,
anisotropy,
mode);
float g = gabor_fractal_noise(fp, gp, p, scale, dimensions, periodic, use_origin_offset);
@ -457,7 +457,7 @@ ccl_device_noinline int svm_node_tex_gabor(
float rot_variance = stack_load_float_default(stack, rot_variance_offset, defaults_node6.z);
float tilt_randomness = stack_load_float_default(
stack, tilt_randomness_offset, defaults_node6.w);
float anistropy = stack_load_float_default(stack, aniso_offset, defaults_node7.x);
float anisotropy = stack_load_float_default(stack, aniso_offset, defaults_node7.x);
float3 direction = stack_load_float3(stack, direction_offset);
@ -480,7 +480,7 @@ ccl_device_noinline int svm_node_tex_gabor(
rot_variance,
tilt_randomness,
cell_randomness,
anistropy,
anisotropy,
dimension_offset,
mode_offset,
use_normalize_offset,

View File

@ -1252,7 +1252,7 @@ NODE_DEFINE(GaborTextureNode)
SOCKET_IN_FLOAT(tilt_randomness, "Tilt Randomness", 1.0f);
SOCKET_IN_POINT(direction, "Direction", make_float3(0.0f, 0.0f, 1.0f));
SOCKET_IN_FLOAT(cell_randomness, "Cell Randomness", 1.0f);
SOCKET_IN_FLOAT(anistropy, "Anistropic Factor", 1.0f);
SOCKET_IN_FLOAT(anisotropy, "Anisotropic Factor", 1.0f);
SOCKET_OUT_FLOAT(value, "Value");
@ -1295,7 +1295,7 @@ void GaborTextureNode::compile(SVMCompiler &compiler)
ShaderInput *tilt_randomness_in = input("Tilt Randomness");
ShaderInput *direction_in = input("Direction");
ShaderInput *cell_randomness_in = input("Cell Randomness");
ShaderInput *anistropy_in = input("Anistropic Factor");
ShaderInput *anisotropy_in = input("Anisotropic Factor");
ShaderOutput *value_out = output("Value");
@ -1317,7 +1317,7 @@ void GaborTextureNode::compile(SVMCompiler &compiler)
int rot_variance_in_stack_offset = compiler.stack_assign(rot_variance_in);
int tilt_randomness_in_stack_offset = compiler.stack_assign(tilt_randomness_in);
int cell_randomness_in_stack_offset = compiler.stack_assign(cell_randomness_in);
int anistropy_in_stack_offset = compiler.stack_assign(anistropy_in);
int anisotropy_in_stack_offset = compiler.stack_assign(anisotropy_in);
int direction_in_stack_offset = compiler.stack_assign(direction_in);
int value_out_stack_offset = compiler.stack_assign_if_linked(value_out);
@ -1344,7 +1344,7 @@ void GaborTextureNode::compile(SVMCompiler &compiler)
direction_in_stack_offset,
value_out_stack_offset,
dimensions),
compiler.encode_uchar4(mode, anistropy_in_stack_offset, periodic, use_normalize),
compiler.encode_uchar4(mode, anisotropy_in_stack_offset, periodic, use_normalize),
use_origin_offset);
compiler.add_node(__float_as_int(scale),
@ -1363,7 +1363,7 @@ void GaborTextureNode::compile(SVMCompiler &compiler)
__float_as_int(rotation),
__float_as_int(rot_variance),
__float_as_int(tilt_randomness));
compiler.add_node(__float_as_int(anistropy));
compiler.add_node(__float_as_int(anisotropy));
tex_mapping.compile_end(compiler, vector_in, vector_stack_offset);
}

View File

@ -266,7 +266,7 @@ class GaborTextureNode : public TextureNode {
NODE_SOCKET_API(float, rot_variance)
NODE_SOCKET_API(float, tilt_randomness)
NODE_SOCKET_API(float, cell_randomness)
NODE_SOCKET_API(float, anistropy)
NODE_SOCKET_API(float, anisotropy)
NODE_SOCKET_API(float3, direction)
};

View File

@ -287,8 +287,8 @@ class NODE_MT_category_shader_texture(Menu):
node_add_menu.add_node_type(layout, "ShaderNodeTexBrick")
node_add_menu.add_node_type(layout, "ShaderNodeTexChecker")
node_add_menu.add_node_type(layout, "ShaderNodeTexGabor")
node_add_menu.add_node_type(layout, "ShaderNodeTexEnvironment")
node_add_menu.add_node_type(layout, "ShaderNodeTexGabor")
node_add_menu.add_node_type(layout, "ShaderNodeTexGradient")
node_add_menu.add_node_type(layout, "ShaderNodeTexIES")
node_add_menu.add_node_type(layout, "ShaderNodeTexImage")

View File

@ -11,7 +11,7 @@
* References to the papers are for copyright and reference.
*
* Notes and changes from the original OSL implementation and reference papers:
* - For 2D noise, as with Voronoi the calculation uses a 2x2 grid rather than slicing 3D noise.
* - For 2D noise, as with Voronoi the calculation uses a 3x3x1 grid rather than slicing 3D noise.
* This is more performant when only 2D texture is required.
* - For artistic control, calculations for Bandwidth have been simplified and replaced with
CharlieJolly marked this conversation as resolved Outdated

Brackets to follow Blender's coding style.

Brackets to follow Blender's coding style.
* separate controls for Frequency, Gain and Radius. This provides finer control where
@ -51,6 +51,7 @@
/* Large prime number for grid offset and impulse seed. */
#define GABOR_SEED 11939
/* Struct to hold Gabor parameters. */
struct GaborParams {
float frequency;
float gain;
@ -62,11 +63,12 @@ struct GaborParams {
float rot_variance;
float tilt_randomness;
float cell_randomness;
float anistropy;
float anisotropy;
int mode;
vec3 direction;
};
/* Struct to hold Fractal parameters. */
struct FractalParams {
float octaves;
float roughness;
@ -143,23 +145,29 @@ vec3 gabor_kernel(GaborParams gp, vec3 omega, float phi, vec3 position, float dv
return r * g;
}
/* Set omega (angular frequency) and phi (phase) for the impulse based on the anistropy
* parameter. */
/* Set omega (angular frequency/direction) and phi (phase) for the impulse based on the anisotropy
* parameters. Isotropic and Anisotropic modes have been combined using a factor to mix between
* these modes. */
vec3 gabor_sample(GaborParams gp, vec3 cell, int seed, out float phi)
{
vec3 rand_values = hash_vec4_to_vec3(vec4(cell, float(seed))) * 2.0 - 1.0;
/* Phase. */
float pvar = mix(0.0, rand_values.z, gp.phase_variance);
phi = M_2PI * pvar + gp.phase;
CharlieJolly marked this conversation as resolved Outdated

This if seems redundant and can be removed.

This `if` seems redundant and can be removed.

Is this a redundant optimisation?

Is this a redundant optimisation?

I wouldn't call it an optimization, branches like this can needlessly slow down vectorized code, so it is best avoided.

I wouldn't call it an optimization, branches like this can needlessly slow down vectorized code, so it is best avoided.

I assume this is the same for all codebases or just glsl?

I assume this is the same for all codebases or just glsl?

This is probably for all backends, not just GLSL.

This is probably for all backends, not just GLSL.
/* Isotropic direction. */
float ovar = M_PI * (rand_values.x);
CharlieJolly marked this conversation as resolved Outdated

I am still not sure why the anisotropic and isotropic types can't be joined by defining an annular sector as described in section "3.2 Noise with Controllable Band-Limits" of the paper.

I am still not sure why the anisotropic and isotropic types can't be joined by defining an annular sector as described in section "3.2 Noise with Controllable Band-Limits" of the paper.

I can add back the Hybrid mode.

I can add back the Hybrid mode.

@CharlieJolly So the hybrid mode was based on that section of the paper?

@CharlieJolly So the hybrid mode was based on that section of the paper?

Well TBH I'm not sure, reading it again this looks like a feature of their application which is no longer available it seems. In this case I believe this can be achieved using the Rotation Variance control or by using the fractal noise options.

Well TBH I'm not sure, reading it again this looks like a feature of their application which is no longer available it seems. In this case I believe this can be achieved using the Rotation Variance control or by using the fractal noise options.

Well, the hybrid mode is actually described in section 3.3 of:

Lagae, Ares, and George Drettakis. "Filtering solid Gabor noise." ACM Transactions on Graphics (TOG) 30.4 (2011): 1-6.

But what I am after is removing the mode altogether and replacing it with intutive parameters that describe and annular sector as mentioned before.

Well, the hybrid mode is actually described in section 3.3 of: Lagae, Ares, and George Drettakis. "Filtering solid Gabor noise." ACM Transactions on Graphics (TOG) 30.4 (2011): 1-6. But what I am after is removing the mode altogether and replacing it with intutive parameters that describe and annular sector as mentioned before.

@OmarEmaraDev this is achieved using the Rotation and Rotation Variance controls.

image

@OmarEmaraDev this is achieved using the Rotation and Rotation Variance controls. ![image](/attachments/e4d3e0a6-737b-466c-8c23-2eba581bdebd)

Is isotropic the same as Rotation Variance = 360?

Is isotropic the same as `Rotation Variance = 360`?

Yes, in OSL implementation we have the angular frequency set to a random number

float omega_t = float(M_TWO_PI) * rng();

in this patch this is contolled by Rotation and Rotation Variance.

float ovar = M_PI * (rand_values.x * 2.0 - 1.0);
float omega_t = ovar * gp.rot_variance - gp.rotation;
Yes, in OSL implementation we have the angular frequency set to a random number ``` float omega_t = float(M_TWO_PI) * rng(); ``` in this patch this is contolled by Rotation and Rotation Variance. ``` float ovar = M_PI * (rand_values.x * 2.0 - 1.0); float omega_t = ovar * gp.rot_variance - gp.rotation; ```

Okay, so why not remove the enum, rename Rotation Variance to Anisotropy, and unify the Direction and Rotation inputs?

Okay, so why not remove the enum, rename Rotation Variance to Anisotropy, and unify the Direction and Rotation inputs?

Okay, so why not remove the enum, rename Rotation Variance to Anisotropy, and unify the Direction and Rotation inputs?

I did think about this but found it tricky to do this in a nice way. The Rotation controls are not shown on Anisotropic mode as it is only controlled by the direction vector. Hybrid mixed both these modes so that maybe something to consider adding back.

> Okay, so why not remove the enum, rename Rotation Variance to Anisotropy, and unify the Direction and Rotation inputs? I did think about this but found it tricky to do this in a nice way. The Rotation controls are not shown on Anisotropic mode as it is only controlled by the direction vector. Hybrid mixed both these modes so that maybe something to consider adding back.

I really think we should try to reduce the number of options and inputs in the node as much as we can, because those inputs are not all orthogonal, so the node is hard to use for the average user.

I really think we should try to reduce the number of options and inputs in the node as much as we can, because those inputs are not all orthogonal, so the node is hard to use for the average user.

The number of inputs is definitely increased by adding the fractal controls. Removing those alone would reduce inputs by five but at the loss of that feature. (@Hoshinova)

image

Node panels patch may help here.

Otherwise it is difficult to reduce the params without compromising the features.

In comparison to the Principled BSDF.

image

The number of inputs is definitely increased by adding the fractal controls. Removing those alone would reduce inputs by five but at the loss of that feature. (@Hoshinova) ![image](/attachments/213c08e3-2dfa-4c3b-8d9c-c6b451629ebc) Node panels patch may help here. Otherwise it is difficult to reduce the params without compromising the features. In comparison to the Principled BSDF. ![image](/attachments/d12b218d-3582-496e-9f24-7e0c5bf624a7)

Please stop this project and look into adding loops to shaders and reworking all fractal noise texture types into a node group asset)

Please stop this project and look into adding loops to shaders and reworking all fractal noise texture types into a node group asset)

Please stop this project and look into adding loops to shaders and reworking all fractal noise texture types into a node group asset)

Voronoi and Noise have both recently had fractal noise modes added. That is why this was added to this node.

I can't comment on the feasibility of adding loops to shading nodes. Don't forget that for any shading node, there has to be three implementations for Eevee, Cycles and OSL.

> Please stop this project and look into adding loops to shaders and reworking all fractal noise texture types into a node group asset) Voronoi and Noise have both recently had fractal noise modes added. That is why this was added to this node. I can't comment on the feasibility of adding loops to shading nodes. Don't forget that for any shading node, there has to be three implementations for Eevee, Cycles and OSL.

The UI has now been grouped using the new Panel feature.

The UI has now been grouped using the new Panel feature.
float omega_t = ovar * gp.rot_variance - gp.rotation;
float cos_omega_p = clamp(rand_values.y * gp.tilt_randomness, -1.0, 1.0);
float sin_omega_p = sqrt(1.0 - cos_omega_p * cos_omega_p);
float sin_omega_t = sin(omega_t);
float cos_omega_t = cos(omega_t);
/* Mix between Isotropic and Anisotropic direction. */
return mix(normalize(vec3(cos_omega_t * sin_omega_p, sin_omega_t * sin_omega_p, cos_omega_p)),
normalize(gp.direction),
gp.anistropy);
gp.anisotropy);
}
CharlieJolly marked this conversation as resolved Outdated

If this is simply only passed to gabor_sample, why not call it in gabor_sample directly?

If this is simply only passed to `gabor_sample`, why not call it in `gabor_sample` directly?
/* Generate noise based on the cell position and number of impulses. */
@ -259,7 +267,7 @@ float gabor_grid_3d(GaborParams gp, vec3 p, float scale, int periodic)
}
CharlieJolly marked this conversation as resolved Outdated

This seems like the kind of thing that you can sanitize before passing it to the shader.

This seems like the kind of thing that you can sanitize before passing it to the shader.

This is partly implemented in Cycles using constant folding. Do you have an example for Eevee?

This is partly implemented in Cycles using constant folding. Do you have an example for Eevee?

@CharlieJolly That's probably just a:

if (folding_condition) {
  const float base_value = 0.5f;
  return GPU_link(mat, "set_value", GPU_uniform(&base_value), &out->link);
}
@CharlieJolly That's probably just a: ``` if (folding_condition) { const float base_value = 0.5f; return GPU_link(mat, "set_value", GPU_uniform(&base_value), &out->link); } ```

But I just realized that the impulses are not constant, so you can ignore my comment here.

But I just realized that the impulses are not constant, so you can ignore my comment here.
}
/* Calculate 2D noise using 3x3x1 cell grid. Less computational than 3x3. */
/* Calculate 2D noise using 3x3x1 cell grid. Less computational than 3x3x3 grid. */
float gabor_grid_2d(GaborParams gp, vec3 p, float scale, int periodic)
{
vec3 coords = vec3(p.xy, 0.0) * scale;
@ -313,13 +321,13 @@ GaborParams gabor_parameters(vec3 direction,
float rot_variance,
float tilt_randomness,
float cell_randomness,
float anistropy,
float anisotropy,
int mode)
{
GaborParams gp;
gp.impulses = clamp(impulses, 0.0001, 32.0);
gp.rot_variance = rot_variance;
gp.anistropy = anistropy;
gp.anisotropy = anisotropy;
gp.mode = mode;
gp.direction = direction;
gp.phase = phase;
@ -336,8 +344,8 @@ GaborParams gabor_parameters(vec3 direction,
/* Layered fractal noise. Optionally, for each layer, the offset is changed. This ensures that
* the impulses occur in different places if scale lacunarity is set to 1. Gabor has more variables
* to consider when layering the noise compared to Perlin noise. Kernel frequency and rotation have
* lacunarity parameters in addition to scale lacunarity and roughness found in Noise and Voronoi
* textures. */
* lacunarity parameters in addition to scale lacunarity and roughness that is found in Noise and
* Voronoi textures. */
float gabor_fractal_noise(FractalParams fp,
GaborParams gp,
vec3 p,
@ -350,7 +358,7 @@ float gabor_fractal_noise(FractalParams fp,
float amp = 1.0;
float maxamp = 0.0;
float sum = 0.0;
float octaves = fp.octaves;
float octaves = clamp(fp.octaves, 0.0, 15.0);
if (fp.roughness == 0.0) {
octaves = 0.0;
}
@ -398,7 +406,7 @@ void node_tex_gabor(vec3 co,
float rotation,
float rot_variance,
float tilt_randomness,
float anistropy,
float anisotropy,
vec3 direction,
float dimensions,
float mode,
@ -413,10 +421,10 @@ void node_tex_gabor(vec3 co,
return;
}
/* Set Fractal params. Octaves are clamped as these directly impact performance. */
/* Set Fractal params. */
FractalParams fp;
fp.roughness = roughness;
fp.octaves = clamp(detail, 0.0, 15.0);
fp.octaves = detail;
fp.scl_lacunarity = scl_lacunarity;
fp.fre_lacunarity = fre_lacunarity;
fp.rot_lacunarity = rot_lacunarity;
@ -433,7 +441,7 @@ void node_tex_gabor(vec3 co,
rot_variance,
tilt_randomness,
cell_randomness,
anistropy,
anisotropy,
int(mode));
float g = gabor_fractal_noise(

View File

@ -117,7 +117,7 @@ static void node_declare(NodeDeclarationBuilder &b)
.max(1.0f)
.default_value(1.0f)
.subtype(PROP_FACTOR);
aniso.add_input<decl::Float>("Anistropic Factor")
aniso.add_input<decl::Float>("Anisotropic Factor")
.min(0.0f)
.max(1.0f)
.default_value(0.0f)
@ -200,7 +200,7 @@ typedef struct GaborParams {
float rot_variance;
float tilt_randomness;
float cell_randomness;
float anistropy;
float anisotropy;
int mode;
float3 direction;
} GaborParams;
@ -295,7 +295,7 @@ static float3 gabor_sample(const GaborParams gp, const float3 cell, const int se
return math::interpolate(
math::normalize(float3(cos_omega_t * sin_omega_p, sin_omega_t * sin_omega_p, cos_omega_p)),
math::normalize(gp.direction),
gp.anistropy);
gp.anisotropy);
}
/* Generate noise based on the cell position. */
@ -450,7 +450,7 @@ static float gabor_fractal_noise(FractalParams fp,
float amp = 1.0f;
float maxamp = 0.0f;
float sum = 0.0f;
float octaves = fp.octaves;
float octaves = math::clamp(fp.octaves, 0.0f, 15.0f);
if (fp.roughness == 0.0f) {
octaves = 0.0f;
}
@ -491,13 +491,13 @@ static GaborParams gabor_parameters(float3 direction,
float rot_variance,
float tilt_randomness,
float cell_randomness,
float anistropy,
float anisotropy,
int mode)
{
GaborParams gp;
gp.impulses = math::clamp(impulses, 0.0001f, 32.0f);
gp.rot_variance = rot_variance;
gp.anistropy = anistropy;
gp.anisotropy = anisotropy;
gp.mode = mode;
gp.direction = direction;
gp.phase = phase;
@ -529,7 +529,7 @@ static float gabor_noise(const float3 p,
const float rot_variance,
const float tilt_randomness,
const float cell_randomness,
const float anistropy,
const float anisotropy,
const int dimensions,
const int mode,
const int use_normalize,
@ -542,7 +542,7 @@ static float gabor_noise(const float3 p,
FractalParams fp;
fp.roughness = roughness;
fp.octaves = math::clamp(detail, 0.0f, 15.0f);
fp.octaves = detail;
fp.scl_lacunarity = scl_lacunarity;
fp.fre_lacunarity = fre_lacunarity;
fp.rot_lacunarity = rot_lacunarity;
@ -558,7 +558,7 @@ static float gabor_noise(const float3 p,
rot_variance,
tilt_randomness,
cell_randomness,
anistropy,
anisotropy,
mode);
float g = gabor_fractal_noise(fp, gp, p, scale, dimensions, periodic, use_origin_offset);
@ -599,7 +599,7 @@ static mf::Signature gabor_signature(const char *name)
builder.single_input<float>("Rotation Variance");
builder.single_input<float3>("Direction");
builder.single_input<float>("Tilt Randomness");
builder.single_input<float>("Anistropic Factor");
builder.single_input<float>("Anisotropic Factor");
builder.single_output<float>("Value");
return signature;
}
@ -654,8 +654,8 @@ class GaborNoiseFunction : public mf::MultiFunction {
"Rotation Variance");
const VArray<float> &tilt_randomness = params.readonly_single_input<float>(param++,
"Tilt Randomness");
const VArray<float> &anistropy = params.readonly_single_input<float>(param++,
"Anistropic Factor");
const VArray<float> &anisotropy = params.readonly_single_input<float>(param++,
"Anisotropic Factor");
const VArray<float3> &direction = params.readonly_single_input<float3>(param++, "Direction");
MutableSpan<float> r_value = params.uninitialized_single_output_if_required<float>(param++,
@ -680,7 +680,7 @@ class GaborNoiseFunction : public mf::MultiFunction {
rot_variance[i],
tilt_randomness[i],
cell_randomness[i],
anistropy[i],
anisotropy[i],
dimensions_,
mode_,
normalize_,