Slang shaders for buffer device address example

This commit is contained in:
Sascha Willems 2025-03-28 15:16:45 +01:00
parent bc3c41e89a
commit 880b48485f
3 changed files with 68 additions and 1 deletions

View file

@ -0,0 +1,20 @@
/* Copyright (c) 2025, Sascha Willems
*
* SPDX-License-Identifier: MIT
*
*/
[[vk::binding(0, 0)]]
Sampler2D samplerColorMap;
struct VSInput
{
[[vk::location(1)]] float3 Color;
[[vk::location(2)]] float2 UV;
};
[shader("fragment")]
float4 main(VSInput input)
{
return samplerColorMap.Sample(input.UV) * float4(input.Color, 1.0);
}