Misc renderer improvements:
- Use VK_KHR_multiview - Compute bounding boxes, use them to sort primitives - Add shader reflection - Add debug drawer
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
|
||||
namespace utils
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct is_vk_flags : std::false_type
|
||||
{};
|
||||
@@ -35,6 +34,14 @@ template <typename T>
|
||||
struct is_vk_flags<vk::Flags<T>> : std::true_type
|
||||
{};
|
||||
|
||||
template <typename T>
|
||||
struct is_std_vector : std::false_type
|
||||
{};
|
||||
|
||||
template <typename T, typename Allocator>
|
||||
struct is_std_vector<std::vector<T, Allocator>> : std::true_type
|
||||
{};
|
||||
|
||||
template <typename T>
|
||||
struct magic_hash
|
||||
{
|
||||
@@ -51,6 +58,12 @@ struct magic_hash
|
||||
std::hash<V> hasher;
|
||||
h = std::rotl(h, 5) ^ hasher(static_cast<V>(member));
|
||||
}
|
||||
else if constexpr (is_std_vector<U>::value)
|
||||
{
|
||||
std::hash<typename U::value_type> hasher;
|
||||
for (const auto & i: member)
|
||||
h = std::rotl(h, 5) ^ hasher(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::hash<U> hasher;
|
||||
|
||||
Reference in New Issue
Block a user