Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// CODE
- STRUCT someStruct
- {
- float3 a;
- float b;
- }; // <-- optional
- BUFFER 0; // set current constant buffer
- MACRO light N, L = dot(N,L) * someVal * someColor;
- FUNC light
- IN float3 N, float3 L, // the comma should be optional
- OUT float factor
- {
- factor = dot( N, L );
- // return factor = dot( N, L ); // -- also accepted
- }
- /// OUTPUT
- [USL] Universal Shading Language compiler v0.1
- STRUCT ident(someStruct) { ident(float3) ident(a) ; ident(float) ident(b)
- ; } ; BUFFER number(0) ; MACRO ident(light) ident(N) , ident(L)
- = ident(dot) ( ident(N) , ident(L) ) * ident(someVal) * ident(so
- meColor) ; FUNC ident(light) IN ident(float3) ident(N) , ident(float3) ident(L)
- , OUT ident(float) ident(factor) { ident(factor) = ident(dot) ( ident(N)
- , ident(L) ) ; }
- <memory>(3:1): error USL1006: unexpected token
- <memory>(4:2): error USL1006: unexpected token
- <memory>(4:9): error USL1006: unexpected token
- <memory>(4:10): error USL1006: unexpected token
- <memory>(5:2): error USL1006: unexpected token
- <memory>(5:8): error USL1006: unexpected token
- <memory>(5:9): error USL1006: unexpected token
- <memory>(6:1): error USL1006: unexpected token
- <memory>(6:2): error USL1006: unexpected token
- <memory>(8:9): error USL1006: unexpected token
- <memory>(10:13): error USL1006: unexpected token
- <memory>(10:14): error USL1006: unexpected token
- <memory>(10:16): error USL1006: unexpected token
- <memory>(10:18): error USL1006: unexpected token
- <memory>(10:20): error USL1006: unexpected token
- <memory>(10:23): error USL1006: unexpected token
- <memory>(10:24): error USL1006: unexpected token
- <memory>(10:25): error USL1006: unexpected token
- <memory>(10:26): error USL1006: unexpected token
- <memory>(10:27): error USL1006: unexpected token
- <memory>(10:29): error USL1006: unexpected token
- <memory>(10:31): error USL1006: unexpected token
- <memory>(10:39): error USL1006: unexpected token
- <memory>(10:41): error USL1006: unexpected token
- <memory>(10:50): error USL1006: unexpected token
- <memory>(13:2): error USL1006: unexpected token
- <memory>(13:5): error USL1006: unexpected token
- <memory>(13:12): error USL1006: unexpected token
- <memory>(13:13): error USL1006: unexpected token
- <memory>(13:15): error USL1006: unexpected token
- <memory>(13:22): error USL1006: unexpected token
- <memory>(13:23): error USL1006: unexpected token
- <memory>(14:2): error USL1006: unexpected token
- <memory>(14:6): error USL1006: unexpected token
- <memory>(14:12): error USL1006: unexpected token
- <memory>(15:1): error USL1006: unexpected token
- <memory>(16:2): error USL1006: unexpected token
- <memory>(16:9): error USL1006: unexpected token
- <memory>(16:11): error USL1006: unexpected token
- <memory>(16:14): error USL1006: unexpected token
- <memory>(16:16): error USL1006: unexpected token
- <memory>(16:17): error USL1006: unexpected token
- <memory>(16:19): error USL1006: unexpected token
- <memory>(16:21): error USL1006: unexpected token
- <memory>(16:22): error USL1006: unexpected token
- <memory>(18:1): error USL1006: unexpected token
- - structs -
- <<< someStruct >>>
- - macros -
- - functions -
- <<< light >>>
- > IN
- > OUT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement