Extract vertex attributes

This commit is contained in:
Gustas
2023-09-13 12:57:47 +03:00
committed by Matthias Mailänder
parent 0a90c2a95e
commit 26b6118f50
10 changed files with 149 additions and 57 deletions

View File

@@ -46,4 +46,34 @@ namespace OpenRA.Graphics
R = r; G = g; B = b; A = a;
}
}
public sealed class CombinedShaderBindings : ShaderBindings
{
public CombinedShaderBindings()
: base("combined")
{ }
public override ShaderVertexAttribute[] Attributes { get; } = new[]
{
new ShaderVertexAttribute("aVertexPosition", 3, 0),
new ShaderVertexAttribute("aVertexTexCoord", 4, 12),
new ShaderVertexAttribute("aVertexTexMetadata", 2, 28),
new ShaderVertexAttribute("aVertexTint", 4, 36)
};
}
public sealed class ModelShaderBindings : ShaderBindings
{
public ModelShaderBindings()
: base("model")
{ }
public override ShaderVertexAttribute[] Attributes { get; } = new[]
{
new ShaderVertexAttribute("aVertexPosition", 3, 0),
new ShaderVertexAttribute("aVertexTexCoord", 4, 12),
new ShaderVertexAttribute("aVertexTexMetadata", 2, 28),
new ShaderVertexAttribute("aVertexTint", 4, 36)
};
}
}