Aeva / nw-converter

Parser and converter for the .nw level file format
GNU General Public License v3.0
8 stars 4 forks source link

change lighting function for seteffect #3

Closed Aeva closed 8 years ago

Aeva commented 8 years ago

The current code for tinting an actor via seteffect and compositing it onto the background is incorrect currently.

The alpha compositing part is fine as default behavior, but when a seteffect NPC is being drawn, its color channels should be added to the destination's instead of alpha blended against it.

The apply effect should multiply the image by the effect params (and do nothing with the value of the image). Because this will be used for ADD blending, we do not need to fudge the opacity (black regions will be translucent, the background will always get a little lighter)

The actual blending should probably be implemented using numpy due to the limitations of pillow and for the sake of speed.