diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-24 22:20:06 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-24 22:20:06 +0200 |
commit | ab7885a7c4063d418cbd874a9fc7d906a7c7f3c3 (patch) | |
tree | ab2aba54acbd28ecf067006a6a33947f4bbb2032 /shaders | |
parent | 040c3ebbfb590dfc6ee30b699de92914c198c554 (diff) |
aaaaaa
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/lightmap.cpp | 4 | ||||
-rw-r--r-- | shaders/lightmap.hpp | 2 | ||||
-rw-r--r-- | shaders/lightmap.vert | 7 |
3 files changed, 4 insertions, 9 deletions
diff --git a/shaders/lightmap.cpp b/shaders/lightmap.cpp index b096ef3f..353febe3 100644 --- a/shaders/lightmap.cpp +++ b/shaders/lightmap.cpp @@ -25,8 +25,8 @@ namespace floormat { namespace { -constexpr float fuzz_pixels = 32; -constexpr float shadow_wall_depth = 4; +constexpr float fuzz_pixels = 16; +constexpr float shadow_wall_depth = 8; constexpr float real_image_size = 1024; constexpr auto neighbor_count = lightmap_shader::neighbor_count; diff --git a/shaders/lightmap.hpp b/shaders/lightmap.hpp index 5fee2381..0479a9b3 100644 --- a/shaders/lightmap.hpp +++ b/shaders/lightmap.hpp @@ -50,7 +50,7 @@ struct lightmap_shader final : GL::AbstractShaderProgram GL::Texture2D& accum_texture(); // todo allow 16 neighbors on new gpu's - static constexpr auto neighbor_count = 8; + static constexpr auto neighbor_count = 4; static constexpr auto half_neighbors = Vector2(neighbor_count)/2; using Position = GL::Attribute<0, Vector3>; diff --git a/shaders/lightmap.vert b/shaders/lightmap.vert index 24f07736..7aba6feb 100644 --- a/shaders/lightmap.vert +++ b/shaders/lightmap.vert @@ -19,12 +19,7 @@ void main() { if (mode == 0) { vec2 dir = pos - center_clip; - float len = length(dir); - if (len > 1e-6) - { - vec2 dir_norm = dir * (1/len); - pos += dir_norm * position.z * 4; - } + pos += dir * position.z * 1e4; } gl_Position = vec4(pos, 0, 1); } |