Merge branch 'crabman/rope-panic' into 'master'

Fix rope shader panic

See merge request veloren/veloren!4403
This commit is contained in:
crabman 2024-03-31 16:09:39 +00:00
commit e353802d77
3 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
#version 430 core #version 440 core
#define FIGURE_SHADER #define FIGURE_SHADER
@ -56,6 +56,7 @@ layout (std140, set = 2, binding = 0)
uniform u_locals { uniform u_locals {
vec4 pos_a; vec4 pos_a;
vec4 pos_b; vec4 pos_b;
float rope_length;
}; };
layout(location = 0) out vec4 tgt_color; layout(location = 0) out vec4 tgt_color;

View File

@ -1,4 +1,4 @@
#version 430 core #version 440 core
#include <constants.glsl> #include <constants.glsl>

View File

@ -9,6 +9,7 @@ pub struct Locals {
pos_a: [f32; 4], pos_a: [f32; 4],
pos_b: [f32; 4], pos_b: [f32; 4],
rope_length: f32, rope_length: f32,
_padding: [f32; 3],
} }
impl Locals { impl Locals {
@ -17,6 +18,7 @@ impl Locals {
pos_a: pos_a.with_w(0.0).into_array(), pos_a: pos_a.with_w(0.0).into_array(),
pos_b: pos_b.with_w(0.0).into_array(), pos_b: pos_b.with_w(0.0).into_array(),
rope_length, rope_length,
_padding: [0.0; 3],
} }
} }
} }