parent
0f8a349f0c
commit
465c18862c
8 changed files with 4 additions and 12 deletions
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
layout (binding = 1) uniform sampler2D samplerColor;
|
||||
|
||||
layout (location = 0) in vec2 inUV;
|
||||
layout (location = 1) in vec4 inPos;
|
||||
layout (location = 0) in vec4 inPos;
|
||||
|
||||
layout (location = 0) out vec4 outFragColor;
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,7 +1,6 @@
|
|||
#version 450
|
||||
|
||||
layout (location = 0) in vec3 inPos;
|
||||
layout (location = 1) in vec2 inUV;
|
||||
|
||||
layout (binding = 0) uniform UBO
|
||||
{
|
||||
|
|
@ -10,12 +9,10 @@ layout (binding = 0) uniform UBO
|
|||
mat4 model;
|
||||
} ubo;
|
||||
|
||||
layout (location = 0) out vec2 outUV;
|
||||
layout (location = 1) out vec4 outPos;
|
||||
layout (location = 0) out vec4 outPos;
|
||||
|
||||
void main()
|
||||
{
|
||||
outUV = inUV;
|
||||
outPos = ubo.projection * ubo.view * ubo.model * vec4(inPos.xyz, 1.0);
|
||||
gl_Position = outPos;
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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;
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue