antvis / g-device-api

A Device API references WebGPU implementations

Home Page:https://observablehq.com/@antv/g-device-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebGPU bindings 支持 storage texture

xiaoiver opened this issue · comments

texture-storage 可以无需采样器,直接访问像素。

例如在 Compute Shader 中可以直接写:https://webgpu.github.io/webgpu-samples/samples/imageBlur#./blur.wgsl

@group(1) @binding(2) var outputTex : texture_storage_2d<rgba8unorm, write>;

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: WebGPU bindings support storage texture

texture-storage allows direct access to pixels without a sampler.

For example, you can write directly in Compute Shader: https://webgpu.github.io/webgpu-samples/samples/imageBlur#./blur.wgsl

@group(1) @binding(2) var outputTex : texture_storage_2d<rgba8unorm, write>;

TextureUsage 需要增加 STORAGE

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


TextureUsage needs to add STORAGE