| 220 | { |
| 221 | |
| 222 | float NormalDistribution( float x, float sigma, float weight ) |
| 223 | { |
| 224 | const float dx = std::abs( x ); |
| 225 | const float clampedOneMinusDX = std::max( 0.0f, 1.0f - ( dx * dx ) ); |
| 226 | |
| 227 | if( weight > 1.0f ) |
| 228 | { |
| 229 | return std::pow( clampedOneMinusDX, weight ); |
| 230 | } |
| 231 | const float gaussian = std::exp( -TRI_PI * 5.0f * ( ( dx * dx ) / ( sigma * sigma ) ) ); |
| 232 | return Lerp( gaussian, clampedOneMinusDX, weight ); |
| 233 | } |
| 234 | |
| 235 | GaussianData CalculateGaussianPassParameters( float radius, float centerWeight, float normalizingFactor, Vector3 overallWeight, Vector2 direction ) |
| 236 | { |
no test coverage detected