private double[][] computeBlendWeights()
	{
		int width = m_lic.getTextureSize().width;
		int height = m_lic.getTextureSize().height;
		double[][] weights = new double[width][height];
		
		//generate texture containg weights
		PdVector[] verts = m_domain.getVertices();
		for(int i = 0; i < m_domain.getNumElements(); i++){
			PiVector face = m_domain.getElement(i);
			//texture coordinates
			PdVector[] coords = m_domain.getElementTexture(i);
			//bounding box in texture
			double u_min = Float.MAX_VALUE, u_max = 0, v_min = Float.MAX_VALUE, v_max = 0;
			for(PdVector coord : coords){
				if(coord.m_data[0] < u_min) u_min = coord.m_data[0];
				if(coord.m_data[0] > u_max) u_max = coord.m_data[0];
				if(coord.m_data[1] < v_min) v_min = coord.m_data[1];
				if(coord.m_data[1] > v_max) v_max = coord.m_data[1];
			}
			u_min = Math.floor(u_min*width);
			u_max = Math.ceil(u_max*width);
			v_min = Math.floor(v_min*height);
			v_max = Math.ceil(v_max*height);
			//rasterize triangle
			for(double u = u_min; u < u_max; u++){
				for (double v = v_min; v < v_max; v++) {
					PdBary bary = new PdBary(3);
					PdBary.getBary(bary, new PdVector(u/width,v/height), coords);
					if(bary.isInside(1./m_domain.getDescr().getNumULines())){
						//compute weight
						PdVector vertex = bary.getVertex(null, verts[face.m_data[0]], verts[face.m_data[1]], verts[face.m_data[2]]);
						weights[(int)(u)][height-(int)(v)-1] = computeWeight(vertex, i, bary);
					}
				}
			}
		}
		
		return weights;
	}