Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with the Vanilla Tweaks texture pack. #1813

Closed
Blergonos opened this issue Jun 15, 2023 · 5 comments
Closed

Issue with the Vanilla Tweaks texture pack. #1813

Blergonos opened this issue Jun 15, 2023 · 5 comments
Labels
S-needs-triage Status: Needs triage T-bug Type: Bug

Comments

@Blergonos
Copy link

Blergonos commented Jun 15, 2023

Version information

mc1.20-0.4.10+build.27, mc-1.20.1, fabric loader-0.14.21-1.20.1

Expected Behavior

When opening the settings menu, I expect the sliders and the on-off buttons to be visible, like they always were (this is the first time I seen this issue, even with the same texture pack from vanilla tweaks). The photo is what I expect to see. Note that this photo was made when the texture pack was off.
Sodium gltich

Actual Behavior

The sliders and on-off buttons aren't visible, making it difficult to use. This photo is what happens. Note that this photo was made with the texture pack on. Before 1.20 this never happened. The second image is the mods I have installed. Note that I tried without Sodium Extra, BSVSB, and Reeses Sodium Options and this didn't fix the issues.
sodium glitch 2
sodium glitch 3

Reproduction Steps

VanillaTweaks_r654081.zip
This is the texture pack configuration I'm using.
sodium glitch 3
And the mods I use. To recreate just install the texture pack, go into video settings, and there's the problem.

Java version

Java 8 Update 371

CPU

Intel Core i7 8565U 1.80Ghz 1.99Ghz

GPU

Nvidia MX130

Additional information

I already gave everything above that is needed, I will edit it if you need me to.

@Blergonos Blergonos added S-needs-triage Status: Needs triage T-bug Type: Bug labels Jun 15, 2023
@Julienraptor01
Copy link

The reason is because this pack has core shaders, remake your pack on the website whitout the features that use core shaders

@Blergonos
Copy link
Author

The reason is because this pack has core shaders, remake your pack on the website whitout the features that use core shaders

Ok then. Thanks.

jellysquid3 added a commit that referenced this issue Jun 24, 2023
The NVIDIA drivers now check the command line arguments
for the presence of a sub-string containing ".main", and
forcefully enables their "Threaded Optimizations" hack which
destroys performance and causes crashes with Sodium.

Unfortunately, NVIDIA has implemented this in the most
insane way possible. Rather than using application-specific
profiles, they have instead hardcoded the detection
logic into their driver, and have done so in a manner
that makes it impossible to use NVAPI to override it.

So, in summary, this workaround does two things:

a) We invoke GetCommandLineW and directly modify the pointer
of string data it gives us, in order to strip the command line
arguments of anything identifying.

b) We invoke SetEnvironmentVariableW to set SHIM_MCCOMPAT=0x800000001,
which hints to the NVIDIA driver that it should use the
high-performance GPU. This is required, because as mentioned,
we are breaking the driver's ability to detect Minecraft, which
means it won't try to run it on the high-performance GPU any longer.

Both of these modifications are applied just before context
creation, and any changes are restored right after it. This ensures
other applications which are trying to detect Minecraft are not
affected.

It is worth noting that this problem *only* affected the Vanilla
launcher, since the Fabric Installer chose to include a reference
to the Minecraft entry point on purpose so that the NVIDIA drivers
could continue detecting it. As far as we know, Prism Launcher does
not do this, hence it is not affected by the issue.

As a side effect of this work, we have also improved the
graphics adapter detection code to use OSHI. This is much simpler,
and allows us to enumerate all graphics adapters more reliably. It
also doesn't require a sub-process to be launched, which should
hopefully reduce startup times and some jank.

We have also implemented some minor optimizations which avoid
the calls into glGetInteger/glGetUniformLocation, as we noticed
these were particularly hot in profiling on NVIDIA GPUs.

See #1813 for more information.
@jellysquid3
Copy link
Member

The mentioned commit incorrectly references this issue, when it should have referenced #1816.

@Edenmessi107
Copy link

The reason is because this pack has core shaders, remake your pack on the website whitout the features that use core shaders

what are the features that use core shaders I don't know

@MeeniMc
Copy link
Contributor

MeeniMc commented Jun 30, 2024

Please join the discord if you want guidance on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-needs-triage Status: Needs triage T-bug Type: Bug
Development

No branches or pull requests

5 participants