Skip to content

Commit 19911e9

Browse files
committed
Vulkan_Helpers: Fix warnings in packUnorm4x8()
Thanks to a friend for the tips
1 parent 253d030 commit 19911e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Vulkan_Helpers/src/vk_engine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ uint32_t packUnorm4x8(math::float4 const& v) {
2121
union {
2222
unsigned char in[4];
2323
uint out;
24-
} u;
24+
} u{};
2525

26-
math::float4 result = round(clamp(v, 0.0f, 1.0f) * 255.0f);
26+
math::vector<unsigned char, 4> result = round(clamp(v, 0.0f, 1.0f) * 255.0f);
2727

2828
u.in[0] = result[0];
2929
u.in[1] = result[1];

0 commit comments

Comments
 (0)