Shadow mode takes effect when there are two layers with neighboring priority values. (within the halfpixel column)
| dest layer | shadow=2 | shadow=3 |
|---|---|---|
| pivot | bit4 = 1 | bits 6-11 = 0, bit 12 = 1 (!) |
| bpp=0 | bit4 = 1 | bits 6-12 = 0 |
| bpp=1 | bit5 = 1 | bits 4,6-12 = 0 |
| bpp=2 | no effect | bits 5-12 = 0 |
| bpp=3 | bit6 = 1 | bits 4-12 = 0 |
t = texture bit (n) p = palette bit (n-4) Q = palette bit (n-4) OR'd with texture bit (n) 0 = always 0 1 = always 1 (note that palette and texture bits are never shifted around) bpp=0 shadow=0 [p pppp pppp tttt] shadow=2 [p pppp ppp1 tttt] shadow=3 [0 0000 00pp tttt] bpp=1 shadow=0 [p pppp pppQ tttt] shadow=2 [p pppp pp1Q tttt] shadow=3 [0 0000 00p0 tttt] bpp=2 shadow=0 [p pppp ppQp tttt] shadow=2 [p pppp ppQp tttt] (no change) shadow=3 [0 0000 000p tttt] bpp=3 shadow=0 [p pppp ppQQ tttt] shadow=2 [p pppp p1QQ tttt] shadow=3 [0 0000 0000 tttt] EXCEPT, with the pivot layer, it's like: shadow=0 [0 00pp pppp tttt] shadow=2 [0 00pp ppp1 tttt] shadow=3 [1 0000 0000 tttt] note that sprites normally have color bit 12 hardcoded to 1, which is uniquely cleared by shadow mode 3
Shadow only works between certain combinations of upper/lower layers, though all layers can affect the results via priority conflicts (e.g. normally sprites can't shadow onto tilemaps, but you can shadow a tilemap onto another tilemap, and use conflicting sprites to cut a hole in the lower tilemap, which will cut a hole in the shadow effect) There isn't any clear rule for which layers are compatible:
| bottom | ||||||||
|---|---|---|---|---|---|---|---|---|
| tm 0 | tm 1 | tm 2 | tm 3 | sprite | pivot | highcolor | ||
| top | tm 0 | - | ||||||
| tm 1 | yes | - | ||||||
| tm 2 | yes | - | ||||||
| tm 3 | yes | yes | yes | - | yes | yes | ||
| sprite | yes | - | ||||||
| pivot | yes | yes | yes | - | ||||
| highcolor | yes | yes | yes | - | ||||