浏览代码

Fix THIN_INSTANCES define not injected in some shaders

Popov72 5 年之前
父节点
当前提交
569b36ba50

+ 1 - 1
src/PostProcesses/volumetricLightScatteringPostProcess.ts

@@ -206,7 +206,7 @@ export class VolumetricLightScatteringPostProcess extends PostProcess {
         if (useInstances) {
             defines.push("#define INSTANCES");
             MaterialHelper.PushAttributesForInstances(attribs);
-            if (subMesh.getRenderingMesh().hasInstances) {
+            if (subMesh.getRenderingMesh().hasThinInstances) {
                 defines.push("#define THIN_INSTANCES");
             }
         }

+ 1 - 1
src/Rendering/depthRenderer.ts

@@ -235,7 +235,7 @@ export class DepthRenderer {
         if (useInstances) {
             defines.push("#define INSTANCES");
             MaterialHelper.PushAttributesForInstances(attribs);
-            if (subMesh.getRenderingMesh().hasInstances) {
+            if (subMesh.getRenderingMesh().hasThinInstances) {
                 defines.push("#define THIN_INSTANCES");
             }
         }

+ 1 - 1
src/Rendering/geometryBufferRenderer.ts

@@ -301,7 +301,7 @@ export class GeometryBufferRenderer {
         if (useInstances) {
             defines.push("#define INSTANCES");
             MaterialHelper.PushAttributesForInstances(attribs);
-            if (subMesh.getRenderingMesh().hasInstances) {
+            if (subMesh.getRenderingMesh().hasThinInstances) {
                 defines.push("#define THIN_INSTANCES");
             }
         }

+ 1 - 1
src/Rendering/outlineRenderer.ts

@@ -274,7 +274,7 @@ export class OutlineRenderer implements ISceneComponent {
         if (useInstances) {
             defines.push("#define INSTANCES");
             MaterialHelper.PushAttributesForInstances(attribs);
-            if (subMesh.getRenderingMesh().hasInstances) {
+            if (subMesh.getRenderingMesh().hasThinInstances) {
                 defines.push("#define THIN_INSTANCES");
             }
         }