-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Big ask: can we instance in a browser? #7
Comments
Looks like it's this line it really takes exception to: |
Sorry this fell of my radar. If the browser doesn't support storage buffers then the only way to work around it is to figure out how to store the instances in a different kind of uniform buffer, maybe a texture. It's not an easy "tweak" AFAICT. |
No worries. In the end have ditched bevy and hit the graphics card directly.
…On Tue, 25 Oct 2022 at 22:12, Duncan ***@***.***> wrote:
Sorry this fell of my radar. If the browser doesn't support storage
buffers then the only way to work around it is to figure out how to store
the instances in a different kind of uniform buffer, maybe a texture. It's
not an easy "tweak" AFAICT.
—
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGEJCG7S7B6KFR7SJYDGTLWFBEMDANCNFSM6AAAAAAQ36JC4A>
.
You are receiving this because you authored the thread.Message ID:
<ForesightMiningSoftwareCorporation/bevy-aabb-instancing/issues/7/1291149729
@github.com>
|
Since I just saw this issue and did play with this I can give some input: It is totally possible to use textures to store the instance data and is rather straight forward to implement. The biggest problem is that wgpu only supports images up to a hard coded size limitation (8192 pixels per dimension), As for the limit I'm currently using a 2d texture and it just seems to work fine for 100m entities (which is the limit my crate can handle) |
Texture limits are actually half of that if you’re targeting ios and
android. One of them only has a 4k height. 100m entities? Nice. In the end
I used wgpu directly rather than through bevy.
…On Sun, 12 Mar 2023 at 12:56, Emi ***@***.***> wrote:
Since I just saw this issue and did play with this I can give some input:
It is totally possible to use textures to store the instance data and is
rather straight forward to implement.
Also it doesn't seem to come with any performance issues AFAICT.
The biggest problem is that wgpu only supports images up to a hard coded
size limitation (8192 pixels per dimension),
the capacity can be increased by using a 2d or even 3d texture if needed
and in the worst case, you could even change the encoding of the instances
to be more dense than 1 instance per pixel
but I don't thing this is a good idea.
As for the limit I'm currently using a 2d texture and it just seems to
work fine for 100m entities (which is the limit my crate can handle)
For reference, I used this in my warbler_grass
<https://github.com/EmiOnGit/warbler_grass> crate.
—
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGEJCEJGODG77F327XAC73W3XBZRANCNFSM6AAAAAAQ36JC4A>
.
You are receiving this because you authored the thread.Message ID:
<ForesightMiningSoftwareCorporation/bevy-aabb-instancing/issues/7/1465191244
@github.com>
|
Thought I would push my luck and try it on the browsers of a mac:
Do we have to wait for WebGPU to land in 2023 or are there maybe some tweaks we could try to get it running somehow in the browser?
The text was updated successfully, but these errors were encountered: