oppenheimer's Forum Posts

  • Joannesalfa

    no problem m8, was glad to help.

    have a look at the javascript-sdk-template. it's pretty useful, because it explains what you have to do when writing (or copy&paste) shaders (or behaviours/plugins).

  • wow, not so nice :/

    yeah, it looks good, but accessability has suffered.

    my suggestion would be to have some user defined critera / filters to choose from.

    • not just presets: beginners, top and newest.
    • show XXX tutorials at once (customizable while logged in?).
    • automatic loading of the next page, when we scroll to the bottom.
    • list view as an option to the "matrix" view, (as seen in famous stores like apple or samsung e.g.).
    • briefly show other relevant topics / hits on a tutorial page.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yann - <img src="smileys/smiley32.gif" border="0" align="middle"> on your plugin, it 's cool!

    do you think, that bezier curvers will be an option?

    Aaand have a look at this awesome flash-engine-demo. Which ingredients do we need to replicate that into a plugin?

    edit: well, it seems like i asked a similar question to labithiotis's. such an editor would be soooo awesome ;)

  • Ize

    i cannot reproduce this bug you are talking of. what objects on the gui layer? Maybe those interfere with the shader, or you might have accidently placed them on another layer.

    Animmaniac

    congrats, this effect is awesome =)

    especially with rojos outline shader ^^

  • Pode and Joannesalfa

    cleaned the code and now it works <img src="smileys/smiley1.gif" border="0" align="middle">

    here is a preview. and the corresponding .capx

    and here is the VHS .FX and XML.

    Save file as & put them into the effects folder.

    I didn't spend much time on describing the parameters.. so maybe you like to add some meaning to it or even improve it.

  • Did you came up with some result Joannesalfa ?

    Just ask, i'll try to clarify ;)

    I found a really nice webGL tutorial on the net by Stefan Gustavson:

    WebGL halftone shader: a step-by-step tutorial

  • sogen - why do you think PSD import will be of any use? i can't imagine a usecase where one really needs it. stick to PNG and everything is fine!

  • R0J0hound

    Interesting! I encountered artifacts as i tried to build a cartesian to polar mapper, which tries to sample some points out of the box area at times. Maybe it has something to do with the extended box... dunno.

    Btw. a first experiment showed, that your outline shader with outline only set to 1 works pretty good as a photoshop style "glow". Just in case somebody likes to try ;)

  • sogen - that advanced text object would be definately useful. especially if we can have css for it ;)

    R0J0hound Ashley - Well, in addition to my last post, i should clarify that it's not my intend to have a color parameter alone. The 3 vector types would be smart, too.

    edit: grammar <img src="smileys/smiley32.gif" border="0" align="middle" />

  • Ashley - So a game developer who targets desktop/browser apps has the same restrictions in shader usage as a mobile developer. Maybe a concept where the dev has the option to specify a certain glsl version would be good. The shader xml has to contain a param to define this gl version then. This would be flexible solution for multitarget exports.

    I can imagine that it means a lot of work for you, but to be really future proof (regarding mobile hardware as well), it's inevitable to open up the options a bit.

    Speaking of options.. The same way fragment shaders are implemented, it should be possible to include vertex shaders. Back in 2009 you stated "What can you usefully do with four vertices?" speaking about CC. There we had the opportunity to distort the vertices via events. Kinda bottlenecked, but it was possible. With a vertex shader it should be possible to adaptively add more vertices to an object. You claim that C2 is not a 3D software, but again i think, that you should open up the possibilites for the user a little bit more. Think of how much bandwidth will be saved if a user wants to add a 3d model with one texture instead of a precomputed sprite sheet.

    Concerning your last question, i can't think of further params to be included. But the 3 vector types (and arrays perhaps) would be pretty useful imho.

  • Joannesalfa

    First of all, it is a good idea to have a look into the shaders.js when you get errors. In chrome you can do this by pressing ctrl+shift+i. Go to the tab named "Sources", then "shaders.js". The specific error you encountered is present at Line 19, because the first line just initialzes the following code for C2.

    "Varying" variables can't be altered at runtime, so therefore you get that error. To bypass it you can simply define a new vec2 variable after "void main( void ) {" like this:

    vec2 myPos = position;

    then just replace the following "position" variable with "myPos".

    One further suggestion when copy-pasting:

    glsl es 1.0 is VERY strict, so you should always check the code for possible errors beforehand, otherwise Chrome will make you go nuts. For example if you define a float variable like this:

    float myFloat = 1;

    you will get an error because 1 is not a float. Write 1.0 instead.

    another popular one:

    gl_FragColor is a vec4(). So if you pass a vec3 to it (just rgb for example), you'll get an error.

    gl_FragColor = vec3(1.0, 1.0, 1.0); // <- wrong

    gl_FragColor = vec4(1.0, 1.0, 1.0, 0.5); // <- right

    following code is possible, too:

    vec3 RGBcolor = vec3(1.0, 1.0, 1.0);

    gl_FragColor = vec4(RGBcolor, 0.5);

  • Ashley

    Currently i'm pretty much into web gl sahder writing.. at least i try. But still there are some things a bit unclear to me. For example which version of glsl es are we dealing with, my guess is 1.0 because you pointed to page 3 and 4 of the reference card.

    That brings me to the question if there is any chance to raise this in the near future, because in 1.0 one has to struggle with a lot of limitations (e.g. array initializing, loops etc.).

    Another suggestion would be to elaborate a bit more on the pre-defined parameters we can use in shaders. Right now the template.fx speaks of seconds, pixelWidth, pixelHeight etc.. Is that everything? In the file "glwrap.js" there is one additional parameter "LayerScale". Might this be useful to include it into the template?

    How difficult would it be to implement furthers params we can use? As i already suggested it would be awesome to pass vector values (vec2, vec3, vec4) on the fly.

    Thanks for your reply! <img src="smileys/smiley2.gif" border="0" align="middle" />

  • R0J0hound

    just a little question: why did you set extend-box parameters in the xml to zero? i'd expect a bit more for standard outlines like up to 8 to 16 perhaps.

    On the other hand one can extend the transparent area around a sprite to the specified outline width. I thought it'll be a useful hint for some people <img src="smileys/smiley17.gif" border="0" align="middle" />

  • lemo thanks! im a newbie to glsl es, but i try my best to come up with something useful. and thanks for pointing me to the outline shader; maybe we can achieve a glow with that and a simple blur?

    just yesterday i realized that there are 2 simple glow shaders in the effects dir, horizontal and vertical. i'll see, if it can be improved somehow (radius etc.) <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Joannesalfa

    well, you can't just replace the sampler name. the shader toy has some built variables which will not work in C2.

    For example "uniform float time;" would be "uniform float seconds;" in C2. Take a look at the "template.fx" and "template.xml" from the sdk. Some of those special variables are explained there.