0 Favourites

[C3][Effects]

  • Ashley

    It take me 5 minutes to convert the basic Shadertoy shader to C3 ... it's long !! And what about the \n for every lines ??... the C3 fx is unreadable ... or effects sdk will simple ? The only advantage is the removed .xml file.

    I have quickly madea converter

    Thanks

    Here is a simple conversion :

    Shadertoy ;

    void mainImage( out vec4 fragColor, in vec2 fragCoord )
    {
    	vec2 uv = fragCoord.xy / iResolution.xy;
    	fragColor = vec4(uv,0.5+0.5*sin(iGlobalTime),1.0);
    }[/code:yjmwzgvd]
    
    C3 shader :
    
    [code:yjmwzgvd]
    
    cr.shaders = {};
    cr.shaders ["myfx"] = {"src":"#ifdef GL_ES
    precision mediump float;\n
    #endif
    
    // Construct base uniforms .........
    
    uniform mediump sampler2D samplerFront;\n
    varying mediump vec2 vTex;\n
    uniform mediump float seconds;\n
    uniform mediump float date;\n
    uniform mediump float pixelWidth;\n
    uniform mediump float pixelHeight;\n
    vec2 iResolution = vec2( 1./pixelWidth, 1./pixelHeight);\n
    uniform mediump float speed;\n
    void main()\n
    {\n
    	vec2 uv = vTex;\n
    	gl_FragColor = vec4(uv,0.5+0.5*sin(seconds*speed),1.0);\n
    }","extendBoxHorizontal":0,"extendBoxVertical":0,"crossSampling":false,"preservesOpaqueness":false,"animated":true,"parameters":[["speed",0,1]]};
    
    [/code:yjmwzgvd]
  • Great job! How can one then add these shaders to the Effects though? Sorry I'm a noob.

  • how can i use this shadertoy with construct 2??

    void mainImage( out vec4 fragColor, in vec2 fragCoord )
    {
    	
        
        vec2 position = ( fragCoord.xy - iResolution.xy*.5 ) / iResolution.x;
    
            // 256 angle steps
            float angle = atan(position.y,position.x)/(1.*2.14159265359);
            angle -= floor(angle);
            float rad = length(position);
            
            float color = 0.0;
            for (int i = 0; i < 2; i++) {
                float angleFract = fract(angle*36.);
                float angleRnd = floor(angle*360.)+1.;
                float angleRnd1 = fract(angleRnd*fract(angleRnd*.7)*45.1);
                float angleRnd2 = fract(angleRnd*fract(angleRnd*.97)*13.724);
                float t = iGlobalTime+angleRnd1*10.;
                float radDist = sqrt(angleRnd2+float(i));
                
                float adist = radDist/rad*.1;
                float dist = (t*.2+adist);
                dist = abs(fract(dist)-.2);
                color += max(0.,.5-dist*50./adist)*(.5-abs(angleFract-.1))*1./adist/radDist;
                
                angle = fract(angle);
            }
        
        
        
        
        
        
       fragColor = vec4(color,color,color,1.0);
    }[/code:2m2t73ws]
  • how can i use this shadertoy with construct 2??

    void mainImage( out vec4 fragColor, in vec2 fragCoord )
    {
    	
        
        vec2 position = ( fragCoord.xy - iResolution.xy*.5 ) / iResolution.x;
    
            // 256 angle steps
            float angle = atan(position.y,position.x)/(1.*2.14159265359);
            angle -= floor(angle);
            float rad = length(position);
            
            float color = 0.0;
            for (int i = 0; i < 2; i++) {
                float angleFract = fract(angle*36.);
                float angleRnd = floor(angle*360.)+1.;
                float angleRnd1 = fract(angleRnd*fract(angleRnd*.7)*45.1);
                float angleRnd2 = fract(angleRnd*fract(angleRnd*.97)*13.724);
                float t = iGlobalTime+angleRnd1*10.;
                float radDist = sqrt(angleRnd2+float(i));
                
                float adist = radDist/rad*.1;
                float dist = (t*.2+adist);
                dist = abs(fract(dist)-.2);
                color += max(0.,.5-dist*50./adist)*(.5-abs(angleFract-.1))*1./adist/radDist;
                
                angle = fract(angle);
            }
        
        
        
        
        
        
       fragColor = vec4(color,color,color,1.0);
    }[/code:5kxrq3bt]
    

    imothep85

    This section is for C3 effects.

    C2 effects discussions and creations should go HERE.

  • Hi nice people

    Played with the new Color picker on C3 shader very basic shader...

    Here a quick made fx for C3 .. My first one..

    Install it into C3with addon manager... read the content to learn how to start shader with C3.

    This fx take 3 colors parameters and divide sprite area in 3 zone with 3 colors..

    Regards

  • The next fx is 8 layer amiga style starfield...

  • Salut,

    Nouvel utilisateur de construct 3 et ancien, ancien possesseur d'Amiga 500, merci pour ce starfield

  • Salut,

    Nouvel utilisateur de construct 3 et ancien, ancien possesseur d'Amiga 500, merci pour ce starfield

    kenafred

    This is an English forum, moderated and searched in English.

    Please ensure all posts are in English or provide an English translation, as stipulated in the Forum Rules.

    Thank you.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • bilgekaan

    Please try it;

  • Maybe X-Y Shift fx working too;

  • Gigatron Thank you,

    Skend isn't working correctly, It looks like a glitch.

  • Sorry bilgekaan

    Download it again, i am reading effects sdk and missed something...

  • I am an Amiga Fan and not forget this machine ...

    Here is the legendary Amiga Copper bar animated up down , copper division and of course color with

    the new vec3 color on C3. (value for each color).

    This time here is my first demo on C3.. open it with Chrome

    When you click the text box you can download directly the fx..

  • Sorry bilgekaan

    Download it again, i am reading effects sdk and missed something...

    Thank you! But instead of bending it goes left and right like sine behavior with the horizontal move. Also it creates glitches in the background.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)