public void compose(Raster src, Raster dstIn, WritableRaster dstOut)
	{
		if (_Entity == null) { throw new IllegalArgumentException("You must set an entity before drawing anything with this composite."); }

		try
		{
			// Get the max bounds of the writable raster.
			int maxX = dstOut.getMinX() + dstOut.getWidth();
			int maxY = dstOut.getMinY() + dstOut.getHeight();

			// Translate coordinates from the raster's space to the SampleModel's space.
			int dstInX = -dstIn.getSampleModelTranslateX();
			int dstInY = -dstIn.getSampleModelTranslateY();

			// Whether the source raster supports a 4th color band, ie. alpha.
			boolean supportsAlpha = src.getNumBands() >= 4;

			// For each pixel in the writable raster.
			for (int y = dstOut.getMinY(); y < maxY; y++)
			{
				for (int x = dstOut.getMinX(); x < maxX; x++)
				{
					// Get the depth (z) for both the destination and source rasters.
					double dstZ = getZ(dstInX + x, dstInY + y);
					double srcZ = _Entity.getDepthSort(x, y);

					// Get the pixel's alpha value.
					int alpha = supportsAlpha ? src.getSample(x, y, A_BAND) : 1;

					// If to overwrite or keep the source raster's data.
					if (srcZ > dstZ && alpha > 0)
					{
						setZ(dstInX + x, dstInY + y, srcZ);
						dstOut.setSample(x, y, R_BAND, src.getSample(x, y, R_BAND)); // R
						dstOut.setSample(x, y, G_BAND, src.getSample(x, y, G_BAND)); // G
						dstOut.setSample(x, y, B_BAND, src.getSample(x, y, B_BAND)); // B
					}
					else if (srcZ == dstZ && alpha > 0)
					{
						dstOut.setSample(x, y, R_BAND, src.getSample(x, y, R_BAND)); // R
						dstOut.setSample(x, y, G_BAND, src.getSample(x, y, G_BAND)); // G
						dstOut.setSample(x, y, B_BAND, src.getSample(x, y, B_BAND)); // B
					}
					else
					{
						dstOut.setSample(x, y, R_BAND, dstIn.getSample(x, y, R_BAND)); // R
						dstOut.setSample(x, y, G_BAND, dstIn.getSample(x, y, G_BAND)); // G
						dstOut.setSample(x, y, B_BAND, dstIn.getSample(x, y, B_BAND)); // B
					}
				}
			}
		}
		catch (Exception e)
		{
			System.out.println(this + ": Depth Composite Error. (" + e + ", Entity: " + _Entity.getName() + ")");
		}
	}