Gigatron's Forum Posts

  • matriax

    glsl texture3D ... or textureCube is missing in glmatrix 1.30 used by C2 ; maybe C3

  • matriax

    Don't forget this : every sprite you created mean X sprite on the execution with C2. Each Sprite are used to draw glsl shader inside;

    Are you tryed performance with empty square sprites on C2 without fx ?

    Hope you understand .

  • matriax

    Yes , the first demo is based on IQ rasterized traingles. It use 1 itération to draw the result;

    https://www.shadertoy.com/view/XdlGzn

    You can now roll x,y for make building like your demo on twitter;

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

    If camera is upper of the object you must use roll x,y ;

    If camera is face of the object then you can use rotation x,y etc...

    fx file :

    http://gigatron3k.free.fr/html5/C2/FX/mcube.rar

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • matriax

    This shader using iterations for the precision (raymarching shader); You must need minimum 64 iterations

    this is normal value, imagine some shaders have 200 iterations...

    If you want gain a bit speed , you can break the loop if precision become lower than 0.001; the ray considering

    nothing to hit;

    // The perfomance problem?

    float trace(vec3 o, vec3 r)

    {

    float t = 0.0; //

    // Some kind of weird alpha around the cube ¿?

    for (int i = 0; i < 64; ++i) { // 64 = 150cubes | 32 = 300 cubes | 16 = 450 cubes on screen (256x Sprites)

    vec3 p = o + r * t;

    float d = map(p).x;

    if (d<0.001) break; //This will stop the loop ... and consider that the ray has nothing more to detect

    t += d;

    }

    return t;

    }

    The first shader demo use triangles : http://gigatron3k.free.fr/html5/C2/FX/mcube

    instead of raymarching like here ;

  • 1- Understood

    2- So actualy in C2 there is no way to apply antialias to 3D render or use Nearest instead Bilinear? <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    3- I mean scale the Cube rendered by the shader, to make more tall, short or depth.

    Then seems actually is not possible do what i want in this way. Really hope C3 comes with vertex shaders and the rest of options you need to unlock all the potential. Will be great have in C3 the chances to do 2D games with the option to add 3D things with some properties to adapt it as our needs.

    matriax

    glmatrix 2.0 will resolve the problem...

    I made another example based on box mapped with specular not based on triangles vertices;

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

    And here is the fx;

    http://gigatron3k.free.fr/html5/C2/FX/mcube2.rar

    You can scale only the box on x y z and see mapped texure wich scaled with static value;

    this mean all faces are scaled separately the box; however if you want make building Set the x, y or z face scale to the minimum instead of maximum, and zoom it : in this demo the size of sprite is 450x450;

    texture disposition format must exactly like this; i used this texure in demo;

    https://en.wikipedia.org/wiki/File:Skybox_example.png

    good luck ;

  • Really Interesting, works like a 3D cube on we can texture each side or with zoom-big object work as a Skybox.

    Some questions:

    1.- The cube only appears inside the X/Y size of the sprite, if you make it bigger looks cutted. I saw some shaders that on applied to a for example a 64x64 sprite in the runtime the effect looks out that size. This is because a shader can work out the sprite limitations in some way or because on runtime the sprite limits goes big to fits the shader requeriments? Is to understand better how shaders works.

    2.- The textures have some smoothing/mipmap/bilinear, is possible add an option to switch that? to select Nearest or Bilinear, in case we want to preserve real pixels?. In the same way, the cube, talking about the polygon no have antialias, any chances to apply?

    3.- Any way to Transform the model? I mean make the X,Y,Z more bigger/short. For example scale the Y to use it as a column or as a building.

    PD. Why the "Mario Cube" name?

    1 - The sprite area is the Quad like shadertoy uv screen or c2 vTex ;

    2 - maybe in c3;

    3 - scale the sprite in editor ?

    Mario cube ... really don't know

  • Hi nice people ;

    matriax asked me if it's possible to map 6 faces cube according faces disposed with 3D Cube map textured style ;

    Don't forget C2 is not using vertex shader so it's not possible in teory;

    https://en.wikipedia.org/wiki/File:Skybox_example.png

    So after 5 day of intensive work and combining some gls code i have made demo and it's working at 60 fps;

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

    ** Please don't rip this shader with this demo... simply let me release it..

  • Like!

    Is the music free to use for commercial projects and if so, would you mind sharing your source? It sounds cheerful <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    Not sure you can use the music for commercial project; you must ask the author ;

    All the music i am using in demo are copyrighted by their authors except some amiga modules i think ;

    Source from amiga remix ; Amberstar

    https://www.amigaremix.com/files/1808/V ... Trance.mp3

  • I have another problem.

    It lacks colors!

    Link :

    https://www.catupload.com/download/36dc ... f4e8b.html

    Thank you for your help.

    This issue was fixed now, download the fx again please ;

    http://gigatron3k.free.fr/html5/C2/FX/gsphere.rar

  • Voici le liens :

    https://www.catupload.com/download/57d9 ... 3947e.html

    Your .capx is working for me , maybe you are using an old version of the fx please try this one ,;

    parameters with your moon texture : speed 0.2; x rotation 0.2 ; zoom -9

    http://gigatron3k.free.fr/html5/C2/FX/gsphere.rar

    good luck

  • Gigatron Do you have any example about how to pass variables for seeking and repeating certain parts of the song? How do you adjust the speed of the track? (I tried passing integers such as 2,3 etc. before loading a track, but they didn't seem to have any effect)

    Speed of the module is set from module pattern with effect F-05 <--- mean speed of the song; this can not be changed on the fly

    but global BPM can be changed.. If you are using protracker plugin

    you must set speed every thick to ... X for example:

    for the playing position is the same with slider...

    I will see if i have the .capx of the demo ...

  • Hello.

    What are the dimensions for the image?

    Because I have only half of the planet, the rest is a trail of texture!

    Thank you.

    Can you post the .capx please ?

  • Hi nice people

    I have some unfinished shader on my ssd, slowly i've decided to finish them for your pleasure.

    This is a variant of utility shader but for sprite..;

    Live demo:

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

    fx file and .capx with release R242.:

    Some parameters like RollX,Y and Bg red,green,blue are not working cause not needed.

    http://gigatron3k.free.fr/html5/C2/FX/sutility.rar

  • brent_hamel

    This shader is for sprite; to rotate transform skew and much more .. still wip ..

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

  • totoe zenox98 matriax

    I have a registered version of C2 this mean i can not drop C2. If someone need an effect sure i can convert or make it; simply i will not release another fx for C2 by myself.

    I think C3 will use new glmatrix based on webgl2, and sure webgl2 shaders use new built-in functions.

    Then C3 can switch between shader version ? Like this if version set 0 then all C2 shaders will working , or set to 1 new webgl2 based

    shaders working ... on C3. Don't know how the coders of C3 will organize this..