Wgpu Users

809 Members
0.16 release party zone39 Servers

Load older messages

14 May 2020
@kyren:kyju.orgkyrenparticles can have random deaths, so either their ttl can be lower or maybe collide with something, so it's not so clean that I can just copy the whole thing03:04:21
@kyren:kyju.orgkyrenbut, mostly particles will die predictably, so my other strategy is to do a ring buffer somehow where the tail of the ring buffer gets incremented as particles die03:04:44
@kyren:kyju.orgkyrenbut doing that and coordinating everything with particles that can spawn particles (think trails) is kind of hard03:05:00
@kyren:kyju.orgkyrenso I just wanted to make it work by using sorting03:05:06
@cwfitzgerald:matrix.orgcwfitzgeraldtbh I still thing OIT is the way to go here03:05:14
@cwfitzgerald:matrix.orgcwfitzgeraldthere are some like 2N drawcalls ways of doing OIT03:05:26
@kyren:kyju.orgkyrenit won't help they need to be sorted even without transparency03:05:27
@kyren:kyju.orgkyrenthis is in 2d, there's no z buffer or z layer at all03:05:49
@kyren:kyju.orgkyrenI mean I could introduce it but that's a whole thing03:06:05
@cwfitzgerald:matrix.orgcwfitzgeraldwell that's it, you sorta have yourself a thing here03:06:30
@cwfitzgerald:matrix.orgcwfitzgeraldI don't think any of those solutions will be particularly pretty03:06:39
@cwfitzgerald:matrix.orgcwfitzgeraldwhat determines the order they need to be drawn at03:06:47
@cwfitzgerald:matrix.orgcwfitzgerald * what determines the order they need to be drawn in03:06:51
@kyren:kyju.orgkyrenwhat order they're spawned in03:06:57
@kyren:kyju.orgkyreneither new in front or new in back, either one works though new in back is maybe better03:07:20
@cwfitzgerald:matrix.orgcwfitzgeraldtbh adding a integer depth buffer is probably going to be your best bet03:07:58
@kyren:kyju.orgkyrenand using OIT03:08:14
@cwfitzgerald:matrix.orgcwfitzgeraldassuming you need partial transparency, yeah03:08:25
@kyren:kyju.orgkyrenI'm really close to a solution, I actually have a solution I just don't like it very much03:08:37
@kyren:kyju.orgkyrenand I was trying to find an easier quicker solution with gpu sorting03:08:48
@kyren:kyju.orgkyrenthat solution seems actually more complex than the other solution I have03:08:57
@cwfitzgerald:matrix.orgcwfitzgeraldwhat's your current solution03:09:05
@kyren:kyju.orgkyrenokay the solution that I have in mind (but have not implemented) is to make the particle buffer a ring buffer, but the details get messy03:09:30
@kyren:kyju.orgkyren so a particle would have to have a max ttl independent of whether it's really alive 03:09:47
@kyren:kyju.orgkyrenif you spawn 10 particles, after the max ttl you know those particles are dead, so that gives you a way of popping off of the back of the ring buffer03:10:10
@kyren:kyju.orgkyrenif they die earlier oh well, that's wasted space03:10:32
@kyren:kyju.orgkyrenupdates happen in place in this system03:10:41
@kyren:kyju.orgkyrenpushes push to the end of the ring buffer, popping happens after the max ttl for any particle03:10:55
@kyren:kyju.orgkyrenbut the details are messy03:10:59

There are no newer messages yet.

Back to Room ListRoom Version: 5