You do not have permission to edit this page, for the following reason:
The action you have requested is limited to users in one of the groups: Users, Administrators.
Free text:
{{#seo: |title=GameBrew |title_mode=append |image=subpixelscrollinggb.png |image_alt=Sub-Pixel Scrolling Demo }} An assembler demo that smoothly scrolls half of the screen one pixel at a time, and the other half 1/3 of a pixel at a time. == User guide == Each pixel on the CGB screen is made up out of three thin color elements of red, green and blue. You can see this for yourself if you put a drop of water on the screen, as a makeshift magnifying glass. The elements in each pixel are ordered red, green, blue from left to right, but of course any other order would do as well. Look at this diagram of a row of pixels on the CGB screen: https://dlhb.gamebrew.org/gbhomebrews/subpixelscrollinggb2.png Normally, if you were to scroll this row by one pixel to the left, you would get this: https://dlhb.gamebrew.org/gbhomebrews/subpixelscrollinggb3.png But scrolling at sub-pixel accuracy, you take these steps: https://dlhb.gamebrew.org/gbhomebrews/subpixelscrollinggb4.png Voila, three times as smooth. Of course, this comes at a price. Scrolling on the GB is done in hardware, while all this business is going to take a considerable amount of (video) memory and processing whichever way you implement it. Also, if you're scrolling something made up out of multiple colors, the constant reordering of pixel elements might result in very apparent color clash changes. Consider this example: https://dlhb.gamebrew.org/gbhomebrews/subpixelscrollinggb5.png The second pixel is fully bright, the third has its green element fully turned on. What happens when you scroll this? https://dlhb.gamebrew.org/gbhomebrews/subpixelscrollinggb6.png As you can see, the single green element 'jumps' to different positions compared to the fully bright 'pixel', which could result in some visual artefacts. Also, the Game Boy has a palletized display, so there's a limited amount of colors to work with. Just scrolling our single fully bright pixel at sub-pixel accuracy created four new colors: rgB, RGb, rGB and Rgb. (that is, (0,0,255),(255,255,0), etc.) Not all is lost, though, as there are other, more appropriate uses for the same idea. Due to the way the eye perceives color, sub-pixel rendering can be very useful for static images - not in the least for text, which is monochrome most of the time anyway. See also [https://www.grc.com/cleartype.htm Sub-Pixel Font Rendering Technology] for an excellent overview of the issues involved. ==External links== *Author's website - [https://web.archive.org/web/20000815225059/http://vandenborre.org/old/ http://vandenborre.org/] (archived)
Advertising: