quad.setRenderState(texState); blend.setSourceFunction(SourceFunction.SourceAlpha); blend.setDestinationFunction(DestinationFunction.OneMinusSourceAlpha); quad.setRenderState(blend);
quad.setRenderState(texState); blend.setSourceFunction(SourceFunction.SourceAlpha); blend.setDestinationFunction(DestinationFunction.OneMinusSourceAlpha); quad.setRenderState(blend);
/** * Set the texture to be displayed on the given side of the skybox. Only replaces the texture at the index specified * by textureUnit. * * @param face * the face to set * @param texture * The texture for that side to assume. * @param textureUnit * The texture unite of the given side's TextureState the texture will assume. */ public void setTexture(final Face face, final Texture texture, final int textureUnit) { // Validate if (face == null) { throw new IllegalArgumentException("Face can not be null."); } TextureState ts = (TextureState) _skyboxQuads[face.ordinal()] .getLocalRenderState(RenderState.StateType.Texture); if (ts == null) { ts = new TextureState(); } // Initialize the texture state ts.setTexture(texture, textureUnit); ts.setEnabled(true); texture.setWrap(WrapMode.EdgeClamp); // Set the texture to the quad _skyboxQuads[face.ordinal()].setRenderState(ts); return; }
/** * Set the texture to be displayed on the given side of the skybox. Only replaces the texture at the index specified * by textureUnit. * * @param face * the face to set * @param texture * The texture for that side to assume. * @param textureUnit * The texture unite of the given side's TextureState the texture will assume. */ public void setTexture(final Face face, final Texture texture, final int textureUnit) { // Validate if (face == null) { throw new IllegalArgumentException("Face can not be null."); } TextureState ts = (TextureState) _skyboxQuads[face.ordinal()] .getLocalRenderState(RenderState.StateType.Texture); if (ts == null) { ts = new TextureState(); } // Initialize the texture state ts.setTexture(texture, textureUnit); ts.setEnabled(true); texture.setWrap(WrapMode.EdgeClamp); // Set the texture to the quad _skyboxQuads[face.ordinal()].setRenderState(ts); return; }
public void resetTexture() { _texture.setWrap(Texture.WrapMode.EdgeClamp); _texture.setMinificationFilter(Texture.MinificationFilter.BilinearNoMipMaps); _texture.setMagnificationFilter(Texture.MagnificationFilter.Bilinear); _texture.setTextureStoreFormat(TextureStoreFormat.RGBA8); _tRenderer.setupTexture(_texture); final TextureState ts = new TextureState(); ts.setEnabled(true); ts.setTexture(_texture, 0); _imposterQuad.setRenderState(ts); // Add a blending mode... This is so the background of the texture is // transparent. final BlendState as1 = new BlendState(); as1.setBlendEnabled(true); as1.setSourceFunction(BlendState.SourceFunction.SourceAlpha); as1.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); as1.setTestEnabled(true); as1.setTestFunction(BlendState.TestFunction.GreaterThan); as1.setEnabled(true); _imposterQuad.setRenderState(as1); }
public void resetTexture() { _texture.setWrap(Texture.WrapMode.EdgeClamp); _texture.setMinificationFilter(Texture.MinificationFilter.BilinearNoMipMaps); _texture.setMagnificationFilter(Texture.MagnificationFilter.Bilinear); _texture.setTextureStoreFormat(TextureStoreFormat.RGBA8); _tRenderer.setupTexture(_texture); final TextureState ts = new TextureState(); ts.setEnabled(true); ts.setTexture(_texture, 0); _imposterQuad.setRenderState(ts); // Add a blending mode... This is so the background of the texture is // transparent. final BlendState as1 = new BlendState(); as1.setBlendEnabled(true); as1.setSourceFunction(BlendState.SourceFunction.SourceAlpha); as1.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); as1.setTestEnabled(true); as1.setTestFunction(BlendState.TestFunction.GreaterThan); as1.setEnabled(true); _imposterQuad.setRenderState(as1); }
screen.setEnabled(true); _quad.setRenderState(screen);
bufTexture = new Texture2D(); ts.setTexture(bufTexture); bQuad.setRenderState(ts);
_bgQuad.setRenderState(_defBlendState); _bgQuad.setTranslation(texWidth / 2f, texHeight - (texHeight - lastY) / 2f, 0); _bgQuad.updateGeometricState(0, true);
fullScreenQuad.setRenderState(ts); as.setDestinationFunction(BlendState.DestinationFunction.One); as.setEnabled(true); fullScreenQuad.setRenderState(as);
_bgQuad.setRenderState(_defBlendState); _bgQuad.setTranslation(texWidth / 2f, texHeight - (texHeight - lastY) / 2f, 0); _bgQuad.updateGeometricState(0, true);
bufTexture = new Texture2D(); ts.setTexture(bufTexture); bQuad.setRenderState(ts);
fullScreenQuad.setRenderState(ts); fullScreenQuad.updateWorldRenderStates(false); fullScreenQuad.setRenderMaterial("bloom/fsq_blur_vertical5_down.yaml");
extractionShader.setUniform("exposureCutoff", getExposureCutoff()); fullScreenQuad.setRenderState(extractionShader); fullScreenQuad.updateWorldRenderStates(false); fullScreenQuad.setRenderState(blurShader); fullScreenQuad.updateWorldRenderStates(false); fullScreenQuad.setRenderState(blurShaderHorizontal); fullScreenQuad.updateWorldRenderStates(false); fullScreenQuad.setRenderState(blurShaderVertical); fullScreenQuad.updateWorldRenderStates(false); fullScreenQuad.setRenderState(finalShader); fullScreenQuad.updateWorldRenderStates(false);
final TextureState ts = new TextureState(); ts.setTexture(textureReflect); fullScreenQuad.setRenderState(ts); fullScreenQuad.setRenderState(blurShaderVertical); fullScreenQuad.updateWorldRenderStates(false);