Skip to content

Commit

Permalink
fixed error at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
nem0 committed Sep 19, 2023
1 parent 0dc52a6 commit 6edef7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/pipelines/cubemap_sky.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
return {
enabled = false,
intensity = 1.0,
sky = LumixAPI.loadResource(LumixAPI.engine, "textures/Yokohama2/cube.ltc", "texture"), -- TODO set from UI
sky = nil,

gui = function(self)
_, self.enabled = ImGui.Checkbox("Enabled", self.enabled)
Expand All @@ -10,7 +10,7 @@ return {

postprocess = function(self, env, hdr_buffer, gbuffer, shadowmap) : ()
if not self.enabled then return end
if self.sky == -1 then return end
self.sky = self.sky or LumixAPI.loadResource(LumixAPI.engine, "textures/Yokohama2/cube.ltc", "texture"), -- TODO set from UI
env.beginBlock("sky")
if env.cubemap_sky_shader == nil then
env.cubemap_sky_shader = env.preloadShader("pipelines/cubemap_sky.shd")
Expand Down

0 comments on commit 6edef7c

Please sign in to comment.