diff --git a/jme3-core/src/main/java/com/jme3/material/logic/ShadowStaticPassLightingLogic.java b/jme3-core/src/main/java/com/jme3/material/logic/ShadowStaticPassLightingLogic.java index 1c6164ba1..5bc4c7fed 100755 --- a/jme3-core/src/main/java/com/jme3/material/logic/ShadowStaticPassLightingLogic.java +++ b/jme3-core/src/main/java/com/jme3/material/logic/ShadowStaticPassLightingLogic.java @@ -39,7 +39,7 @@ import com.jme3.light.PointLight; import com.jme3.light.SpotLight; import com.jme3.material.TechniqueDef; import com.jme3.math.Matrix4f; -import com.jme3.math.Vector4f; +import com.jme3.math.Vector3f; import com.jme3.renderer.Caps; import com.jme3.renderer.RenderManager; import com.jme3.renderer.Renderer; @@ -149,7 +149,7 @@ public class ShadowStaticPassLightingLogic extends StaticPassLightingLogic { @Override protected void updateShadowUniforms(Renderer renderer, Shader shader, int nextTextureUnit) { TextureArray array = null; - Vector4f pssmSplits = null; + Vector3f pssmSplits = null; Uniform shadowMatricesUniform = shader.getUniform("g_ShadowMatrices"); @@ -187,7 +187,7 @@ public class ShadowStaticPassLightingLogic extends StaticPassLightingLogic { if (pssmSplits != null) { Uniform pssmSplitsUniform = shader.getUniform("g_PssmSplits"); - pssmSplitsUniform.setValue(VarType.Vector4, pssmSplits); + pssmSplitsUniform.setValue(VarType.Vector3, pssmSplits); } } } diff --git a/jme3-core/src/main/java/com/jme3/shadow/next/array/DirectionalArrayShadowMap.java b/jme3-core/src/main/java/com/jme3/shadow/next/array/DirectionalArrayShadowMap.java index 32151e42a..445a52203 100755 --- a/jme3-core/src/main/java/com/jme3/shadow/next/array/DirectionalArrayShadowMap.java +++ b/jme3-core/src/main/java/com/jme3/shadow/next/array/DirectionalArrayShadowMap.java @@ -34,7 +34,6 @@ package com.jme3.shadow.next.array; import com.jme3.light.DirectionalLight; import com.jme3.light.Light; import com.jme3.math.Vector3f; -import com.jme3.math.Vector4f; import com.jme3.renderer.RenderManager; import com.jme3.renderer.ViewPort; import com.jme3.renderer.queue.GeometryList; @@ -47,7 +46,7 @@ import com.jme3.texture.TextureArray; public class DirectionalArrayShadowMap extends BaseArrayShadowMap { private final DirectionalLight light; - private final Vector4f projectionSplitPositions = new Vector4f(); + private final Vector3f projectionSplitPositions = new Vector3f(); public DirectionalArrayShadowMap(DirectionalLight light, TextureArray array, int firstArraySlice, int textureSize, int numSplits, Vector3f[] points) { super(array, firstArraySlice); @@ -70,7 +69,7 @@ public class DirectionalArrayShadowMap extends BaseArrayShadowMap 1 + pssmSliceOffset = int(dot(step(g_PssmSplits.xyz, gl_FragCoord.zzz), vec3(1.0))); #else pssmSliceOffset = 0; #endif