Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed static reflection map being black. #2721

Merged
merged 1 commit into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/main/GameContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ bool GameContext::LoadTerrain(std::string const& filename_part)
// Initialize envmap textures by rendering center of map
Ogre::Vector3 center = App::GetSimTerrain()->getMaxTerrainSize() / 2;
center.y = App::GetSimTerrain()->GetHeightAt(center.x, center.z) + 1.0f;
App::GetGfxScene()->GetEnvMap().UpdateEnvMap(center, nullptr);
App::GetGfxScene()->GetEnvMap().UpdateEnvMap(center, /*gfx_actor:*/nullptr, /*full:*/true);

// Scan groundmodels
App::GetGuiManager()->GetFrictionSettings()->AnalyzeTerrain();
Expand Down
2 changes: 1 addition & 1 deletion source/main/gfx/EnvironmentMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void RoR::GfxEnvmap::UpdateEnvMap(Ogre::Vector3 center, GfxActor* gfx_actor, boo
{
// how many of the 6 render planes to update at once? Use cvar 'gfx_envmap_rate', unless instructed to do full render.
const int update_rate = full ? NUM_FACES : App::gfx_envmap_rate->GetInt();
if (!App::gfx_envmap_enabled->GetBool() || update_rate == 0)
if (!full && (!App::gfx_envmap_enabled->GetBool() || update_rate == 0))
{
return;
}
Expand Down