Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Porting Notes
<tMLCompileEffects>
property<tMLEffectsVersion>
property, if you need more instructionsWhat is the new feature?
Adding effect compiling to tML.
.fx
and.hlsl
files are automatically compiled using fxc to an.fxc
filefx_2_0
- Defaultfx_4_0
fx_4_1
fx_5_0
Also cleaned up the old
.fx
files in EM and fixed an alpha issue with the ExampleDye.Closes #3326
Why should this be part of tModLoader?
At the moment third party compilers or a custom build task are required to get effects compiling, which can be confusing for users (though shaders are confusing sometimes anyway, especially premultiplication)
Are there alternative designs?
Yes, discussed a bit on the Discord in #collaborators, but involves using other compilers such as EasyXNB or dxc. There is also the possibility of doing the compiling in a C# build task or doing it in the ModCompile class.
Sample usage for the new feature
See ExampleMod and compile it, then run it.
ExampleMod updates
Deleted old xnb files.
Possible TODOs