def METHOD_NAME(variants_vec_backends_once_rgb):
    import numpy as np
    # RGB image
    bitmap = mi.load_dict({
        'type' : 'bitmap',
        'filename' : 'resources/data/common/textures/carrot.png'
    })
    x_res, y_res =  bitmap.resolution()
    # Coordinates of green pixel: (7, 1)
    x = (1 / x_res) * 7 + (1 / (2 * x_res))
    y = (1 / y_res) * 1 + (1 / (2 * y_res))
    si = dr.zeros(mi.SurfaceInteraction3f)
    si.uv = [x, y]
    mono = bitmap.eval_1(si)
    color = bitmap.eval_3(si)
    spec = bitmap.eval(si)
    expected = [0.0012, 0.1946, 0.0241]
    assert dr.allclose(0, color - spec)
    assert dr.allclose(expected, color, atol=1e-04)
    assert dr.allclose(mi.luminance(expected), mono, atol=1e-04)
    # Grayscale image
    bitmap = mi.load_dict({
        'type' : 'bitmap',
        'filename' : 'resources/data/common/textures/noise_02.png'
    })
    x_res, y_res =  bitmap.resolution()
    # Coordinates of gray pixel: (0, 15)
    x = (1 / x_res) * 0 + (1 / (2 * x_res))
    y = (1 / y_res) * 15 + (1 / (2 * y_res))
    si = dr.zeros(mi.SurfaceInteraction3f)
    si.uv = [x, y]
    mono = bitmap.eval_1(si)
    with pytest.raises(RuntimeError):
        color = bitmap.eval_3(si)
    spec = bitmap.eval(si)
    expected = 0.5394
    assert dr.allclose(expected, spec, atol=1e-04)
    assert dr.allclose(expected, mono, atol=1e-04)