mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 15:41:59 +00:00
[vulkan] Move matrices uniform def to a header file
Too many places to keep up to date.
This commit is contained in:
parent
5df9b506e0
commit
b7947b48a5
14 changed files with 55 additions and 78 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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[];
|
||||
|
|
|
@ -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[];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
6
libs/video/renderer/vulkan/shader/matrices.h
Normal file
6
libs/video/renderer/vulkan/shader/matrices.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
Matrices {
|
||||
mat4 Projection3d;
|
||||
mat4 View;
|
||||
mat4 Sky;
|
||||
mat4 Projection2d;
|
||||
}
|
|
@ -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;
|
||||
|
|
|
@ -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[];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue