omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Shader + Scene to Image

    Pythonista
    image shader glsl scene
    2
    2
    2107
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • marcusk
      marcusk last edited by

      Found SceneView and also the SimpleNoise GLSL example.

      This example is great in that it shows that GLSL can be used interactively with Pythonista.

      However, what if one would like to use it for non-interactive purposes such as visualizing escape time fractals in 2d/3d where the computation time could be say 1 sec for a frame or you render lower resolution image blocks and assemble.

      Is it possible with current Scene API to render at a fixed resolution, frame by frame to an image?

      Possibly future improvement if not possible with current API?

      The task is essentially (dream solution):
      Given a GLSL fragment shader, compile, set uniforms and input texture(s), render a quad (2D, 0 to 1 in each dimension or -1 to 1), output to a float texture of given dimension and be able to convert this texture into a numpy array in the end.

      Thanks in advance for any input.

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        @Cethric made a full GLKit wrapper, which might do what you want.
        In scene, you will be limited to converting each frame to .jpg by using the SceneView screen capture method, i think, since there is no way to get data out of a shader.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB Forums | Contributors