Add slang shaders for additional samples

This commit is contained in:
Sascha Willems 2025-05-10 15:20:40 +02:00
parent 7e5a387eb8
commit d6a1f6af06
4 changed files with 198 additions and 0 deletions

View file

@ -0,0 +1,35 @@
/* Copyright (c) 2025, Sascha Willems
*
* SPDX-License-Identifier: MIT
*
*/
struct VSInput
{
float2 Pos;
float2 UV;
};
struct VSOutput
{
float4 Pos : SV_POSITION;
float2 UV;
};
Sampler2D samplerFont;
[shader("vertex")]
VSOutput vertexMain(VSInput input)
{
VSOutput output;
output.Pos = float4(input.Pos, 0.0, 1.0);
output.UV = input.UV;
return output;
}
[shader("fragment")]
float4 fragmentMain(VSOutput input)
{
float color = samplerFont.Sample(input.UV).r;
return color.xxxx;
}