matriax's Forum Posts

  • Editor progresion, every time looks better!:

    New features:

      • Change the background image
      • Set Shader Blend On/Off
      • Save/Load shader
      • Added a lot of pressets
      • Added a "Fade Start Y" variable.
      • Url Shader sharing. Adding in the link "?shadercode=" + your shader code, the app starts with the shader you created.

    The ideas was create a Fire shader for my game but after see all the things i can do i believe this can be some kind of "Shader Editor"

    More things and a lot of fun coming!

  • So if i have 40 sprites with 25 parameters each one i have to go one by one sprite and one by one parameter passing as instance variable? :S .

    I tried from yesterday another solution and nothing, I finally simply set at start layout the value of each Slidebar with the sprite reference while i find a better way, at least i can test the editor/configurator with one sprite.

    Maybe this will be a good idea for a feature request, i saw you can get a lot of information from a sprite but nothing from the effects parameters.

    So, there is no way to set automatically with one event using "for each" the values of each slide bar from some Effect Parameter of the sprite right?.

  • Can anybody make something like CRT Shader FX without the ScanLines? Or just cut the scanlines from this source(comments included, but I don't know how to do that):

    mef1sto Make what i do: See all the numbers in the .fx and edit/run, for example change 1 to 4, run C2 ¿What happens? THis modify the color? so go to the .fx and add a comment like : "// Modify RGB=RED".

    And you will get a code like this:

    	q.x *= 1.0; // Number of flames on horizontal
    	q.y *= fireVP; // Vertical Y Fire-Flame separation
    	float strength = floor(q.x+noiseT); // Total noise in all the flame
    	float T3 = max(fireSPD1,fireSPD2*strength)*seconds; // 1=Speed /  2=Speed2
    	q.x = mod(q.x,1.0)-0.5; // 1=Separation / 2- Move to right
    	q.y -= firePOSy;  // Position Y
    [/code:1yi4pivb]
    
    So, in the CRT code one of them will modify the scanlines, maybe the size, number of them,etc... if you find what value is, well, set to 0 
    
    Edit: I download the CRT effect, and looking the code seems is very easy to find it look this code in the CRT effect you want:
    
    [code:1yi4pivb]
    vec4 scanlineWeights(float distance, vec4 color)
    {
    	vec4 wid = 0.5 + 2.0 * pow(color, vec4(4.0));
    	vec4 weights = vec4(distance * 3.333333);                
    	return 0.51 * exp(-pow(weights * sqrt(2.0 / wid), wid)) / (0.18 + 0.06 * wid);
    }[/code:1yi4pivb]
    
    With the Scanlines effect located edit them and in the numbers set  various of the to 0 and see what happens. I'm sure you will remove it in minutes.
  • Joannesalfa Now this have to work: https://dl.dropboxusercontent.com/u/659 ... d_v101.rar

    Close C2, overwrite files , open C2 and now no matter if there is a light with 0 not appears black.

    At least for me in the other version appears black in preview but in this one with lights in 0 still have ilumination if there is a light one.

    Crossing fingers....

  • This is how looks the shader editor/config now:

    Video:

    https://instagram.com/p/5NmKMHALw5/

    The animation is simply that i clicked in the "Position Y" slider and keep pressed to the left to get the shader fall <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> .

    The idea is try if is posible save the values in a .txt when you find something cool and import to a shader using "set effect parameter". With that also the people can share his own creations simply with a paste of the code.

  • I updated with the Blend-background to True and put the NormalMap layout with the planets first.

    The other layout is to test the Spotlights but i can't get working so i leave that at the moment.

    -

    The problem of the lights enable/disable is that with 1 they multiply by their efect for 0 the efect becomes 0. In my case if i set some light to 0 when i run the layout works correct, simply this light is not visible.

    So to be clear, in your case in the moment you put 0 to any light, when you run the layout the texture with any light at 0 comes entire to black? I mean, in my case if i put 0 in the preview looks black but when runs is all lighted except the one i disabled, but if i understand well, in your case when one is 0 turns all the texture to black ¿Correct? is this?

    Edit: In that case i guess i will have to use an IF instead the multiplier. Tomorrow i will try.

  • LOL! Please restart your computer and try again , this is so weird.

    BTW, the star effect appears in the other screenshot, so if now not appears maybe you made something wrong or your WebGL exploded XD . Also in the main post therse is the version 1.0 and 1.01 links, thw two works bad?

    Gigatron I choose you! This man is killing me! haha.

    Now serious, Rest of the people works correct?

    Edit: Joannesalfa Can you send me your .capx that works correct to see the difference?

    Yes i use 1 to all light sources because with that i can use various lights in the same texture and is like works. ¿? If not how can you get varios lights working in the same texture without enable them ¿?¿?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I know, i can "set value" of the Slide Bar of something, the problem is that i not find where is the parameter of each variable of the effect to say "set value".

    In the options, i have "set value" of the Opacity object, Angle, X, and a lot of them but i can't find how to set the value of any parameters of some effect added to the object.

    yes i also now the minimu/maximun value at start, also the maximun steps,etc.... the problem is set the slider to the same number of the effect parameter.

    Edit: This:

    How i can set to the slider at the start of the layout the parameter of some effect?

  • I'm doing a shader generator on the user can modify the aspect in real time using the "slider bar" and text boxes.

    How can i get that when the layout is started> set the slide bar value of X parameter.

    The object have an efect called "Fire". The fire effect have 26 parameters (0 to 25). The idea is that when the layout is started the slide bar get the value of them.

    I already have a for that "on change" the slider the parameter change but obviously all the alider bar starts on 0. So i need that when the layout is started the slider value gets the initial value of each parameter but i can't find nothing ¿?.

  • This started as a fire shader for a game but after see all the variables and possibilities i decided to expand it, and after a few changes i saw you can do more things, not only fire, like snow, acid, noise, fog, rain, water, blast shoots, lasers, etc... so i decided to create some kind of Shader Editor you can use for your games.

    ---

    Shader Effect - EDIT: 3 JAN - 2017

    Here is the shader effect (FX+XML) including a .capx example with all the presets working:

    https://drive.google.com/file/d/0B8vm3F ... sp=sharing

    Inside the .capx you will find some comments that how all works.

    ---

    Shader Editor - EDIT: 3 JAN - 2017

    Diane Mueller (https://twitter.com/MadameBerry) made a Win/Mac/Linux version that you can find here:

    https://www.patreon.com/posts/construct-2-7658638

    Screenshot

    ---

    Video showing how the shader and editor works

    https://www.twitch.tv/davitmasia/v/111896787

  • Ops! i understood you wrong, if you run my .capx have to work like the screnshots without touch nothing.

    So, you are running my example and this is how look? In all sites? NW.js, browsers,etc... ? Livedemo also looks wrong?(https://dl.dropboxusercontent.com/u/659 ... index.html) Arggg!

    Try this:

    Open the: NormalMapExt.xml

    Search this line:

    <blends-background>true</blends-background>

    Change to false like this:

    <blends-background>false</blends-background>

    Close C2 and open again ¿Works now? .

    Edit: I updated the .rar file with the .xml changed and the .capx file updated with the third light. You have to see the yellow and red square 2 lights and other that will be pointed in the cursor/mouse.

  • Yes, because in the preview the NormalMaps is over the planets without light for that appears black. When runs, the events set the lights in the mouse and the rotating squares and starts the fun

  • Thanks for the feedback! About Chrome mmm, i thought had a more advance WebGL support than Firefox.

    In my case Firefox(39.0), Chrome(43.0) and NW,js works without problems, in Opera(12.7) not runs that is one of the browsers with less WebGL capabilities.

    Edit: Ah! I see! Works also on Chrome, Perfect then!

  • Wow great! Gigatron!

    Worked! Now with the line change both version works <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    Seems was my fault on the FlamesP variable, sorry! :S , I go to upload the new version, one moment!

    Link updated: https://dl.dropboxusercontent.com/u/659 ... e/fire.rar! Please Joannesalfa test it now ¿Works correct?.

  • The fireflames effects is the same from shadertoy, i made also the variations. Looks weird on Direct3D but good when WebGL is used, ¿Why? I don't know, i'm new on shaders , Maybe Gigatron can explain what is happen here or look the code and solve it.

    As i said in my C2 preview , i mean in the C2 layout, looks a bit weird(Direct3d is used), exactly that you screenshot, but when the effect runs on C2 using NW.js or in the browsers Firefox/Chorme that uses WebGL appears perfectly.

    So, when DIrect3D is used looks like you, and when WebGL is used looks like my screenshot.

    Also i not understad why in your case are using Direct3D, how are you getting this? NW.js? Browser? Mobile?... Also, have you tested to export to desktop o see with NW.js or chrome, firefox etc...? In all is the same?