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/kernel/closure/bsdf.h | |
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/kernel/closure/bsdf.h')
-rw-r--r-- | intern/cycles/kernel/closure/bsdf.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/kernel/closure/bsdf.h b/intern/cycles/kernel/closure/bsdf.h index 6f3c2092c64..4feb21c43e3 100644 --- a/intern/cycles/kernel/closure/bsdf.h +++ b/intern/cycles/kernel/closure/bsdf.h @@ -439,7 +439,7 @@ ccl_device_inline int bsdf_sample(KernelGlobals kg, *eval *= shift_cos_in(dot(*omega_in, sc->N), frequency_multiplier); } if (label & LABEL_DIFFUSE) { - if (!isequal_float3(sc->N, sd->N)) { + if (!isequal(sc->N, sd->N)) { *eval *= bump_shadowing_term((label & LABEL_TRANSMIT) ? -sd->N : sd->N, sc->N, *omega_in); } } @@ -550,7 +550,7 @@ ccl_device_inline break; } if (CLOSURE_IS_BSDF_DIFFUSE(sc->type)) { - if (!isequal_float3(sc->N, sd->N)) { + if (!isequal(sc->N, sd->N)) { eval *= bump_shadowing_term(sd->N, sc->N, omega_in); } } @@ -635,7 +635,7 @@ ccl_device_inline break; } if (CLOSURE_IS_BSDF_DIFFUSE(sc->type)) { - if (!isequal_float3(sc->N, sd->N)) { + if (!isequal(sc->N, sd->N)) { eval *= bump_shadowing_term(-sd->N, sc->N, omega_in); } } |