extensions
extensions copied to clipboard
Add GPU.sb3 extension
This adds blocks to use compute shaders in a Turbowarp project. This uses WebGPU(which is experimental!), and only supports compute shaders. From what little research I've done it seems like it would be a pain to add any of the other types, so I'm not doing that.
- Documentation here
- Demos here
- WGSL spec here
- WebGPU spec here
- WebGPU implementation status by browser here
- WebGPU fundamentals here
Notes:
- The only thing that's somewhat undocumented(I think, let me know if I forgot something) is buffer alignment and stuff, but webgpufundamentals does a better job of that.
- This doesn't work in the packager with electron. Not sure why, a quick google search leads me to believe it's in beta.
It fails to get WebGPU adapter
What does the extension do
It fails to get WebGPU adapter
what browser are you on, and what os
What does the extension do
it's like pen+ but with numbers instead of colors and it all happens at the same time
It fails to get WebGPU adapter
what browser are you on, and what os
Chrome, Android, Why did you ask?
What does the extension do
it's like pen+ but with numbers instead of colors and it all happens at the same time
That would be more hard but ok
It fails to get WebGPU adapter
what browser are you on, and what os
Chrome, Android, Why did you ask?
WebGPU is experimental and doesn't work on some devices. Seems like android wouldn't be supported based on webgpu.io.
It fails to get WebGPU adapter
what browser are you on, and what os
Chrome, Android, Why did you ask?
WebGPU is experimental and doesn't work on some devices. Seems like android wouldn't be supported based on webgpu.io.
Oh ok
well this is rough, make it more readable.
well this is rough, make it more readable.
that's fair, I will work on that
I'm excited to see the extension coming out as it means that we could now perform GPGPU calculations on TurboWarp, meaning that 3D applications will be blazingly fast and AI is now possible.
I'm excited to see the extension coming out as it means that we could now perform GPGPU calculations on TurboWarp, meaning that 3D applications will be blazingly fast and AI is now possible.
this isn't really intended for 3d, I think vertex/fragment shader implementations such as those in webgl would be far faster than anything custom made
added a bunch of comments, removed profanity, and I think I reordered stuff in a way that makes more sense but I don't remember
i have finally updated documentation to add the 3 new blocks
what the sigma why lint fail
The latest commit(https://github.com/TurboWarp/extensions/pull/1762/commits/84c7b87ca44ab8815907336960d6518894e34ac2) adds error handling in case the device was lost or the project was run before it was finished getting the adapter+device. this makes pretty much every webgpu block async, which is pretty cringe. I could alternatively:
- use .thens on the promise instead of awaiting it, removing the need for async(? not sure if this would work)
- check if the device is invalid, and if it is just don't run the block while also throwing an error
- do it anyways and add a way to check if the last block run threw an error
- have duplicates of all the blocks as an "unsafe" version which run anyways and just throw an error if something goes wrong
- force the init block to be run before you can do anything (! this would be a lot easier than the alternatives)
Should I keep it as is or do one of the above?
chose the last option as suggested https://discord.com/channels/837024174865776680/1132437506655268926/1337565380243099679
gpu errors aren't going to be translated with Scratch.translate as they're browser-specific, they might already be translated by the browser(couldn't find too much good information), and it's already established as being fine in the game jolt extension. discussion is around here: https://discord.com/channels/837024174865776680/1132437506655268926/1344686905194971166
i need to make some changes to the gpu.sb3 compiler so it doesn't get broken by translations
changes complete, this is ready for review
i'm planning on adding some utilities for struct building on the cpu and maybe possible perhaps some rendering stuff, let me know if you have any ideas as to what this should look like
vadik came in clutch and told me that I can just put the texture of a skin to a canvas that was rendered to via webgpu, I'm going to add that
Is this still a thing or is it stagnant?
Is this still a thing or is it stagnant?
it is, i'm just waiting for this pr to be reviewed and i'm working on adding rendering
Is this still a thing or is it stagnant?
it is, i'm just waiting for this pr to be reviewed and i'm working on adding rendering
Okay this one is bigger so I'll review it when I have time
Is this still a thing or is it stagnant?
it is, i'm just waiting for this pr to be reviewed and i'm working on adding rendering
Okay this one is bigger so I'll review it when I have time
thats what they all said
Is this still a thing or is it stagnant?
it is, i'm just waiting for this pr to be reviewed and i'm working on adding rendering
Okay this one is bigger so I'll review it when I have time
thats what they all said
Okay, I'll tell you what. I'll get around to it at my earliest convenience, likely sometime today
I'll look over it too
I'd recommend putting your documentation at extensions.turbowarp.com, just because some users may not trust your personal site.
Also, considering how much this extension appears to be a work-in-progress, I'm going to convert it to a draft, but if I'm wrong please feel free to open it up again.