Remove updateNormals() call
This commit is contained in:
parent
4e848091bb
commit
c3432af621
2 changed files with 0 additions and 13 deletions
|
@ -23,7 +23,6 @@ protocol TerrainGenerator {
|
||||||
var needsGPU: Bool { get }
|
var needsGPU: Bool { get }
|
||||||
var outTexture: MTLTexture { get }
|
var outTexture: MTLTexture { get }
|
||||||
|
|
||||||
func updateUniforms()
|
|
||||||
func encode(in encoder: MTLComputeCommandEncoder)
|
func encode(in encoder: MTLComputeCommandEncoder)
|
||||||
func render(progress: Progress) -> [Float]
|
func render(progress: Progress) -> [Float]
|
||||||
}
|
}
|
||||||
|
@ -97,8 +96,6 @@ class ZeroAlgorithm: Kernel, TerrainGenerator {
|
||||||
|
|
||||||
// MARK: Algorithm
|
// MARK: Algorithm
|
||||||
|
|
||||||
func updateUniforms() { }
|
|
||||||
|
|
||||||
func render(progress: Progress) -> [Float] {
|
func render(progress: Progress) -> [Float] {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
@ -359,9 +356,6 @@ public class DiamondSquareGenerator: TerrainGenerator {
|
||||||
|
|
||||||
func encode(in encoder: MTLComputeCommandEncoder) {
|
func encode(in encoder: MTLComputeCommandEncoder) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateUniforms() {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension DiamondSquareGenerator.Point: Equatable {
|
extension DiamondSquareGenerator.Point: Equatable {
|
||||||
|
|
|
@ -210,13 +210,6 @@ class Renderer: NSObject, MTKViewDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func updateGameState() {
|
private func updateGameState() {
|
||||||
/// Update any game state before rendering
|
|
||||||
if iterateTerrainAlgorithm {
|
|
||||||
if terrain.generator.needsGPU {
|
|
||||||
terrain.generator.updateUniforms()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
geometryUniforms.pointer[0].projectionMatrix = camera.projectionMatrix
|
geometryUniforms.pointer[0].projectionMatrix = camera.projectionMatrix
|
||||||
|
|
||||||
let rotationAxis = float3(0, 1, 0)
|
let rotationAxis = float3(0, 1, 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue