Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] drawing completely outside screen overwrites border pixels #93

Closed
jzeiber opened this issue Sep 15, 2021 · 3 comments
Closed

[bug] drawing completely outside screen overwrites border pixels #93

jzeiber opened this issue Sep 15, 2021 · 3 comments

Comments

@jzeiber
Copy link
Contributor

jzeiber commented Sep 15, 2021

If drawing outside the screen 1 pixel to the right or 1 pixel below the SCREEN_SIZE, the border pixels within the screen boundary are overwritten. Doing so in the top or left of the screen does not exhibit the issue.

Example:

#include "wasm4.h"

void start()
{
	PALETTE[0]=0x000000;
	PALETTE[1]=0xFF0000;
	PALETTE[2]=0x00FF00;
	PALETTE[3]=0x0000FF;
}

void update()
{
	*DRAW_COLORS=0x03;
	rect(SCREEN_SIZE-16,SCREEN_SIZE-16,16,16);
	*DRAW_COLORS=0x22;
	rect(SCREEN_SIZE,SCREEN_SIZE-16,16,16);
	rect(SCREEN_SIZE-16,SCREEN_SIZE,16,16);
	
	*DRAW_COLORS=0x03;
	rect(0,0,16,16);
	*DRAW_COLORS=0x22;
	rect(-16,0,16,16);
	rect(0,-16,16,16);
}

Result:
result

Expected:
expected

@eXponenta
Copy link
Contributor

eXponenta commented Sep 15, 2021

Can you provide a cart file?
not reproduced on my project.

Maybe a device specific bug - how GPU query colors on missposited pixels.

@jzeiber
Copy link
Contributor Author

jzeiber commented Sep 15, 2021

Here's a cart that exhibits the issue. Tested on different computers with different browsers (Chrome/Firefox) and they all show the issue.
borderbug.zip

@aduros aduros closed this as completed in 80b38df Sep 15, 2021
@aduros
Copy link
Owner

aduros commented Sep 15, 2021

Thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants