I installed chrome canery on my tablet to use webgpu with three.js. This also worked for some time after I activated webgpu in chrome://flags. Recently, however, I only get a white picture. So I looked for other browser. Google dev, it worked then,…
Currently my axes --for some reason-- are X and Y defining the ground plane and -Z as up. I want to have X and Z as the ground plane and +Y as up.
To illustrate what I'm saying, here's the normal scene:
Brazil with a translation of [1, 0,…
Basically title. There are support for timestamp queries, but that requires specific device feature support (my laptop for example does not support it when targeting web). There is also the function Queue::onSubmittedWorkDone(callback) that throws…
I am rendering what is effectively a fancy point cloud. Each point is to occupy multiple pixels on the screen (depending on the depth) and has a bunch of data required for shading. With primitive.topology = 'point-list' I can have each point draw…
I have the following rust code which work when I create a native window:
event_loop.run(move |event, _, control_flow| {
control_flow.set_poll();
match event {
Event::WindowEvent {
event:…
C++ has a proposal that named std::execution, in this proposal, we don't have to write synchronization manually and it's zero cost abstraction.
I'm new to Vulkan. After some study, I find Vulkan has many complex synchronization commands which is…
I'm trying to convert my code from WebGL to WebGPU. In WebGL, I'm using below code to update pixel Image data to update in canvas.
....
var texture = webglCtx.createTexture();
webglCtx.bindTexture(webglCtx.TEXTURE_2D, texture);
…
Using the newest chrome 113 and the web gpu function, after updating drivers, testing on different computers, I have determined that this is the error, and I cannot understand why wgsl would fail here. Speculation: there's some call stack limit im…
In Deno 1.8, unstable/experimental support for WebGPU was added.
With WebGPU landing in Chrome Stable 113, I decided it was about time I start my foray into graphics programming. I do understand that no other browser has this feature enabled by…
In Chrome Dev 113, the code below displays a triangle. However, in Firefox Nightly 116, only the background color is shown. This happens for me both on Linux and Android—haven't tested on Windows or macOS.
I know that WebGPU is still in development,…
I'm new to WebGPU and the 3D rendering world.
What I am trying to do is to draw a rectangle in Typescript and wgsl.
I understand that a mesh is a set of vertices.
A mesh of 3 vertices draws a triangle.
Doesn't a mesh of 4 vertices draws a…
The first triangle must be RED,
the second triangle must be GREEN.
But both are GREEN (((
How to set different colors for each sub-triangle in 'triangle-strip' primitive topology ?
My final goal is: Creating new triangles with new colors at mouse…
I have a uniform buffer that is created like this:
const temp = new Float32Array([0, 0, 0, 0, 0, 0, 0, 0]);
const positionBuffer = device.createBuffer({
size: temp.byteLength,
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_SRC,
…
I am simply trying to send an array of vertex positions to the vertex shader.
Here is a snippet of my JS code:
const vertices = new Float32Array([0, 0.5, 0, 1, -0.5, -0.5, 0, 2, 0.5, -0.5, 0, 1]);
const vertexBuffer = device.createBuffer({
//…