Fading on the NES is indeed accomplished by darkening/brightening the palette over time. The challenge is to do it smoothly when there are only 4 levels of brightness to work with. The color emphasis bits can be used to create intermediary steps if you turn all 3 bits on, since that darkens the palette slightly, but this trick backfires on RGB PPUs, where turning all 3 color emphasis bits on makes the screen completely white.
Another way to create smoother fading sequences is to animate the hue in addition to the brightness: slide towards blue when fading to black, towards yellow when fading to white.
One more technique that worked reasonably well for me is to stagger the brightness changes, instead of changing all colors at once: when fading out, only darken the $0x colors, making them black. On the next step, darken only colors $1x, making them $0x. Then darken $2x, then finally $3x, so what took just 1 frame with the typical "subtract $10" technique, takes 4 frames with the staggered method. The next round of updates has only 3 steps, since there are no $3x colors anymore, and each round has fewer steps, but in the end you have a 4 + 3 + 2 + 1 = 10-step fade sequence instead of a 4-step one, and it does look smoother (as long as the image contains colors of varied brightness levels).
|