diff options
Diffstat (limited to 'shaders/lightmap.hpp')
-rw-r--r-- | shaders/lightmap.hpp | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/shaders/lightmap.hpp b/shaders/lightmap.hpp index a5564a9b..8e9b77e2 100644 --- a/shaders/lightmap.hpp +++ b/shaders/lightmap.hpp @@ -40,10 +40,6 @@ struct lightmap_shader final : GL::AbstractShaderProgram GL::Texture2D scratch{NoCreate}, accum{NoCreate}; }; - struct output final { - GL::Texture2D &scratch, &accum; - }; - #if 0 const blend_light = { equation: {color: gl.FUNC_ADD, alpha: gl.FUNC_ADD}, @@ -71,26 +67,13 @@ const blend_shadow = { void add_rect(Vector2 neighbor_offset, Pair<Vector2, Vector2> minmax); //void finish_light_only(); //void finish_and_blend_light(); - struct output output(); - - //GL::Texture2D& scratch_texture(); - //GL::Texture2D& accum_texture(); - //void begin_accum(); - //void end_accum(); + void add_light(Vector2 neighbor_offset, const light_s& light); void bind(); - static constexpr auto max_chunks = Vector2s(8, 8); + GL::Texture2D& scratch_texture(); + GL::Texture2D& accum_texture(); -#if 0 -layout (location = 0) uniform sampler2D sampler; -layout (location = 1) uniform vec3 light_color; -layout (location = 2) uniform vec2 size; -layout (location = 3) uniform vec2 center_fragcoord; -layout (location = 4) uniform vec2 center_clip; -layout (location = 5) uniform float intensity; -layout (location = 6) uniform uint mode; -layout (location = 7) uniform uint falloff; -#endif + static constexpr auto max_chunks = Vector2s(8, 8); using Position = GL::Attribute<0, Vector2>; @@ -117,17 +100,8 @@ private: BlendLightmapMode = 2, }; -#if 0 - _mesh.setCount(6) - .addVertexBuffer(_vertex_buffer, 0, tile_shader::Position{}, - tile_shader::TextureCoordinates{}, tile_shader::Depth{}) - .setIndexBuffer(_index_buffer, 0, GL::MeshIndexType::UnsignedShort); - CORRADE_INTERNAL_ASSERT(_mesh.isIndexed()); -#endif - static Framebuffer make_framebuffer(Vector2i size); GL::Mesh make_occlusion_mesh(); - void add_light(Vector2 neighbor_offset, const light_s& light); //void flush_vertexes(ShaderMode mode); //void add_quad(const std::array<Vector2, 4>& quad); //void clear_scratch(); |