From 9e749583791c9523efab90665ffd8f5c30e4f449 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 22 Nov 2023 03:56:58 +0100 Subject: a wip --- shaders/lightmap.cpp | 8 +++----- shaders/lightmap.hpp | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'shaders') diff --git a/shaders/lightmap.cpp b/shaders/lightmap.cpp index 20d5616e..d782a376 100644 --- a/shaders/lightmap.cpp +++ b/shaders/lightmap.cpp @@ -5,6 +5,7 @@ #include "src/chunk.hpp" #include "src/tile-bbox.hpp" #include "src/tile-atlas.hpp" +#include "src/quads.hpp" #include "src/object.hpp" #include "loader/loader.hpp" #include @@ -20,6 +21,8 @@ namespace floormat { +using namespace floormat::Quads; + namespace { constexpr auto neighbor_count = 4; @@ -212,11 +215,6 @@ lightmap_shader::lightmap_shader(texture_unit_cache& tuc) : tuc{tuc} block_uniform_buf.bind(GL::Buffer::Target::Uniform, BlockUniform); } -std::array lightmap_shader::quad_indexes(size_t N) -{ - return tile_atlas::indices(N); -} - void lightmap_shader::add_light(Vector2 neighbor_offset, const light_s& light) { // NOTE, make a benchmark where the vertex buffer isn't updated every frame diff --git a/shaders/lightmap.hpp b/shaders/lightmap.hpp index ff2dd9b4..d4e09815 100644 --- a/shaders/lightmap.hpp +++ b/shaders/lightmap.hpp @@ -72,7 +72,6 @@ private: static Framebuffer make_framebuffer(Vector2i size); GL::Mesh make_occlusion_mesh(); - static std::array quad_indexes(size_t N); void add_objects(Vector2 neighbor_offset, chunk& c); void add_geometry(Vector2 neighbor_offset, chunk& c); -- cgit v1.2.3