Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ricky Reusser
    @rreusser
    @Rezmason Is it clear through which platform they were inquiring? I didn't get anything, though I'm just a glorified passerby. Feels like regl could use a faq section which addresses the fact that it's very much alive and doesn't intend to expand indefinitely.
    Fu Zhen
    @fuzhenn
    sorry, my bad : (, didn't test enough for the uniform array pr
    阿豪
    @ahaoboy
    @rreusser thx, It's my mistake, I forget set stencil flag...
    Leo Accounts
    @leoccnts_gitlab
    @rreusser It's amazing how often I'm learning about something and see you did an implementation before. I've been exploring rendering implicit surfaces with Monte Carlo techniques and found this from you https://www.shadertoy.com/view/wdffWj. I was wondering if you could get me started in reimplementing this in regl? I'm still fairly new to shaders and am having a bit of trouble with the translation. It's for this sort of task https://fab.cba.mit.edu/classes/865.18/people/Amira/Mods_Axis/index_frep.html
    adnan wahab
    @adnan-wahab
    i feel like the world really needs a regl-network-graph library with 1st class support for transitions, animated arcs, zoom, panning, tooltips, labels, and offline layout calculations or webworkers
    adnan wahab
    @adnan-wahab
    Actually I have a question. If one were to design such a library, would you prefer to have 2D only but lots of features or 3D but less features...?
    Ricky Reusser
    @rreusser
    @adnan-wahab I think there are a lot of different use cases, but I had really good luck with gephi: https://gephi.org/
    I had just enough data (which wasn't a lot) that basically the only constraint for me was that the the library have good enough algorithms to untangle the layout. I couldn't find a js library that really nailed that, making any nicer UI features not very useful. But again, that may be very specific to particular cases.
    @leoccnts_gitlab this doesn't do multi-pass and it's not regl, but this might be a nice template for a shadertoy-like interface: https://observablehq.com/@mbostock/shader
    Matthew Turk
    @matthewturk
    I was using regl.party today in class to teach about WebGL/OpenGL and some of the students were getting mixed content http/https warnings, and it wasn't able to load for them. (Not all the students had this issue.) Has anyone else run into this?
    Amit Patel
    @redblobgames
    I used to see that a while back but no longer do
    adnan wahab
    @adnan-wahab
    does anyone know a good example of using offscreen rendering to pick objects? (i'm trying to 'pick' points in pointclouds and cubes.. not sure if a raycaster would be better but seems not)
    Amit Patel
    @redblobgames
    Long long ago in a galaxy far far away I rendered each object in a different color to an offscreen canvas, and then picking objects meant looking up which color was at the mouse pointer. But I kind of assumed people didn't do that anymore.
    1 reply
    Mikola Lysenko
    @mikolalysenko
    matthewturk: that's not good!
    I need to update the dns records
    adnan wahab
    @adnan-wahab
    has anyone seen a bug where you render stuff to an FBO offscreen, then render that fbo to screen, and it works for one frame, but if you mouse over the canvas it disappears
    weird when i dont clear the screen it like blends and bleeds everywhere. but if i do clear it, the background eats my pointcloud... but only on the second frame :o
    omg it works when i clear the depth buffer before drawing to FBO wowwww amazing so cool
    John Wilkinson
    @jcwilk
    anyone run into an issue where using a "float" (32 bit) texture in a framebuffer on mobile seems to result in a "half float" (16 bit) texture, but when run on a desktop it correctly uses the full 32 bits? changing it to "half float" makes it the same behavior on both. tried checking webglreport.com and didn't see any differences in float, half float, or general precision metrics. may very well be doing something wrong, I'm a bit new to webgl stuff, but figured I'd see if there might possibly be a known issue there either with mobile browser webgl implementations, mobile graphics cards, or regl
    John Wilkinson
    @jcwilk
    Also, any examples of multi-draw in action? Couldn't find anything about it in the docs
    Amit Patel
    @redblobgames
    I've had issues with "mediump" being the same as "highp" (32 bit) on desktop, and then I never realize that my code doesn't actually work on "mediump" proper (16 bit) on mobile :cry: but I haven't tried float textures yet and don't know what happens there
    webglstats would probably have told us but it's gone! :-(
    Hm, https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices says “If you have a float texture, iOS requires that you use highp sampler2D foo;, or it will very painfully give you lowp texture samples!”
    John Wilkinson
    @jcwilk
    ahh that sounds extremely promising, lowp texture samples would very much explain what I'm seeing. I'll report back if I can confirm when I get time! And yes, the exact same thing happened to me WRT mediump/highp on the desktop... a somewhat understandable "feature" but ugh it makes debugging way more complicated :triumph: thanks again for the tip!
    John Wilkinson
    @jcwilk
    still no luck unfortunately... i'll have to make a make a simplified example to try to narrow it down, but 16 bit textures aren't the end of the world either
    Mikola Lysenko
    @mikolalysenko
    is anyone here looking for work?
    Qao
    @qaoqz_twitter

    hi guys, im looking to render points progressively, one at time kind of like https://p5js.org/examples/image-pointillism.html

    Can someone point me towards the relevant docs I need to go through - am I going about it the wrong way if I do something like have a massive array of elements and just update the offset?

    Amit Patel
    @redblobgames
    I think a massive array of elements should work nicely
    Greg Fagan
    @gregfagan
    Hi folks, what matrix/vector math library are you pairing with regl?
    Amit Patel
    @redblobgames
    I usually use https://glmatrix.net/
    Greg Fagan
    @gregfagan
    I'm able to construct a texture from a 2D array of colors, but when I try to update that texture by calling it with the same data, it no longer renders. Does anyone have an ideas about what I might be doing wrong?
    ah, it worked when I changed it from tex(data) to tex.subimage(data)
    Greg Fagan
    @gregfagan
    @redblobgames do you use the API as-is, or wrap it to be pure/immutable? I know for performance reasons it's better to mutate the data in place, but I'm not sure how much it matters for the kind of projects I do, and a functional API is easier to use
    Amit Patel
    @redblobgames
    glmatrix offers both — if you pass in [] as the first argument, you get back new values, or if you pass in an existing matrix/vector it mutates in place
    Greg Fagan
    @gregfagan
    ah okay yeah that makes sense, I was doing vec2.add(vec2.create(), a, b) but just using [] would be less typing
    do you usually do the former or the latter?
    (create new values/mutate existing ones)
    Amit Patel
    @redblobgames
    I use [] most of the time (it's easier, less error prone), but occasionally I'll mutate existing ones, even try to reuse across animation frames. But it's rare that I need to push performance that much.
    Jack Kutilek
    @jackkutilek
    hi there! is there a way to use regl in a js module without npm/webpack? having trouble using a plain es6 import
    Greg Fagan
    @gregfagan
    https://github.com/regl-project/regl#standalone-script-tag
    it's not packaged as an ES module, but after loading the script on the page you should be able to use the global constructor from your module
    Amit Patel
    @redblobgames
    I haven't gotten it working as an es6 import yet but I use the script tag version often.
    https://www.npmjs.com/package/esinstall can convert many packages into es6 modules
    Amit Patel
    @redblobgames
    Jack Kutilek
    @jackkutilek
    thanks! i've been using the script tag for now, just decided that was good enough