Add lexing, parsing and some semantic checking for constant buffers.

This commit is contained in:
2024-06-14 19:56:28 +02:00
parent b1dceb298f
commit a9a67e3fac
45 changed files with 1275 additions and 1119 deletions

12
test/constant_buffer.shd Normal file
View 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);
}