[vulkan] Move matrices uniform def to a header file

Too many places to keep up to date.
This commit is contained in:
Bill Currie 2022-11-21 20:02:18 +09:00
parent 5df9b506e0
commit b7947b48a5
14 changed files with 55 additions and 78 deletions

View file

@ -1,11 +1,9 @@
#version 450
#extension GL_GOOGLE_include_directive : enable
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
};
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (push_constant) uniform PushConstants {
mat4 Model;

View file

@ -1,11 +1,9 @@
#version 450
#extension GL_GOOGLE_include_directive : enable
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
};
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (push_constant) uniform PushConstants {
mat4 Model;

View file

@ -3,12 +3,9 @@
#include "entity.h"
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
};
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (set = 1, binding = 0) buffer Entities {
Entity entities[];

View file

@ -3,12 +3,9 @@
#include "entity.h"
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
};
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (set = 1, binding = 0) buffer Entities {
Entity entities[];

View file

@ -1,11 +1,9 @@
#version 450
#extension GL_GOOGLE_include_directive : enable
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
};
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (set = 1, binding = 0) uniform textureBuffer glyph_data;
// per instance data

View file

@ -1,13 +1,11 @@
#version 450
#extension GL_GOOGLE_include_directive : enable
layout (constant_id = 0) const bool IQMDepthOnly = false;
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
};
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (set = 2, binding = 0) buffer Bones {
// NOTE these are transposed, so v * m

View file

@ -1,11 +1,9 @@
#version 450
#extension GL_GOOGLE_include_directive : enable
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
};
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (location = 0) in vec2 vertex;
layout (location = 1) in vec2 uv;
layout (location = 2) in vec4 vcolor;

View file

@ -0,0 +1,6 @@
Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
}

View file

@ -1,11 +1,9 @@
#version 450
#extension GL_GOOGLE_include_directive : enable
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
};
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (push_constant) uniform PushConstants {
mat4 Model;

View file

@ -3,12 +3,9 @@
#include "entity.h"
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
};
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (set = 1, binding = 0) buffer Entities {
Entity entities[];

View file

@ -1,11 +1,9 @@
#version 450
#extension GL_GOOGLE_include_directive : enable
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
};
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (set = 1, binding = 0) uniform textureBuffer glyph_data;
// per instance data

View file

@ -1,11 +1,9 @@
#version 450
#extension GL_GOOGLE_include_directive : enable
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
};
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (set = 1, binding = 0) uniform Vertices {
vec4 xyuv[4];

View file

@ -1,11 +1,9 @@
#version 450
#extension GL_GOOGLE_include_directive : enable
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
};
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
layout (set = 1, binding = 0) uniform Vertices {
vec4 xyuv[4];

View file

@ -1,11 +1,9 @@
#version 450
#extension GL_GOOGLE_include_directive : enable
layout (set = 0, binding = 0) uniform Matrices {
mat4 Projection3d;
mat4 View;
mat4 Sky;
mat4 Projection2d;
};
layout (set = 0, binding = 0) uniform
#include "matrices.h"
;
/** Vertex position.
x, y, s, t