Add lexing, parsing and some semantic checking for constant buffers.
This commit is contained in:
12
test/constant_buffer.shd
Normal file
12
test/constant_buffer.shd
Normal file
@@ -0,0 +1,12 @@
|
||||
Camera_Data :: constant_buffer {
|
||||
projection : float4x4;
|
||||
view : float4x4;
|
||||
}
|
||||
|
||||
vertex main :: (pos : float4 @position) -> float4 @position {
|
||||
return mul(projection, mul(view, pos));
|
||||
}
|
||||
|
||||
pixel main :: () -> float4 @target {
|
||||
return float(0.5, 0.5, 0.5, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user