Skip to content

Conversation

@Papierkorb2292
Copy link

I didn't notice the 1.21.3 branch until I was done updating, I'm not sure whether I'm missing any new features from there, but from my testing the approach taken in this pull request to integrate ShaderReload with the new rendering system appears to work well too.

@EGOIST1372
Copy link

any plan on updating it to 1.21.6-8 (all 3 versions from 1.21.6 to 1.21.8 are compatible with each other)
Thanks in advance <3

@Papierkorb2292
Copy link
Author

@EGOIST1372 After I made this pull request, I actually implemented very similar (I would say even better) functionality into one of my own projects, which I continue to develop and maintain, so if I may, I'll advertise how you can use that one for shader development instead:
This project can also be found on Github here and it consists of a Fabric mod and a VSCode extension. The mod includes similar error handling to what I did in this pull request and whilst it doesn't actually show shader errors in chat like ShaderReload, it instead shows you the Minecraft log in VSCode including any errors in shaders. And whilst it also doesn't provide a shortcut in Minecraft to reload shaders, it instead adds the VSCode command Reload shaders, which can also be configured to use a shortcut. Lastly, we have what I think is probably the most useful feature: It lets you enable a file watcher that automatically reloads shaders whenever you save the file. This is done by going to VSCode's settings and changing "autoreload.resourcepack" to enable and then reconnecting to Minecraft.
When Spyglass is installed, the extension might interfere with syntax highlighting, but this can be fixed by turning off semantic tokens for my extension (also in the settings by changing analyzer.semanticTokens to disable)

Btw. I uh quickly went to test this feature before posting this message and it seems like something actually broke it in 1.21.9, so I'll be releasing a bugfix for that but in 1.21.8 it seems to work fine

@EGOIST1372
Copy link

@Papierkorb2292 Hi
sorry for late response I was out of city
very interesting mod you created, I liked so far what I've read
But does your mod also has these features?
Reloads much faster than F3+T, especially with large resourcepacks.
Won't remove resourcepacks if an exception is found while loading.
Thanks <3

@Papierkorb2292
Copy link
Author

@EGOIST1372
Yes, there are a total of three VSCode commands related to reloading: Reload Datapacks, Reload Resourcepacks and Reload Shaders. The first one works like /reload, the second one like the vanilla F3 + T and the third one works like F3 + R from ShaderReload reloading shaders pretty much instantaneously. I also made sure that if "autoreload.resourcepack" is turned on and you save a shader file, it will only reload the shaders real quick, whereas if any other resourcepack file is saved a normal resource reload is triggered.
I implemented this a while ago, but if I remember correctly I had already written the required error handling in this pull request to make sure resourcepacks stay enabled, making it fairly easy to add the same functionality to my own mod. So it also shouldn't remove resourcepacks when an exception occurs, it will just use the vanilla shader for that one file instead until the problem is fixed.

Also, I realized I might not have explained the config options enough in my first response: To enable/disable options like "autoreload.resourcepack", you have to search in the settings for Command Crafter: Feature Config, which should be an empty table by default (in the future I'll have some default values in there but I forgot that that isn't released yet). So then you have to manually add an entry to the table, give it the correct name and select enable or disable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants