瀏覽代碼

Merge pull request #9285 from Popov72/fix-sandbox-shadows

Sandbox: don't consider meshes that are at infinite distance when creating a shadow generator
David Catuhe 4 年之前
父節點
當前提交
baa4a5f38a

+ 1 - 0
inspector/src/components/actionTabs/tabs/propertyGrids/lights/commonShadowLightPropertyGridComponent.tsx

@@ -40,6 +40,7 @@ export class CommonShadowLightPropertyGridComponent extends React.Component<ICom
         let generator = internals.generatorType === 0 ? new ShadowGenerator(internals.mapSize, light) : new CascadedShadowGenerator(internals.mapSize, light as DirectionalLight);
 
         scene.meshes.forEach((m) => {
+            if (m.infiniteDistance) { return; }
             generator.addShadowCaster(m);
             if (!m.isAnInstance) {
                 m.receiveShadows = true;