16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 05:29:18 +02:00

tmj merge (broken)

This commit is contained in:
milek7
2018-01-24 22:48:41 +01:00
26 changed files with 539 additions and 408 deletions

View File

@@ -274,8 +274,8 @@ void CSkyDome::RebuildColors() {
float const y = PerezFunctionO2( perezy, icostheta, gamma, cosgamma2, zenithy );
// luminance(Y) for clear & overcast sky
float const yclear = PerezFunctionO2( perezluminance, icostheta, gamma, cosgamma2, zenithluminance );
float const yover = zenithluminance * ( 1.0f + 2.0f * vertex.y ) / 3.0f;
float const yclear = std::max( 0.01f, PerezFunctionO2( perezluminance, icostheta, gamma, cosgamma2, zenithluminance ) );
float const yover = std::max( 0.01f, zenithluminance * ( 1.0f + 2.0f * vertex.y ) / 3.0f );
float const Y = interpolate( yclear, yover, m_overcast );
float const X = (x / y) * Y;