diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-22 03:56:58 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-22 03:56:58 +0100 |
commit | 9e749583791c9523efab90665ffd8f5c30e4f449 (patch) | |
tree | bcb7fd1774e0b1ca4f69ff19c9c2f9e3c63eac1a /shaders | |
parent | 34c451c6b64ba1c11efa9a390c16e2097a25279a (diff) |
a wip
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/lightmap.cpp | 8 | ||||
-rw-r--r-- | shaders/lightmap.hpp | 1 |
2 files changed, 3 insertions, 6 deletions
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 <utility> @@ -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<UnsignedShort, 6> 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<UnsignedShort, 6> quad_indexes(size_t N); void add_objects(Vector2 neighbor_offset, chunk& c); void add_geometry(Vector2 neighbor_offset, chunk& c); |