Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    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?
    Rezmason
    @Rezmason
    Do regl users meet or talk anyplace other than this gitter? And has anyone discussed webgpu here?
    Amit Patel
    @redblobgames
    I don't know of anywhere other than this gitter, and this gitter is pretty quiet
    kev zettler
    @kevzettler
    whats regl's position on webgpu? same story as Webgl2? is the webgpu API significantly diff from webgl. haven't looked at all tbh just prompting discussion.
    Ricky Reusser
    @rreusser
    I feel like the problems a regl-like API would solve for webgpu are slightly different. for webgl, its goal is basically to manage statefulness. For webgpu, a lot of the API already looks a lot easier to manage, e.g. https://github.com/austinEng/webgpu-samples/blob/e4f0831a56454dc78a62cb4444ea968d1547d45c/src/sample/instancedCube/main.ts#L44-L97
    but there's also a lot of low level control around pipelines and encoders. I'm not really familiar enough with it to understand exactly the ways in which you might be able to abstract those concepts so you can use them but so your code isn't dominated by boilerplate
    Mikola Lysenko
    @mikolalysenko
    webgpu is a big deal but a different api?
    its a thing i would love to have, but not sure if i have enough time to build it right now
    Mikola Lysenko
    @mikolalysenko
    I feel bad that I've not been here enough
    Ricky Reusser
    @rreusser
    A little overwrought maybe, but my first module in a long time: https://github.com/rreusser/regl-gpu-lines
    it's a product of frustration since things tend to be so rigid that I always just copy paste this sort of thing into my code. so instead, I tried to make it pretty general (too general?).
    Ricky Reusser
    @rreusser
    tl;dr you provide a vertex and a fragment shader. #pragma statements in the vertex shader specify attributes and varyings as well as functions for computing line geometry (vertex position and width). It sets up the correct attributes, strides, etc and handles all the other details
    Feels overwrought, but I'm pretty happy with how usable it actually seems in practice
    Amit Patel
    @redblobgames
    oooh
    seems very handy!!
    Mikola Lysenko
    @mikolalysenko
    way cool!
    Ricky Reusser
    @rreusser
    Screen Shot 2021-11-07 at 01.38.38.png
    Still making progress! Reworked the geometry and got the varyings unskewed by computing the projected offsetsโ€”so that you can do dashes!
    Amit Patel
    @redblobgames
    makes me think of striped socks :smile:
    1 reply
    Ricky Reusser
    @rreusser
    download.jpg
    Reminds me of Slimey
    Amit Patel
    @redblobgames
    yessssssss
    kev zettler
    @kevzettler
    very cool work Ricky
    Ricky Reusser
    @rreusser
    thanks, @kevzettler! I kinda wanted to find out how hard it was to get a simple concept to documented, tested production quality. It's difficult.