Replace separate slang files per stage with single slang files containing multiple stages

This commit is contained in:
Sascha Willems 2025-03-29 10:31:46 +01:00
parent cf3700cb2f
commit c4556374c3
8 changed files with 44 additions and 87 deletions

View file

@ -1,38 +0,0 @@
/* Copyright (c) 2025, Sascha Willems
*
* SPDX-License-Identifier: MIT
*
*/
struct VSInput
{
[[vk::location(0)]]float2 Pos : POSITION0;
[[vk::location(1)]]float2 UV : TEXCOORD0;
[[vk::location(2)]]float4 Color : COLOR0;
};
struct VSOutput
{
float4 Pos : SV_POSITION;
[[vk::location(0)]]float2 UV : TEXCOORD0;
[[vk::location(1)]]float4 Color : COLOR0;
};
struct PushConstants
{
float2 scale;
float2 translate;
};
[[vk::push_constant]]
PushConstants pushConstants;
[shader("vertex")]
VSOutput main(VSInput input)
{
VSOutput output;
output.Pos = float4(input.Pos * pushConstants.scale + pushConstants.translate, 0.0, 1.0);
output.UV = input.UV;
output.Color = input.Color;
return output;
}