add 'graphics.dense-render' setting

This commit is contained in:
MihailRis
2024-12-21 08:13:05 +03:00
parent 954724c837
commit dc8f5e7873
12 changed files with 111 additions and 47 deletions
-3
View File
@@ -8,9 +8,6 @@
#include "voxels/Chunks.hpp"
#include "lighting/Lightmap.hpp"
#include "frontend/ContentGfxCache.hpp"
#include "settings.hpp"
#include <glm/glm.hpp>
const glm::vec3 BlocksRenderer::SUN_VECTOR (0.411934f, 0.863868f, -0.279161f);
+5 -3
View File
@@ -13,6 +13,7 @@
#include "graphics/core/MeshData.hpp"
#include "maths/util.hpp"
#include "commons.hpp"
#include "settings.hpp"
class Content;
class Mesh;
@@ -22,7 +23,6 @@ class Chunks;
class VoxelsVolume;
class Chunks;
class ContentGfxCache;
struct EngineSettings;
struct UVRegion;
class BlocksRenderer {
@@ -129,8 +129,10 @@ class BlocksRenderer {
if (((block.drawGroup != def.drawGroup) && block.drawGroup) || !block.rt.solid) {
return true;
}
if (def.culling == CullingMode::DISABLED ||
(def.culling == CullingMode::OPTIONAL && id == def.rt.id)) {
if ((def.culling == CullingMode::DISABLED ||
(def.culling == CullingMode::OPTIONAL &&
settings.graphics.denseRender.get())) &&
id == def.rt.id) {
return true;
}
return !id;