How to check if a resource has finished uploading to the GPU
I’m developing an app with a big 3D world where meshes/textures are uploaded and immediately drawn when you move to a new area. The simplified code for rendering a frame looks like this (I’m using Dawn):
WebGPU: how to check if a resource has finished uploading to the GPU
I’m developing an app with a big 3D world where meshes/textures are uploaded and immediately drawn when you move to a new area. The simplified code for rendering a frame looks like this (I’m using Dawn):
a valid external instance reference no longer exists
After drawing a line, after a while, the browser produces a warning: a valid external instance reference no longer exists.
I wonder if it was because of my setVertexBuffer
in requestAnimationFrame
, or maybe for other reasons, I want to know where my error is, and how to solve it.
Device.createBuffer( usage:GPUBufferUsage.VERTEX ) in every frame , minutes later , browser get wrong
I try to code a simple paint example with webgpu , so , in every mousemove , arrayData.length is changing. I keep an array storage all points(vec2 array) , I create new GPUBuffer with this points array in every frame,because I want to change the gpuBuffer.size whitch is readonly.
Simple raycast hit object detection
I found article at https://maierfelix.github.io/2020-01-13-webgpu-ray-tracing/
wgpu-matrix vec3.normalize return vec4
Main func with bug:
WebGPU: Changing the output format to non-float types, possible?
For rendering to <canvas>
, it seems that navigator.getPreferredCanvasFormat()
is the only way to get a valid format.