mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Allow for 0.5 offsets in figures
This commit is contained in:
parent
19ce03d9ed
commit
83af40a460
@ -36,7 +36,7 @@ void main() {
|
||||
uint bone_idx = (v_ao_bone >> 2) & 0x3Fu;
|
||||
mat4 combined_mat = model_mat * bones[bone_idx].bone_mat;
|
||||
|
||||
vec3 pos = vec3((uvec3(v_pos_norm) >> uvec3(0, 8, 16)) & uvec3(0xFFu)) - 128.0;
|
||||
vec3 pos = (vec3((uvec3(v_pos_norm) >> uvec3(0, 8, 16)) & uvec3(0xFFu)) - 128.0) / 2.0;
|
||||
|
||||
f_pos = (
|
||||
combined_mat *
|
||||
|
@ -57,7 +57,7 @@ impl Vertex {
|
||||
Self {
|
||||
pos_norm: pos
|
||||
.map2(Vec3::new(0, 8, 16), |e, shift| {
|
||||
((e + 128.0) as u32) << shift
|
||||
((e * 2.0 + 128.0) as u32) << shift
|
||||
})
|
||||
.reduce_bitor()
|
||||
| (norm_bits << 24),
|
||||
|
Loading…
Reference in New Issue
Block a user