Problem aplying brick shader

I’m trying to apply the brick shader, but it shows black. Texture and color work in the code below, but the shader doesn’t. Can anybody spot the problem? I’m drawing it onto an image (so the code below follows a setContext(img)), maybe that’s causing problems?

        local m = mesh()
        m:addRect(self.wh.x/2, self.floorHeight/2, self.wh.x, self.floorHeight)
        m.shader = shader("Patterns:Bricks")
        --m.texture = readImage("Cargo Bot:Codea Icon")
        --m:setColors(color(255,0,math.random(255)))
        m:draw()

You need to provide parameters to the shader, do this in setup

--these are the settings from the ShaderLab
m.shader.brickColor=vec4(0.8,0.8,0.8,1)
m.shader.mortarColor=vec4(1,.2,.3,1)
m.shader.brickSize=vec3(35,15,35)
m.shader.brickPct=vec3(.9,.85,.85)

Ah, excellent! Thanks! =)