diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-23 03:51:59 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-23 03:51:59 +0200 |
| commit | 8e4781b3103f68965b2aba4e914f7c3281ccbc59 (patch) | |
| tree | fe140971aa60c4a7d018c3c3f5cd7a9e9dbebf24 /shaders/lightmap.cpp | |
| parent | e659a6f6edc857fa424b1aafe319f1a9be74a840 (diff) | |
ok so shadows aren't very slow anymore
Diffstat (limited to 'shaders/lightmap.cpp')
| -rw-r--r-- | shaders/lightmap.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/shaders/lightmap.cpp b/shaders/lightmap.cpp index 186be81a..2f61e846 100644 --- a/shaders/lightmap.cpp +++ b/shaders/lightmap.cpp @@ -23,6 +23,7 @@ namespace floormat { namespace { +// todo add back drawing an 8x8 grid constexpr auto chunk_size = TILE_SIZE2 * TILE_MAX_DIM; constexpr auto chunk_offset = TILE_SIZE2/2; constexpr auto image_size = iTILE_SIZE2 * TILE_MAX_DIM; @@ -265,13 +266,15 @@ void lightmap_shader::add_light(const light_s& light) setUniform(ModeUniform, DrawLightmapMode); AbstractShaderProgram::draw(blend_mesh); -#if 0 +#if 1 + setUniform(ModeUniform, DrawShadowsMode); setUniform(LightColorUniform, Color3{0, 0, 0}); + setUniform(IntensityUniform, 1 ); fm_assert(occlusion_mesh.id()); auto mesh_view = GL::MeshView{occlusion_mesh}; mesh_view.setCount((int32_t)count*6); - AbstractShaderProgram::draw(mesh_view); mesh_view.setIndexRange(0, 0, uint32_t(count*6 - 1)); + AbstractShaderProgram::draw(mesh_view); #endif #if 0 |
