NS2CDT / NS2Plus

NS2+ mod for Natural Selection 2
5 stars 7 forks source link

Generate custom AV based on user's av settings on load #22

Open GhoulofGSG9 opened 5 years ago

GhoulofGSG9 commented 5 years ago

Right now crazyAV uses one hlsl file for all available options which requires not only to push all the user's av settings to the shader on run time but also the usage of a lot optional branching. That causes the AV to perform a lot worse than it should.

A more elegant solution would be to generate a hlsl on load based on the user's av settings. So the client doesn't have to run any unnecessary shader code and the shader compiler is able to optimize the byte code as much as possible.