fisholith's Recent Forum Activity

  • Is there a list of the specialty variables that Construct 2 makes accessible in GLSL?

    e.g. From looking through scripts I found "pixelHeight".

    In Construct Classic, I recall the following variables being available:

    [quote:1lvdl6i8]boxWidth

    boxHeight

    boxLeft

    boxRight

    boxTop

    boxBottom

    pixelWidth

    pixelHeight

    hotspotX

    hotspotY

  • Sounds good. Thanks again. :)

  • Just want to double check the method for enabling dev mode.

    The SDK page says,

    [quote:165dbysl]"and add the key devmode and set it to 1 (DWORD value)."

    Does this mean that, inside the "html5" key (folder), I need to create a new key (subfolder) named "devmode", put an unnamed DWORD inside it, and set it to 1?

    Or does it mean that, inside the "html5" key, I need to create a DWORD named "devmode", and set it to 1?

  • Good point. Additionally, adding and removing effects is probably much less of an issue than previewing changes anyway, because in general if I'm working on a new effect, I only need to restart C2 once for it to show up. After that it's just a matter of testing incremental changes.

    The dev mode sounds like it's pretty much exactly what I'm looking for.

    Thanks :D

  • Other than exiting and restarting Construct 2, is there a way to force the list of effects to reload?

    The only reason I ask is that it would be a bit easier to test incremental changes to effect code if I could avoid regularly restarting Construct.

    On the plus side, what I've noticed so far is that in some cases I can see changes to effect code when running the compiled version of a project, which is nice, but it's a limited workaround, as it doesn't really help if the change was something like a new parameter.

    At the moment, if I create a new effect, I save my project, close Construct 2, restart it, and reopen the project, to see the new effect show up in the effects list.

    Similarly, if I make a change to an existing effect, the change will show up when I compile and run the project, but it won't show up in Construct 2's layout editor, even if I remove and reapply the effect.

    Anyway, I hope I don't sound like I'm complaining or anything. I just want to make sure I'm not missing something, or overlooking a better workaround.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, awesome. Thanks. :D

    A few more questions just occurred to me, actually.

    5: If you place an effect on a sprite, can you sample parts of a foreground sprite that are off-screen?

    Just checking because I played around with a blur, and it looks like it ignores pixels that are outside the visible screen area. More specifically it looks like sample coords that refer to off-screen locations are clamped to the closest equivalent on-screen location.

    6: Can the origin of the vTex coords ever be outside the visible screen area?

    i.e. If a foreground sprite's top-left corner moves off-screen, does the origin of the vTex coords move off screen with it, or are the vTex coords squeezed to fit inside the edges of the visible screen area?

    In Construct Classic, I vaguely recall the HLSL coords acting a little different as a sprite started moving off-screen.

    7: Is there any place I should look to find out more about the details of the Construct 2's GLSL related stuff, or is the forum the best place to ask about this kind of thing?

    Thanks again. :)

  • Hi all :)

    I just started looking into making some GLSL shaders, and I have a few questions about the coordinate system.

    1: What are the units for the vTex coordinate values? (e.g. pixels, sprite lengths, etc)

    2: What is the origin for the vTex coordinates? (e.g. corner of layout, corner of sprite, etc)

    3: Does the background need some kind of special coordinate conversion to ensure that it is sampled correctly? I ask because the "dodge" effect has the following line:

    [quote:sdoz8br7]lowp vec4 back = texture2D( samplerBack , mix( destStart , destEnd , vTex ) );

    It looks like "mix()" might be a lerp style function. It makes me wonder if vTex values run from 0 to 1 across a sprite, and so they are being used to lerp between the screen cords of the relevant patch of background, or something.

    4: What are the "destStart" and "destEnd" variables, and what are their units and origin?

    Just curious, thanks. :)

  • Thanks. :D

  • I just recently created a post for an effect suite I'm working on for Construct Classic. I set up the download to use Dropbox, as I wasn't sure if it was okay for a poster to link to their own website. So I wanted to ask first.

    Is it alright for a poster to link to their own site?

    (e.g. In my case link to a page containing documentation for the effect suite I'm releasing.)

    Does it make a difference if the site can accept donations, via donation button or something?

    (My site doesn't have any donation system at the moment, but I'm still in the process of assembling the site, and I hope to include something like that eventually.)

    I know I've seen a few other posters link to their sites, but I just wanted to make sure those weren't special cases or something.

    Sorry if this is an odd question. I try to err on the side of caution where forum etiquette is concerned. :)

  • Thanks everyone. :D

    Definitely let me know if you have any questions or suggestions. I'm all ears.

    Also, there are descriptions of all the effect parameters available as well. I just added a new "Effect Instructions" section to my top post describing where you can find these descriptions.

    (I'm also including that new section below for convenience.)

    <font color=blue>Effect Instructions:</font>

    I'll be releasing more detailed instructions in the future, but for now, each effect has some built-in documentation which should help out.

    Effect Descriptions:

    When adding a new effect from the effect list, the description of the selected effect can be seen in a gray box at the bottom of the effect list window. If a description doesn't quite fit in the box, then you can always stretch the window wider to read all of it.

    Effect Parameter Descriptions:

    When you add an effect to an object, and edit the effect parameters in the Property panel, clicking on one of the parameters to edit it's value causes a gray box at the very bottom of the Property panel to show a description of that parameter. I've tried to make the parameter descriptions pretty helpful. They will often explain what the parameter does, what to expect from specific example values, and the valid range (e.g. 0.0 to 1.0) and type (integer or decimal) of values.

    For parameters that are integer menus, (e.g. 0 = off, and 1 = on.), the parameter descriptions will list the available menu options, and their effects.

    e.g.

    [0] = Normal blend.   [1] = Add blend.   [2] = Multiply blend.

  • Okay, here is the alpha release of the effect suite I'm working on.

    Feedback is very much welcome, as are any questions.

    I'll be releasing effect demos, in both .cap and .exe form, for the other effects soon.

    <font color="blue">Download:</font>

    Fisholith Effects - alpha 1 - 111111.zip

    (The "111111" is the date.)

    <font color="blue">Effect Demos (compiled):</font>

    Download - Bias Gain demo app

    (more to come)

    <font color="blue">Installation:</font>

    Unzip the ".fx" files and place them in the following folder, (depending on your OS).

    XP: C:\Program Files\Scirra\Construct Classic\Effects

    Vista & 7 x64: C:\Program Files (x86)\Scirra\Construct Classic\Effects

    <font color="blue">Effect naming:</font>

    "!fi -"

    For the alpha releases, all effect names start with "!fi -". This is because when I work on them, it's much easier to have them sort to the top, and stay in a group. I hope this isn't too inconvenient for anyone for the time being.

    "RGB"

    Effects with names ending in RGB give individual control over the Red, Green, and Blue channels.

    <font color="blue">Effect Instructions:</font>

    I'll be releasing more detailed instructions in the future, but for now, each effect has some built-in documentation which should help out.

    Effect Descriptions:

    When adding a new effect from the effect list, the description of the selected effect can be seen in a gray box at the bottom of the effect list window. If a description doesn't quite fit in the box, then you can always stretch the window wider to read all of it.

    Effect Parameter Descriptions:

    When you add an effect to an object, and edit the effect parameters in the Property panel, clicking on one of the parameters to edit it's value causes a gray box at the very bottom of the Property panel to show a description of that parameter. I've tried to make the parameter descriptions pretty helpful. They will often explain what the parameter does, what to expect from specific example values, and the valid range (e.g. 0.0 to 1.0) and type (integer or decimal) of values.

    For parameters that are integer menus, (e.g. 0 = off, and 1 = on.), the parameter descriptions will list the available menu options, and their effects.

    e.g.

    [0] = Normal blend.   [1] = Add blend.   [2] = Multiply blend.

    <font color="blue">Effect List:</font>

    Additive Bidirectional RGB

    Additive Bidirectional

    Bias Gain

    Bias RGB

    Bias

    Bit Crusher RGB

    Channel Invert

    Channel Reassignment

    Channel Select RGBA for BG

    Channel Select RGBA

    Channel Wrench

    Compose RGBA Tiles Stretch

    Compose RGBA Tiles

    Dither Map Bit Crusher RGB

    Dither Map Gen 8x8

    Dither Map Posterize RGB

    Elevation Gradient Chromatic

    Elevation Gradient

    Gain

    Global Variable Texture Viewer

    Grayscale to Opacity Gamma Aware

    Grayscale to Opacity

    Pixel Noise

    Posterize RGB f3

    Posterize RGB

    RGB2HLS

    Scan Line Tool

    Solarize RGB

    Solarize

    Threshold RGB

    Threshold Soft Color

    Threshold Soft

    Threshold

    Use Background via Alpha Mask

    Use Background via Bounding Box Mask

    • Post link icon

    I would definitely be interested in helping to add to Construct. :)

fisholith's avatar

fisholith

Member since 8 Aug, 2009

Twitter
fisholith has 2 followers

Connect with fisholith

Trophy Case

  • 16-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies