Gigatron's Recent Forum Activity

  • ErekT, zenox98

    I have made a little example to add alpha intensity. For do this , add an uniform float variable like this :

    uniform  float alpha_coef;
    
    and modify last line of glsls file; to
     gl_FragColor.a = (alpha/1.0)-alpha_coef;
    
    [/code:aq63an7w]
    and .xml file add:
    [code:aq63an7w]
       <param>
             <name>Alpha Coef</name>
             <description>Alpha Coef Multiplier</description>
             <type>percent</type>
             <initial>0.01</initial>
             <uniform>alpha_coef</uniform>
          </param>
    
    [/code:aq63an7w]
    
    Finally  the result: [url=http://gigatron3k.free.fr/html5/C2/FX/alpha]http://gigatron3k.free.fr/html5/C2/FX/alpha[/url]
    
    Hope this will help //
  • Would you like to try this one ;

    <?xml version="1.0" encoding="UTF-8" ?>
    <c2effect>
       <!-- About -->
       <id>XBR</id>         <!-- Never change the ID.  Change the name instead -->
       <name>xBR</name>
       <category>Advanced Effect Layout</category>
       <description>Use this effect on individual sprites or the whole layout. Based on code by Hyllian and Anata</description>
       <author>Hyllian</author>
       
       <!-- Settings -->
       
       <!-- Extend the bounding box for effect processing by a number of pixels to show the edges
           of effects which go beyond the object edges, e.g. blur and warp. -->
       <extend-box-horizontal>10</extend-box-horizontal>
       <extend-box-vertical>10</extend-box-vertical>
       
       <!-- Set to true if the background is sampled (samplerBack is referenced at all in the shader) -->
       <blends-background>false</blends-background>
       
       <!-- Set to true if the background is not sampled at 1:1 with the foreground (e.g. the
           background texture co-ordinates are modified in some way by the shader, as done
           by Glass and Lens) -->
       <cross-sampling>false</cross-sampling>
       
       <!-- Set to true if the effect changes over time, e.g. Noise or Warp effects. -->
       <animated>false</animated>
       
       <!-- Parameters -->
       <parameters>
          <param>
             <name>Width</name>
             <description>Destination X</description>
             <type>float</type>
             <initial>0</initial>
             <uniform>WindowsWidth</uniform>
          </param>
          <param>
             <name>Height</name>
             <description>Destination Y</description>
             <type>float</type>
             <initial>0</initial>
             <uniform>WindowsHeight</uniform>
          </param>
    	  <param>
             <name>X Coef</name>
             <description>X Coef Multiplier</description>
             <type>percent</type>
             <initial>0.2</initial>
             <uniform>x_coef</uniform>
          </param>
    	    <param>
             <name>Y Coef</name>
             <description>Y Coef Multiplier</description>
             <type>percent</type>
             <initial>0.2</initial>
             <uniform>y_coef</uniform>
          </param>
    	  
    	  
       </parameters>
    </c2effect>[/code:1zrs66q1]
    
    [code:1zrs66q1]#ifdef GL_ES
    precision mediump float;
    #endif
    
    uniform mediump sampler2D samplerFront;
    varying mediump vec2 vTex;
    uniform mediump float seconds;
    uniform mediump float date;
    uniform mediump float pixelWidth;
    uniform mediump float pixelHeight;
    vec2 iResolution = vec2( 1./pixelWidth, 1./pixelHeight);
    
    uniform  float WindowsWidth;
    uniform  float WindowsHeight;
    uniform  float x_coef;
    uniform  float y_coef;
    
    const float  coef=2.0;
    const vec3  rgbw        = vec3(14.352, 28.176, 5.472);
    
    // const vec2 dx         = vec2( 0.0009765625, 0.0);
    // const vec2 dy         = vec2( 0.0, 0.001953125 );
    // const vec2 x2         = vec2( 0.001953125 , 0.0);
    // const vec2 y2         = vec2( 0.0 , 0.00390625 );
    // const vec4 xy         = vec4( 0.0009765625, 0.001953125,-0.0009765625,-0.001953125); 
    // const vec4 zw         = vec4( 0.001953125 , 0.001953125,-0.001953125 ,-0.00390625 ); 
    // const vec4 wz         = vec4( 0.0009765625, 0.00390625 ,-0.0009765625,-0.00390625 ); 
    
    vec4 df(vec4 A, vec4 B)
    {
        return abs(A-B);
    }
    
    vec4 weighted_distance(vec4 a, vec4 b, vec4 c, vec4 d, vec4 e, vec4 f, vec4 g, vec4 h)
    {
        return (df(a,b) + df(a,c) + df(d,e) + df(d,f) + 4.0*df(g,h));
    }
    
    void main()
    {
    //   float x = 0.5 * (1.0 / WindowsWidth);
    //   float y = 0.5 * (1.0 / WindowsHeight);
    
       vec2 dx         = vec2( 0.0009765625, 0.0);//vec2(x, 0.0);//
       vec2 dy         = vec2( 0.0, 0.001953125 );//vec2(0.0, y);//
       vec2 x2         = vec2( 0.001953125 , 0.0);//vec2(y, 0);//
       vec2 y2         = vec2(0.0, 0.00390625);//vec2( 0.0 , y*2.0 );//
       vec4 xy         = vec4( 0.0009765625, 0.001953125,-0.0009765625,-0.001953125);//vec4( x, y,-x,-y);// 
       vec4 zw         = vec4( 0.001953125 , 0.001953125,-0.001953125 ,-0.00390625 );//vec4( y , y,-y ,-(y*2.0) );// 
       vec4 wz         = vec4( 0.0009765625, 0.00390625 ,-0.0009765625,-0.00390625 );  //vec4( x, y*2.0 ,-x,-(y*2.0) );//
    
        vec4  edr, edr_left, edr_up; bvec4 px; // px = pixel, edr = edge detection rule
        vec4  interp_restriction_lv1, interp_restriction_lv2_left, interp_restriction_lv2_up;
        bvec4 nc; // new_color
        vec4  fx, fx_left, fx_up; // inequations of straight lines.
       
        float alpha = texture2D(samplerFront, vTex).a;
    
        vec2 fp  = fract(vTex.xy*vec2(WindowsWidth,WindowsHeight));
        vec2 TexCoord_0 = vTex.xy-fp*vec2(0.0009765625*x_coef, 0.001953125*y_coef);//vec2(x, y);
    
        vec3 A  = texture2D(samplerFront, TexCoord_0 + xy.zw ).xyz;
        vec3 B  = texture2D(samplerFront, TexCoord_0     -dy ).xyz;
        vec3 C  = texture2D(samplerFront, TexCoord_0 + xy.xw ).xyz;
        vec3 D  = texture2D(samplerFront, TexCoord_0 - dx    ).xyz;
        vec3 E  = texture2D(samplerFront, TexCoord_0         ).xyz;
        vec3 F  = texture2D(samplerFront, TexCoord_0 + dx    ).xyz;
        vec3 G  = texture2D(samplerFront, TexCoord_0 + xy.zy ).xyz;
        vec3 H  = texture2D(samplerFront, TexCoord_0     +dy ).xyz;
        vec3 I  = texture2D(samplerFront, TexCoord_0 + xy.xy ).xyz;
        vec3 A1 = texture2D(samplerFront, TexCoord_0 + wz.zw ).xyz;
        vec3 C1 = texture2D(samplerFront, TexCoord_0 + wz.xw ).xyz;
        vec3 A0 = texture2D(samplerFront, TexCoord_0 + zw.zw ).xyz;
        vec3 G0 = texture2D(samplerFront, TexCoord_0 + zw.zy ).xyz;
        vec3 C4 = texture2D(samplerFront, TexCoord_0 + zw.xw ).xyz;
        vec3 I4 = texture2D(samplerFront, TexCoord_0 + zw.xy ).xyz;
        vec3 G5 = texture2D(samplerFront, TexCoord_0 + wz.zy ).xyz;
        vec3 I5 = texture2D(samplerFront, TexCoord_0 + wz.xy ).xyz;
        vec3 B1 = texture2D(samplerFront, TexCoord_0 - y2    ).xyz;
        vec3 D0 = texture2D(samplerFront, TexCoord_0 - x2    ).xyz;
        vec3 H5 = texture2D(samplerFront, TexCoord_0 + y2    ).xyz;
        vec3 F4 = texture2D(samplerFront, TexCoord_0 + x2    ).xyz;
    
        vec4 b  = vec4(dot(B ,rgbw), dot(D ,rgbw), dot(H ,rgbw), dot(F ,rgbw));
        vec4 c  = vec4(dot(C ,rgbw), dot(A ,rgbw), dot(G ,rgbw), dot(I ,rgbw));
        vec4 d  = b.yzwx;
        vec4 e  = vec4(dot(E,rgbw));
        vec4 f  = b.wxyz;
        vec4 g  = c.zwxy;
        vec4 h  = b.zwxy;
        vec4 i  = c.wxyz;
        vec4 i4 = vec4(dot(I4,rgbw), dot(C1,rgbw), dot(A0,rgbw), dot(G5,rgbw));
        vec4 i5 = vec4(dot(I5,rgbw), dot(C4,rgbw), dot(A1,rgbw), dot(G0,rgbw));
        vec4 h5 = vec4(dot(H5,rgbw), dot(F4,rgbw), dot(B1,rgbw), dot(D0,rgbw));
        vec4 f4 = h5.yzwx;
       
        vec4 Ao = vec4( 1.0, -1.0, -1.0, 1.0 );
        vec4 Bo = vec4( 1.0,  1.0, -1.0,-1.0 );
        vec4 Co = vec4( 1.5,  0.5, -0.5, 0.5 );
        vec4 Ax = vec4( 1.0, -1.0, -1.0, 1.0 );
        vec4 Bx = vec4( 0.5,  2.0, -0.5,-2.0 );
        vec4 Cx = vec4( 1.0,  1.0, -0.5, 0.0 );
        vec4 Ay = vec4( 1.0, -1.0, -1.0, 1.0 );
        vec4 By = vec4( 2.0,  0.5, -2.0,-0.5 );
        vec4 Cy = vec4( 2.0,  0.0, -1.0, 0.5 );
        vec4 Ci = vec4(0.25, 0.25, 0.25, 0.25);
       
        // These inequations define the line below which interpolation occurs.
        fx      = vec4(greaterThan(Ao*fp.y+Bo*fp.x,Co));
        fx_left = vec4(greaterThan(Ax*fp.y+Bx*fp.x,Cx));
        fx_up   = vec4(greaterThan(Ay*fp.y+By*fp.x,Cy));
    
        interp_restriction_lv1      = vec4(notEqual(e,f))*vec4(notEqual(e,h));
        interp_restriction_lv2_left = vec4(notEqual(e,g))*vec4(notEqual(d,g));
        interp_restriction_lv2_up   = vec4(notEqual(e,c))*vec4(notEqual(b,c));
    
        edr      = vec4(lessThan(weighted_distance( e, c, g, i, h5, f4, h, f), weighted_distance( h, d, i5, f, i4, b, e, i)))*interp_restriction_lv1;
        edr_left = vec4(lessThanEqual(coef*df(f,g),df(h,c)))*interp_restriction_lv2_left;
        edr_up   = vec4(greaterThanEqual(df(f,g),coef*df(h,c)))*interp_restriction_lv2_up;
       
        nc = bvec4 (edr*(max(max(fx, edr_left*fx_left), edr_up*fx_up)));
    
        px = lessThanEqual(df(e,f),df(e,h));
    
        vec3 res = nc.x ? px.x ? F : H : nc.y ? px.y ? B : F : nc.z ? px.z ? D : B : nc.w ? px.w ? H : D : E;   
        gl_FragColor.xyz = res;   
       gl_FragColor.a = alpha;
    }[/code:1zrs66q1]
    
    Dont forget to follow variables in source try to understand what they do  ....
  • Oh man! this is looking AWESOME. I was making this back in MMF, but this version takes the cake

    The only thing I suggest is gearing this plugin more as a "psuedo 3D" set rather than just outrun. There's a lot of different games that could use this! Space shooters, space harrier, maybe some games with fake perspective. I'll take a look at this later tonight

    You Mean;

    like that ; quick space harrier test ; done with a bit modified Mr RojoHound mode7 FX;

    btw he has a 3d perspective projection routine somewhere in this forum, so it will easy to include plants ennemy etc ...

    http://gigatron3k.free.fr/html5/C2/sharrier

  • Looks awesome, does this have any different features in compared to your Protracker plugin, and does one minify okay?

    Use Protracker instead of Xmplayer plugin;

    Protracker can now play .xm ; .s3m; and .mod files format .(i must include some features)

  • Only slight issue is it's upside down, but still - hot damn!

    Download if interested

    Good work ..

    To flip fx vertically ... add line 68 :v=-v; //sorry of course talking about y axis ... so v.y=-v.y; same but better sens and not affect x axis

  • if someone try this little tool ..

    consider you have .xml file and empty .fx file ;

    Go to shadertoy copy a simple fx and past into this tool ; click to convert; and copy code on your .fx

    file; As i said complex and compacted fx are not working yet;

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

  • mod — compute value of one parameter modulo another

    floor — find the nearest integer less than or equal to the parameter

    so try this line ;

    float timeId = mod(floor(iGlobalTime * speed),26.0);

  • Gigatron I like your effects! And I really like the music you use in it. And this track especially. But I can't find it in nowhere

    Absolutely ...

    Here is the download link.... hope you know how to listen this track .

    http://gigatron3k.free.fr/html5/C2/FX/mfx4/ndream.s3m

  • I have some variant fx like one is your PM; and another is here :

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

    the glitch fx you want use noise textured pic , som i must use Computed texture to insert it..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is the topic where i started to understand glsl.. (RojoHound glsl help) and never used samplerBack..

  • zenox98 thank you very much,i'll take a look

    Gigatron i already have the original mod....i just asked u if i can have the different cool version u played on your website <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    http://amigaremix.com the place of the mod remix./

  • Gigatron where can i get the "Aurora.mod" that u played on your site ??i'm an old amiga vintage sound fanatic

    follow Zenox98 link..

    the module is named Hymn to Aurora;

Gigatron's avatar

Gigatron

Member since 8 Jan, 2012

Twitter
Gigatron has 33 followers

Connect with Gigatron

Trophy Case

  • 12-Year Club
  • x2
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

16/44
How to earn trophies