t2.setCombineScaleRGB(0);
t2.setCombineScaleRGB(1.0f);
  protected void simpleInitGame() {    display.setTitle("Terrain Test");    input.setKeySpeed(50f);    cam.setLocation(new Vector3f(64*5, 250, 64*5));    cam.update();    FogState fs = display.getRenderer().getFogState();    fs.setEnabled(false);    rootNode.setRenderState(fs);    CullState cs = display.getRenderer().getCullState();    cs.setCullMode(CullState.CS_BACK);    cs.setEnabled(true);    lightState.setTwoSidedLighting(true);    ((PointLight)lightState.get(0)).setLocation(new Vector3f(100,500,50));    MidPointHeightMap heightMap = new MidPointHeightMap(128, 1.9f);    Vector3f terrainScale = new Vector3f(5,1,5);    TerrainBlock tb = new TerrainBlock("Terrain", heightMap.getSize(), terrainScale,                                       heightMap.getHeightMap(),                                       new Vector3f(0, 0, 0), false);    tb.setDetailTexture(1, 16);    tb.setModelBound(new BoundingBox());    tb.updateModelBound();    tb.setLocalTranslation(new Vector3f(0,0,0));    rootNode.attachChild(tb);    rootNode.setRenderState(cs);    ProceduralTextureGenerator pt = new ProceduralTextureGenerator(        heightMap);    pt.addTexture(new ImageIcon(TestTerrain.class.getClassLoader()                                .getResource("jmetest/data/texture/grassb.png")),                  -128, 0, 128);    pt.addTexture(new ImageIcon(TestTerrain.class.getClassLoader()                                .getResource("jmetest/data/texture/dirt.jpg")),                  0, 128, 255);    pt.addTexture(new ImageIcon(TestTerrain.class.getClassLoader()                                .getResource("jmetest/data/texture/highest.jpg")),                  128, 255,                  384);    pt.createTexture(64);    TextureState ts = display.getRenderer().getTextureState();    ts.setEnabled(true);    Texture t1 = TextureManager.loadTexture(        pt.getImageIcon().getImage(),        Texture.MM_LINEAR_LINEAR,        Texture.FM_LINEAR, true, true);    ts.setTexture(t1, 0);    Texture t2 = TextureManager.loadTexture(        TestTerrain.class.getClassLoader().getResource(        "jmetest/data/texture/Detail.jpg"),        Texture.MM_LINEAR_LINEAR,        Texture.FM_LINEAR, true);    ts.setTexture(t2, 1);    t2.setWrap(Texture.WM_WRAP_S_WRAP_T);    t1.setApply(Texture.AM_COMBINE);    t1.setCombineFuncRGB(Texture.ACF_MODULATE);    t1.setCombineSrc0RGB(Texture.ACS_TEXTURE);    t1.setCombineOp0RGB(Texture.ACO_SRC_COLOR);    t1.setCombineSrc1RGB(Texture.ACS_PRIMARY_COLOR);    t1.setCombineOp1RGB(Texture.ACO_SRC_COLOR);    t1.setCombineScaleRGB(0);    t2.setApply(Texture.AM_COMBINE);    t2.setCombineFuncRGB(Texture.ACF_ADD_SIGNED);    t2.setCombineSrc0RGB(Texture.ACS_TEXTURE);    t2.setCombineOp0RGB(Texture.ACO_SRC_COLOR);    t2.setCombineSrc1RGB(Texture.ACS_PREVIOUS);    t2.setCombineOp1RGB(Texture.ACO_SRC_COLOR);    t2.setCombineScaleRGB(0);    rootNode.setRenderState(ts);  }