LoginLogin

Sub Pixels

Root / General / [.]

12Me21Created:
On the 3DS, the pixels look like this: ______ BB|BB GG|GG RR|RR/u] This means the resolution is really 800x720 Unfortunately, you can't easily use the left and right subpixels, because of the graphics limitations, and the parallax barrier. However, you can change each color independantly so each pixel is 1x3 pixels
DEF GSPSET X,Y,A   'A = 1:on, A=0: off
 C=Y MOD 3
 RGBREAD GSPOIT(X,Y/3) OUT R,G,B
 GPSET X,Y/3,RGB(A*255,(C==2)*255 OR R,(C==1)*255 OR G,(C==0)*255 OR B)
END
Demo:
WHILE 1
GSPSET X,Y,1
B=BUTTON(1)
IF B==#UP THEN DEC Y ELSEIF B==#DOWN THEN INC Y ELSEIF B==#LEFT THEN DEC X ELSEIF B==#RIGHT THEN INC X
VSYNC
WEND
Also try doing GPAINT 0,0,#WHITE and then using GSPSET X,Y,0

BB GG RR ON NEW 3DS XL but the c==2 c==1 c ==0 don't need to be swapped...

Subpixel rendering is cool but it's only so useful. You're tied to the subpixel arrangement of the display unit, and the fact that each subpixel is only a single color. Usually it's done on a low-level display driver type situation (ClearType on Windows is a great example.) It's pretty hard to do at a high software level like this, but godspeed anyway I guess.

Yeah, it would work much better with the RGB RGB RGB pixel arrangement (like on most computer screens) but of course, the 3DS needed the sideways pixels so they could be divided in half for 3D.