diff options
author | Andrii Symkin <pembem22> | 2022-06-23 15:29:17 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-06-23 16:02:53 +0300 |
commit | c2a2f3553aed58ae9e4c165f8bfcad2b31dcf74b (patch) | |
tree | 236fca0080484dc7e9b1f8816e2770b4422db00d /intern/cycles/util/transform.cpp | |
parent | b8403b065e222faff3dfb3e2e9aa1b3d3f56c555 (diff) |
Cycles: unify math functions names
This patch unifies the names of math functions for different data types and uses
overloading instead. The goal is to make it possible to swap out all the float3
variables containing RGB data with something else, with as few as possible
changes to the code. It's a requirement for future spectral rendering patches.
Differential Revision: https://developer.blender.org/D15276
Diffstat (limited to 'intern/cycles/util/transform.cpp')
-rw-r--r-- | intern/cycles/util/transform.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/util/transform.cpp b/intern/cycles/util/transform.cpp index fa50e1db063..0bf5de57a20 100644 --- a/intern/cycles/util/transform.cpp +++ b/intern/cycles/util/transform.cpp @@ -229,17 +229,17 @@ static void transform_decompose(DecomposedTransform *decomp, const Transform *tf /* extract scale and shear first */ float3 scale, shear; scale.x = len(colx); - colx = safe_divide_float3_float(colx, scale.x); + colx = safe_divide(colx, scale.x); shear.z = dot(colx, coly); coly -= shear.z * colx; scale.y = len(coly); - coly = safe_divide_float3_float(coly, scale.y); + coly = safe_divide(coly, scale.y); shear.y = dot(colx, colz); colz -= shear.y * colx; shear.x = dot(coly, colz); colz -= shear.x * coly; scale.z = len(colz); - colz = safe_divide_float3_float(colz, scale.z); + colz = safe_divide(colz, scale.z); transform_set_column(&M, 0, colx); transform_set_column(&M, 1, coly); |