public override Color LinearSample(Vector2 uv)
    {
        Color rlt = Color.black;

        for (int i = 0; i < alphamapLayers; i++)
        {
            float alpha = RayTraceTool.BilinearInterpolation(alphamaps[i], alphamapWidth, alphamapHeight, new Vector2(uv.y, uv.x));
            if (alpha > 0.004f)
            {
                rlt += RayTraceTool.LinearSample(textures[i].colors, textures[i].width, textures[i].height, Vector2.Scale(uv, textures[i].scale)) * alpha;
            }
        }
        return(rlt);
    }
 public override Color LinearSample(Vector2 uv)
 {
     return(RayTraceTool.LinearSample(texture.colors, texture.width, texture.height, uv));
 }