예제 #1
0
    public override float ProcessCoordinate(LayerChunk layerChunk, float layerOpacity, int x, int y, float weight)
    {
        float getWeight = layerChunk.GetHeight(x, y);

        // Div weight by layer weight, check for 0 weight or 0 opacity to avoid division by 0
        return((getWeight != 0 && layerOpacity != 0) ? weight / (getWeight * layerOpacity) : 0);
    }
예제 #2
0
 public override float ProcessCoordinate(LayerChunk layerChunk, float layerOpacity, int x, int y, float weight)
 {
     // Simple addition
     return(weight * (layerChunk.GetHeight(x, y) * layerOpacity));
 }
예제 #3
0
 public override float ProcessCoordinate(LayerChunk layerChunk, float layerOpacity, int x, int y, float weight)
 {
     // Halfway between weights
     return(weight + (((weight - layerChunk.GetHeight(x, y)) / 2) * layerOpacity));
 }