GithubHelp home page GithubHelp logo

Exploit shader from shadertoy about editly HOT 7 CLOSED

cDelage avatar cDelage commented on June 2, 2024 1
Exploit shader from shadertoy

from editly.

Comments (7)

mifi avatar mifi commented on June 2, 2024

hi
you can see the source code (JSON) of that youtube video here: https://github.com/mifi/editly/blob/master/examples/commonFeatures.json5

from editly.

cDelage avatar cDelage commented on June 2, 2024

Hello Mifi,
Maybe I don't understand how to export the code but when I copy the following code and paste in a frag file, then I don't succeed to run the code like in the commonFeatures.json5
image

I understand that the code is not compatible (editly await for a frag with a main() and not mainImage with parameters...)
but I don't know how you do the conversion ?
Is there any way to download the shaders from shadertoy that make compatible with editly ?

(PS : I succeed to use the GL with the existing rainbow-color frag file)

from editly.

mifi avatar mifi commented on June 2, 2024

unfortunately im not a glsl expert

from editly.

cDelage avatar cDelage commented on June 2, 2024

Will it be possible to see the assets ./assets/shaders/MdXyzX.frag file please ? (or any other assets from commonFeature)

from editly.

mifi avatar mifi commented on June 2, 2024

It’s already there. See readme

from editly.

cDelage avatar cDelage commented on June 2, 2024

Thanks for the support i found the assets source

Finaly i found how to proceed :

1 - Define the variable needed by the shader

Example :

uniform vec2 resolution;
uniform float time;

#define Mouse (vec2(0, 0))
#define iResolution (resolution)
#define Resolution (resolution)
#define Time (time)

2- add a main function to call main image

void main(void)
{
    mainImage(gl_FragColor, gl_FragCoord.xy);
}

from editly.

hddananjaya avatar hddananjaya commented on June 2, 2024

@cDelage can you kindly share an example file that you copied from shadertoy and edited and used with Editly.
I tried to follow the steps you mentioned. But I get this. πŸ€”

➜  examples git:(master) βœ— editly --fast gl.json5
ffmpeg version 4.4.2
ffprobe version 4.4.2
250x250 15fps
Failed to format compiler error: TypeError: string.split is not a function
Caught error Error
    at new GLError (/home/caretaker/.nvm/versions/node/v18.15.0/lib/node_modules/editly/node_modules/gl-shader/lib/GLError.js:8:19)
    at compileShader (/home/caretaker/.nvm/versions/node/v18.15.0/lib/node_modules/editly/node_modules/gl-shader/lib/shader-cache.js:63:15)
    at proto.getShaderReference (/home/caretaker/.nvm/versions/node/v18.15.0/lib/node_modules/editly/node_modules/gl-shader/lib/shader-cache.js:75:21)
    at Object.getShaderReference [as shader] (/home/caretaker/.nvm/versions/node/v18.15.0/lib/node_modules/editly/node_modules/gl-shader/lib/shader-cache.js:131:23)
    at proto.update (/home/caretaker/.nvm/versions/node/v18.15.0/lib/node_modules/editly/node_modules/gl-shader/index.js:115:31)
    at createShader (/home/caretaker/.nvm/versions/node/v18.15.0/lib/node_modules/editly/node_modules/gl-shader/index.js:255:10)
    at createGlFrameSource (file:///home/caretaker/.nvm/versions/node/v18.15.0/lib/node_modules/editly/sources/glFrameSource.js:26:18)
    at async pMap.concurrency (file:///home/caretaker/.nvm/versions/node/v18.15.0/lib/node_modules/editly/sources/frameSource.js:61:25)
    at async file:///home/caretaker/.nvm/versions/node/v18.15.0/lib/node_modules/editly/node_modules/p-map/index.js:141:20 {
  shortMessage: 'Error compiling shader:\n' +
    "ERROR: 0:4: '' : No precision specified for (float) \n" +
    "ERROR: 0:5: '' : No precision specified for (float) \n" +
    "ERROR: 0:6: '' : No precision specified for (float) \n" +
    "ERROR: 0:7: '' : No precision specified for (float) \n" +
    "ERROR: 0:9: '' : No precision specified for (float) \n" +
    "ERROR: 0:10: '' : No precision specified for (float) \n" +
    "ERROR: 0:11: '' : No precision specified for (float) \n" +
    "ERROR: 0:12: 'iChannel0' : syntax error \n",
  longMessage: '',
  rawError: "ERROR: 0:4: '' : No precision specified for (float) \n" +
    "ERROR: 0:5: '' : No precision specified for (float) \n" +
    "ERROR: 0:6: '' : No precision specified for (float) \n" +
    "ERROR: 0:7: '' : No precision specified for (float) \n" +
    "ERROR: 0:9: '' : No precision specified for (float) \n" +
    "ERROR: 0:10: '' : No precision specified for (float) \n" +
    "ERROR: 0:11: '' : No precision specified for (float) \n" +
    "ERROR: 0:12: 'iChannel0' : syntax error \n",
  message: 'gl-shader: Error compiling shader:\n' +
    "ERROR: 0:4: '' : No precision specified for (float) \n" +
    "ERROR: 0:5: '' : No precision specified for (float) \n" +
    "ERROR: 0:6: '' : No precision specified for (float) \n" +
    "ERROR: 0:7: '' : No precision specified for (float) \n" +
    "ERROR: 0:9: '' : No precision specified for (float) \n" +
    "ERROR: 0:10: '' : No precision specified for (float) \n" +
    "ERROR: 0:11: '' : No precision specified for (float) \n" +
    "ERROR: 0:12: 'iChannel0' : syntax error \n"
}

from editly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.