Gigatron's Forum Posts

  • Hi L&G

    It's late , in the black color of the night i would share another cool stuff with you.

    You can reduce your game color until 1bits with pixelate resolution like old games;

    demo is better than word;

    http://gigatron3k.free.fr/html5/C2/FX/cds

    try to load your own picture, and contact me if you are interested by this fx ;

    Released version : http://gigatron3k.free.fr/html5/C2/FX/dscolor.rar

    Regards

  • blurymind

    Sorry this one is already converted..

    if you want to include special fx inside/outside the circle tell me ..

    http://gigatron3k.free.fr/html5/C2/FX/advignette

  • glerikud

    Yes, i have more and more fx in my hard drive, some for my personal usage , and others for C2 users .

    When you see demo without download link , just ask me to obtain that fx. After request i add some parameters to extend the fx.

    Regards

  • i am on smarphone

    try to convert rgb to float..

    for red (255.0,0.0,0.0)/255.0

    c2 only use float or percent

  • This pic is mixed with texture and white color with 0.3 intensity factor on vg fx

  • add a color value to the vignette effect. That would make it much more useful!

    blurymind

    can you draw an example image ? then i will study the situation ;

  • Can you give a link where I can download this? I only see the demo clicking on the link above.

    glerikud

    However i ve done it for you; http://gigatron3k.free.fr/html5/C2/FX/floodfill.rar

    3 parameters here are : mode =0 nothing happen, 1,2,3,4,5,6 various flood direction;

    duration is how many second the fx will work , like speed;

    vbl_wait is how many seconds the fx wait after restart usefull to stop fx during this time with setting mode to 0

    Regards

  • Ok ... after lost against Portugal, i decided to analyze deeply the Cdex glsl,

    the correct conversion near %99 is here :

    http://gigatron3k.free.fr/html5/C2/FX/funky

    instead mixing textured palette with texture ; here is mixing glsl gradient with texture..

    will send this glsl to you soon ;

  • Gigatron

    I've managed to get a full-window version of C2-DEX working well. There are still a few minor issues that do not inhibit the basic functionality of the effect which I'd like to resolve, but it is more or less ready for people to test. I'll post it in its own thread to stop spamming this one, since it's a request theread, but I am eagerly awaiting your version.

    sorry but mine is completely diffent i think <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    in fact i know what c-dex do,

    not finished gradient mix based demo ; this demo use entire gradient color

    this is the reason why it's different but i can achieve this easily .

    http://gigatron3k.free.fr/html5/C2/FX/funky

  • The formula for alpha from src, dest is something like this :

    gl_FragColor = mix(vec4(dest.rgb, 1.0), vec4(src.rgb,1.0), (gl_FragCoord.x/iResolution.x-src.a)/(src.a/dest.a));[/code:r8egllez]
    
    you know now ; dest is vec4 samplerback ... and src is vec4 samplerfront ... the sprite using fx on C2.
    
    I have really no time to finish a huge list of my glsl fx list for C2. My goal is 500 Fx for C2;
    Ok make some test with this formula ... will see later ;
    
    Regards
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So ... let's lforget samplerback and dest.x, y and others...

    But finally .. i found what exactly C-Dex do .. i found the demo.exe now ... sorry for this not saw !

    void main()
    {
    	vec2 uv = vTex;
    	 
    	float cr;
        vec4 cl= vec4(uv.y*sin(seconds),uv.y*sin(seconds*2.),uv.y*sin(seconds*4.),1.0); // gradient start
    		
        vec4 tc= texture2D(samplerFront,uv);
    		    
         cl.rgb /= cl.a;
         cr = (cl.r + cl.g + cl.b)/3.0 ;
    	 cl.rgb *= cl.a;
      
        float mixer = dot(tc.rgb*cr, vec3(1.0, 1.0, 1.0));
          
        gl_FragColor = mix(vec4(cl.rgb, 1.0), vec4(rred,ggreen,bblue,1.0), mixer);
    //                                 ^^	^                       ^^
    //                                      gradient start , gradient end 
    
    }[/code:35hia245]
    
    I am very tired now will continue to add palette sooon ;
  • Good,

    You are using bounds with dest.x, y etc... However there is a problem on the conversion ..

    You must use vec2 uv=vTex; The mysterious Vtex mean the Sprite area;

    /*
     Gradient mapping effect;
     Gigatron and Funky Koval for C2. Original by Tulamide.
     V0.9 almost there
     */
     
    #ifdef GL_ES
    precision mediump float;
    #endif
    
    uniform mediump sampler2D samplerBack;
    uniform mediump sampler2D samplerFront;
    uniform mediump vec2 destStart;
    uniform mediump vec2 destEnd;
    varying mediump vec2 vTex;
    uniform mediump float pixelWidth;
    uniform mediump float pixelHeight;
    
    uniform float intensity;
    uniform float offset;
    
    void main()
    {
           vec2 uv=vTex;
       float current;
       vec4 color =  texture2D(samplerBack, mix(destStart, destEnd, vTex));
         
       color.rgb /= color.a;
       current = (color.r + color.g + color.b) / 3.;
    
       color.rgb = mix(color.rgb , texture2D(samplerFront, vec2(destStart.x + mod((((abs(destEnd.x - destStart.x)) * offset + ((abs(destEnd.x - destStart.x)) - pixelWidth) * current) + pixelWidth / 2.), (abs(destEnd.x - destStart.x))),destStart.y + pixelHeight / 2.)).rgb , intensity);
    
       color.rgb *= color.a;
       
       gl_FragColor = vec4(color);
    }[/code:1y1o9kha]
    
    and we have problem in the vertical position of texture .... after the second ","  
    here : , (abs(destEnd.x - destStart.x))),destStart.y + pixelHeight / 2.)).rgb , intensity);
    After declaring vec2 uv=vTex;
    Try this : 
    [code:1y1o9kha]color.rgb = mix(color.rgb , texture2D(samplerFront, vec2(destStart.x + mod((((abs(destEnd.x - destStart.x)) * offset + ((abs(destEnd.x - destStart.x)) - pixelWidth) * current) + pixelWidth / 2.), (abs(destEnd.x - destStart.x))),uv.y + pixelHeight / 2.)).rgb , intensity);[/code:1y1o9kha]
  • Relief map on the way ///

    http://gigatron3k.free.fr/html5/C2/FX/rmap

  • Gigatron

    Any chance to get that effect? it looks awesome

    Will share this soon .. be patient

  • Ok i forgot many things..... sorry

    (( <blends-background>true</blends-background> - this makes the effect preview in the editor.))

    If the fx is almost here for you ?

    "current" is declared so try this;

    color.rgb = texture2D(samplerFront, vec2(current, uv.y)).rgb;

    instead this : color.rgb = texture2D(samplerFront, vec2(float (((color.r + color.g + color.b) / 3.0)*1.0), 0.5)).rgb;

    Mix is missing but try any way, i can add mix later with intensity...

    Btw; I think this fx is not same c-dex fx.. i must meditate.. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    With mix it become : color.rgb = mix(color.rgb,texture2D(samplerFront, vec2(uv.x, uv.y)).rgb*current,intensity);

    http://gigatron3k.free.fr/html5/C2/FX/cmixer