2 ms·
You can't always access an image across origin boundaries. If you load an IMG into WebGL as a texture, that's not allowed cross-domain. It's considered "proces
by Animats 5y ago
You can't always access an image across origin boundaries.
If you load an IMG into WebGL as a texture, that's not allowed cross-domain. It's considered "processing" the image, rather than just displaying it. I ran into this when displaying slippy maps from map tiles. You can display the map tiles with JavaScript regardless of origin, but use WebGL, and you have to deal with the origin problem.
- jaffathecake 5y agoThe article covers this. It's because WebGL has texture readback, giving you access to the pixel data. Reading image pixels isn't allowed unless the resource passes a CORS check.