Effect APIs (ctx.src, ctx.wrapTexture()) returns EffectTexture as the handle of raw WebGL texture.
To use these textures, you need to pass this handle as uniform.
width / height are physical pixels of the source's native size
(0 for images / videos that haven't loaded yet).
Call dispose() to release the underlying GL texture eagerly. Idempotent.
Only textures you created via EffectContext.wrapTexture are freed;
framework-owned textures (e.g. ctx.src) ignore the call. Do not use the
handle after disposing it. Effects that rebuild a wrapped texture (e.g. a
regenerated atlas) should dispose the previous handle to avoid leaking it
until the effect is removed.
A handle to a GPU texture.
Effect APIs (
ctx.src,ctx.wrapTexture()) returnsEffectTextureas the handle of raw WebGL texture.To use these textures, you need to pass this handle as
uniform.width/heightare physical pixels of the source's native size(
0for images / videos that haven't loaded yet).Call
dispose()to release the underlying GL texture eagerly. Idempotent.Only textures you created via EffectContext.wrapTexture are freed;
framework-owned textures (e.g.
ctx.src) ignore the call. Do not use thehandle after disposing it. Effects that rebuild a wrapped texture (e.g. a
regenerated atlas) should dispose the previous handle to avoid leaking it
until the effect is removed.