Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Aron Gabor
    @ashnur
    How can I make sure I have all the debug features enabled if I am not using browserify?
    Matt Lockyer
    @mattlockyer
    wondering how to do something similar to preserveDrawingBuffer: true (from threejs) in regl, so that you can use canvas.toDataUrl(...)?
    Mikola Lysenko
    @mikolalysenko
    you can just set preserveDrawingBuffer in the context creation flags
    ashnur: you can directly include the library
    if you manually specify the input file it should work
    Max Bittker
    @MaxBittker
    localhost_9966_.png
    I am drawing on an html canvas using some canvas APIs (looks sharp), then constructing a regl texture from that canvas and passing it to a fragment shader where i use texture2D... it works except it comes out super jaggy (bottom image)
    does anyone recognize this problem and you could you suggest what I might want to investigate? right now the texture has all default parameters... do you think this is an interpolation thing?
    my shader is just gl_FragColor = texture2D(tex, uv);
    Max Bittker
    @MaxBittker
    sorry, i've solved it :) the canvas i was rendering to was the wrong size
    Max Bittker
    @MaxBittker
    but might be a cool visual effect to revisit in the future :P
    Amit Patel
    @redblobgames
    :-)
    Max Bittker
    @MaxBittker
    If anyone else is into this aesthetic, I wanted to share this video I LOVE of someone showing off their jpeg-compression shader (also just makes me happy to see people excited about sharing graphics): https://twitter.com/ompuco/status/1334402098750869507?s=20
    Mikola Lysenko
    @mikolalysenko
    you could break the image into blocks and then do a dct/thresholding pass
    Nick Matantsev
    @unframework
    i looooved that shader by Ompuco - and especially the fact that they actually followed the JPEG algorithm and glitched it, rather than e.g. approximating via blur/posterization/whatever
    Alberto
    @nkint
    hei! this seems an interesting project: https://github.com/caa1211/webOAcard
    http://caa1211.github.io/webOAcard/?m=castle
    do anyone know any similar project? or some reference about the math behind this?
    Mikola Lysenko
    @mikolalysenko
    i used to make those kinds of things when i was a kid
    i think you just cut out a parallelogram at the right distance and fold it
    then they glue on some stuff on the front to make whatever shape
    ayshvab
    @ayshvab
    Hi, maybe someone has an example of how to draw an isometric grid ?
    Draw a regular grid, z-rotate it 45°, then x-rotate it:
    Amit Patel
    @redblobgames
    It was a lot more complicated back in the day, but simpler with the gpu :-)
    joepie91 🏳️‍🌈
    @joepie91:pixie.town
    [m]
    hmmm. regl.party shows frameCount instead of tick in the default context variables, even though that seems to have been changed back in 0.9.0 or so, and it also still lists deltaTime which no longer exists. are the docs on regl.party not kept in sync with those in the repo?
    Mikola Lysenko
    @mikolalysenko
    DataScienceBits_twitter: regl context creation is sync, no need to wait
    joepie91:pixie.town: i don't think the deployment is very automatic right now. really need to automate this
    joepie91 🏳️‍🌈
    @joepie91:pixie.town
    [m]
    aha :) I think it would be out of date by 2 years or so now, though
    frameCount seems to have been replaced quite some time ago
    Mikola Lysenko
    @mikolalysenko
    yeah
    too many things to do, i can't keep up with it
    joepie91 🏳️‍🌈
    @joepie91:pixie.town
    [m]
    I know the feeling :)
    Dusan Bosnjak
    @pailhead

    Heya, in case anyone is still here - I'm trying to apply some blur passes to a texture.

    I have a command that has:

    {
       ...,
        framebuffer: regl.prop('framebuffer' as never),
        viewport: regl.prop('viewport' as never),
    }

    I do N passes and each time i generate two draw calls:

    return [
        hBlur(
          cubeUVRenderTarget.texture,
          pingPongRenderTarget.fbo,
          lodIn,
          lodOut,
          sigma,
          'latitudinal',
          poleAxis
        ),
        hBlur(
          pingPongRenderTarget.texture,
          cubeUVRenderTarget.fbo,
          lodIn,
          lodOut,
          sigma,
          'longitudinal',
          poleAxis
        ),
      ]
    for (let i = 1; i < PARAMS.totalLods; i++) {
              blurCommand(getBlurDrawCall(cubeUVRT, pingPongRT, i))
      }

    And for some reason this is able to read the cubeUVRT buffer only every other time. Like, from these totalLods passes, every command renders (i can fill my final texture with color) but the ping pong thing doesn't work, it just reads black.

    Dusan Bosnjak
    @pailhead
    heh it was a user error, it definitely does the read (upon further inspection with spector)
    Mikola Lysenko
    @mikolalysenko
    pailhead: ok glad it sorted out
    sorry I didn't check the messages quickly enough, been very busy
    2 kids now and not much time
    Dusan Bosnjak
    @pailhead
    kids are better than time :D
    Thanks for responding! I noticed it's been a bit slow, but it seems like it's still active?
    I started working with a framework called WebViz which relies on regl under the hood, it seems to be really popular in robotics.
    (at least in san francisco heh)

    For any future readers, i came across this:
    https://stackoverflow.com/questions/69250608/is-my-webgl-fbo-color-attachment-being-cleared

    I'm still not actually sure what caused it, but basically i was using React.useState to store a texture, the moment i pass the "raw" texture reference (whatever is the result of calling regl.texture() the texture would be reset. Took a while to realize that calling this function will "reset" the texture to 1x1.

    Basically:

    const [texture, setTexture] = useState(null)
    
    ....
      const myTexture = regl.texture()
      //barfed
      setTexture(myTexture)
       //worked
      setTexture({myTexture})
    Jason Ting
    @jzting
    regl doesn't support 3d textures, right?
    Mikola Lysenko
    @mikolalysenko
    jzting: no, webgl1 only has 2d textures and cubemaps
    pailhead: yeah, it's still active but not my main priority now. things are pretty stable so doesn't require as much attention
    Jason Ting
    @jzting
    @mikolalysenko thanks!
    Jason Ting
    @jzting
    and there are no plans to support webgl2?
    Amit Patel
    @redblobgames
    No plans to support webgl2
    But you might find regl-project/regl#561 interesting
    1 reply
    solsarratea
    @solsarratea
    hi :) i am trying to update a texture with different webcam's devices, but i am struggling how to do it. I am currently updating the source from the video html element, but this is not changing the texture, so guess maybe I am doing it wrong. has anybody tried this?