Jump to content

[bug] error ShadowProjectionMatrix


Dad72
 Share

Recommended Posts

Hi,

 

Since the last update 2.1 I have this error (see image)

 

 

The error comes from this function (line 11)

 

DirectionalLight.prototype.setShadowProjectionMatrix = function (matrix, viewMatrix, renderList, useVSM) {            var orthoLeft = Number.MAX_VALUE;            var orthoRight = Number.MIN_VALUE;            var orthoTop = Number.MIN_VALUE;            var orthoBottom = Number.MAX_VALUE;            var orthoNear = Number.MAX_VALUE;            var orthoFar = Number.MIN_VALUE;            var tempVector3 = BABYLON.Vector3.Zero();            var activeCamera = this.getScene().activeCamera;            for (var meshIndex = 0; meshIndex < renderList.length; meshIndex++) {                var boundingBox = renderList[meshIndex].getBoundingInfo().boundingBox;                for (var index = 0; index < boundingBox.vectorsWorld.length; index++) {                    BABYLON.Vector3.TransformCoordinatesToRef(boundingBox.vectorsWorld[index], viewMatrix, tempVector3);                    if (tempVector3.x < orthoLeft)                        orthoLeft = tempVector3.x;                    if (tempVector3.y < orthoBottom)                        orthoBottom = tempVector3.y;                    if (tempVector3.x > orthoRight)                        orthoRight = tempVector3.x;                    if (tempVector3.y > orthoTop)                        orthoTop = tempVector3.y;                    if (tempVector3.z < orthoNear)                        orthoNear = tempVector3.z;                    if (tempVector3.z > orthoFar)                        orthoFar = tempVector3.z;                }            }            var orthoWidth = Math.max(Math.abs(orthoRight), Math.abs(orthoLeft)) * this.shadowOrthoScale;            var orthoHeight = Math.max(Math.abs(orthoTop), Math.abs(orthoBottom)) * this.shadowOrthoScale;            var orthoDepth = Math.max(Math.abs(orthoNear), Math.abs(orthoFar)) * this.shadowOrthoDepthScale;            BABYLON.Matrix.OrthoOffCenterLHToRef(-orthoWidth, orthoWidth, -orthoHeight, orthoHeight, useVSM ? -orthoDepth : activeCamera.minZ, orthoDepth, matrix);        };
Link to comment
Share on other sites

I point to help. Is not that what we're supposed to do to help. or should we just test the stable version and never report bugs?

 

Beta and Alpha  version  are made to be tested, right?

 

I'm not complaining Davrous, I point to help. I am aware that 2.1 is not complete.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...