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.
Renamed functions:
- saturate3 -> saturate
- sqr3 -> sqr
- pow3 -> pow
- exp3 -> exp
- log3 -> log
- isequal_float3 -> isequal
- isfinite3_safe -> isfinite_safe
- isfinite4_safe -> isfinite_safe
- ensure_finite3 -> ensure_finite
- ensure_finite4 -> ensure_finite
- safe_divide_float3_float3 -> safe_divide
- safe_divide_float3_float -> safe_divide
- safe_divide_float4_float -> safe_divide
- min3 -> reduce_min
- max3 -> reduce_max
- bsdf_eval_mul3 -> bsdf_eval_mul
Tested on CPU and CUDA.