Add an option to make view distance automatically sync to Voxy view distance
Syncs cloud generation distance to voxy view distance if coxy is installed, enabled, the config is enabled and the voxy view distance is greater than 0.
Pretty much requires nvidium to work well
NeoForge support seems to be fully working now. You can fix the conflicts now. I think I'll also have to request a few changes but for today I'm exhausted.
Would it better to change the "distance" option to actually select the render distance (in chunks) instead of it being a multiplier? A multiplier doesn't make much sense when extended distances come into play. I think coupling the cloud distance directly to the voxy view distance isn't always desired. Here is what I'm thinking:
- Make the cloud render distance it's own value, measured in chunks. No longer as a multiplier.
- Limit the distance to 128 (4 * 32) chunks for vanilla, which is currently the max.
- If a mod that allows for further distances (e.g. nvidium) is installed the maximum value is adjusted accordingly.
I've already considered some of those, that's why I added a config option to disable the feature. It also ignores the multiplier. I feel like making it so there's a separate render distance would be a lot better for long distances, plus it makes it more configurable.
The only problem could be the slider being sensitive if the max distance is too high, so if there's some way to implement an exponential slider with a direct integer input as well it could make inputting the desired value easier.
With a slider from 16 to 256 in increments of 4 I didn't have any issues selecting the value, so that should be fine.
However in a world with 32 chunks rd and 256 chunks cloud rd the cloud rendering takes as long as terrain drawing. That's with sodium and nvidium. (Note: the chart measures cpu time)
One issue is the frustum culling. Clouds are grouped into chunks which are checked against the view frustum. But the group size only makes sense at closer distances. Further away a larger region of clouds should be grouped together.
That makes sense, I'll wait for you to tinker with it to update this PR then, once you're ready or if you have any similar updates/questions let me know
Latest Voxy indev version has removed the view distance option