Make sure apply = false for all forced render states

in-pass-shadows
Kirill Vainer 7 years ago
parent ce28e35393
commit 8a747276d7
  1. 2
      jme3-core/src/main/java/com/jme3/post/PreDepthProcessor.java
  2. 2
      jme3-core/src/main/java/com/jme3/shadow/AbstractShadowRenderer.java
  3. 2
      jme3-niftygui/src/main/java/com/jme3/niftygui/JmeBatchRenderBackend.java
  4. 2
      jme3-niftygui/src/main/java/com/jme3/niftygui/RenderDeviceJme.java

@ -60,7 +60,7 @@ public class PreDepthProcessor implements SceneProcessor {
preDepth.getAdditionalRenderState().setPolyOffset(0, 0);
preDepth.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Back);
forcedRS = new RenderState();
forcedRS = RenderState.ADDITIONAL.clone();
forcedRS.setDepthTest(true);
forcedRS.setDepthWrite(false);
}

@ -94,7 +94,7 @@ public abstract class AbstractShadowRenderer implements SceneProcessor, Savable,
protected EdgeFilteringMode edgeFilteringMode = EdgeFilteringMode.Bilinear;
protected CompareMode shadowCompareMode = CompareMode.Hardware;
protected Picture[] dispPic;
protected RenderState forcedRenderState = new RenderState();
protected RenderState forcedRenderState = RenderState.ADDITIONAL.clone();
protected boolean renderBackFacesShadows = true;
protected AppProfiler prof;

@ -453,7 +453,7 @@ public class JmeBatchRenderBackend implements BatchRenderBackend {
private final Mesh mesh = new Mesh();
private final Geometry meshGeometry = new Geometry("nifty-quad", mesh);
private final RenderState renderState = new RenderState();
private final RenderState renderState = RenderState.ADDITIONAL.clone();
private FloatBuffer vertexPosBuffer;
private FloatBuffer vertexTexCoordBuffer;

@ -73,7 +73,7 @@ public class RenderDeviceJme implements RenderDevice {
private VertexBuffer quadColor;
private Matrix4f tempMat = new Matrix4f();
private ColorRGBA tempColor = new ColorRGBA();
private RenderState renderState = new RenderState();
private RenderState renderState = RenderState.ADDITIONAL.clone();
private Material colorMaterial;
private Material textureColorMaterial;

Loading…
Cancel
Save