summaryrefslogtreecommitdiffhomepage
path: root/shaders
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-12-23 14:42:15 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-12-26 04:39:12 +0100
commit3370445a2e22ee00687ecef2e9dc88f47bb2b4c6 (patch)
treea99ec32a02fc91d729205fc26d7183b6b4214b28 /shaders
parentc141a9efcfaecadffe771bd0c37bea0e46a3f9aa (diff)
a
Diffstat (limited to 'shaders')
-rw-r--r--shaders/lightmap.cpp4
-rw-r--r--shaders/shader.hpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/shaders/lightmap.cpp b/shaders/lightmap.cpp
index fcb32619..f925cc98 100644
--- a/shaders/lightmap.cpp
+++ b/shaders/lightmap.cpp
@@ -135,7 +135,7 @@ void lightmap_shader::end_occlusion()
}
}
-std::array<Vector3, 4>& lightmap_shader::alloc_rect()
+quad& lightmap_shader::alloc_rect()
{
if (count == capacity)
{
@@ -192,7 +192,7 @@ lightmap_shader::lightmap_shader(texture_unit_cache& tuc) : tuc{tuc}
framebuffer = make_framebuffer(Vector2i((int)real_image_size));
- auto blend_vertexes = std::array<Vector3, 4>{{
+ auto blend_vertexes = quad {{
{ 1, -1, 0 }, /* 3--1 1 */
{ 1, 1, 0 }, /* | / /| */
{ -1, -1, 0 }, /* |/ / | */
diff --git a/shaders/shader.hpp b/shaders/shader.hpp
index dc87a2cc..5b46fcb2 100644
--- a/shaders/shader.hpp
+++ b/shaders/shader.hpp
@@ -44,7 +44,7 @@ struct tile_shader final : private GL::AbstractShaderProgram
static constexpr float scenery_depth_offset = 1 + 2./64;
static constexpr float ground_depth_offset = 0;
static constexpr float wall_depth_offset = 1;
- static constexpr float wall_overlay_depth_offset = 1 + 1./64;
+ static constexpr float wall_overlay_depth_offset = 1 + 1./64; // todo add this
static constexpr float wall_side_offset = 1 - 4./64;
static constexpr float z_depth_offset = 1 + 4./64;
static constexpr float depth_tile_size = 1.f/(TILE_MAX_DIM * 2 * max_screen_tiles.product());