Merge pull request #555 from MihailRis/fixes

Small fixes
This commit is contained in:
MihailRis 2025-07-18 23:31:16 +03:00 committed by GitHub
commit 1cff6bfbbb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View File

@ -51,7 +51,9 @@ void main() {
mat4 viewmodel = u_view * u_model; mat4 viewmodel = u_view * u_model;
a_distance = length(viewmodel * vec4(pos3d, 0.0)); a_distance = length(viewmodel * vec4(pos3d, 0.0));
#ifndef ADVANCED_RENDER
a_fog = calc_fog(length(viewmodel * vec4(pos3d * FOG_POS_SCALE, 0.0)) / 256.0); a_fog = calc_fog(length(viewmodel * vec4(pos3d * FOG_POS_SCALE, 0.0)) / 256.0);
#endif
a_emission = v_normal.w; a_emission = v_normal.w;
vec4 viewmodelpos = u_view * a_modelpos; vec4 viewmodelpos = u_view * a_modelpos;

View File

@ -164,14 +164,14 @@ void WorldRenderer::setupWorldShader(
auto inventory = player.getInventory(); auto inventory = player.getInventory();
ItemStack& stack = inventory->getSlot(player.getChosenSlot()); ItemStack& stack = inventory->getSlot(player.getChosenSlot());
auto& item = indices->items.require(stack.getItemId()); auto& item = indices->items.require(stack.getItemId());
float multiplier = 0.5f; float multiplier = 0.75f;
shader.uniform3f( shader.uniform3f(
"u_torchlightColor", "u_torchlightColor",
item.emission[0] / 15.0f * multiplier, item.emission[0] / 15.0f * multiplier,
item.emission[1] / 15.0f * multiplier, item.emission[1] / 15.0f * multiplier,
item.emission[2] / 15.0f * multiplier item.emission[2] / 15.0f * multiplier
); );
shader.uniform1f("u_torchlightDistance", 6.0f); shader.uniform1f("u_torchlightDistance", 8.0f);
} }
} }

View File

@ -220,6 +220,7 @@ void EnginePaths::cleanup() {
io::remove_device(entryPoint); io::remove_device(entryPoint);
} }
entryPoints.clear(); entryPoints.clear();
writeables.clear();
} }
void EnginePaths::setEntryPoints(std::vector<PathsRoot> entryPoints) { void EnginePaths::setEntryPoints(std::vector<PathsRoot> entryPoints) {