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>2022-01-06 20:01:46 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-01-10 15:52:08 +0300
commitfaeab8367c68356c1defa7db78cb841c087faa45 (patch)
treee16292b97f0dd211db3cf68216b38809d371a26d /source/blender/nodes/shader
parent76d69bbb0864269afb14b88fb4d6145331b4e4ac (diff)
BLI_floatX: Add most missing constructors and operator
This should have no side effect. This reverse the dependency, with `float2` being needed for `float3` and so on. This is needed for extensive usage of these types in the draw engines. Differential Revision: https://developer.blender.org/D13756
Diffstat (limited to 'source/blender/nodes/shader')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_noise.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc b/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc
index 0e549859a39..1c703313edf 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc
@@ -176,14 +176,14 @@ class NoiseFunction : public fn::MultiFunction {
const VArray<float3> &vector = params.readonly_single_input<float3>(0, "Vector");
if (compute_factor) {
for (int64_t i : mask) {
- const float2 position = vector[i] * scale[i];
+ const float2 position = float2(vector[i] * scale[i]);
r_factor[i] = noise::perlin_fractal_distorted(
position, detail[i], roughness[i], distortion[i]);
}
}
if (compute_color) {
for (int64_t i : mask) {
- const float2 position = vector[i] * scale[i];
+ const float2 position = float2(vector[i] * scale[i]);
const float3 c = noise::perlin_float3_fractal_distorted(
position, detail[i], roughness[i], distortion[i]);
r_color[i] = ColorGeometry4f(c[0], c[1], c[2], 1.0f);