Attach height texture to vertex shader
This commit is contained in:
parent
a5d08d6974
commit
d4d4a0a7ba
1 changed files with 2 additions and 2 deletions
|
@ -202,7 +202,8 @@ class Renderer: NSObject, MTKViewDelegate {
|
|||
renderEncoder.setVertexBuffer(buffer.buffer, offset:buffer.offset, index: index)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
renderEncoder.setVertexTexture(terrain.heights, index: 0)
|
||||
renderEncoder.setFragmentTexture(colorMap, index: TextureIndex.color.rawValue)
|
||||
|
||||
for submesh in terrain.mesh.submeshes {
|
||||
|
@ -211,7 +212,6 @@ class Renderer: NSObject, MTKViewDelegate {
|
|||
indexType: submesh.indexType,
|
||||
indexBuffer: submesh.indexBuffer.buffer,
|
||||
indexBufferOffset: submesh.indexBuffer.offset)
|
||||
|
||||
}
|
||||
|
||||
renderEncoder.popDebugGroup()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue