From f7e05555fb4ff6d8e51bdb5734db4dab1841d593 Mon Sep 17 00:00:00 2001 From: hachem Date: Wed, 19 Aug 2026 02:02:20 +0200 Subject: [feat]: migrate to slang from glsl --- Assets/Shaders/TexturedQuad.slang | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Assets/Shaders/TexturedQuad.slang (limited to 'Assets/Shaders/TexturedQuad.slang') diff --git a/Assets/Shaders/TexturedQuad.slang b/Assets/Shaders/TexturedQuad.slang new file mode 100644 index 0000000..52d46ed --- /dev/null +++ b/Assets/Shaders/TexturedQuad.slang @@ -0,0 +1,28 @@ +struct VSInput +{ + float2 position : POSITION; + float2 texCoord : TEXCOORD0; +}; + +struct VSOutput +{ + float4 position : SV_Position; + float2 texCoord : TEXCOORD0; +}; + +[shader("vertex")] +VSOutput vertexMain(VSInput input) +{ + VSOutput output; + output.position = float4(input.position, 0.0, 1.0); + output.texCoord = input.texCoord; + return output; +} + +Sampler2D u_ScreenTexture; + +[shader("fragment")] +float4 fragmentMain(VSOutput input) : SV_Target +{ + return u_ScreenTexture.Sample(input.texCoord); +} -- cgit v1.3