mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-08 14:59:16 -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.front = front
|
||||
val cameraBlockPosition = eyePosition.blockPosition
|
||||
if (fov != previousFOV) {
|
||||
calculateProjectionMatrix(fov)
|
||||
}
|
||||
calculateProjectionMatrix(fov)
|
||||
previousFOV = fov
|
||||
|
||||
updateFront(front)
|
||||
@ -179,4 +177,8 @@ class MatrixHandler(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun invalidate() {
|
||||
upToDate = false
|
||||
}
|
||||
}
|
||||
|
@ -78,6 +78,7 @@ class FogManager(
|
||||
save()
|
||||
this.options = options
|
||||
state.revision++
|
||||
context.camera.matrixHandler.invalidate()
|
||||
}
|
||||
|
||||
private fun save() {
|
||||
@ -108,6 +109,7 @@ class FogManager(
|
||||
}
|
||||
|
||||
state.revision++
|
||||
context.camera.matrixHandler.invalidate()
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user