VideoSW: reuse Common::Vec2/3/4

This commit is contained in:
Tillmann Karras
2025-07-28 16:31:46 +01:00
parent e6ed939952
commit fa4127b145
8 changed files with 48 additions and 137 deletions

View File

@@ -7,25 +7,17 @@
#include <cstddef>
#include "Common/CommonTypes.h"
#include "VideoBackends/Software/Vec3.h"
struct Vec4
{
float x;
float y;
float z;
float w;
};
#include "Common/Matrix.h"
struct InputVertexData
{
u8 posMtx;
std::array<u8, 8> texMtx;
Vec3 position;
std::array<Vec3, 3> normal;
Common::Vec3 position;
std::array<Common::Vec3, 3> normal;
std::array<std::array<u8, 4>, 2> color;
std::array<std::array<float, 2>, 8> texCoords;
std::array<Common::Vec2, 8> texCoords;
};
struct OutputVertexData
@@ -39,12 +31,12 @@ struct OutputVertexData
ALP_C
};
Vec3 mvPosition = {};
Vec4 projectedPosition = {};
Vec3 screenPosition = {};
std::array<Vec3, 3> normal{};
Common::Vec3 mvPosition = {};
Common::Vec4 projectedPosition = {};
Common::Vec3 screenPosition = {};
std::array<Common::Vec3, 3> normal{};
std::array<std::array<u8, 4>, 2> color{};
std::array<Vec3, 8> texCoords{};
std::array<Common::Vec3, 8> texCoords{};
void Lerp(float t, const OutputVertexData* a, const OutputVertexData* b)
{