void OutputPixel(Pixel P, Action <DrawOpBlock> output) { ushort x = (ushort)(Origin.X + dx.X * P.X + dy.X * P.Y); ushort y = (ushort)(Origin.Y + dx.Y * P.X + dy.Y * P.Y); ushort z = (ushort)(Origin.Z + dx.Z * P.X + dy.Z * P.Y); if (P.A < 20) { output(Place(x, y, z, Block.air, 0)); return; } int position; byte block = selector.BestMatch(P.R, P.G, P.B, out position); // Back layer block if (position <= threshold) { x = (ushort)(x + adj.X); z = (ushort)(z + adj.Z); } output(Place(x, y, z, block, 0)); }