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:
authorClément Foucault <foucault.clem@gmail.com>2018-08-13 16:30:29 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-08-14 00:01:18 +0300
commit77b39bbaa0c796b936f8691c1431f467d4f39981 (patch)
tree7ca96767ca82b7138eb58577ddd811b7aaac7a9f /source/blender/nodes
parent822de6e9e1b87e2ed3571e7166281fa622c28c02 (diff)
Cleanup: Rename GPU_* functions to make more sense
* Remove GPU_link_changed which is unused. * Remove all GPU link function that are not used anymore. * GPU_uniform_buffer is now GPU_uniform. * GPU_texture_ramp is now GPU_color_band. * GPU_uniform is now GPU_constant.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/shader/node_shader_util.c12
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_blackbody.c4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bump.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_curves.c8
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_eevee_specular.c4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mapping.c12
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_math.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mixRgb.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_normal.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_normal_map.c10
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_brick.c4
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_gradient.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_image.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_magic.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_wave.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_valToRgb.c6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vectTransform.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_volume_principled.c10
24 files changed, 51 insertions, 51 deletions
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c
index 63c1cac566d..80cfba00e0a 100644
--- a/source/blender/nodes/shader/node_shader_util.c
+++ b/source/blender/nodes/shader/node_shader_util.c
@@ -257,12 +257,12 @@ void node_shader_gpu_tex_mapping(GPUMaterial *mat, bNode *node, GPUNodeStack *in
static float min[3] = {-FLT_MAX, -FLT_MAX, -FLT_MAX};
GPUNodeLink *tmin, *tmax, *tmat0, *tmat1, *tmat2, *tmat3;
- tmin = GPU_uniform_buffer((domin) ? texmap->min : min, GPU_VEC3);
- tmax = GPU_uniform_buffer((domax) ? texmap->max : max, GPU_VEC3);
- tmat0 = GPU_uniform_buffer((float *)texmap->mat[0], GPU_VEC4);
- tmat1 = GPU_uniform_buffer((float *)texmap->mat[1], GPU_VEC4);
- tmat2 = GPU_uniform_buffer((float *)texmap->mat[2], GPU_VEC4);
- tmat3 = GPU_uniform_buffer((float *)texmap->mat[3], GPU_VEC4);
+ tmin = GPU_uniform((domin) ? texmap->min : min);
+ tmax = GPU_uniform((domax) ? texmap->max : max);
+ tmat0 = GPU_uniform((float *)texmap->mat[0]);
+ tmat1 = GPU_uniform((float *)texmap->mat[1]);
+ tmat2 = GPU_uniform((float *)texmap->mat[2]);
+ tmat3 = GPU_uniform((float *)texmap->mat[3]);
GPU_link(mat, "mapping", in[0].link, tmat0, tmat1, tmat2, tmat3, tmin, tmax, &in[0].link);
diff --git a/source/blender/nodes/shader/nodes/node_shader_blackbody.c b/source/blender/nodes/shader/nodes/node_shader_blackbody.c
index e57f5e0d6cf..28ba3d2c5c8 100644
--- a/source/blender/nodes/shader/nodes/node_shader_blackbody.c
+++ b/source/blender/nodes/shader/nodes/node_shader_blackbody.c
@@ -46,9 +46,9 @@ static int node_shader_gpu_blackbody(GPUMaterial *mat, bNode *node, bNodeExecDat
blackbody_temperature_to_rgb_table(data, size, 965.0f, 12000.0f);
float layer;
- GPUNodeLink *ramp_texture = GPU_texture_ramp(mat, size, data, &layer);
+ GPUNodeLink *ramp_texture = GPU_color_band(mat, size, data, &layer);
- return GPU_stack_link(mat, node, "node_blackbody", in, out, ramp_texture, GPU_uniform(&layer));
+ return GPU_stack_link(mat, node, "node_blackbody", in, out, ramp_texture, GPU_constant(&layer));
}
/* node type definition */
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c
index ada6e21356f..b18dcacb98f 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c
@@ -54,7 +54,7 @@ static int node_shader_gpu_bsdf_glass(GPUMaterial *mat, bNode *node, bNodeExecDa
GPU_material_flag_set(mat, GPU_MATFLAG_GLOSSY | GPU_MATFLAG_REFRACT);
- return GPU_stack_link(mat, node, "node_bsdf_glass", in, out, GPU_uniform(&node->ssr_id));
+ return GPU_stack_link(mat, node, "node_bsdf_glass", in, out, GPU_constant(&node->ssr_id));
}
/* node type definition */
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c
index f56837de261..342b3a67ffb 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c
@@ -53,7 +53,7 @@ static int node_shader_gpu_bsdf_glossy(GPUMaterial *mat, bNode *node, bNodeExecD
GPU_material_flag_set(mat, GPU_MATFLAG_GLOSSY);
- return GPU_stack_link(mat, node, "node_bsdf_glossy", in, out, GPU_uniform(&node->ssr_id));
+ return GPU_stack_link(mat, node, "node_bsdf_glossy", in, out, GPU_constant(&node->ssr_id));
}
/* node type definition */
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c
index 370dcdcc2ea..16d35c7003a 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c
@@ -104,7 +104,7 @@ static int node_shader_gpu_bsdf_principled(GPUMaterial *mat, bNode *node, bNodeE
}
else {
float one[3] = {1.0f, 1.0f, 1.0f};
- GPU_link(mat, "set_rgb", GPU_uniform((float *)one), &sss_scale);
+ GPU_link(mat, "set_rgb", GPU_constant((float *)one), &sss_scale);
}
bool use_diffuse = socket_not_one(4) && socket_not_one(15);
@@ -149,7 +149,7 @@ static int node_shader_gpu_bsdf_principled(GPUMaterial *mat, bNode *node, bNodeE
GPU_material_flag_set(mat, flag);
return GPU_stack_link(mat, node, node_name, in, out, GPU_builtin(GPU_VIEW_POSITION),
- GPU_uniform(&node->ssr_id), GPU_uniform(&node->sss_id), sss_scale);
+ GPU_constant(&node->ssr_id), GPU_constant(&node->sss_id), sss_scale);
}
static void node_shader_update_principled(bNodeTree *UNUSED(ntree), bNode *node)
diff --git a/source/blender/nodes/shader/nodes/node_shader_bump.c b/source/blender/nodes/shader/nodes/node_shader_bump.c
index 08b50a886c5..b71a59d8c11 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bump.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bump.c
@@ -52,7 +52,7 @@ static int gpu_shader_bump(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(
else
GPU_link(mat, "direction_transform_m4v3", in[3].link, GPU_builtin(GPU_VIEW_MATRIX), &in[3].link);
float invert = node->custom1;
- GPU_stack_link(mat, node, "node_bump", in, out, GPU_builtin(GPU_VIEW_POSITION), GPU_uniform(&invert));
+ GPU_stack_link(mat, node, "node_bump", in, out, GPU_builtin(GPU_VIEW_POSITION), GPU_constant(&invert));
/* Other nodes are applying view matrix if the input Normal has a link.
* We don't want normal to have view matrix applied twice, so we cancel it here.
*
diff --git a/source/blender/nodes/shader/nodes/node_shader_curves.c b/source/blender/nodes/shader/nodes/node_shader_curves.c
index 21bdc3cd0d8..243d57339ea 100644
--- a/source/blender/nodes/shader/nodes/node_shader_curves.c
+++ b/source/blender/nodes/shader/nodes/node_shader_curves.c
@@ -66,9 +66,9 @@ static int gpu_shader_curve_vec(GPUMaterial *mat, bNode *node, bNodeExecData *UN
int size;
curvemapping_table_RGBA(node->storage, &array, &size);
- GPUNodeLink *tex = GPU_texture_ramp(mat, size, array, &layer);
+ GPUNodeLink *tex = GPU_color_band(mat, size, array, &layer);
- return GPU_stack_link(mat, node, "curves_vec", in, out, tex, GPU_uniform(&layer));
+ return GPU_stack_link(mat, node, "curves_vec", in, out, tex, GPU_constant(&layer));
}
void register_node_type_sh_curve_vec(void)
@@ -126,9 +126,9 @@ static int gpu_shader_curve_rgb(GPUMaterial *mat, bNode *node, bNodeExecData *UN
curvemapping_initialize(node->storage);
curvemapping_table_RGBA(node->storage, &array, &size);
- GPUNodeLink *tex = GPU_texture_ramp(mat, size, array, &layer);
+ GPUNodeLink *tex = GPU_color_band(mat, size, array, &layer);
- return GPU_stack_link(mat, node, "curves_rgb", in, out, tex, GPU_uniform(&layer));
+ return GPU_stack_link(mat, node, "curves_rgb", in, out, tex, GPU_constant(&layer));
}
void register_node_type_sh_curve_rgb(void)
diff --git a/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c b/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c
index 6583dd0cec3..939cd9f79a2 100644
--- a/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c
+++ b/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c
@@ -64,12 +64,12 @@ static int node_shader_gpu_eevee_specular(GPUMaterial *mat, bNode *node, bNodeEx
/* Occlusion */
if (!in[9].link) {
- GPU_link(mat, "set_value", GPU_uniform(&one), &in[9].link);
+ GPU_link(mat, "set_value", GPU_constant(&one), &in[9].link);
}
GPU_material_flag_set(mat, GPU_MATFLAG_DIFFUSE | GPU_MATFLAG_GLOSSY);
- return GPU_stack_link(mat, node, "node_eevee_specular", in, out, GPU_uniform(&node->ssr_id));
+ return GPU_stack_link(mat, node, "node_eevee_specular", in, out, GPU_constant(&node->ssr_id));
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_mapping.c b/source/blender/nodes/shader/nodes/node_shader_mapping.c
index 98dcd58b983..282c6a4f147 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mapping.c
+++ b/source/blender/nodes/shader/nodes/node_shader_mapping.c
@@ -92,12 +92,12 @@ static int gpu_shader_mapping(GPUMaterial *mat, bNode *node, bNodeExecData *UNUS
static float min[3] = {-FLT_MAX, -FLT_MAX, -FLT_MAX};
GPUNodeLink *tmin, *tmax, *tmat0, *tmat1, *tmat2, *tmat3;
- tmin = GPU_uniform_buffer((domin) ? texmap->min : min, GPU_VEC3);
- tmax = GPU_uniform_buffer((domax) ? texmap->max : max, GPU_VEC3);
- tmat0 = GPU_uniform_buffer((float *)texmap->mat[0], GPU_VEC4);
- tmat1 = GPU_uniform_buffer((float *)texmap->mat[1], GPU_VEC4);
- tmat2 = GPU_uniform_buffer((float *)texmap->mat[2], GPU_VEC4);
- tmat3 = GPU_uniform_buffer((float *)texmap->mat[3], GPU_VEC4);
+ tmin = GPU_uniform((domin) ? texmap->min : min);
+ tmax = GPU_uniform((domax) ? texmap->max : max);
+ tmat0 = GPU_uniform((float *)texmap->mat[0]);
+ tmat1 = GPU_uniform((float *)texmap->mat[1]);
+ tmat2 = GPU_uniform((float *)texmap->mat[2]);
+ tmat3 = GPU_uniform((float *)texmap->mat[3]);
GPU_stack_link(mat, node, "mapping", in, out, tmat0, tmat1, tmat2, tmat3, tmin, tmax);
diff --git a/source/blender/nodes/shader/nodes/node_shader_math.c b/source/blender/nodes/shader/nodes/node_shader_math.c
index 1b702a722ba..a072c686686 100644
--- a/source/blender/nodes/shader/nodes/node_shader_math.c
+++ b/source/blender/nodes/shader/nodes/node_shader_math.c
@@ -332,7 +332,7 @@ static int gpu_shader_math(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(
if (node->custom2 & SHD_MATH_CLAMP) {
float min[3] = {0.0f, 0.0f, 0.0f};
float max[3] = {1.0f, 1.0f, 1.0f};
- GPU_link(mat, "clamp_val", out[0].link, GPU_uniform(min), GPU_uniform(max), &out[0].link);
+ GPU_link(mat, "clamp_val", out[0].link, GPU_constant(min), GPU_constant(max), &out[0].link);
}
return 1;
diff --git a/source/blender/nodes/shader/nodes/node_shader_mixRgb.c b/source/blender/nodes/shader/nodes/node_shader_mixRgb.c
index b598859ab8e..5bf5ce69261 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mixRgb.c
+++ b/source/blender/nodes/shader/nodes/node_shader_mixRgb.c
@@ -76,7 +76,7 @@ static int gpu_shader_mix_rgb(GPUMaterial *mat, bNode *node, bNodeExecData *UNUS
if (ret && node->custom2 & SHD_MIXRGB_CLAMP) {
float min[3] = {0.0f, 0.0f, 0.0f};
float max[3] = {1.0f, 1.0f, 1.0f};
- GPU_link(mat, "clamp_vec3", out[0].link, GPU_uniform(min), GPU_uniform(max), &out[0].link);
+ GPU_link(mat, "clamp_vec3", out[0].link, GPU_constant(min), GPU_constant(max), &out[0].link);
}
return ret;
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_normal.c b/source/blender/nodes/shader/nodes/node_shader_normal.c
index 121cb9cc1a5..13335c86382 100644
--- a/source/blender/nodes/shader/nodes/node_shader_normal.c
+++ b/source/blender/nodes/shader/nodes/node_shader_normal.c
@@ -60,7 +60,7 @@ static void node_shader_exec_normal(void *UNUSED(data), int UNUSED(thread), bNod
static int gpu_shader_normal(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
- GPUNodeLink *vec = GPU_uniform(out[0].vec);
+ GPUNodeLink *vec = GPU_constant(out[0].vec);
return GPU_stack_link(mat, node, "normal_new_shading", in, out, vec);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_normal_map.c b/source/blender/nodes/shader/nodes/node_shader_normal_map.c
index e4b5aaef72d..c066fea81ad 100644
--- a/source/blender/nodes/shader/nodes/node_shader_normal_map.c
+++ b/source/blender/nodes/shader/nodes/node_shader_normal_map.c
@@ -66,23 +66,23 @@ static int gpu_shader_normal_map(GPUMaterial *mat, bNode *node, bNodeExecData *U
else if (node->original) {
bNodeSocket *socket = BLI_findlink(&node->original->inputs, 0);
bNodeSocketValueFloat *socket_data = socket->default_value;
- strength = GPU_uniform_buffer(&socket_data->value, GPU_FLOAT);
+ strength = GPU_uniform(&socket_data->value);
}
else
- strength = GPU_uniform(in[0].vec);
+ strength = GPU_constant(in[0].vec);
if (in[1].link)
realnorm = in[1].link;
else if (node->original) {
bNodeSocket *socket = BLI_findlink(&node->original->inputs, 1);
bNodeSocketValueRGBA *socket_data = socket->default_value;
- realnorm = GPU_uniform_buffer(socket_data->value, GPU_VEC3);
+ realnorm = GPU_uniform(socket_data->value);
}
else
- realnorm = GPU_uniform(in[1].vec);
+ realnorm = GPU_constant(in[1].vec);
negnorm = GPU_builtin(GPU_VIEW_NORMAL);
- GPU_link(mat, "math_max", strength, GPU_uniform(d), &strength);
+ GPU_link(mat, "math_max", strength, GPU_constant(d), &strength);
const char *color_to_normal_fnc_name = "color_to_normal_new_shading";
if (nm->space == SHD_SPACE_BLENDER_OBJECT || nm->space == SHD_SPACE_BLENDER_WORLD)
diff --git a/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c b/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c
index f8af125eb9e..7cc80a0c636 100644
--- a/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c
+++ b/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c
@@ -67,7 +67,7 @@ static int node_shader_gpu_subsurface_scattering(GPUMaterial *mat, bNode *node,
&socket_data_sharp->value);
}
- return GPU_stack_link(mat, node, "node_subsurface_scattering", in, out, GPU_uniform(&node->sss_id));
+ return GPU_stack_link(mat, node, "node_subsurface_scattering", in, out, GPU_constant(&node->sss_id));
}
static void node_shader_update_subsurface_scattering(bNodeTree *UNUSED(ntree), bNode *node)
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_brick.c b/source/blender/nodes/shader/nodes/node_shader_tex_brick.c
index 227df5e8e56..2002e3c14c9 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_brick.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_brick.c
@@ -82,8 +82,8 @@ static int node_shader_gpu_tex_brick(GPUMaterial *mat, bNode *node, bNodeExecDat
float squash_freq = tex->squash_freq;
return GPU_stack_link(mat, node, "node_tex_brick",
in, out,
- GPU_uniform(&tex->offset), GPU_uniform(&offset_freq),
- GPU_uniform(&tex->squash), GPU_uniform(&squash_freq));
+ GPU_constant(&tex->offset), GPU_constant(&offset_freq),
+ GPU_constant(&tex->squash), GPU_constant(&squash_freq));
}
/* node type definition */
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c
index 06f3773e6d8..750ce60e84d 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c
@@ -61,7 +61,7 @@ static int node_shader_gpu_tex_gradient(GPUMaterial *mat, bNode *node, bNodeExec
NodeTexGradient *tex = (NodeTexGradient *)node->storage;
float gradient_type = tex->gradient_type;
- return GPU_stack_link(mat, node, "node_tex_gradient", in, out, GPU_uniform(&gradient_type));
+ return GPU_stack_link(mat, node, "node_tex_gradient", in, out, GPU_constant(&gradient_type));
}
/* node type definition */
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_image.c b/source/blender/nodes/shader/nodes/node_shader_tex_image.c
index 9782df2638f..0b33b186dd2 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_image.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.c
@@ -124,7 +124,7 @@ static int node_shader_gpu_tex_image(GPUMaterial *mat, bNode *node, bNodeExecDat
norm,
col1, col2, col3,
GPU_image(ima, iuser, isdata),
- GPU_uniform(&blend),
+ GPU_constant(&blend),
&out[0].link,
&out[1].link);
break;
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_magic.c b/source/blender/nodes/shader/nodes/node_shader_tex_magic.c
index deb81b7b78f..fb3012e1d2b 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_magic.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_magic.c
@@ -64,7 +64,7 @@ static int node_shader_gpu_tex_magic(GPUMaterial *mat, bNode *node, bNodeExecDat
node_shader_gpu_tex_mapping(mat, node, in, out);
- return GPU_stack_link(mat, node, "node_tex_magic", in, out, GPU_uniform(&depth));
+ return GPU_stack_link(mat, node, "node_tex_magic", in, out, GPU_constant(&depth));
}
/* node type definition */
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c b/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c
index 03f401e7f01..30171eea9e2 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c
@@ -68,7 +68,7 @@ static int node_shader_gpu_tex_musgrave(GPUMaterial *mat, bNode *node, bNodeExec
NodeTexMusgrave *tex = (NodeTexMusgrave *)node->storage;
float type = tex->musgrave_type;
- return GPU_stack_link(mat, node, "node_tex_musgrave", in, out, GPU_uniform(&type));
+ return GPU_stack_link(mat, node, "node_tex_musgrave", in, out, GPU_constant(&type));
}
/* node type definition */
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c b/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c
index 18d0dee8b88..2105bbfa25a 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c
@@ -66,7 +66,7 @@ static int node_shader_gpu_tex_voronoi(GPUMaterial *mat, bNode *node, bNodeExecD
NodeTexVoronoi *tex = (NodeTexVoronoi *)node->storage;
float coloring = tex->coloring;
- return GPU_stack_link(mat, node, "node_tex_voronoi", in, out, GPU_uniform(&coloring));
+ return GPU_stack_link(mat, node, "node_tex_voronoi", in, out, GPU_constant(&coloring));
}
static void node_shader_update_tex_voronoi(bNodeTree *UNUSED(ntree), bNode *node)
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 2b06f66eb63..ac955b29808 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
@@ -67,7 +67,7 @@ static int node_shader_gpu_tex_wave(GPUMaterial *mat, bNode *node, bNodeExecData
float wave_type = tex->wave_type;
float wave_profile = tex->wave_profile;
- return GPU_stack_link(mat, node, "node_tex_wave", in, out, GPU_uniform(&wave_type), GPU_uniform(&wave_profile));
+ return GPU_stack_link(mat, node, "node_tex_wave", in, out, GPU_constant(&wave_type), GPU_constant(&wave_profile));
}
/* node type definition */
diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
index 5f583e1e29b..4f4462f20bb 100644
--- a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
+++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
@@ -70,13 +70,13 @@ static int gpu_shader_valtorgb(GPUMaterial *mat, bNode *node, bNodeExecData *UNU
int size;
BKE_colorband_evaluate_table_rgba(coba, &array, &size);
- GPUNodeLink *tex = GPU_texture_ramp(mat, size, array, &layer);
+ GPUNodeLink *tex = GPU_color_band(mat, size, array, &layer);
if (coba->ipotype == COLBAND_INTERP_CONSTANT) {
- return GPU_stack_link(mat, node, "valtorgb_nearest", in, out, tex, GPU_uniform(&layer));
+ return GPU_stack_link(mat, node, "valtorgb_nearest", in, out, tex, GPU_constant(&layer));
}
else {
- return GPU_stack_link(mat, node, "valtorgb", in, out, tex, GPU_uniform(&layer));
+ return GPU_stack_link(mat, node, "valtorgb", in, out, tex, GPU_constant(&layer));
}
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_vectTransform.c b/source/blender/nodes/shader/nodes/node_shader_vectTransform.c
index 63964e27d20..bce96230403 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vectTransform.c
+++ b/source/blender/nodes/shader/nodes/node_shader_vectTransform.c
@@ -106,7 +106,7 @@ static int gpu_shader_vect_transform(GPUMaterial *mat, bNode *node, bNodeExecDat
if (in[0].hasinput)
inputlink = in[0].link;
else
- inputlink = GPU_uniform(in[0].vec);
+ inputlink = GPU_constant(in[0].vec);
fromto = get_gpulink_matrix_from_to(nodeprop->convert_from, nodeprop->convert_to);
diff --git a/source/blender/nodes/shader/nodes/node_shader_volume_principled.c b/source/blender/nodes/shader/nodes/node_shader_volume_principled.c
index c946c42f9af..cf458ac8f51 100644
--- a/source/blender/nodes/shader/nodes/node_shader_volume_principled.c
+++ b/source/blender/nodes/shader/nodes/node_shader_volume_principled.c
@@ -120,15 +120,15 @@ static int node_shader_gpu_volume_principled(GPUMaterial *mat, bNode *node, bNod
/* Default values if attributes not found. */
if (!density) {
static float one = 1.0f;
- density = GPU_uniform(&one);
+ density = GPU_constant(&one);
}
if (!color) {
static float white[4] = {1.0f, 1.0f, 1.0f, 1.0f};
- color = GPU_uniform(white);
+ color = GPU_constant(white);
}
if (!temperature) {
static float one = 1.0f;
- temperature = GPU_uniform(&one);
+ temperature = GPU_constant(&one);
}
/* Create blackbody spectrum. */
@@ -141,10 +141,10 @@ static int node_shader_gpu_volume_principled(GPUMaterial *mat, bNode *node, bNod
else {
data = MEM_callocN(sizeof(float) * size * 4, "blackbody black");
}
- GPUNodeLink *spectrummap = GPU_texture_ramp(mat, size, data, &layer);
+ GPUNodeLink *spectrummap = GPU_color_band(mat, size, data, &layer);
return GPU_stack_link(mat, node, "node_volume_principled", in, out, density, color, temperature, spectrummap,
- GPU_uniform(&layer));
+ GPU_constant(&layer));
}
/* node type definition */