initial chunk render caching

This commit is contained in:
2024-09-01 23:34:32 +10:00
parent da26773221
commit 5f372a9398
9 changed files with 220 additions and 10 deletions

View File

@ -1,4 +1,4 @@
public struct Mesh<VertexType: Vertex, IndexType: UnsignedInteger> {
public struct Mesh<VertexType: Vertex, IndexType: UnsignedInteger>: Equatable {
public let vertices: [VertexType]
public let indices: [IndexType]
}
@ -14,3 +14,10 @@ public struct VertexPositionNormalTexcoord: Vertex {
var normal: SIMD3<Float>
var texCoord: SIMD2<Float>
}
public struct VertexPositionNormalColorTexcoord: Vertex {
var position: SIMD3<Float>
var normal: SIMD3<Float>
var color: SIMD4<Float16>
var texCoord: SIMD2<Float>
}