Read texture data from the heights texture
This commit is contained in:
parent
753e8eb311
commit
4803620d4b
2 changed files with 13 additions and 7 deletions
|
@ -43,10 +43,11 @@ class Terrain: NSObject {
|
|||
}
|
||||
|
||||
/// Create and condition mesh data to feed into a pipeline using the given vertex descriptor.
|
||||
/// @param dimensions Coordinate dimensions of the plane
|
||||
/// @param segments Number of segments to divide each dimension into
|
||||
/// @param device Metal device
|
||||
/// @param vertexDescriptor Description of how to lay out vertex data in GPU memory
|
||||
///
|
||||
/// - parameter dimensions: Coordinate dimensions of the plane.
|
||||
/// - parameter segments: Number of segments to divide each dimension into.
|
||||
/// - parameter device: Metal device.
|
||||
/// - parameter vertexDescriptor: Description of how to lay out vertex data in GPU memory.
|
||||
class func buildMesh(withDimensions dimensions: float2, segments: uint2, device: MTLDevice, vertexDescriptor: MTLVertexDescriptor) throws -> MTKMesh {
|
||||
let metalAllocator = MTKMeshBufferAllocator(device: device)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue