CaffeineMC / sodium

A Minecraft mod designed to improve frame rates and reduce micro-stutter
Other
4.77k stars 811 forks source link

Hide the TS option to only be visible in dev environments #2660

Closed douira closed 2 months ago

douira commented 2 months ago
NebelNidas commented 2 months ago

Why shouldn't users with weak machines be able to turn this off if they don't necessarily care about translucent objects looking correct? Is the impact of translucency sorting really that low?

jellysquid3 commented 2 months ago

On the GPU, there is no additional overhead (the same stuff just gets rendered in a different order.)

On the CPU, there is some overhead... But the way Douira's approach works allows for translucent objects to only be re-sorted when strictly necessary, meaning that very little (or possibly none) of the geometry needs to be sorted when you move around. And, even then, you may have to move around a lot before you reach that threshold.

Point being, we're talking about less than a percent of the frame time in any reasonable situation, and only periodically at that. We've not had reports from players suggesting it causes a performance regression, or that it is worth disabling in any situation.

jellysquid3 commented 2 months ago

Screencast_20240214_001830_trimmed.webm

Even with a completely unreasonable and contrived example (an entire world made of honey blocks, over 10 GB of geometry) there is minimal performance impact from sorting the geometry, and each frame still manages to look perfectly correct.

NebelNidas commented 2 months ago

Oh wow, that's truly impressive indeed. I was asking since I have some family members with very slow laptops, where every option to turn off unnecessary eye-candy helps. But if we're talking about less than 1% frame times, it should be fine I guess. Thanks for the detailed anwser!