maintenance: settings item refactoring, include dependencies fixes

This commit is contained in:
tmj-fstate
2018-01-26 16:44:47 +01:00
parent 9d008d2a3e
commit 0124032d3b
92 changed files with 2226 additions and 2233 deletions

View File

@@ -2,7 +2,7 @@
#include "stdafx.h"
#include "skydome.h"
#include "color.h"
#include "usefull.h"
#include "utilities.h"
// sky gradient based on "A practical analytic model for daylight"
// by A. J. Preetham Peter Shirley Brian Smits (University of Utah)
@@ -283,9 +283,9 @@ void CSkyDome::RebuildColors() {
float const Z = ((1.0f - x - y) / y) * Y;
colorconverter = glm::vec3( X, Y, Z );
color = XYZtoRGB( colorconverter );
color = colors::XYZtoRGB( colorconverter );
colorconverter = RGBtoHSV(color);
colorconverter = colors::RGBtoHSV(color);
if ( m_linearexpcontrol ) {
// linear scale
colorconverter.z *= m_expfactor;
@@ -309,9 +309,9 @@ void CSkyDome::RebuildColors() {
float const shiftfactor = clamp( interpolate(heightbasedphase, sunbasedphase, sunbasedphase), 0.0f, 1.0f );
// h = 210 makes for 'typical' sky tone
shiftedcolor = glm::vec3( 210.0f, colorconverter.y, colorconverter.z );
shiftedcolor = HSVtoRGB( shiftedcolor );
shiftedcolor = colors::HSVtoRGB( shiftedcolor );
color = HSVtoRGB(colorconverter);
color = colors::HSVtoRGB(colorconverter);
color = interpolate( color, shiftedcolor, shiftfactor );
/*