Hersir Posted July 3, 2018 Share Posted July 3, 2018 Hi, have some question regarding `alwaysSelectAsActiveMesh`. was experimenting with `alwaysSelectAsActiveMesh` and saw that in `_evaluateActiveMeshes` there is check for active meshes: if (mesh.alwaysSelectAsActiveMesh || mesh.isVisible && mesh.visibility > 0 && ((mesh.layerMask & this.activeCamera.layerMask) !== 0) && mesh.isInFrustum(this._frustumPlanes)) ... Any reason why `isVisible` and `visibility ` is not checked before `alwaysSelectAsActiveMesh` ? Like this: if (mesh.isVisible && mesh.visibility > 0 && (mesh.alwaysSelectAsActiveMesh || ((mesh.layerMask & this.activeCamera.layerMask) !== 0 && mesh.isInFrustum(this._frustumPlanes))) ... It have some specific semantics ? As for me if mesh is not visible it should not be rendered Quote Link to comment Share on other sites More sharing options...
Guest Posted July 3, 2018 Share Posted July 3, 2018 Well no good reason I'll fix that for next commit Quote Link to comment Share on other sites More sharing options...
Hersir Posted July 10, 2018 Author Share Posted July 10, 2018 @Deltakosh saw that this was merged, tried it, all looked good but saw issues with visibility change, for meshes were alwaysSelectAsActiveMesh is true, they dont react to visibility change until some child mesh is added to them. Could it be caused by this change or its related to freezeActiveMeshes from scene ? Quote Link to comment Share on other sites More sharing options...
Guest Posted July 10, 2018 Share Posted July 10, 2018 if you freezeActiveMeshes then they are no more evaluated and thus they stay in their current rendering bucket. Which means that if they were flagged with full visibility (opaque) they will stay opaque. If you want to change visibility or alpha for meshes, you have to unfreeze / freeze Quote Link to comment Share on other sites More sharing options...
Hersir Posted July 11, 2018 Author Share Posted July 11, 2018 @Deltakosh thanks for clarification Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.