Code cleanup, simplified, added code comments
This commit is contained in:
parent
4ae651ce51
commit
67820604b8
8 changed files with 14 additions and 2 deletions
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
layout (binding = 1) uniform sampler2D samplerColor;
|
||||
|
||||
layout (binding = 2) uniform UBO
|
||||
layout (binding = 0) uniform UBO
|
||||
{
|
||||
mat4 projection;
|
||||
mat4 model;
|
||||
vec4 outlineColor;
|
||||
float outlineWidth;
|
||||
float outline;
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -7,6 +7,9 @@ layout (binding = 0) uniform UBO
|
|||
{
|
||||
mat4 projection;
|
||||
mat4 model;
|
||||
vec4 outlineColor;
|
||||
float outlineWidth;
|
||||
float outline;
|
||||
} ubo;
|
||||
|
||||
layout (location = 0) out vec2 outUV;
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,16 +1,19 @@
|
|||
// Copyright 2020 Google LLC
|
||||
// Copyright 2023 Sascha Willems
|
||||
|
||||
Texture2D textureColor : register(t1);
|
||||
SamplerState samplerColor : register(s1);
|
||||
|
||||
struct UBO
|
||||
{
|
||||
float4x4 projection;
|
||||
float4x4 model;
|
||||
float4 outlineColor;
|
||||
float outlineWidth;
|
||||
float outline;
|
||||
};
|
||||
|
||||
cbuffer ubo : register(b2) { UBO ubo; }
|
||||
cbuffer ubo : register(b0) { UBO ubo; }
|
||||
|
||||
float4 main([[vk::location(0)]] float2 inUV : TEXCOORD0) : SV_TARGET
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,4 +1,5 @@
|
|||
// Copyright 2020 Google LLC
|
||||
// Copyright 2023 Sascha Willems
|
||||
|
||||
struct VSInput
|
||||
{
|
||||
|
|
@ -10,6 +11,9 @@ struct UBO
|
|||
{
|
||||
float4x4 projection;
|
||||
float4x4 model;
|
||||
float4 outlineColor;
|
||||
float outlineWidth;
|
||||
float outline;
|
||||
};
|
||||
|
||||
cbuffer ubo : register(b0) { UBO ubo; }
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue