Browse Source

Fixed a crash with singlepass an multipass TDL when a lightProbe is added to the scene

Nehon 9 năm trước cách đây
mục cha
commit
17ef34ad3a

+ 2 - 0
jme3-core/src/main/java/com/jme3/material/logic/MultiPassLightingLogic.java

@@ -156,6 +156,8 @@ public final class MultiPassLightingLogic extends DefaultTechniqueDefLogic {
 
                     lightDir.setValue(VarType.Vector4, tmpLightDirection);
 
+                    break;
+                case Probe:
                     break;
                 default:
                     throw new UnsupportedOperationException("Unknown type of light: " + l.getType());

+ 2 - 0
jme3-core/src/main/java/com/jme3/material/logic/SinglePassLightingLogic.java

@@ -185,6 +185,8 @@ public final class SinglePassLightingLogic extends DefaultTechniqueDefLogic {
                     lightData.setVector4InArray(tmpVec.getX(), tmpVec.getY(), tmpVec.getZ(), spotAngleCos, lightDataIndex);
                     lightDataIndex++;
                     break;
+                case Probe:
+                    break;
                 default:
                     throw new UnsupportedOperationException("Unknown type of light: " + l.getType());
             }