Bug - Grey pixels in simulator

If you use a float to fill, you get a grey border around your filled square

As an example, add this to your player script:

on draw do
	fl = 15
	fl /= 2
	fill "white" at 0,0,fl,fl
end

You'll see on the top left a white square with a grey border. Is this just a simulator issue? Would actual hardware show something else?

image

Yup, simulator or browser issue. The hardware has only black and white pixels. Thanks for the report!

Here’s how it looks on the device. As you can see, the half-pixels are rendered fully white.

1 Like

Cool, thanks for testing that. So I can use ceil to make the browser match the hardware.

Yup, these values should be clamped by the runtime when used as arguments to functions that expect an integer. But if you want to ensure it’s rounding in a specific direction, manually using floor or ceil is definitely the way to go.