فهرست منبع

Use the right LOD of an instance when rendering by the depth renderer

Popov72 4 سال پیش
والد
کامیت
dc31ef8db5
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/Materials/Textures/renderTargetTexture.ts

+ 1 - 1
src/Materials/Textures/renderTargetTexture.ts

@@ -769,7 +769,7 @@ export class RenderTargetTexture extends Texture {
                             mesh._internalAbstractMeshDataInfo._onlyForInstancesIntermediate = false;
                         } else {
                             if (!mesh._internalAbstractMeshDataInfo._actAsRegularMesh) {
-                                mesh = (mesh as InstancedMesh).sourceMesh;
+                                mesh = mesh._internalAbstractMeshDataInfo._currentLOD ?? (mesh as InstancedMesh).sourceMesh;
                             }
                         }
                         mesh._internalAbstractMeshDataInfo._isActiveIntermediate = true;