How do the pixel shaders work?

This forum is currently in read-only mode.
From the Asset Store
Per Pixel Destruction like in "Worms" (perfect performance, no third party plugins)
  • I did part of the effect for Rocket Days, just cause I thought it would be easy (and it was).

    It's lacking blotches, hairs and scratches (the bright lines that walk are scratches in the film made by projection equipment!) but only because they require more time creating the images for them.

    http://www.udec.cl/~jfuente_alba/film.cap

    Nice link on L4D tech. We'll need adjustable smart-sharpening to do that one, and adjustable kernel-size blurring (samples can be fixed, kernel size just has to be adjustable).

    Also, grayscale plus breaks alpha? Try adding it to the layer in that .cap and see what happens.

    We need a way to apply effects to the whole screen. 3D games use a big quad that samples a buffer where everything's been stored so far. Layers cannot sample other layers in Construct. Would using Canvas work?

  • We need a way to apply effects to the whole screen. 3D games use a big quad that samples a buffer where everything's been stored so far. Layers cannot sample other layers in Construct. Would using Canvas work?

    That's exactly what I do. Create a canvas object and put it into the topmost layer. Then apply the effect to the canvas object. So you really only ever have to set the effect once.

    DevS: It'd be cool if we could copy / paste a whole layer with its settings from one layout to another.

    If you want the effect on other layouts as well, you just create a layer on top of everything and set it to be an inheritance layer that references the canvas layer from the other layout.

    The interesting part is that we can even use this stuff for gameplay effects. Like, you can even flip the screen (including inverted controls), invert everything, use warp effects and stuff like that.

    Also, because the post processing then happens on an object and isn't just something that's being done internally, you can use it in events, which is pretty awesome. Imagine your character is drunk or drugged and to heighten the difficulty, you could start warping the screen, etc.

  • That's exactly what I do. Create a canvas object and put it into the topmost layer. Then apply the effect to the canvas object. So you really only ever have to set the effect once.

    You paste every object on the canvas? or is there a way to paste a whole layer?

  • No, that's what the canvas object does. I only assign it to the topmost layer so it affects every layer underneath it.

    A canvas object is an object like the sprite object - just create it, you'll see what it'll do. You only need 1 canvas object and assign the effect you want to it - that's all there is to it. That way, you can even emulate adjustment layers or quickly change the mood of layouts and stuff, it's a pretty great way of working. So you could have 2 different mood sets that are only based on effects and they'd still only count as one in terms of vram.

  • I'm trying but it behaves just like a sprite with the difference that I have an action to paste stuff on it.

    Could you make an example of how to affect layers below?

  • Have you set the canvas object to 'Grab Layout: Before drawing'?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I forgot about this thread :s

    Okay, yeah, I never saw that option. It works now, thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)