MCRcortex / MCRcortex/voxy

Compatiblity with fog settings mods like SimpleFogControl

Open
#440 0 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.2k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Hello,

Description:
I would like to have more control over the Fog (especially in the Overworld) with the Mod SimpleFogControl (https://github.com/Draradech/SimpleFogControl). My personal desired behaviour is starting at 32 chunks distance the Fog starts, and it slowly increases until the world is nearly not visible at the border of the voxy render distance (I experimented with 128 and 512 Chunks). This is in the current state of voxy not possible.

Cause of current behaviour:
Currently, there is an endDistance defined in /voxy/src/main/java/me/cortex/voxy/client/core/NormalRenderPipeline.java /voxy/src/main/java/me/cortex/voxy/client/core/NormalRenderPipeline.java lines: 118-119.

float endDistance = Math.max(Minecraft.getInstance().gameRenderer.getRenderDistance(), 20*16);//TODO: make this constant a config option
endDistance *= (float)Math.sqrt(3);

This variable is dependent on the vanilla render distance and defines at which distance the fog effect can't get any stronger. At any vanilla render distance up to 20 it will be at roughly 34 chunks distance at the maximum vanilla render distance of 32 chunks this endDistance can be at roughly 55 chunks. Which is by far not enough for my desired look of the game.

Possible solutions:
Best possible solution would be a system that detects the presence of fog settings mods and reacts on it with changes that make the use and feel of such mods easier. I understand that this would be out of the scope of the development of voxy as it is currently.

A much more simple solution is to change make the constant part of line 118 that is quoted above to a configurable option. This is already suggested by a comment within the existing code. And I believe it wouldn't be too much work to do. How the performance impact of larger values in this variable is I can't really estimate, but if the impact is big just give a warning.

I hope there can be a simple patch that makes voxy even better together with SimpleFogControl.

Sincerely

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in voxy/src/main/java/me/cortex/voxy/client/core/NormalRenderPipeline.java at the endDistance calculation on lines 118-119, including the existing TODO about making the constant configurable. Trace how that value controls fog in the render pipeline, then make the setting configurable and verify that larger values work with SimpleFogControl without an unacceptable performance impact.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.