-------------------------------------------------------------------------------------- Description: Calculates SH lighting coefficient for the given sample position. Arguments: position - Sample position intensity - Lighting intensity factor lightingCoefficients - (out) SH lighting coefficients (8 for L2 and 4 for L1) --------------------------------------------------------------------------------
| 369 | // lightingCoefficients - (out) SH lighting coefficients (8 for L2 and 4 for L1) |
| 370 | // -------------------------------------------------------------------------------------- |
| 371 | void Tr2ShLightingManager::GetLighting( const Vector3& position, float intensity, float cutoffRadius, Vector4* lightingCoefficients ) |
| 372 | { |
| 373 | CCP_STATS_INC( shLightingSamples ); |
| 374 | |
| 375 | if( m_quality == L2 ) |
| 376 | { |
| 377 | CalculateSecondaryLighting<L2>( position, intensity, cutoffRadius, lightingCoefficients ); |
| 378 | } |
| 379 | else |
| 380 | { |
| 381 | CalculateSecondaryLighting<L1>( position, intensity, cutoffRadius, lightingCoefficients ); |
| 382 | } |
| 383 | } |
| 384 | |
| 385 | inline float MaxVectorComponent( const Vector3& v ) |
| 386 | { |