fancy text

This commit is contained in:
2021-08-16 02:27:00 +02:00
parent fb045f210a
commit 00d6d1c5f8
13 changed files with 52 additions and 30 deletions

View File

@@ -8,6 +8,7 @@ layout(push_constant) uniform PushConstants {
layout(binding = 0) uniform ObjectUniformData {
mat4 view;
mat4 projection;
mat4 ortho_projection;
float time;
vec3 light_position;
vec3 light_directional_rotation;
@@ -16,7 +17,6 @@ layout(binding = 0) uniform ObjectUniformData {
layout(location = 0) in vec3 position;
layout(location = 1) in vec2 uv;
layout(location = 2) in vec3 normal;
layout(location = 0) out vec2 tex_coords;
@@ -25,15 +25,16 @@ out gl_PerVertex {
};
void main() {
float scale = 0.01;
mat4 invert = mat4(
1., 0., 0., 0.,
0., -1., 0., 0.,
0., 0., 1., 0.,
0., 0., 0., 1.
scale, 0., 0., 0.,
0., scale, 0., 0.,
0., 0., scale, 0.,
0., 0., 0., 1.
);
// Vertex position in camera
gl_Position = ubo.projection * ubo.view * invert * push.model * vec4(position, 1.0);
gl_Position = ubo.ortho_projection * vec4(position, 1.0);
// Just interpolate UV coords, no transformation needed
tex_coords = uv;