Fix static array. Add constant buffers. Beginning of textures.

This commit is contained in:
2024-06-26 13:42:13 +02:00
parent 3bbbc1d556
commit 1bf829d42f
8 changed files with 217 additions and 59 deletions

View File

@@ -0,0 +1,21 @@
(program
(properties p
[(:= texture texture2D)
(:= sampler sampler)])
(struct PS_Input
[(:= uv float2 (@uv))
(:= pos float4 (@position))])
(fun vertex vs_main -> PS_Input
[(:= pos float4 (@position))
(:= uv float2 (@uv))]
(:= result PS_Input)
(= result.uv uv)
(= result.pos pos)
(return result))
(fun pixel ps_main -> float4 (@target)
[(:= input PS_Input)]
(:= color float4 (sample p.texture input.uv p.sampler))
(return color)))