matriax's Forum Posts

  • Interesting!, so are you doing the plugin for free release? Or for a paid version?

    I guess you are C2/C3-JS-WebGl skilled?

  • Due C3 finished the new runtime and babylon 4.0 has been released, wonder how much will cost (Aprox or range) do a Babylon.js plugin about it.

    babylonjs.com

  • I'm testing blends and it affects to all the objects behind the one with the blend.

    To avoid that and be applied to only the desired sprite, this two sprites, the one using blend, and the other who receive needs to be added in a different layer with "force own texture" enabled.

    Is there any way to apply a blend that affect only to the object behind, in the same layer?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Using canvas or paster, if you try to paste a sprite or another canvas/paster object with multiple FX, the output image (Using canvas or PasterUrl) only will have the sprites/objects with last FX added, not the others.

    A screenshot from where we thinks is the problem:

    Somebody knows how to fix it? After paste and export the image it should have all the FX added and keep transparency.

    I pay via paypal.

  • Hi R0J0hound , thanks for the comment.

    About canvas Eren fixed and now we have a version that allow effects and works in the same way that paster on runtime and the same problems on export. Also he added fill path with gradient/texture,etc... but this FX things seems is too complex.

    So, hope somebody with JS skills can fix the problem. In case is a big task, i'm willing to pay.

    I recently launched my Vector Drawing app made with C2:

    kronbits.itch.io/vecmaker

    And well, the ability to use effects/shaders will give a lot of options for creativity, speed up some work and add cool things.

  • Using canvas or paster, if you try to paste a sprite or another canvas/paster object with multiple FX, the output image only will have the sprites/objects with last FX added.

    The code that R0J0hound uses in their plugin is the same as C2runtime uses as Eren says, but we can't find the fix for none of them.

    A screenshot from Eren where he thinks is the problem:

    Somebody knows how to fix it?

    Tagged:

  • Hi R0J0hound ,

    Is there anyway to deactivate the AA on canvas plugin?

    I'm doing the shapes tool with bezier curves,etc... and they looks a bit blurry.

    If i set on C2: Pixel Rounding: On and Sampling:Point all is sharpen except the things drew in the canvas that have some small AA and they look perfectly smooth with that minimal AA.

    THe problem is that i need Sampling:Linear for textures and other stuff, and this seems to mix with the AA of canvas plugin.

    So, is there anyway to deactivate the AA on canvas plugin?

  • I have to test more but i think i fixed it with this:

    uv += 0.5/(divider);

    Then now no matter the divider still the image is on center, but i have to confirm to be 100% sure.

  • Well found an error due i'm suing an updated version with a divider:

    {
    	
    	// Sprite Area
    	vec2 uv= vTex; 
    	
    	// center image in canvas 1
    	uv -= 0.5; 
    	
    	// offset
     uv -= offset;
    	
    	// scale
     uv /= scale;
    
    	// rotate
     uv = cos(rotate) * uv + sin(rotate) * vec2(uv.y, -uv.x);
    	
    	
    	// center image in canvas 2
     uv += 0.5; 
    
    	// Fix the tile thing + Divider
    	vec2 n = vec2(1.0, 1.0) * divider;
     uv = fract(uv*n);
    
    	gl_FragColor = texture2D(samplerFront, uv);
    
    }
    

    vec2 n = vec2(1.0, 1.0) * divider;

    What i do i load an image on tuntime this one can be 10x10. So i scale it bigger than 1024x1024. What i do i set on Divider parameter that scalation, so i keep the orignal texture size to use the Scale parameter.

    Any idea how to fix?

  • Hey! SnipG yes, works! I need to test better but yes, seems was a problem with the order and adding a uv -= before.

    Thanks!

  • Thanks, we remade the formula using the bezier function, and now should all works well with nice curves and the option to move the curve points.

  • Got an erros on this: "^" .

    Tried this:

    uv -= -4.65 + 49.38333*scale - 143.5 * pow(scale.x, 2.0) + 126.6667 * pow(scale.x, 3.0);

    And sometimes it get just the center, other times not. :(

    Any help please? Gigatron ?

  • The actual code:

    #ifdef GL_ES
    precision mediump float;
    #endif
    
    #extension GL_OES_standard_derivatives : disable
    
    uniform mediump sampler2D samplerBack;
    uniform mediump sampler2D samplerFront;
    varying mediump vec2 vTex;
    uniform mediump vec2 destStart;
    uniform mediump vec2 destEnd;
    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 rotate; 
    uniform float scaleX; 
    uniform float scaleY; 
    uniform float offsetX; 
    uniform float offsetY; 
    
    vec2 scale = vec2(scaleX,scaleY);
    vec2 offset = vec2(offsetX,offsetY);
    
    
    void main()
    {
    	// Sprite Area
    	vec2 uv= vTex; 
    
    
    	// rotate
     uv = cos(rotate) * uv + sin(rotate) * vec2(uv.y, -uv.x);
    
    	// scale
     uv /= scale;
    	
    
    	// center image in canvas - Not works on C2
     uv += 0.5;
    	
    	// offset
     uv -= offset;
    	
    	// Fix the tile thing
     uv = fract(uv);
    	 
    
    
    	gl_FragColor = texture2D(samplerFront, uv);
    
    }
    

    With this code( uv += 0.5;), i found that to get the center of the image the offset on C2 needs to be for this different scales:

    0.5 > 0 Offset

    0.4 > 0.25 Offset

    0.3 > 0.67 Offset

    0.2 > 0.5 Offset

    If you set that Scales 0.2-0.5 and you set on C2 that offset the image will be center.

    Trying to find the math expresion to fix the problem but no idea :(

  • I can't fix the center image thing.

    On shadertoy works this:

    uv += 0.5;

    But on C2 nope, also i'm using uv = vTex(Need the sprite area)

    Any math expresion for scale/offset to achieve this?

  • Still there is a small issue, due i want the texture in the center of the image and then repeat over all.

    I mean, actually work great just by default i want that, but well i', gonna test .

    Also thinking to create a C2 page on Itchio with all my shaders, template and all related stuff.