2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2021-07-04 19:22:19 -06:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2008-12-07 22:25:12 -07:00
|
|
|
|
2017-03-03 12:43:52 -07:00
|
|
|
#include "VideoCommon/VertexLoader_Normal.h"
|
|
|
|
|
2019-05-29 20:54:21 -06:00
|
|
|
#include <array>
|
2014-11-11 02:48:38 -07:00
|
|
|
#include <type_traits>
|
2008-12-07 22:25:12 -07:00
|
|
|
|
2014-09-07 19:06:58 -06:00
|
|
|
#include "Common/CommonTypes.h"
|
2021-04-25 17:04:13 -06:00
|
|
|
#include "Common/EnumMap.h"
|
2017-03-03 12:43:52 -07:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "VideoCommon/VertexLoader.h"
|
2015-05-29 06:42:45 -06:00
|
|
|
#include "VideoCommon/VertexLoaderManager.h"
|
2016-01-17 14:54:31 -07:00
|
|
|
#include "VideoCommon/VertexLoaderUtils.h"
|
2014-02-17 03:18:15 -07:00
|
|
|
|
2013-02-21 03:45:29 -07:00
|
|
|
// warning: mapping buffer should be disabled to use this
|
2020-11-13 20:33:26 -07:00
|
|
|
#define LOG_NORM() // PRIM_LOG("norm: {} {} {}, ", ((float*)g_vertex_manager_write_ptr)[-3],
|
2014-12-09 00:30:38 -07:00
|
|
|
// ((float*)g_vertex_manager_write_ptr)[-2],
|
|
|
|
// ((float*)g_vertex_manager_write_ptr)[-1]);
|
2008-12-07 22:25:12 -07:00
|
|
|
|
2013-02-20 21:22:41 -07:00
|
|
|
namespace
|
2008-07-12 11:40:22 -06:00
|
|
|
{
|
2013-02-20 21:22:41 -07:00
|
|
|
template <typename T>
|
2019-05-29 20:54:21 -06:00
|
|
|
constexpr float FracAdjust(T val)
|
2008-11-01 23:07:14 -06:00
|
|
|
{
|
2013-02-20 21:22:41 -07:00
|
|
|
// auto const S8FRAC = 1.f / (1u << 6);
|
|
|
|
// auto const U8FRAC = 1.f / (1u << 7);
|
|
|
|
// auto const S16FRAC = 1.f / (1u << 14);
|
|
|
|
// auto const U16FRAC = 1.f / (1u << 15);
|
2013-03-19 19:51:12 -06:00
|
|
|
|
2013-02-20 23:49:47 -07:00
|
|
|
// TODO: is this right?
|
2019-05-29 21:58:18 -06:00
|
|
|
return val / float(1u << (sizeof(T) * 8 - std::is_signed_v<T> - 1));
|
2008-07-12 11:40:22 -06:00
|
|
|
}
|
2008-12-07 22:25:12 -07:00
|
|
|
|
2013-02-20 21:22:41 -07:00
|
|
|
template <>
|
2019-05-29 20:54:21 -06:00
|
|
|
constexpr float FracAdjust(float val)
|
2013-02-20 21:22:41 -07:00
|
|
|
{
|
|
|
|
return val;
|
|
|
|
}
|
2009-09-13 15:18:04 -06:00
|
|
|
|
2023-01-12 16:00:51 -07:00
|
|
|
template <typename T, u32 N, u32 Offset>
|
2022-04-13 23:03:34 -06:00
|
|
|
void ReadIndirect(VertexLoader* loader, const T* data)
|
2008-07-12 11:40:22 -06:00
|
|
|
{
|
2013-02-20 21:22:41 -07:00
|
|
|
static_assert(3 == N || 9 == N, "N is only sane as 3 or 9!");
|
2023-01-12 16:00:51 -07:00
|
|
|
static_assert(!(Offset != 0 && 9 == N), "N == 9 only makes sense if offset == 0");
|
2008-12-07 22:25:12 -07:00
|
|
|
|
2023-01-12 16:00:51 -07:00
|
|
|
for (u32 i = Offset; i < N + Offset; ++i)
|
2008-11-01 23:07:14 -06:00
|
|
|
{
|
2022-04-13 23:03:34 -06:00
|
|
|
const float value = FracAdjust(Common::FromBigEndian(data[i]));
|
|
|
|
if (loader->m_remaining == 0)
|
|
|
|
{
|
|
|
|
if (i >= 3 && i < 6)
|
|
|
|
VertexLoaderManager::tangent_cache[i - 3] = value;
|
|
|
|
else if (i >= 6 && i < 9)
|
|
|
|
VertexLoaderManager::binormal_cache[i - 6] = value;
|
|
|
|
}
|
2022-11-22 17:54:05 -07:00
|
|
|
DataWrite(value);
|
2013-02-20 21:22:41 -07:00
|
|
|
}
|
2013-03-19 19:51:12 -06:00
|
|
|
|
2013-02-21 05:45:48 -07:00
|
|
|
LOG_NORM();
|
2009-09-13 15:18:04 -06:00
|
|
|
}
|
|
|
|
|
2019-05-29 20:54:21 -06:00
|
|
|
template <typename T, u32 N>
|
2022-09-14 15:58:09 -06:00
|
|
|
void Normal_ReadDirect(VertexLoader* loader)
|
2008-07-12 11:40:22 -06:00
|
|
|
{
|
2022-09-14 15:58:09 -06:00
|
|
|
const auto source = reinterpret_cast<const T*>(DataGetPosition());
|
2023-01-12 16:00:51 -07:00
|
|
|
ReadIndirect<T, N * 3, 0>(loader, source);
|
2022-09-14 15:58:09 -06:00
|
|
|
DataSkip<N * 3 * sizeof(T)>();
|
|
|
|
}
|
2008-12-07 22:25:12 -07:00
|
|
|
|
2019-05-29 20:54:21 -06:00
|
|
|
template <typename I, typename T, u32 N, u32 Offset>
|
2022-09-14 15:58:09 -06:00
|
|
|
void Normal_ReadIndex_Offset(VertexLoader* loader)
|
2008-07-12 11:40:22 -06:00
|
|
|
{
|
2019-05-29 21:58:18 -06:00
|
|
|
static_assert(std::is_unsigned_v<I>, "Only unsigned I is sane!");
|
2013-10-28 23:23:17 -06:00
|
|
|
|
2021-06-20 14:47:57 -06:00
|
|
|
const auto index = DataRead<I>();
|
2023-01-12 16:00:51 -07:00
|
|
|
const auto data =
|
|
|
|
reinterpret_cast<const T*>(VertexLoaderManager::cached_arraybases[CPArray::Normal] +
|
|
|
|
(index * g_main_cp_state.array_strides[CPArray::Normal]));
|
|
|
|
ReadIndirect<T, N * 3, Offset * 3>(loader, data);
|
2008-07-12 11:40:22 -06:00
|
|
|
}
|
2008-12-07 22:25:12 -07:00
|
|
|
|
2019-05-29 20:54:21 -06:00
|
|
|
template <typename I, typename T, u32 N>
|
2022-09-14 15:58:09 -06:00
|
|
|
void Normal_ReadIndex(VertexLoader* loader)
|
2009-09-13 15:18:04 -06:00
|
|
|
{
|
2022-09-14 15:58:09 -06:00
|
|
|
Normal_ReadIndex_Offset<I, T, N, 0>(loader);
|
|
|
|
}
|
2009-09-13 15:18:04 -06:00
|
|
|
|
2013-02-20 21:22:41 -07:00
|
|
|
template <typename I, typename T>
|
2022-09-14 15:58:09 -06:00
|
|
|
void Normal_ReadIndex_Indices3(VertexLoader* loader)
|
2008-07-12 11:40:22 -06:00
|
|
|
{
|
2022-09-14 15:58:09 -06:00
|
|
|
Normal_ReadIndex_Offset<I, T, 1, 0>(loader);
|
|
|
|
Normal_ReadIndex_Offset<I, T, 1, 1>(loader);
|
|
|
|
Normal_ReadIndex_Offset<I, T, 1, 2>(loader);
|
|
|
|
}
|
2019-05-29 20:54:21 -06:00
|
|
|
|
2021-04-25 17:04:13 -06:00
|
|
|
using Common::EnumMap;
|
2024-04-01 22:37:11 -06:00
|
|
|
using Formats = EnumMap<TPipelineFunction, ComponentFormat::InvalidFloat7>;
|
2022-05-17 12:54:24 -06:00
|
|
|
using Elements = EnumMap<Formats, NormalComponentCount::NTB>;
|
2021-04-25 17:04:13 -06:00
|
|
|
using Indices = std::array<Elements, 2>;
|
|
|
|
using Types = EnumMap<Indices, VertexComponentFormat::Index16>;
|
2019-05-29 20:54:21 -06:00
|
|
|
|
2022-09-14 15:58:09 -06:00
|
|
|
consteval Types InitializeTable()
|
2019-05-29 20:54:21 -06:00
|
|
|
{
|
|
|
|
Types table{};
|
|
|
|
|
2021-04-25 17:04:13 -06:00
|
|
|
using VCF = VertexComponentFormat;
|
|
|
|
using NCC = NormalComponentCount;
|
|
|
|
using FMT = ComponentFormat;
|
|
|
|
|
2022-09-14 15:58:09 -06:00
|
|
|
table[VCF::Direct][false][NCC::N][FMT::UByte] = Normal_ReadDirect<u8, 1>;
|
|
|
|
table[VCF::Direct][false][NCC::N][FMT::Byte] = Normal_ReadDirect<s8, 1>;
|
|
|
|
table[VCF::Direct][false][NCC::N][FMT::UShort] = Normal_ReadDirect<u16, 1>;
|
|
|
|
table[VCF::Direct][false][NCC::N][FMT::Short] = Normal_ReadDirect<s16, 1>;
|
|
|
|
table[VCF::Direct][false][NCC::N][FMT::Float] = Normal_ReadDirect<float, 1>;
|
2024-04-01 22:37:11 -06:00
|
|
|
table[VCF::Direct][false][NCC::N][FMT::InvalidFloat5] = Normal_ReadDirect<float, 1>;
|
|
|
|
table[VCF::Direct][false][NCC::N][FMT::InvalidFloat6] = Normal_ReadDirect<float, 1>;
|
|
|
|
table[VCF::Direct][false][NCC::N][FMT::InvalidFloat7] = Normal_ReadDirect<float, 1>;
|
2022-09-14 15:58:09 -06:00
|
|
|
table[VCF::Direct][false][NCC::NTB][FMT::UByte] = Normal_ReadDirect<u8, 3>;
|
|
|
|
table[VCF::Direct][false][NCC::NTB][FMT::Byte] = Normal_ReadDirect<s8, 3>;
|
|
|
|
table[VCF::Direct][false][NCC::NTB][FMT::UShort] = Normal_ReadDirect<u16, 3>;
|
|
|
|
table[VCF::Direct][false][NCC::NTB][FMT::Short] = Normal_ReadDirect<s16, 3>;
|
|
|
|
table[VCF::Direct][false][NCC::NTB][FMT::Float] = Normal_ReadDirect<float, 3>;
|
2024-04-01 22:37:11 -06:00
|
|
|
table[VCF::Direct][false][NCC::NTB][FMT::InvalidFloat5] = Normal_ReadDirect<float, 3>;
|
|
|
|
table[VCF::Direct][false][NCC::NTB][FMT::InvalidFloat6] = Normal_ReadDirect<float, 3>;
|
|
|
|
table[VCF::Direct][false][NCC::NTB][FMT::InvalidFloat7] = Normal_ReadDirect<float, 3>;
|
2021-04-25 17:04:13 -06:00
|
|
|
|
|
|
|
// Same as above, since there are no indices
|
2022-09-14 15:58:09 -06:00
|
|
|
table[VCF::Direct][true][NCC::N][FMT::UByte] = Normal_ReadDirect<u8, 1>;
|
|
|
|
table[VCF::Direct][true][NCC::N][FMT::Byte] = Normal_ReadDirect<s8, 1>;
|
|
|
|
table[VCF::Direct][true][NCC::N][FMT::UShort] = Normal_ReadDirect<u16, 1>;
|
|
|
|
table[VCF::Direct][true][NCC::N][FMT::Short] = Normal_ReadDirect<s16, 1>;
|
|
|
|
table[VCF::Direct][true][NCC::N][FMT::Float] = Normal_ReadDirect<float, 1>;
|
2024-04-01 22:37:11 -06:00
|
|
|
table[VCF::Direct][true][NCC::N][FMT::InvalidFloat5] = Normal_ReadDirect<float, 1>;
|
|
|
|
table[VCF::Direct][true][NCC::N][FMT::InvalidFloat6] = Normal_ReadDirect<float, 1>;
|
|
|
|
table[VCF::Direct][true][NCC::N][FMT::InvalidFloat7] = Normal_ReadDirect<float, 1>;
|
2022-09-14 15:58:09 -06:00
|
|
|
table[VCF::Direct][true][NCC::NTB][FMT::UByte] = Normal_ReadDirect<u8, 3>;
|
|
|
|
table[VCF::Direct][true][NCC::NTB][FMT::Byte] = Normal_ReadDirect<s8, 3>;
|
|
|
|
table[VCF::Direct][true][NCC::NTB][FMT::UShort] = Normal_ReadDirect<u16, 3>;
|
|
|
|
table[VCF::Direct][true][NCC::NTB][FMT::Short] = Normal_ReadDirect<s16, 3>;
|
|
|
|
table[VCF::Direct][true][NCC::NTB][FMT::Float] = Normal_ReadDirect<float, 3>;
|
2024-04-01 22:37:11 -06:00
|
|
|
table[VCF::Direct][true][NCC::NTB][FMT::InvalidFloat5] = Normal_ReadDirect<float, 3>;
|
|
|
|
table[VCF::Direct][true][NCC::NTB][FMT::InvalidFloat6] = Normal_ReadDirect<float, 3>;
|
|
|
|
table[VCF::Direct][true][NCC::NTB][FMT::InvalidFloat7] = Normal_ReadDirect<float, 3>;
|
2022-09-14 15:58:09 -06:00
|
|
|
|
|
|
|
table[VCF::Index8][false][NCC::N][FMT::UByte] = Normal_ReadIndex<u8, u8, 1>;
|
|
|
|
table[VCF::Index8][false][NCC::N][FMT::Byte] = Normal_ReadIndex<u8, s8, 1>;
|
|
|
|
table[VCF::Index8][false][NCC::N][FMT::UShort] = Normal_ReadIndex<u8, u16, 1>;
|
|
|
|
table[VCF::Index8][false][NCC::N][FMT::Short] = Normal_ReadIndex<u8, s16, 1>;
|
|
|
|
table[VCF::Index8][false][NCC::N][FMT::Float] = Normal_ReadIndex<u8, float, 1>;
|
2024-04-01 22:37:11 -06:00
|
|
|
table[VCF::Index8][false][NCC::N][FMT::InvalidFloat5] = Normal_ReadIndex<u8, float, 1>;
|
|
|
|
table[VCF::Index8][false][NCC::N][FMT::InvalidFloat6] = Normal_ReadIndex<u8, float, 1>;
|
|
|
|
table[VCF::Index8][false][NCC::N][FMT::InvalidFloat7] = Normal_ReadIndex<u8, float, 1>;
|
2022-09-14 15:58:09 -06:00
|
|
|
table[VCF::Index8][false][NCC::NTB][FMT::UByte] = Normal_ReadIndex<u8, u8, 3>;
|
|
|
|
table[VCF::Index8][false][NCC::NTB][FMT::Byte] = Normal_ReadIndex<u8, s8, 3>;
|
|
|
|
table[VCF::Index8][false][NCC::NTB][FMT::UShort] = Normal_ReadIndex<u8, u16, 3>;
|
|
|
|
table[VCF::Index8][false][NCC::NTB][FMT::Short] = Normal_ReadIndex<u8, s16, 3>;
|
|
|
|
table[VCF::Index8][false][NCC::NTB][FMT::Float] = Normal_ReadIndex<u8, float, 3>;
|
2024-04-01 22:37:11 -06:00
|
|
|
table[VCF::Index8][false][NCC::NTB][FMT::InvalidFloat5] = Normal_ReadIndex<u8, float, 3>;
|
|
|
|
table[VCF::Index8][false][NCC::NTB][FMT::InvalidFloat6] = Normal_ReadIndex<u8, float, 3>;
|
|
|
|
table[VCF::Index8][false][NCC::NTB][FMT::InvalidFloat7] = Normal_ReadIndex<u8, float, 3>;
|
2021-04-25 17:04:13 -06:00
|
|
|
|
2022-05-17 12:54:24 -06:00
|
|
|
// Same for NormalComponentCount::N; differs for NTB
|
2022-09-14 15:58:09 -06:00
|
|
|
table[VCF::Index8][true][NCC::N][FMT::UByte] = Normal_ReadIndex<u8, u8, 1>;
|
|
|
|
table[VCF::Index8][true][NCC::N][FMT::Byte] = Normal_ReadIndex<u8, s8, 1>;
|
|
|
|
table[VCF::Index8][true][NCC::N][FMT::UShort] = Normal_ReadIndex<u8, u16, 1>;
|
|
|
|
table[VCF::Index8][true][NCC::N][FMT::Short] = Normal_ReadIndex<u8, s16, 1>;
|
|
|
|
table[VCF::Index8][true][NCC::N][FMT::Float] = Normal_ReadIndex<u8, float, 1>;
|
2024-04-01 22:37:11 -06:00
|
|
|
table[VCF::Index8][true][NCC::N][FMT::InvalidFloat5] = Normal_ReadIndex<u8, float, 1>;
|
|
|
|
table[VCF::Index8][true][NCC::N][FMT::InvalidFloat6] = Normal_ReadIndex<u8, float, 1>;
|
|
|
|
table[VCF::Index8][true][NCC::N][FMT::InvalidFloat7] = Normal_ReadIndex<u8, float, 1>;
|
2022-09-14 15:58:09 -06:00
|
|
|
table[VCF::Index8][true][NCC::NTB][FMT::UByte] = Normal_ReadIndex_Indices3<u8, u8>;
|
|
|
|
table[VCF::Index8][true][NCC::NTB][FMT::Byte] = Normal_ReadIndex_Indices3<u8, s8>;
|
|
|
|
table[VCF::Index8][true][NCC::NTB][FMT::UShort] = Normal_ReadIndex_Indices3<u8, u16>;
|
|
|
|
table[VCF::Index8][true][NCC::NTB][FMT::Short] = Normal_ReadIndex_Indices3<u8, s16>;
|
|
|
|
table[VCF::Index8][true][NCC::NTB][FMT::Float] = Normal_ReadIndex_Indices3<u8, float>;
|
2024-04-01 22:37:11 -06:00
|
|
|
table[VCF::Index8][true][NCC::NTB][FMT::InvalidFloat5] = Normal_ReadIndex_Indices3<u8, float>;
|
|
|
|
table[VCF::Index8][true][NCC::NTB][FMT::InvalidFloat6] = Normal_ReadIndex_Indices3<u8, float>;
|
|
|
|
table[VCF::Index8][true][NCC::NTB][FMT::InvalidFloat7] = Normal_ReadIndex_Indices3<u8, float>;
|
2022-09-14 15:58:09 -06:00
|
|
|
|
|
|
|
table[VCF::Index16][false][NCC::N][FMT::UByte] = Normal_ReadIndex<u16, u8, 1>;
|
|
|
|
table[VCF::Index16][false][NCC::N][FMT::Byte] = Normal_ReadIndex<u16, s8, 1>;
|
|
|
|
table[VCF::Index16][false][NCC::N][FMT::UShort] = Normal_ReadIndex<u16, u16, 1>;
|
|
|
|
table[VCF::Index16][false][NCC::N][FMT::Short] = Normal_ReadIndex<u16, s16, 1>;
|
|
|
|
table[VCF::Index16][false][NCC::N][FMT::Float] = Normal_ReadIndex<u16, float, 1>;
|
2024-04-01 22:37:11 -06:00
|
|
|
table[VCF::Index16][false][NCC::N][FMT::InvalidFloat5] = Normal_ReadIndex<u16, float, 1>;
|
|
|
|
table[VCF::Index16][false][NCC::N][FMT::InvalidFloat6] = Normal_ReadIndex<u16, float, 1>;
|
|
|
|
table[VCF::Index16][false][NCC::N][FMT::InvalidFloat7] = Normal_ReadIndex<u16, float, 1>;
|
2022-09-14 15:58:09 -06:00
|
|
|
table[VCF::Index16][false][NCC::NTB][FMT::UByte] = Normal_ReadIndex<u16, u8, 3>;
|
|
|
|
table[VCF::Index16][false][NCC::NTB][FMT::Byte] = Normal_ReadIndex<u16, s8, 3>;
|
|
|
|
table[VCF::Index16][false][NCC::NTB][FMT::UShort] = Normal_ReadIndex<u16, u16, 3>;
|
|
|
|
table[VCF::Index16][false][NCC::NTB][FMT::Short] = Normal_ReadIndex<u16, s16, 3>;
|
|
|
|
table[VCF::Index16][false][NCC::NTB][FMT::Float] = Normal_ReadIndex<u16, float, 3>;
|
2024-04-01 22:37:11 -06:00
|
|
|
table[VCF::Index16][false][NCC::NTB][FMT::InvalidFloat5] = Normal_ReadIndex<u16, float, 3>;
|
|
|
|
table[VCF::Index16][false][NCC::NTB][FMT::InvalidFloat6] = Normal_ReadIndex<u16, float, 3>;
|
|
|
|
table[VCF::Index16][false][NCC::NTB][FMT::InvalidFloat7] = Normal_ReadIndex<u16, float, 3>;
|
2021-04-25 17:04:13 -06:00
|
|
|
|
2022-05-17 12:54:24 -06:00
|
|
|
// Same for NormalComponentCount::N; differs for NTB
|
2022-09-14 15:58:09 -06:00
|
|
|
table[VCF::Index16][true][NCC::N][FMT::UByte] = Normal_ReadIndex<u16, u8, 1>;
|
|
|
|
table[VCF::Index16][true][NCC::N][FMT::Byte] = Normal_ReadIndex<u16, s8, 1>;
|
|
|
|
table[VCF::Index16][true][NCC::N][FMT::UShort] = Normal_ReadIndex<u16, u16, 1>;
|
|
|
|
table[VCF::Index16][true][NCC::N][FMT::Short] = Normal_ReadIndex<u16, s16, 1>;
|
|
|
|
table[VCF::Index16][true][NCC::N][FMT::Float] = Normal_ReadIndex<u16, float, 1>;
|
2024-04-01 22:37:11 -06:00
|
|
|
table[VCF::Index16][true][NCC::N][FMT::InvalidFloat5] = Normal_ReadIndex<u16, float, 1>;
|
|
|
|
table[VCF::Index16][true][NCC::N][FMT::InvalidFloat6] = Normal_ReadIndex<u16, float, 1>;
|
|
|
|
table[VCF::Index16][true][NCC::N][FMT::InvalidFloat7] = Normal_ReadIndex<u16, float, 1>;
|
2022-09-14 15:58:09 -06:00
|
|
|
table[VCF::Index16][true][NCC::NTB][FMT::UByte] = Normal_ReadIndex_Indices3<u16, u8>;
|
|
|
|
table[VCF::Index16][true][NCC::NTB][FMT::Byte] = Normal_ReadIndex_Indices3<u16, s8>;
|
|
|
|
table[VCF::Index16][true][NCC::NTB][FMT::UShort] = Normal_ReadIndex_Indices3<u16, u16>;
|
|
|
|
table[VCF::Index16][true][NCC::NTB][FMT::Short] = Normal_ReadIndex_Indices3<u16, s16>;
|
|
|
|
table[VCF::Index16][true][NCC::NTB][FMT::Float] = Normal_ReadIndex_Indices3<u16, float>;
|
2024-04-01 22:37:11 -06:00
|
|
|
table[VCF::Index16][true][NCC::NTB][FMT::InvalidFloat5] = Normal_ReadIndex_Indices3<u16, float>;
|
|
|
|
table[VCF::Index16][true][NCC::NTB][FMT::InvalidFloat6] = Normal_ReadIndex_Indices3<u16, float>;
|
|
|
|
table[VCF::Index16][true][NCC::NTB][FMT::InvalidFloat7] = Normal_ReadIndex_Indices3<u16, float>;
|
2019-05-29 20:54:21 -06:00
|
|
|
|
|
|
|
return table;
|
2008-11-01 23:07:14 -06:00
|
|
|
}
|
2008-12-07 22:25:12 -07:00
|
|
|
|
2022-09-14 15:58:09 -06:00
|
|
|
constexpr Types s_table_read_normal = InitializeTable();
|
2019-05-29 20:54:21 -06:00
|
|
|
} // Anonymous namespace
|
|
|
|
|
2021-02-08 16:22:10 -07:00
|
|
|
TPipelineFunction VertexLoader_Normal::GetFunction(VertexComponentFormat type,
|
|
|
|
ComponentFormat format,
|
2021-04-25 17:04:13 -06:00
|
|
|
NormalComponentCount elements, bool index3)
|
2008-11-01 23:07:14 -06:00
|
|
|
{
|
2022-09-14 15:58:09 -06:00
|
|
|
return s_table_read_normal[type][index3][elements][format];
|
2008-07-12 11:40:22 -06:00
|
|
|
}
|