mono/MonoGame — pull request #430 by tomspilman (2012-04-21 00:56:56+00:00)
Title: MGFX

This pull contains the update to the new MGFX effect file format. MGFX is MonoGame's own FX file format which has the following goals:

- Support a similar technique, passes, shaders format as Microsoft FX files.
- Have a textual format for ease of editing.
- Have a compiled and optimized binary format for runtime use.
- Be cross-platform and support OpenGL, GLES, and DirectX shader formats.

At this time MGFX is only a binary format for OpenGL/GLES. In the coming weeks I will be adding the textual format and DirectX shader support for WinRT.

There is a new Tools folder in this update which contains the '2MGFX' tool for compiling MGFX files. It currently goes right from Microsoft FX files to a compiled MGFX file, but will soon support the textual MGFX format as both an input and output format. The tool currently is Windows only, but we will be fixing it to run on OSX and Linux.

In the MonoGame.Framework\Graphics\Effect\Resources folder you'll find Microsoft's "StockEffects Sample" .FX files along with precompiled .mgfx files and a Windows batch file which converts one into the other.

Note the "ShaderTests" test fails at this moment because they use Microsoft FX files which need to be converted to MGFX. I will work with kungfubanana to get the right files in there soon.

These changes have been tested on Windows, iOS, and OSX. It should work fine on Android and Linux, but we have not tested it personally.