List of usage examples for com.badlogic.gdx.graphics.g3d Attributes remove
public final void remove(final long mask)
From source file:com.badlogic.gdx.tests.g3d.shadows.system.classical.Pass2Shader.java
License:Apache License
@Override public void render(Renderable renderable, Attributes combinedAttributes) { if (shadowSystem.isFirstCallPass2()) combinedAttributes.remove(BlendingAttribute.Type); else/* ww w. java 2s. c o m*/ combinedAttributes.set(blend); combinedAttributes.set(depth); super.render(renderable, combinedAttributes); }
From source file:com.uos.mortaldestiny.rendering.FrontShader.java
License:Apache License
@Override public void render(Renderable renderable, Attributes combinedAttributes) { if (combinedAttributes.has(BlendingAttribute.Type)) { final BlendingAttribute blending = (BlendingAttribute) combinedAttributes.get(BlendingAttribute.Type); combinedAttributes.remove(BlendingAttribute.Type); final boolean hasAlphaTest = combinedAttributes.has(FloatAttribute.AlphaTest); if (!hasAlphaTest) combinedAttributes.set(alphaTestAttribute); if (blending.opacity >= ((FloatAttribute) combinedAttributes.get(FloatAttribute.AlphaTest)).value) super.render(renderable, combinedAttributes); if (!hasAlphaTest) combinedAttributes.remove(FloatAttribute.AlphaTest); combinedAttributes.set(blending); } else/*from w w w .j ava 2 s . c o m*/ super.render(renderable, combinedAttributes); }