Table of Contents
1. Summary
swShader is a DirectX 9 shader emulator using soft-wiring technology and MMX/SSE assembly optimizations.
2. Newest Version
This is an alpha version. Please check http://sourceforge.net/projects/sw-shader for newer versions. You can also look in the CVS repository for the last version tagged as stable or release.
3. Demo
An executable is provided in the package, but it is highly recommended to try to build the newest version yourself. For compilation information look below. Execute the application at your own risk (or more disclaimer information please refer to License.txt).
The demo requires Windows 98/XP and a Pentium III compatible processor. Athlon Thunderbird processors do not support the SSE instructions which are crucial for swShader, and no 3DNow! version is available yet nor planned. DirectX 7 is required and your graphics card should be DirectDraw 7 compatible. No 3D hardware acceleration required!
4. Compilation
The library was developed with Visual C++ .NET 2002 and has project and workspace files for this compiler included. Should you have any problems compiling the code with this compiler, please mail me at nicolas@capens.net. Project files for other compilers might be included but I can't give you much support for them. For Visual C++ 6.0 the Processor Pack is required for compiling the inline SSE code.
5. Interface Documentation
Because I strive for compatibility with DirectX shaders, the interface also shows lots of similarities. With a good knowledge of DirectX and 3D graphics theory, the use of swShader should be mostly self-explanatory. The whole interface is exposed via the Renderer class in Renderer/Renderer.hpp.
More documentation will be added at an appropriate time. Please report problems so I know what needs attention.
6. Design & Technology
Interpreters for shaders are horribly slow because of the thousands of control statements and the redundant memory accesses. It is also often not optimized with SIMD instructions which can boost performance by a factor of about four. swShader solves these problems by compiling shader instruction to optimized x86 instructions. The control statements can be eliminated by compiling the shader for a specific render state, and storing it in a cache.
swShader is powered by a run-time assembler called SoftWire, also written by Nicolas Capens. For the latest version of SoftWire please check http://sourceforge.net/projects/softwire. It features run-time intrinsics, which allows to conveniently convert any shader instruction as an x86 assembly block. It is possible to do register allocation and peephole optimizations without multiple passes. In the future, automatic sheduling could be added.
More documentation will be added at an appropriate time. Please report problems so I know what needs attention.
7. License Conditions
All swShader header and source files fall under the LGPL (License.txt) and are Copyright 2002-2003 Nicolas Capens.
The license allows you to keep the source code to your project closed, provided that you do not modify any of swShader's files. This does not apply to deriving from swShader's classes in your own files. When making changes to swShader's files, you have to make them public. Remember to always give the right credit where due. This can be done by mentioning my name in your credits list and providing a link to the original swShader source code (e.g. http://sw-shader.sourceforge.net).
For commercial use of swShader a fair reward would be highly appreciated!
Don't hesitate to contact me and show what you've created with swShader!
8. Bugs & Feature Requests
swShader is a work-in-progress, so every kind of feedback is welcome, good or bad. I'm also always willing to help you out if you don't get something working. Contact me via e-mail at nicolas@capens.net or report problems on the sourceforge project page.
9. Credits &Acknowledgements
Special thanks to:
If you believe this list is incomplete or incorrect, please contact me and I'll rectify it immediately!