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

Compile Shaders #3326

Open
Destructor-Ben opened this issue Mar 19, 2023 · 1 comment · May be fixed by #3929
Open

Compile Shaders #3326

Destructor-Ben opened this issue Mar 19, 2023 · 1 comment · May be fixed by #3929
Labels
Benefit - High Complexity - High Requestor-Modders Issues or PRs adding or fixing TML modder API Type: Change/Feature Request Is a request for changes to code base in order to provide improved capabilities

Comments

@Destructor-Ben
Copy link
Contributor

Destructor-Ben commented Mar 19, 2023

Do you intend to personally contribute/program this feature?

Yes

I would like to see this change made to improve my experience with

Mod capability as a Modder

Description

The ability to compile shaders when a mod is built. After looking at EasyXNB (https://github.com/SuperAndyHero/EasyXnb), I think it can be done in a similar way to it does it without actually creating .xnb files and instead compiling to .fxc (because packaging into an xnb saves to a file I think), and then calling Effects constructor that can takes in compiled code when a mod is loaded.
Another feature that could be useful is a file watcher that automatically recompiles shader files when they are modified.

What does this proposal attempt to solve or improve?

Currently compiling shaders is annoying because you have to use a standalone executable to compile them and remember to compile them every time you change them. It would be nice to have tML automatically compile shaders when a mod is built. It is also annoying how you have to rebuild the mod every time a shader is modified.

Which (other) solutions should be considered?

No response

@Destructor-Ben Destructor-Ben added NEW ISSUE Flags an Issue as new. To be removed once issue is assessed. Type: Change/Feature Request Is a request for changes to code base in order to provide improved capabilities labels Mar 19, 2023
@github-actions github-actions bot added the Requestor-Modders Issues or PRs adding or fixing TML modder API label Mar 19, 2023
@Chicken-Bones Chicken-Bones added Benefit - High Complexity - High and removed NEW ISSUE Flags an Issue as new. To be removed once issue is assessed. labels Mar 28, 2023
@Chicken-Bones
Copy link
Member

Chicken-Bones commented Mar 28, 2023

Look at how we convert png files to .rawimg in ModCompile. Code is in ContentConverters.Convert.

Things to keep in mind:

  • Error messages
  • Building mods on Mac/Linux (it is okay, but not ideal if shaders can only be compiled on windows)

@Destructor-Ben Destructor-Ben linked a pull request Nov 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Benefit - High Complexity - High Requestor-Modders Issues or PRs adding or fixing TML modder API Type: Change/Feature Request Is a request for changes to code base in order to provide improved capabilities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants