diff --git a/Sources/Voxelotl/Color.swift b/Sources/Voxelotl/Color.swift index 58a5fbb..9f0e7d4 100644 --- a/Sources/Voxelotl/Color.swift +++ b/Sources/Voxelotl/Color.swift @@ -89,6 +89,10 @@ public extension Color where T: BinaryFloatingPoint { self.init(r: newR, g: newG, b: newB, a: Self.one) } + init(_ other: Color) { + self._values = SIMD4(other._values) + } + init(_ other: Color) { let mul = 1 / T(0xFF) self.init( diff --git a/Sources/Voxelotl/Renderer.swift b/Sources/Voxelotl/Renderer.swift index 7020e9f..6f7bf9c 100644 --- a/Sources/Voxelotl/Renderer.swift +++ b/Sources/Voxelotl/Renderer.swift @@ -380,7 +380,7 @@ public class Renderer { .scale(instance.scale) data[i] = VertexShaderInstance( model: model, normalModel: model.inverse.transpose, - color: SIMD4(Color(instance.color))) + color: SIMD4(Color(instance.color))) } } instanceBuffer.didModifyRange(0..