Graphics: Add Billboard support

This commit is contained in:
SirLynix
2023-11-25 15:52:58 +01:00
parent 4cbb5b91a3
commit 1ac992b5c7
12 changed files with 472 additions and 98 deletions

View File

@@ -390,6 +390,7 @@ namespace Nz
JointWeights,
Normal,
Position,
SizeSinCos,
Tangent,
TexCoord,
Userdata,
@@ -406,6 +407,7 @@ namespace Nz
enum class VertexLayout
{
// Predefined declarations for rendering
UV_SizeSinCos,
XY,
XY_Color,
XY_UV,
@@ -416,6 +418,7 @@ namespace Nz
XYZ_Normal_UV,
XYZ_Normal_UV_Tangent,
XYZ_Normal_UV_Tangent_Skinning,
UV_SizeSinCos_Color,
XYZ_UV,
// Predefined declarations for instancing

View File

@@ -68,6 +68,17 @@ namespace Nz
Vector3f tangent;
};
struct VertexStruct_UV_SizeSinCos
{
Vector2f uv;
Vector4f sizeSinCos; //< width, height, sin, cos
};
struct VertexStruct_UV_SizeSinCos_Color : VertexStruct_UV_SizeSinCos
{
Color color;
};
struct VertexStruct_XYZ_UV : VertexStruct_XYZ
{
Vector2f uv;