mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
sky-lights fix, graphics.skybox-resolution
This commit is contained in:
parent
2f9244c17c
commit
4de2d77150
5 changed files with 10 additions and 4 deletions
|
|
@ -31,6 +31,7 @@ toml::Wrapper create_wrapper(EngineSettings& settings) {
|
|||
graphics.add("fog-curve", &settings.graphics.fogCurve);
|
||||
graphics.add("backlight", &settings.graphics.backlight);
|
||||
graphics.add("frustum-culling", &settings.graphics.frustumCulling);
|
||||
graphics.add("skybox-resolution", &settings.graphics.skyboxResolution);
|
||||
|
||||
toml::Section& debug = wrapper.add("debug");
|
||||
debug.add("generator-test-mode", &settings.debug.generatorTestMode);
|
||||
|
|
|
|||
|
|
@ -45,13 +45,15 @@ WorldRenderer::WorldRenderer(Engine* engine,
|
|||
lineBatch(new LineBatch()),
|
||||
renderer( new ChunksRenderer(level, cache, engine->getSettings())) {
|
||||
|
||||
auto& settings = engine->getSettings();
|
||||
level->events->listen(EVT_CHUNK_HIDDEN,
|
||||
[this](lvl_event_type type, Chunk* chunk) {
|
||||
renderer->unload(chunk);
|
||||
}
|
||||
);
|
||||
auto assets = engine->getAssets();
|
||||
skybox = new Skybox(64, assets->getShader("skybox_gen"));
|
||||
skybox = new Skybox(settings.graphics.skyboxResolution,
|
||||
assets->getShader("skybox_gen"));
|
||||
}
|
||||
|
||||
WorldRenderer::~WorldRenderer() {
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ struct GraphicsSettings {
|
|||
bool backlight = true;
|
||||
/* Enable chunks frustum culling */
|
||||
bool frustumCulling = true;
|
||||
int skyboxResolution = 64 + 32;
|
||||
};
|
||||
|
||||
struct DebugSettings {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue