diff --git a/include/mitsuba/core/spectrum.h b/include/mitsuba/core/spectrum.h index fded918c..6d245261 100644 --- a/include/mitsuba/core/spectrum.h +++ b/include/mitsuba/core/spectrum.h @@ -485,6 +485,14 @@ public: return result * (1.0f / N); } + /// Component-wise absolute value + inline TSpectrum abs() const { + TSpectrum value; + for (int i=0; i