Custom effets/shaders

GDevelop should support custom effects
and also putting effects on objects, but making the effect affect any object that is behind it

What do you mean by custom effects? Are you aware of the available effects?

If you want certain things to happen when objects overlap, use the collision condition.

thats…
not what i meant
i said nothing about collisions

also by custom effects i mean it should be possible to put your own effect in gdevelop
the available effects are good, but there should be more of them

You asked that an effect would affect any object behind another object.
For that, you should use the collision condition.

Regarding user-made effects, you should be able to import them by placing the effect files in the folder C:\Users\(username)\AppData\Local\Programs\gdevelop\resources\GDJS\Runtime\Extensions\Effects

alright thanks for the effects folder thing
but i dont get how collision condition is related to effects

And nice work using effect and affect correctly and in the same sentence right next to each other!

thats really not what i mean


i meant something like this

So it’s more a post processing effect you’re after, for the area covered by an object. Because object effects just affect the object, and not the surrounding objects.

Do any of the bigger game engines have GameObject or UObject shaders that do this (looking in particular at Unity & UnrealEngine)?

idk about bigger game engines
but theres an engine that can do it
its called Clickteam Fusion 2.5

its just like gdevelop but outdated

As someone who has tinkered with CTF before, I can confirm that they’re really not similar at all in how they work or operate. The closest thing is that they have event-sheet style logic, but the logic between both are vastly different.

That said, if you’re just looking to merge colors, you’re not looking for effects. You’re either looking for opacity for the top level object, or looking to use “Blend modes” which can be used on sprites via an action:
image

GDevelop uses PixiJS as its renderer, and supports Normal (no blending), additive, multiply, and screen.

These can be seen in this example chart below.

1 Like

well im not looking to merge colors
but if they arent similar then it seems impossible in gdev

Oh no, that’s a shame, cos whatever thing you want to apply this too sounds like it would look really good.

There are 2 different blend effects I mentioned above that explicitly merge colors in the example (add and Multiply), so I’m not sure what you mean that GDevelop can’t do it.

The way I read it, Hussinali121 does not want the colors merged. Both Multiply and Add create the look of a third color. The overlapping part of the object at the back needs to take on the color of the front object.

Yes, that’s my understanding too. My interpretation of what Hussinali121 is after is that the effects/shader of the top object is applied to the objects underneath where they overlap.

So, for example, if you have a black & white effect on an object, then the pixels of the objects underneath that are overlapped by the top object also have the black & white effect applied.

Ahh, that sounds like using an object effect on something then applying it as a sprite mask to another thing.

The closest thing would be SRC_OUT/DST_OUT (source/destination out) but those aren’t supported by PixiJS’s WebGL renderer.