diff options
Diffstat (limited to 'math.cginc')
| -rw-r--r-- | math.cginc | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -10,6 +10,11 @@ float pow5(float x) return (tmp * tmp) * x;
}
+float wrapNoL(float NoL, float factor) {
+ // https://www.iro.umontreal.ca/~derek/files/jgt_wrap_final.pdf
+ return pow(max(1E-4, (NoL + factor) / (1 + factor)), 1 + factor);
+}
+
#endif // __MATH_INC
|
