Fix up indentation
This commit is contained in:
parent
2b2539d7df
commit
e56f94dc56
1 changed files with 13 additions and 13 deletions
|
@ -248,19 +248,19 @@ class Renderer: NSObject, MTKViewDelegate {
|
||||||
|
|
||||||
if didScheduleAlgorithmIteration || needsGeometryUpdate {
|
if didScheduleAlgorithmIteration || needsGeometryUpdate {
|
||||||
if let computeEncoder = commandBuffer.makeComputeCommandEncoder() {
|
if let computeEncoder = commandBuffer.makeComputeCommandEncoder() {
|
||||||
print("Scheduling update geometry heights")
|
print("Scheduling update geometry heights")
|
||||||
computeEncoder.label = "Geometry Heights Encoder"
|
computeEncoder.label = "Geometry Heights Encoder"
|
||||||
computeEncoder.pushDebugGroup("Update Geometry: Heights")
|
computeEncoder.pushDebugGroup("Update Geometry: Heights")
|
||||||
computeEncoder.setComputePipelineState(updateGeometryHeightsPipeline)
|
computeEncoder.setComputePipelineState(updateGeometryHeightsPipeline)
|
||||||
computeEncoder.setTexture(terrain.generator.outTexture, index: GeneratorTextureIndex.in.rawValue)
|
computeEncoder.setTexture(terrain.generator.outTexture, index: GeneratorTextureIndex.in.rawValue)
|
||||||
let vertexBuffer = terrain.mesh.vertexBuffers[BufferIndex.meshPositions.rawValue]
|
let vertexBuffer = terrain.mesh.vertexBuffers[BufferIndex.meshPositions.rawValue]
|
||||||
computeEncoder.setBuffer(vertexBuffer.buffer, offset: vertexBuffer.offset, index: GeneratorBufferIndex.vertexes.rawValue)
|
computeEncoder.setBuffer(vertexBuffer.buffer, offset: vertexBuffer.offset, index: GeneratorBufferIndex.vertexes.rawValue)
|
||||||
let texCoordBuffer = terrain.mesh.vertexBuffers[BufferIndex.meshGenerics.rawValue]
|
let texCoordBuffer = terrain.mesh.vertexBuffers[BufferIndex.meshGenerics.rawValue]
|
||||||
computeEncoder.setBuffer(texCoordBuffer.buffer, offset: texCoordBuffer.offset, index: GeneratorBufferIndex.texCoords.rawValue)
|
computeEncoder.setBuffer(texCoordBuffer.buffer, offset: texCoordBuffer.offset, index: GeneratorBufferIndex.texCoords.rawValue)
|
||||||
computeEncoder.setBuffer(dynamicUniformBuffer, offset: uniformBufferOffset, index: GeneratorBufferIndex.uniforms.rawValue)
|
computeEncoder.setBuffer(dynamicUniformBuffer, offset: uniformBufferOffset, index: GeneratorBufferIndex.uniforms.rawValue)
|
||||||
computeEncoder.dispatchThreads(MTLSize(width: Int(terrain.segments.x + 1), height: Int(terrain.segments.y + 1), depth: 1), threadsPerThreadgroup: MTLSize(width: 8, height: 8, depth: 1))
|
computeEncoder.dispatchThreads(MTLSize(width: Int(terrain.segments.x + 1), height: Int(terrain.segments.y + 1), depth: 1), threadsPerThreadgroup: MTLSize(width: 8, height: 8, depth: 1))
|
||||||
computeEncoder.popDebugGroup()
|
computeEncoder.popDebugGroup()
|
||||||
computeEncoder.endEncoding()
|
computeEncoder.endEncoding()
|
||||||
}
|
}
|
||||||
|
|
||||||
if let computeEncoder = commandBuffer.makeComputeCommandEncoder() {
|
if let computeEncoder = commandBuffer.makeComputeCommandEncoder() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue