Make access to the time of the track in the shader to react to day/night cycle
This commit is contained in:
parent
4cc56aec1b
commit
39c50c838f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user