You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add a custom build steps to compile my shader files, but the custom build properties are empty.
I derive from Project.Configuration.CustomFileBuildStep and fill in the properties of the class:
publicclassShaderCompileBuildStep: Project.Configuration.CustomFileBuildStep
{ShaderCompileBuildStep(stringsourceFileName){// fill in KeyInput, Executable, etc.}
I add the extension to the project's supported extensions:
In GenerateShaderCustomBuildSteps(), I add the custom build steps to the project configuration:
privatevoidGenerateShaderCustomBuildSteps(){foreach(var f in ResolvedSourceFiles.Where(f => System.IO.Path.GetExtension(f).ToLower()==".fx")){foreach(Project.Configuration conf in Configurations){
conf.CustomFileBuildSteps.Add(new ShaderCompileBuildStep(f));}}}
In Visual Studio, my .fx files have the proper "Item Type" of "Custom Build Tool", but all of the properties in "Custom Build Tool" are empty.
What am I doing wrong?
The text was updated successfully, but these errors were encountered:
I have tweaked mine to generate a c header file with the compiled shader, but can easily be adapted to other needs, by looking up the fxc commandline compile options.
I'm trying to add a custom build steps to compile my shader files, but the custom build properties are empty.
I derive from
Project.Configuration.CustomFileBuildStep
and fill in the properties of the class:I add the extension to the project's supported extensions:
I then override
Project.ExcludeOutputFiles()
:In
GenerateShaderCustomBuildSteps()
, I add the custom build steps to the project configuration:In Visual Studio, my .fx files have the proper "Item Type" of "Custom Build Tool", but all of the properties in "Custom Build Tool" are empty.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: