Example #1
0
 private void setupFog() {
   FogState fogState = display.getRenderer().createFogState();
   fogState.setDensity(1.0f);
   fogState.setEnabled(true);
   fogState.setColor(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
   fogState.setEnd(farPlane);
   fogState.setStart(farPlane / 10.0f);
   fogState.setDensityFunction(FogState.DensityFunction.Linear);
   fogState.setQuality(FogState.Quality.PerVertex);
   rootNode.setRenderState(fogState);
 }
 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);
 }
Example #3
0
  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);
  }