BLADERUNNER: VK small fixes
Fixed rendering of non-visible objects
This commit is contained in:
parent
3ce56d5427
commit
70e68ace18
2 changed files with 11 additions and 5 deletions
|
@ -115,8 +115,9 @@ void SliceRenderer::calculateBoundingRect() {
|
|||
|
||||
top = bottom + _scale * (top - bottom);
|
||||
|
||||
if (bottom.z < 0.0f || top.z < 0.0f)
|
||||
if (bottom.z < 0.0f || top.z < 0.0f) {
|
||||
return;
|
||||
}
|
||||
|
||||
Matrix3x2 facingRotation = calculateFacingRotationMatrix();
|
||||
|
||||
|
@ -346,6 +347,10 @@ void SliceRenderer::drawInWorld(int animationId, int animationFrame, Vector3 pos
|
|||
_vm->_sliceRenderer->setupFrameInWorld(animationId, animationFrame, position, facing);
|
||||
assert(_sliceFramePtr);
|
||||
|
||||
if (_screenRectangle.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
SliceLineIterator sliceLineIterator;
|
||||
sliceLineIterator.setup(
|
||||
_endScreenVector.x, _endScreenVector.y, _endScreenVector.z,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue