the smoke stuff uses the triangle function 'circle_darken' -
all opaque surfaces must have been scan-converted into pixel memory.
then, the circles can be painted using a dark airbrush.

the trick is, scan-convert the circle using

TREEltZERO_Q6,                   then z-compare to determine visibility
TREEltMEM_L3                     and push away enable flag
ENABintoMEM (inside_circle)      now, are we a 24-bit pixel?
ENABandeqMEM (pxltype)           if so, darken r,g,b
ENABintoMEM (inside_and_24)      save away
// now for each of r, g and b
MEMgtSCA (brightness)            set enable if we can proceed with subtract
MEMpluseqSCA                     NB add on -darkness
ENABINV ()
ENABandeqMEM (inside_24)
CLEAR

MEMgtSCA (brightness)            set enable if we can proceed with subtract
MEMpluseqSCA                     NB add on -darkness
ENABINV ()
ENABandeqMEM (inside_24)
CLEAR

MEMgtSCA (brightness)            set enable if we can proceed with subtract
MEMpluseqSCA                     NB add on -darkness
ENABINV ()
ENABandeqMEM (inside_24)
CLEAR

MEMintoENAB (inside_circle)      now, are we a 24-bit pixel?
ENABandeqMEMBAR (pxltype)        if so, darken r,g,b
ENABintoMEM (inside_and_8)       save away
// now for each of diff and spec
MEMgtSCA (brightness)            set enable if we can proceed with subtract
MEMpluseqSCA                     NB add on -darkness
ENABINV ()
ENABandeqMEM (inside_24)
CLEAR

MEMgtSCA (brightness)            set enable if we can proceed with subtract
MEMpluseqSCA                     NB add on -darkness
ENABINV ()
ENABandeqMEM (inside_24)
CLEAR

Note that if pixel map is arranged for diffuse and spec to inhabit r and g

//                                         cycle count
TREEltZERO_Q6,                             40
TREEltMEM_C1                               40
ENABintoMEM (inside_circle)                 1
// now for each of r, g and b
MEMgtSCA (brightness)                      16
MEMpluseqSCA                               16
ENABINV ()                                  1
ENABandeqMEM (inside_circle)                1
CLEAR                                       8

MEMgtSCA (brightness)                      16
MEMpluseqSCA                               16
ENABINV ()                                  1
ENABandeqMEM (inside_circle)                1
CLEAR                                       8

MEMintoENAB (inside_circle)                 1
ENABandeqMEM (pxltype)                      1
ENABintoMEM  (inside_24)                    1

MEMgtSCA (brightness)                      16
MEMpluseqSCA                               16
ENABINV ()                                  1
ENABandeqMEM (inside_24)                    1
CLEAR                                       8
