Clean up vertex inputs

Fixes #766
This commit is contained in:
Sascha Willems 2022-08-04 17:24:11 +02:00
parent 0f8a349f0c
commit 465c18862c
8 changed files with 4 additions and 12 deletions

View file

@ -5,8 +5,7 @@ SamplerState samplerColor : register(s1);
struct VSOutput
{
[[vk::location(0)]] float2 UV : TEXCOORD0;
[[vk::location(1)]] float4 ProjCoord : POSITION0;
[[vk::location(0)]] float4 ProjCoord : POSITION0;
};
float4 main(VSOutput input, bool FrontFacing : SV_IsFrontFace) : SV_TARGET

View file

@ -3,7 +3,6 @@
struct VSInput
{
[[vk::location(0)]] float3 Pos : POSITION0;
[[vk::location(1)]] float2 UV : TEXCOORD0;
};
struct UBO
@ -18,14 +17,12 @@ cbuffer ubo : register(b0) { UBO ubo; }
struct VSOutput
{
float4 Pos : SV_POSITION;
[[vk::location(0)]] float2 UV : TEXCOORD0;
[[vk::location(1)]] float4 ProjCoord : POSITION0;
[[vk::location(0)]] float4 ProjCoord : POSITION0;
};
VSOutput main(VSInput input)
{
VSOutput output = (VSOutput)0;
output.UV = input.UV;
output.ProjCoord = mul(ubo.projection, mul(ubo.view, mul(ubo.model, float4(input.Pos.xyz, 1.0))));
output.Pos = output.ProjCoord;
return output;