Creating a square on a terrain using SplatTexture

Hi,



I have created a terrain. The terrain size/resolution is 256x256 (= height map size). I have created an alpha map vl, for which I can set on pixels that I want.



I want to be able to set a square splat for any of terrain location (256x256). Now I have set pixel at location x=128,y=128 on. Screen shot shows that area as a blue square. However, the problem is that square coming from the splat texture is 1.5 times larger of what it should be. See yellow square to indicate the true size of 1/256x1/256 of terrain side.



If terrain size is 256x256, how can I adjust that splat would produce square of exactly 1/256 x 1/256?



Sorry, this is a bit hard to explain. Hope somebody understands what I am trying to explain.



Thanks



                Vector<Location> vl = new Vector<Location>();
      vl.add(new Location(128,128));

                BlendState bs = display.getRenderer().createBlendState();
      bs.setBlendEnabled(false);
      bs.setSourceFunction(BlendState.SourceFunction.SourceAlpha);
      //bs.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha);

      bs.setDestinationFunction(BlendState.DestinationFunction.One);
      
      bs.setTestEnabled(true);
      bs.setTestFunction(BlendState.TestFunction.GreaterThan);
      bs.setEnabled(true);

      TextureState ts = createSplatTextureState(display, "graphics/blue.png", createAlphaMap(vl));
      PassNodeState passNodeState = new PassNodeState();
      passNodeState.setPassState(ts);
      passNodeState.setPassState(bs);
      splattingPassNode.addPass(passNodeState);