private void createFog() { FogState fs = display.getRenderer().createFogState(); fs.setDensity(0.5f); fs.setEnabled(true); fs.setColor(new ColorRGBA(0.8f, 0.8f, 0.8f, 0.8f)); fs.setStart(50); fs.setEnd(visibilityRadius); fs.setDensityFunction(FogState.DF_LINEAR); fs.setApplyFunction(FogState.AF_PER_VERTEX); root.setRenderState(fs); }
public Brouillard(Monde client) { FogState fs = client.getDisplay().getRenderer().createFogState(); fs.setDensity(0.5f); fs.setEnabled(true); fs.setColor(new ColorRGBA(0.5f, 0.5f, 0.5f, 0.5f)); fs.setEnd(end); fs.setStart(start); fs.setDensityFunction(FogState.DF_LINEAR); fs.setApplyFunction(FogState.AF_PER_VERTEX); client.getRootNode().setRenderState(fs); }