Mac Simulator, Version 1.9.3 (133541)
When I call playdate.graphics.setStencilPattern(level) I get what looks like level of the pixels in some rows and no pixels (all off, as if stencil were black) in the other rows. It seems to be one row in 8. For example, using playdate.graphics.setStencilPattern(1) gives horizontal stripes. playdate.graphics.image:drawFaded works, so I'm able to work around this, but it'd be better if the stencil dither worked as in the docs.
For the benefit of anyone else trying to use this before it's fixed, here's the monkeypatch:
local ssp = playdate.graphics.setStencilPattern
function playdate.graphics.setStencilPattern(...)
local args = {...}
if #args <= 2 then
level = args[1]
ditherType = args[2] or playdate.graphics.image.kDitherTypeBayer8x8
local b = playdate.graphics.image.new(32, 32, playdate.graphics.kColorBlack)
local w = playdate.graphics.image.new(32, 32, playdate.graphics.kColorWhite)
playdate.graphics.setStencilImage((w:blendWithImage(b, level, ditherType)), true)
else
ssp(...)
end
end
(It's obviously not good for performance since it's making those images every time but it's good enough for my use.)