mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-09 23:42:35 -04:00
fog clipping: properly invalidate projection matrix
This commit is contained in:
parent
901c158b80
commit
d58885a14b
@ -127,9 +127,7 @@ class MatrixHandler(
|
|||||||
this.matrixPosition = matrixPosition
|
this.matrixPosition = matrixPosition
|
||||||
this.front = front
|
this.front = front
|
||||||
val cameraBlockPosition = eyePosition.blockPosition
|
val cameraBlockPosition = eyePosition.blockPosition
|
||||||
if (fov != previousFOV) {
|
calculateProjectionMatrix(fov)
|
||||||
calculateProjectionMatrix(fov)
|
|
||||||
}
|
|
||||||
previousFOV = fov
|
previousFOV = fov
|
||||||
|
|
||||||
updateFront(front)
|
updateFront(front)
|
||||||
@ -179,4 +177,8 @@ class MatrixHandler(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun invalidate() {
|
||||||
|
upToDate = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,7 @@ class FogManager(
|
|||||||
save()
|
save()
|
||||||
this.options = options
|
this.options = options
|
||||||
state.revision++
|
state.revision++
|
||||||
|
context.camera.matrixHandler.invalidate()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun save() {
|
private fun save() {
|
||||||
@ -108,6 +109,7 @@ class FogManager(
|
|||||||
}
|
}
|
||||||
|
|
||||||
state.revision++
|
state.revision++
|
||||||
|
context.camera.matrixHandler.invalidate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user