Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    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.
    nyc-map
    @nyc-map
    hi
    Mikola Lysenko
    @mikolalysenko
    hello!
    Amit Patel
    @redblobgames
    hello!
    Fil
    @fil:matrix.org
    [m]
    salut
    Amit Patel
    @redblobgames
    @rreusser You may enjoy this paper from Nicholas Rougier, about adding dashes to gl-rendered lines https://jcgt.org/published/0002/02/08/paper.pdf . Not sure if it's the same approach you're using
    Ricky Reusser
    @rreusser
    thanks! ooh, that has significantly better corner behavior than mine. strictly speaking, mine sets up geometry to avoid skewed varyings, but it's otherwise agnostic toward how you might implement dashes.
    Ricky Reusser
    @rreusser
    in particular, mine provides no fragment shader. one of the main problems I was trying to solve was how attributes connect to vertices since that's usually very specific and ends up constraining everything end-to-end.
    nyc-map
    @nyc-map
    i'm making a webgpu compute micro-library with the same syntax/api as REGL. its 3.5 faster than webgl and gpus are only doubling every 4 years. together we could make the world a better place. lmk if u want to collab. the lib is anonymous and i accept contrib from anyone :)
    Mikola Lysenko
    @mikolalysenko
    Amit Patel
    @redblobgames
    Keenan Crane has so much amazing work
    Mikola Lysenko
    @mikolalysenko
    coming right after the monte carlo geometry processing, this is amazing stuff
    i love both of these ideas, so many potential applications
    Fil
    @fil:matrix.org
    [m]
    it sounds very difficult to implement though
    I would like to do the planar graph thing, but it feels like I'd need a year :)
    Mikola Lysenko
    @mikolalysenko
    its actually not that bad
    Mikola Lysenko
    @mikolalysenko
    the hard part is going to be remeshing though
    at least for surfaces at any rate
    for curves you can just subdivide/simplify segments until you get about the same edge length
    split long edges, collapse short ones
    for surfaces you would probably want to use something like polthier's method which is kind of what they describe in that video very quickly
    calculating the forces is actually not that terrible, though the preconditioning step sounds a bit complicated
    but i think their split preconditioning scheme is actually not too bad to implement once you grind through the algebra
    the hard part in terms of actual coding for repulsive surfaces is definitely that remeshing though
    Dusan Bosnjak
    @pailhead
    Hi, i'm having some trouble using the stencil buffer. Are there any gotchas? I'm expecting one draw call to write 1 into it, and then another to only render where 1 is.
    stencil.png
    stencil2.png