Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_wave.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_wave.c b/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
index b525f4897a9..457e85519b2 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
@@ -27,6 +27,7 @@ static bNodeSocketTemplate sh_node_tex_wave_in[] = {
{SOCK_FLOAT, 1, N_("Distortion"), 0.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f},
{SOCK_FLOAT, 1, N_("Detail"), 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 16.0f},
{SOCK_FLOAT, 1, N_("Detail Scale"), 1.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f},
+ {SOCK_FLOAT, 1, N_("Phase Offset"), 0.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f},
{-1, 0, ""},
};
@@ -62,7 +63,9 @@ static void node_shader_init_tex_wave(bNodeTree *UNUSED(ntree), bNode *node)
BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT);
BKE_texture_colormapping_default(&tex->base.color_mapping);
tex->wave_type = SHD_WAVE_BANDS;
-
+ tex->bands_direction = SHD_WAVE_BANDS_DIRECTION_X;
+ tex->rings_direction = SHD_WAVE_RINGS_DIRECTION_X;
+ tex->wave_profile = SHD_WAVE_PROFILE_SIN;
node->storage = tex;
}
@@ -77,10 +80,19 @@ static int node_shader_gpu_tex_wave(GPUMaterial *mat,
NodeTexWave *tex = (NodeTexWave *)node->storage;
float wave_type = tex->wave_type;
+ float bands_direction = tex->bands_direction;
+ float rings_direction = tex->rings_direction;
float wave_profile = tex->wave_profile;
- return GPU_stack_link(
- mat, node, "node_tex_wave", in, out, GPU_constant(&wave_type), GPU_constant(&wave_profile));
+ return GPU_stack_link(mat,
+ node,
+ "node_tex_wave",
+ in,
+ out,
+ GPU_constant(&wave_type),
+ GPU_constant(&bands_direction),
+ GPU_constant(&rings_direction),
+ GPU_constant(&wave_profile));
}
/* node type definition */