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:
authorJeroen Bakker <jeroen@blender.org>2022-01-28 15:28:31 +0300
committerJeroen Bakker <jeroen@blender.org>2022-01-28 15:28:31 +0300
commitcdcbdf8ce46d14c753d68ee8dfa533c642376805 (patch)
tree8557864b1f75f6a0a2c80df48692a7723c9e0300 /source/blender/nodes
parent7c48196056c88c17c551e3177ef7b6f276f01d77 (diff)
Remove compilation warnings TexResult.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_attribute_sample_texture.cc2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_output.c8
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_proc.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_texture.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_attribute_sample_texture.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_attribute_sample_texture.cc
index ae034d152be..a71431bdf8e 100644
--- a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_attribute_sample_texture.cc
+++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_attribute_sample_texture.cc
@@ -93,7 +93,7 @@ static void execute_on_component(GeometryComponent &component, const GeoNodeExec
/* For legacy reasons we have to map [0, 1] to [-1, 1] to support uv mappings. */
const float3 remapped_position = position * 2.0f - float3(1.0f);
BKE_texture_get_value(nullptr, texture, remapped_position, &texture_result, false);
- colors[i] = {texture_result.tr, texture_result.tg, texture_result.tb, texture_result.ta};
+ copy_v4_v4(colors[i], texture_result.trgba);
}
});
diff --git a/source/blender/nodes/texture/nodes/node_texture_output.c b/source/blender/nodes/texture/nodes/node_texture_output.c
index 4911ab7ba9e..59c2d2766d0 100644
--- a/source/blender/nodes/texture/nodes/node_texture_output.c
+++ b/source/blender/nodes/texture/nodes/node_texture_output.c
@@ -49,10 +49,10 @@ static void exec(void *data,
params_from_cdata(&params, cdata);
if (in[1] && in[1]->hasinput && !in[0]->hasinput) {
- tex_input_rgba(&target->tr, in[1], &params, cdata->thread);
+ tex_input_rgba(target->trgba, in[1], &params, cdata->thread);
}
else {
- tex_input_rgba(&target->tr, in[0], &params, cdata->thread);
+ tex_input_rgba(target->trgba, in[0], &params, cdata->thread);
}
}
else {
@@ -61,9 +61,9 @@ static void exec(void *data,
TexParams params;
params_from_cdata(&params, cdata);
- tex_input_rgba(&target->tr, in[0], &params, cdata->thread);
+ tex_input_rgba(target->trgba, in[0], &params, cdata->thread);
- target->tin = (target->tr + target->tg + target->tb) / 3.0f;
+ target->tin = (target->trgba[0] + target->trgba[1] + target->trgba[2]) / 3.0f;
target->talpha = true;
if (target->nor) {
diff --git a/source/blender/nodes/texture/nodes/node_texture_proc.c b/source/blender/nodes/texture/nodes/node_texture_proc.c
index 8c294b5954d..38e4f0268e8 100644
--- a/source/blender/nodes/texture/nodes/node_texture_proc.c
+++ b/source/blender/nodes/texture/nodes/node_texture_proc.c
@@ -72,7 +72,7 @@ static void do_proc(float *result,
}
if (textype & TEX_RGB) {
- copy_v4_v4(result, &texres.tr);
+ copy_v4_v4(result, texres.trgba);
}
else {
copy_v4_v4(result, col1);
diff --git a/source/blender/nodes/texture/nodes/node_texture_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c
index 083ae67ccb6..f8f8f25cb5a 100644
--- a/source/blender/nodes/texture/nodes/node_texture_texture.c
+++ b/source/blender/nodes/texture/nodes/node_texture_texture.c
@@ -71,7 +71,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
textype = multitex_nodes(nodetex, co, dxt, dyt, p->osatex, &texres, thread, 0, p->mtex, NULL);
if (textype & TEX_RGB) {
- copy_v4_v4(out, &texres.tr);
+ copy_v4_v4(out, texres.trgba);
}
else {
copy_v4_v4(out, col1);