Function loadTexture2D
-
Parameters
- engine: EngineContext
Engine context.
- url: string
Image URL to fetch and decode.
- opts: Texture2DOptions = {}
Sampler, format, and decode overrides.
Returns Promise<Texture2D>
A promise resolving to the uploaded
Texture2D. - engine: EngineContext
Load an image from
urlinto a GPUTexture2D, generating mipmaps by default. Results are cached per device by URL + options, so repeated calls with the same arguments share one texture promise.