summaryrefslogtreecommitdiffhomepage
path: root/shaders/lightmap.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-06-11 02:40:06 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-06-11 02:40:06 +0200
commit04b9df316971e0cb897605fdabb16da712f3f791 (patch)
tree3c54c390ec3f42fc8d66d6f3f9bb7b36b2feeb08 /shaders/lightmap.hpp
parentd63ae5ac3af050be4439b8d9f9d0c06f94058b7c (diff)
wip
Diffstat (limited to 'shaders/lightmap.hpp')
-rw-r--r--shaders/lightmap.hpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/shaders/lightmap.hpp b/shaders/lightmap.hpp
index e458cadc..4ae6cb5c 100644
--- a/shaders/lightmap.hpp
+++ b/shaders/lightmap.hpp
@@ -43,12 +43,11 @@ struct lightmap_shader final : GL::AbstractShaderProgram
void begin(Vector2i neighbor_offset, const light_s& light);
void add_chunk(Vector2i neighbor_offset, const chunk& ch);
- void add_vertex(Vector2i neighbor_offset, const std::array<Vector2, 4>& obj);
void end();
GL::Texture2D& texture();
private:
- static Framebuffer make_framebuffer();
+ static Framebuffer make_framebuffer(Vector2i size);
GL::Mesh make_mesh();
void add_light(Vector2i neighbor_offset, const light_s& light);
void flush_vertexes();
@@ -64,12 +63,10 @@ private:
//DepthUniform = 4,
};
- Framebuffer framebuffer;
+ Framebuffer framebuffer, accum;
Array<std::array<Vector2, 4>> _quads;
Array<std::array<UnsignedShort, 6>> _indexes;
size_t _count = 0;
- //light_u _light_uniform;
- //light_s _light;
GL::Buffer _vertex_buf{NoCreate}, _index_buf{NoCreate};
GL::Mesh _mesh{NoCreate};
};