-
Notifications
You must be signed in to change notification settings - Fork 11
Home
rookboom edited this page Nov 13, 2012
·
67 revisions
A library for writing GPU shader code in F#.
- Targeting multiple platforms
- Code Sharing
- Unit Testing
- Syntactic sugar
- Because it's FUN!
####The Secret Sauce: Code Quotations ####Examples
####Future Work
- Runtime code compilation
- It should be possible to edit an F# shader and immediately see the result at runtime (if the changed shader compiles of course)
- Geometry, Hull, Domain, Compute Shaders
- Dynamic Shader Linking
- The Dynamic attribute on shader functions should indicate that this function can be swapped at runtime
[<Dynamic>]
let marble = ...
[<Dynamic>]
let lumpy = ...
[<Dynamic>]
let crinkled = ...
let mutable surface = marble
[<PixelShader>]
member m.pixel(input:PSInput) =
surface input
At runtime the surface shader can be swapped:
ps.surface <- ps.crinkled