Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: Oomek on April 20, 2017, 06:07:03 AM
-
I'm planning to add belnding modes to Attract Mode (overlay, multiply, add, subtract)
Are you happy?
-
yes....i am
-
(https://preview.ibb.co/b5Ubkk/AM_Blending_Modes.png) (https://ibb.co/khS7rQ)
-
I can think of a lot of uses for this.
-
It appears that for overlay mode I won't be able to make the alpha blending working. It's due to how glsl's output merger belnding states work. I can work around this by making blending modes as a shader, but I wanted to make them native and accessible by setting for example image.blending("overlay"). To make it as a shader it would require to render all the theme objects on the master surface and then pass that surface to the shader to be used as a back buffer.
The good side of this is that I'm not limited to just 4 blending modes. I could do all the ones that Photoshop provides and many more.
Tell me what do you think.
-
I chose the shade route
usage is as simple as:
local bl = Blender( fe.layout.width, fe.layout.height )
local image1 = bl.add_image( "image1.png", 100, 100, BlendMode.Add )
local image2 = bl.add_image( "image2.png", 200, 200, BlendMode.Overlay )
All the image properties and functions are inherited, so you only substitute fe. with bl. and specify the blending mode and that's it
WIP video
https://youtu.be/JrvfiUfZ_Hw
-
this is awesome, thank you!
-
If this were available for download I'd be testing it on a new layout I have. There are some shadowing and highlights that might be nice to use these on instead of cut PNGs.
-
im guessing he has left the building?
:'(
-
I'm dying for this one as well... :P