simontaylor81 / Syrup

Shader Rapid Prototyping
MIT License
0 stars 0 forks source link

Use sampler state declared in HLSL #20

Open simontaylor81 opened 8 years ago

simontaylor81 commented 8 years ago

It's way nicer to declare sampler state in HLSL rather than in script. Unfortunately this is basically a feature of the Effects framework not HLSL proper, so it doesn't get passed through by the compiler. So it needs a custom HLSL parser.

HlslTools contains a good hlsl parser written in C# which is really easy to use, so this shouldn't be as hard as it sounds. The only slight issue is that it's not on Nuget so needs to be manually extracted from the application.