t2.setCombineScaleRGB(0);
t2.setCombineScaleRGB(1.0f);
    protected void simpleInitGame() {      rootNode.setRenderQueueMode(Renderer.QUEUE_OPAQUE);      fpsNode.setRenderQueueMode(Renderer.QUEUE_OPAQUE);        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);        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, 4);        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(512);        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);        TextureState treeTex = display.getRenderer().getTextureState();        treeTex.setEnabled(true);        Texture tr = TextureManager.loadTexture(                TestTerrainTrees.class.getClassLoader().getResource(                        "jmetest/data/texture/grass.jpg"), Texture.MM_LINEAR_LINEAR,                Texture.FM_LINEAR, true);        treeTex.setTexture(tr);        for (int i = 0; i < 500; i++) {            Pyramid p = new Pyramid("Pyramid" + i, 10, 20);            p.setModelBound(new BoundingBox());            p.updateModelBound();            p.setRenderState(treeTex);            p.setTextureCombineMode(TextureState.REPLACE);            float x = (float) Math.random() * 128 * 5;            float z = (float) Math.random() * 128 * 5;            p.setLocalTranslation(new Vector3f(x, tb.getHeight(x, z), z));            rootNode.attachChild(p);        }    }