Make access to the time of the track in the shader to react to day/night cycle

This commit is contained in:
samuncle 2018-02-27 23:20:49 +01:00
parent 4cc56aec1b
commit 39c50c838f

View File

@ -60,6 +60,13 @@ SPShaderManager::SPShaderManager()
ua->setValue(sp_wind_dir);
}
},
{ "isDuringDayUniformAssigner", [](SPUniformAssigner* ua)
{
int is_during_day = Track::getCurrentTrack() ?
Track::getCurrentTrack()->getIsDuringDay() ? 1 : 0 : 0;
ua->setValue(is_during_day);
}
},
{ "zeroAlphaUniformAssigner", [](SPUniformAssigner* ua)
{
ua->setValue(0.0f);