Windows 95 Mouse Cursor Shadows and Software Rendering
Windows 95 lacked native support for per-pixel alpha blending, meaning cursor drop shadows could not be rendered using modern translucency techniques. Instead, the operating system and display drivers simulated cursor shadows entirely in software using binary bitmasking, checkerboard stipple patterns, and an active save-and-restore framebuffer pipeline. This allowed the illusion of a soft, darkened shadow beneath the pointer without requiring dedicated hardware cursor planes or 32-bit ARGB compositing.
The Limitations of 16-Bit and Early 32-Bit GDI
The Windows 95 Graphics Device Interface (GDI) and Device Independent Bitmap (DIB) engine were built primarily for 8-bit palettized, 16-bit high-color, or basic 24-bit true-color framebuffers. Because full 8-bit alpha channels were not supported in GDI until later Windows versions, the system could not mathematically blend a shadow’s dark pixels with the arbitrary colors of the desktop below it.
When hardware cursor support on the graphics card was absent, disabled, or incompatible with custom cursor sizes, the display driver fell back to a software-rendered cursor implementation. In this fallback mode, all visual effects—including shadows—had to be computed and drawn directly into video memory by the CPU.
The AND/XOR Mask System
Windows 95 represented cursors using two separate monochrome bitmaps: the AND mask and the XOR mask. Each pixel on screen was processed using standard Boolean logic against these masks:
- Transparent background: AND = 1, XOR = 0 (leaves the underlying screen pixel unchanged).
- Opaque black: AND = 0, XOR = 0 (forces the screen pixel to black).
- Opaque white: AND = 0, XOR = 1 (forces the screen pixel to white).
- Inverted pixel: AND = 1, XOR = 1 (inverts the underlying screen color).
Because true partial transparency was impossible with this format, any shadow had to be constructed entirely out of these binary states.
Simulating Shadows via Stippling
To create a drop shadow, cursor designers used a spatial dithering technique known as "screen-door" or stippled transparency. Instead of darkening every pixel beneath the shadow boundary by a fixed percentage, the cursor's shadow area used an alternating 50% checkerboard pattern:
- Every other pixel in the shadow region was set to Opaque Black (AND = 0, XOR = 0).
- The adjacent pixels were set to Transparent (AND = 1, XOR = 0).
At standard CRT display resolutions of the era (such as 640×480 or 800×600), the tightly clustered black and transparent pixels visually merged. This produced the optical illusion of a semi-transparent, darkened shadow cast over whatever window, text, or icon sat underneath the pointer.
The Software Save-Under Pipeline
Because a software cursor is written directly into the visible display buffer, moving the cursor would permanently corrupt the desktop image without a mechanism to preserve the pixels underneath. To prevent this, the software rendering loop followed a strict three-phase procedure:
- Save: Before drawing the cursor, the driver copied the rectangular area of the screen where the cursor and its shadow would appear into an off-screen scratch buffer (known as the "save-under" area).
- Draw: The driver applied the cursor's AND mask to the visible framebuffer, punching holes and applying the stipple pattern, followed by the XOR mask to color the cursor body and shadow pixels.
- Restore: As soon as the mouse moved, the driver restored the original background by copying the saved pixels from the scratch buffer back into the framebuffer at the old coordinates. It then repeated the process at the new position.
Cursor Exclusion Zones
To avoid visual tearing and cursor corruption during screen updates, the Windows 95 DIB engine implemented "cursor exclusion." If an application or GDI routine needed to paint to an area of the screen that overlapped the software cursor, the display driver temporarily hid the cursor, restored the background pixels, allowed GDI to finish its paint operation, and then redrew the cursor and its stippled shadow over the updated content.