mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'crabman/rope-panic' into 'master'
Fix rope shader panic See merge request veloren/veloren!4403
This commit is contained in:
commit
e353802d77
@ -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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#version 430 core
|
#version 440 core
|
||||||
|
|
||||||
#include <constants.glsl>
|
#include <constants.glsl>
|
||||||
|
|
||||||
|
@ -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],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user