tile and particle predicates are drawn twice, once here:
render.set_projection(get_projection(self))
render.draw(self.tile_pred)
render.draw(self.particle_pred)
render.draw_debug3d()
-- render GUI
and second time in Lumiere function:
lumiere.draw(function()
local frustum = self.projection * self.view
render.draw(self.tile_pred, { frustum = frustum })
render.draw(self.particle_pred, { frustum = frustum })
end)
Only second one is affected by Lumiere, but is drawn on top of not cleared screen. I don’t think it was wanted approach?
If lights is the only think you want you could either follow my video: https://www.youtube.com/watch?v=sLFHDihszfc with source code here: GitHub - paweljarosz/unfolding_simple_lighting: Simplest Lighting rendering example in Defold based on post-processing Screen Space Light Maps · GitHub. The same is also explained in an official example: publicexamples/examples/simple_lights at master · britzl/publicexamples · GitHub
This aprroach is drawing to separate render targets (internal buffers / textures) and then drawing them mixed on top of a quad that is filling the full screen - maybe it would be easier for you? It is a raw Defold API based render scipt and I believe it is best to learn it. Then all the full screen post processing is done in the fragment program (shader) of the quad - you can then add here effects from lumiere or other sources.
