Skip to content
100644 65 lines (48 sloc) 2.39 KB
02c2776 First public SL# commit; SL# is now an open source project available …
XTZGZoReX authored Mar 30, 2011
1 SL#: Runtime IL -> GLSL Translator
2 ==================================
4 Introduction
5 ------------
7 SL# is a runtime IL-to-GLSL translation engine, written in pure C#. It takes
8 the compiled IL of a shader definition written in a managed language (usually
9 C#), and generates GLSL code from it. The GLSL is automatically uploaded to
10 the GPU, and you can use the shader object as any other object in .NET. Shaders
11 can have properties that map directly to uniform/varying variables in the GLSL
12 code, allowing you to easily interact with your GPU code from the CPU.
14 Please note that SL# is currently a very experimental library. The syntax and
15 usage may be subject to change at any time, as we further research what design
16 is the most sane for the project.
18 Rationale
19 ---------
21 There are quite a few advantages to this approach:
23 * Developers can use existing development tools (Visual Studio, MonoDevelop,
24 SharpDevelop, etc.) to develop shaders. This means code completion, syntax
25 checking, and so on.
26 * Shaders are validated at compile-time. Any syntactical or semantical errors
27 are caught by the C# compiler, rather than at runtime when interacting with
28 the GPU.
29 * No more storing shaders as huge strings in source code, or storing them as
30 resources. They're compiled directly to IL.
32 Dependencies
33 ------------
35 SL# currently depends on OpenTK and Mono.Reflection, as well as System.Drawing
36 for certain drawing primitives.
38 We plan to abstract shader language generation so that we can support both
39 OpenTK and XNA (that is, GLSL and HLSL) in the future.
41 Issues
42 ------
44 Please report any issues on the GitHub issue tracker.
46 Known problems:
48 * Branching isn't very well-supported at this point. We need to investigate the
49 transforms that the C# compiler performs in order to fully support these.
50 * Geometry shaders are currently not supported.
51 * Support for other .NET languages (such as F#) is currently up in the air. We
52 haven't had time to test SL# with F# yet, but we would definitely like to add
53 support for it in the future (perhaps using quotations).
54 * Matrices are not implemented yet.
56 Donations
57 ---------
59 This project is developed by students, as a part-time project. We're investing a
60 lot of time into this, and so we would greatly appreciate donations that could
61 help us get by economically. Rest assured that your money _will_ make a
62 difference for us.
64 Donations can be sent via PayPal to: xtzgzorex at gmail dot com
Something went wrong with that request. Please try again.