|
|
|
|
|
|
// We can drop the constant (s / (8 * Pi)) due to the subsequent weight renormalization. |
|
|
|
float3 DisneyProfilePolar(float r, float3 S) |
|
|
|
{ |
|
|
|
#if 0 |
|
|
|
#else |
|
|
|
#define LOG2_E 1.44269504088896340736 |
|
|
|
float k = (-1.0 / 3.0) * LOG2_E; |
|
|
|
float3 p = (k * r) * S; |
|
|
|
float3 expOneThird = exp2(p); |
|
|
|
#endif |
|
|
|
return expOneThird + expOneThird * expOneThird * expOneThird; |
|
|
|
} |
|
|
|
|
|
|
|