Blog

Home Forums Beginners GLSL conversion tutorial

This topic contains 7 replies, has 5 voices, and was last updated by  sambright91 4 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #4738

    Mpono
    Member

    Hello!

    I recently purchased BAZIK when my external HD containing all my VJ clips was dropped and I was left day-of-show without my clip library. 
    I am happy to report Bazik saved the show and gave me a wonderful fun toy to port through VDMX which I used to add filters and clips. 
    My question is, 
    Would you consider doing a simple step by step tutorial of a real-world conversion of a shader hosted from somewhere like shadertoy into a .frag?  For someone completely new to code, a visual guide to steps involved with publishing controls would be GREAT. 
    Other forum entries stop short of this. 
    I realize user-created shaders vary so examples can vary as well. A tutorial of an actual shader conversion instead of the test shader would be greatly appreciated. 
    Mahalo!
    -Pono
    #5031

    marg8
    Member

    +1

    #5032

    Maxime
    Participant

    Yes i can understand that. 

    In fact, convert a ShaderToy source to a Bazik file is really easy if you have some skills in code.
    GLSL langage in a “unfriendly” langage, so newby can’t use it quickly. That’s why we never publish a step-by-step tutorial…
    If you’re able to create or understand a GLSL file, put it in Bazik is simple 🙂 
    The hard part is to learn the GLSL langage.
    #5033

    Maxime
    Participant

    Example :

    Shader Toy Source
    /////////////////////////////////////////////////////
    void mainImage( out vec4 fragColor, in vec2 fragCoord )
    {
    vec2 uv = (2.0*fragCoord.xy – iResolution.xy) / iResolution.yy;
    uv *= 1.1;

    float w = 2.0*fwidth(uv.x);
    float t = 0.02;
    float r = 1.0;

    float s;
    if (mod(iTime, 2.0) < 1.0) {
    s = smoothstep(-w/2.0, w/2.0, length(uv) – r);
    } else {
    s = smoothstep(-w/2.0, w/2.0, abs(length(uv) – r) – t/2.0);
    }

    fragColor = vec4(s, s, s, 1.0);
    }

    Bazik file

    /////////////////////////////////////////////////////
    void main( void )
    {
    vec2 uv = (2.0*gl_FragCoord.xy – resolution.xy) / resolution.yy;
    uv *= 1.1;

    float w = 2.0*fwidth(uv.x);
    float t = 0.02;
    float r = 1.0;

    float s;
    if (mod(time, 2.0) < 1.0) {
    s = smoothstep(-w/2.0, w/2.0, length(uv) – r);
    } else {
    s = smoothstep(-w/2.0, w/2.0, abs(length(uv) – r) – t/2.0);
    }

    gl_FragColor = vec4(s, s, s, 1.0);
    }

    #5034

    Mpono
    Member

    Thank you very very much! 

    #6282

    chandaokelle
    Participant

    In between them, they search for instant pleasure and fun to become stress-free. Soon as soon as you get free from your daily work, you’ll easily get our Dwarka Escorts Service to enjoy the decent fun and Business deals. Our Independent Escort service in dwarka has the center to supply you thereupon girl who can satisfy your deepest fun and cause you to feel entertained. Our Call girl in dwarka are always standing to be your partner for one-night to offer you the important shot of best pleasure . we’ve the charming and hot sensual girls who have amazing potential to form your every physical demand complete. an outsized number of female escorts in Dwarka are always able to provoke you and cause you to feel complete. we’ve the special ways to treat our clients and make them feel comfortable with VIP Escort Girls Service.
    Escort Services in Rohini West | Call girls in Rohini West

    #6283

    chandaokelle
    Participant

    Welcome to the place of top eminent call girls in mahipalpur . it’s officially one among the people beloved Escorts service in Mahipalpur from top agency within the City. Our specialty is to supply the entire package of status prostitute in Mahipalpur. we’ve sensual, exotic, model type call girls, who are always able to serve you in day and night with their full magical and exotic moves. Our service compromises all-time best collection of top industry exotic girls within the town. you’ll be wonder to ascertain our escort service in mahipalpur who are the feeling in look, soft within the skin and naughty naturally . Don’t miss any night once you are faraway from your beloved and faraway from your partner.
    Contact Us for advanced Booking via Our Mobile Number. we propose attracttive and appropriate Model Girls in mahipalpur escorts consistent with the requiremment.

    #6284

    sambright91
    Participant

    noiicee! now this is what it is about, hope u are well

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.