User Tag List

Results 1 to 2 of 2

Thread: Canvas Sampler Shader for Html5 Exporter

  1. #1
    Clicker Fusion 2.5
    Gigatron's Avatar
    Join Date
    Jun 2020
    Location
    France
    Posts
    44
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Canvas Sampler Shader for Html5 Exporter

    Hello,

    Just finished this extension for your pleasure glslshader... What it does ?

    This time this shader sample all mmf2 canvas this mean all objects are affected.

    Installation : copy Glslshader.mfx on extension/unicode drawer
    copy Glslshader.js on html5/ drawer;

    1- Run MMF2
    2- Open new html5 developpment project
    3- insert Text object this is important , this object hold shader
    4- insert Glslshader object *** THIS OBJECT ALWAYS MUST BE ON TOP not behind;
    5- insert the shader on your text object here is a basic shader from Shadertoy ;

    Code:
    void mainImage( out vec4 fragColor, in vec2 fragCoord )
    {
        // Normalized pixel coordinates (from 0 to 1)
        vec2 uv = fragCoord/iResolution.xy;
    
        // Time varying pixel color
        vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4));
        vec3 tex = texture2D(iChannel0,uv).xyz;
    
        // Output to screen
        fragColor = vec4(col*tex,1.0);
    }
    6- On start event : on glslshader object set fragment to TEXT object text;

    7- insert some sprites on your scene to see the fx
    8- run the project

    9- Are you understand ? No ? open mfa file on the attached zip; or look the scene

    - I will explain later how modify uniform variables;
    Supported variables are : uniform float, vec2(x,y), vec3(x,y,z),vec4(x,y,z,w) etc..

    Here what is possible :

    http://gigatron3k.free.fr/html5/F25/csampler/
    Images attachées Images attachées
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5
    Gigatron's Avatar
    Join Date
    Jun 2020
    Location
    France
    Posts
    44
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hello , just finished this demo hope you will like it. You need just look and listen music nothing else

    I quickly soon publish the version 2 of csampler, be sure you need fast computer;

    Refresh page with (F5) ; normally the loading issue is fixed for me;

    http://gigatron3k.free.fr/html5/F25/glsl_2/

Similar Threads

  1. Html5 Shader Demo Example
    By Sloxone in forum HTML5 Export Module 2.5
    Replies: 36
    Last Post: 14th August 2020, 11:06 AM
  2. Replies: 13
    Last Post: 30th May 2020, 11:08 AM
  3. Ability to scale html5 canvas while keeping aspect ratio
    By Burfelt in forum HTML5 Export Module 2.5
    Replies: 8
    Last Post: 14th May 2016, 10:06 PM
  4. Strings not working on HTML5 canvas
    By Chrisual in forum HTML5 Export Module 2.5
    Replies: 3
    Last Post: 19th February 2014, 07:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •