def METHOD_NAME(variant_scalar_rgb, np_rng):
    # Tests evaluating the texture gradient under different rotation
    import numpy as np
    delta = 1e-4
    si = mi.SurfaceInteraction3f()
    for u01 in np_rng.random((10, 1)):
        angle = 360.0*u01[0]
        bitmap = mi.load_dict({
            "type" : "bitmap",
            "filename" : "resources/data/common/textures/noise_8x8.png",
            "to_uv" : mi.ScalarTransform4f.rotate([0, 0, 1], angle)
        })
        for uv in np_rng.random((10, 2)):
            si.uv = mi.Vector2f(uv)
            f = bitmap.eval_1(si)
            si.uv = uv + mi.Vector2f(delta, 0)
            fu = bitmap.eval_1(si)
            si.uv = uv + mi.Vector2f(0, delta)
            fv = bitmap.eval_1(si)
            gradient_finite_difference = mi.Vector2f((fu - f)/delta, (fv - f)/delta)
            gradient_analytic = bitmap.eval_1_grad(si)
            assert dr.allclose(0, dr.abs(gradient_finite_difference/gradient_analytic - 1.0), atol = 1e04)