@Override
	public void draw(BufferedImage[] baseImage) throws MdDrawerException {
		DrawerUtil drawerUtil = this.getDrawerUtil();
		String customPixelShaderName = this.customPixelShaderMdSetting.getCustomPixelShaderName();
		CustomPixelShader customPixelShader = null;
		
		if (customPixelShaderName != null) {
			try {
				customPixelShader = drawerUtil.getCustomPixelShader(customPixelShaderName);
			} catch (JspfException e) {
				MdDrawerException e2 = new MdDrawerException(e);
				e2.setContents(e.getContents());
				throw e2;
			}
		}
		
		if (customPixelShader != null) {
			customPixelShader.setDrawerUtil(this.getDrawerUtil());
			customPixelShader.setDebug(false);
			customPixelShader.setSettingValues(customPixelShaderMdSetting.getValues());
			
			StringWriter outputSw = new StringWriter();
			PrintWriterEx outputWriter = new PrintWriterEx(outputSw);
			customPixelShader.setOut(outputWriter);
			
			BufferedImage[] cachedImages = this.getCachedImage();
			for (int i=0;i<cachedImages.length;i++) {

				PresetImage presetImage = new PresetImage();
				presetImage.setBufferedImage(baseImage[i]);
				customPixelShader.setBaseImage(presetImage);
		
				customPixelShader.setFrameCount(i);
				customPixelShader.setMaxFrameCount(cachedImages.length);
				
				Color4d color4d = new Color4d();
				BufferedImage cachedImage = cachedImages[i];
				int w = cachedImage.getWidth();
				int h = cachedImage.getHeight();
				
				try {
					for (int x=0;x<w;x++) {
						for (int y=0;y<h;y++) {
							customPixelShader.shadePixel(color4d, x, y, w, h);
							cachedImage.setRGB(x, y, color4d.toRgb());
						}
					}
				} catch (Exception e) {
					ExceptionHandler.error(e);
				}
			}
		}
	}