fix shader ressource loading#3132
Conversation
|
for more context, this is the message of Su5eD https://ptb.discord.com/channels/1141048834177388746/1141069780225380523/1177749063609892924 it's was for embeddium in 1.20.1 |
|
I don't have access to the mentioned Discord channel, can you please explain why this is necessary? |
@@ -25,7 +25,7 @@
public static String getShaderSource(Identifier name) {
String path = String.format("/assets/%s/shaders/%s", name.getNamespace(), name.getPath());
- try (InputStream in = ShaderLoader.class.getResourceAsStream(path)) {
+ try (InputStream in = ShaderLoader.class.getClassLoader().getResourceAsStream(path)) {
if (in == null) {
throw new RuntimeException("Shader not found: " + path);
}the original message, I hope it help |
|
There's already a compatible nvidium beta. Why is this necessary? |
|
because it crash because of |
|
Would be interested into getting that merged to have cross compilation inside nvidium. On neoforge ressources are isolated per mods, this would allow to load shader with directives such as |
|
I've gone ahead and merged this, reluctantly. We really don't support mods swapping out our shader sources since it is extremely fragile, and the code was originally written to prevent this (assuming classloader isolation ever existed, which it didn't.) |
|
When will these changes be published? |
|
This was merged into 1.21.1/stable but never made it into a release because by that point we were past 1.21.1. Is this change still relevant on current versions of Minecraft (1.21.11) and sodium (0.8)? |
this modification fix error with nvidium when loaded through connector