Fix renderpaths for scenes without a world

This commit is contained in:
Moritz Brückner 2020-07-06 22:53:31 +02:00
parent 22371ec37e
commit 27b3aa5f49
2 changed files with 8 additions and 4 deletions

View file

@ -643,8 +643,10 @@ class RenderPathDeferred {
#if (rp_background == "World")
{
path.setTarget("tex"); // Re-binds depth
path.drawSkydome("shader_datas/World_" + Scene.active.raw.world_ref + "/World_" + Scene.active.raw.world_ref);
if (Scene.active.raw.world_ref != null) {
path.setTarget("tex"); // Re-binds depth
path.drawSkydome("shader_datas/World_" + Scene.active.raw.world_ref + "/World_" + Scene.active.raw.world_ref);
}
}
#end

View file

@ -35,8 +35,10 @@ class RenderPathForward {
#if (rp_background == "World")
{
RenderPathCreator.setTargetMeshes();
path.drawSkydome("shader_datas/World_" + Scene.active.raw.world_ref + "/World_" + Scene.active.raw.world_ref);
if (Scene.active.raw.world_ref != null) {
RenderPathCreator.setTargetMeshes();
path.drawSkydome("shader_datas/World_" + Scene.active.raw.world_ref + "/World_" + Scene.active.raw.world_ref);
}
}
#end