List of usage examples for com.badlogic.gdx.graphics.g3d Attributes set
public final void set(final Iterable<Attribute> attributes)
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/*from ww w .j ava2 s. 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//w w w . jav a 2s . c o m super.render(renderable, combinedAttributes); }