21 lines
475 B
Plaintext
21 lines
475 B
Plaintext
(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))) |