Appearance
@tmrw-realityos/charm / createTextureFromImage
Function: createTextureFromImage()
createTextureFromImage(
device,image,existingTexture?):WebGPUTexture
Defined in: packages/charm/src/graphics/WebGPU/WebGPUTextureTools.ts:15
Create WebGPU texture from HTML image
Parameters
device
GPUDevice
GPU device
image
HTMLImageElement
Image
existingTexture?
Existing target texture to load data into. If undefined, a new WebGPUTexture instance is returned.
Returns
WebGPU texture in rgba8unorm format