WebGPU-Step-By-Step icon indicating copy to clipboard operation
WebGPU-Step-By-Step copied to clipboard

does not match the size of the other attachments

Open erwindy opened this issue 4 years ago • 1 comments

image 看报错信息,是size不匹配,这是我的一个解决方法。 image

erwindy avatar Feb 01 '22 06:02 erwindy

Do not forget to return the "size" in function "InitGPU()" in helper.ts file, and then you can set the texture size when you call "device.createTexture()". It jusk like this:

    const depthTexture = device.createTexture({
        size: [gpu.size[0], gpu.size[1], 1],
        format: "depth24plus",
        usage: GPUTextureUsage.RENDER_ATTACHMENT
    });

xrui94 avatar May 08 '22 08:05 xrui94