Making a shader effect apply to multiple layers

Get help using Construct 2

Post » Sun Mar 10, 2013 2:30 pm

C2's library of shader effects is excellent, however it presents one major limitation - We cannot make an effect apply across multiple layers.

Let's assume we are making a game with a few parallaxed background layers and a few layers for the foreground - perhaps a lighting layer, layer for objects in front of player, etc.

This very common layout has a few very big problems when webGL effects come into the picture.

Let's consider the problem with layer-wide effects. Perhaps we want to adjust the HSL of the foreground and the background to simulate a night atmosphere. As Construct 2 is at the moment, we have to apply redundant effects to every single layer of the game in order to achieve this. This may not seem like such a problem, however it has huge performance ramifications that only really show their faces at high resolutions. I've done testing in a game with about 8-10 layers and having 10 layer effects is crippling in fullscreen, where the same game with a couple of layout effects runs very smoothly at the same resolution.
A nice way to fix this problem would be to let us have 'multi-layer' effects. Layout effects as-is are pretty much useless for any game with a UI as-is anyway, so that's not really a valid option.

Now, I would be very happy to find that there is a way to write my own shader that does this however I feel like this specific problem is hardcoded into the editor.

Thanks for listening! Let me know if you think this is an important subtle change.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sun Mar 10, 2013 2:38 pm

I never messed up with layers myself but I can say that it's a viable option for people who like effects
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Mon Mar 11, 2013 7:56 pm

'Bump' This thread disappeared a little too quickly. My fault for posting in How Do I.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Mon Mar 11, 2013 8:34 pm

Ashley posted something about this here
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Post » Mon Mar 11, 2013 8:37 pm

Oh... that's not good news.

@Ashley , is there anything at all we can do about this? My game pretty much hinges on this being added. How complex is this architecture change?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Mon Mar 11, 2013 8:44 pm

Hey ,if the bummer is performance , then you might want to consider pre-rendering the layers that doesn't change ...
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Mon Mar 11, 2013 9:55 pm

@whiteclaws, different levels should have different effects, and I can't prerender a whole bunch of levels.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400


Return to How do I....?

Who is online

Users browsing this forum: jobel, Yahoo [Bot] and 22 guests