I'd like to achieve the following:
Find all files ending with ".hlsl", "fxc" them with an input of ".psh" and ".vsh". Okay, seems a bit confusing, so here is an example:
Code: Select all
fxc /T vs_5_0 /E VxShader /Fo Terrain.vsh Terrain.hlsl
fxc /T ps_5_0 /E PxShader /Fo Terrain.psh Terrain.hlsl
In this case, the target name is "Terrain.hlsl". Unfortunately, this is doing it's job very well - but only for one file at once. Doing this for many files can become very very confusing and is unclear style i think.
So i need to do these 2 steps for EVERY *.hlsl file in the current directory.
How would i do this? Can this be done with batch or should I use something else?