#ifndef _BLEND_CG_
#define _BLEND_CG_

#include "material.cg"

struct BlendMaterial : Material {
    Material mats[];
    float weights[];

    float3 evaluate(vertexOutput IN, Light lights[]) {
        float3 result = 0;
        for (int i = 0; i < mats.length; i++) {
            result += mats[i].evaluate(IN, lights)*weights[i];
        }
        return result;
    }
};

#endif // _BLEND_CG_
