Subtract Effect Bug?

This forum is currently in read-only mode.
  • Hey folks,

    I've hit a few snags with the 'Subtract' (PS 0 version) effect.

    First, the effect has a different output in the level editor and in the actual .exe. Inside the level editor the effect renders appropriately - sprites with the 'Subtract' effect darken other sprites. In the .exe, the effect is rendered as if it was set to 'Additive' - sprites lighten other sprites.

    Screenshot of this in action: Here

    Secondly, the 'Subtract' effect changes how sprite opacity is handled inside/outside of the level editor. Inside the level editor, sprites with the 'Subtract' effect are rendered semi-transparent, even if their opacity = 100%. Outside of the level editor sprites with opacity = 100% are correctly rendered fully opaque.

    Screenshot of this in action: Screenshot of this in action: Here

    I've also attached a simple .cap file to demonstrate the effect.

    If anyone sees anything obvious I'm doing wrong feel free to ridicule me. :]

  • Looking at Subtract.fx change this line:

    DestBlend        = INVSRCCOLOR;[/code:245lul4c]
    to this:
    [code:245lul4c]
    DestBlend        = SRCCOLOR;[/code:245lul4c]
    Then it will work correctly.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Good stuff! That seems to have solved the blending issue. Opacity is still a bit weird but nothing I can't work around.

  • Rojo, you should fix the .fx for the next version of construct if you haven't already.

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