MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetLighting

Method GetLighting

trinity/Tr2ShLightingManager.cpp:371–383  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- 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) --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

369// lightingCoefficients - (out) SH lighting coefficients (8 for L2 and 4 for L1)
370// --------------------------------------------------------------------------------------
371void 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
385inline float MaxVectorComponent( const Vector3& v )
386{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected