Thx, i look on it, render looks the same.
No idea. All looks correct.I will look on it tomorrow.
function update(self)
render.set_depth_mask(true)
render.set_stencil_mask(0xff)
render.clear({[render.BUFFER_COLOR_BIT] = self.clear_color, [render.BUFFER_DEPTH_BIT] = 1, [render.BUFFER_STENCIL_BIT] = 0})
render.enable_state(render.STATE_BLEND)
render.set_blend_func(render.BLEND_SRC_ALPHA, render.BLEND_ONE_MINUS_SRC_ALPHA)
--draw 3d walls
render.enable_state(render.STATE_CULL_FACE)
render.enable_state(render.STATE_DEPTH_TEST)
render.set_depth_mask(true)
render.set_view(self.view)
render.set_projection(self.projection)
render.draw(self.wall_pred)
render.disable_state(render.STATE_CULL_FACE)
render.disable_state(render.STATE_DEPTH_TEST)
render.set_depth_mask(false)
--draw sprites without camera
render.set_projection(vmath.matrix4_orthographic(0, render.get_width(), 0, render.get_height(), -1, 1))
render.set_view(vmath.matrix4())
render.draw(self.tile_pred)
render.draw(self.particle_pred)
render.draw_debug3d()
render.draw_debug2d()
render.set_view(vmath.matrix4())
render.set_projection(vmath.matrix4_orthographic(0, render.get_window_width(), 0, render.get_window_height(), -1, 1))
render.enable_state(render.STATE_STENCIL_TEST)
render.draw(self.gui_pred)
render.draw(self.text_pred)
render.disable_state(render.STATE_STENCIL_TEST)
render.set_depth_mask(false)
render.draw_debug2d()
end