mpc-hc/mpc-hc — pull request #140 by on-situ (2014-08-29 12:55:24+00:00)
Title: Handling #include directives in shaders

Hi,
I'd like to add new features in order to strengthen the support of shaders in MPC-HC.
This pull request concerns what I believe is the very first step for that: handling #include directives in shaders.
Supporting includes will help users create more complex shaders and organize them.
Currently, included files are simply ignored during compilation.

I have made the following changes:
- includes directives are now taken into account,
- includes can refer to local files (ie. relative to the shader file) or system files (ie. relative to a directory defined in the mpc-hc options in which user can store includes common to different shaders),
- changes in included files are tracked, and cause the reloading of the shader,
- missing #include files cause warning in the shaders debug window,
- #include directives work for the Custom EVR Presenter and SyncRenderer (not MadVR).

I added an edit box and a directory browser button to allow users to easily change the system-wide include directory.

Please decide whether the project would benefit from this change. This is only the first step, as I am planning to add the possibility to pass external data to the shader (like textures or matrices).

Regards.