Solarus-Games English Forum

Solarus => Development => Topic started by: YoshiMario2000 on March 13, 2017, 02:23:49 AM

Title: blend modes
Post by: YoshiMario2000 on March 13, 2017, 02:23:49 AM
So I was working on a new light_manager script for my quest, but I've run into an issue with (what I think is) an engine limitation.
I'm trying to get it so that one surface applies to another while inverting it's alpha channel content (Opaque becomes transparent and transparent becomes Opaque). I'd write an algorithm myself in lua, but It would seem (Unless I'm missing something), that this is impossible for the moment.
Title: Re: blend modes
Post by: MetalZelda on March 13, 2017, 11:19:48 AM
You mean light effects ? It is possible, you need 2 surfaces, one with "multiply" blend, one other with "blend" blend

That way you can draw light effects on the blend surface

There is a thread here
http://forum.solarus-games.org/index.php/topic,676.0.html

And you can test Zelda book of mudora which use blend modes to render light effects