About 50 results
Open links in new tab
  1. javascript - WebGL create Texture - Stack Overflow

    Jan 29, 2012 · I successfully created a WebGL texture from an image and drew it into a canvas element. function initTexture(src) { texture = gl.createTexture(); texture.image = new Image(); texture.image.o...

  2. shader - How to use data textures in WebGL - Stack Overflow

    Mar 11, 2020 · gl.bindTexture(gl.TEXTURE_2D, texture); gl.uniform1i(textureLocation, 0); Finally, in the fragment shader, we are trying to just reliably use one 'texel' as a means of conveying information. I …

  3. Accessing image/texture data (texels) on WebGL - Stack Overflow

    May 14, 2015 · Accessing image/texture data (texels) on WebGL Asked 14 years, 11 months ago Modified 10 years, 7 months ago Viewed 9k times

  4. How to bind an array of textures to a WebGL shader uniform?

    Oct 26, 2013 · So I wanted to pass the texture to use for a vertex as a vertex attribute, and use this number as an index into some "array of textures" in the fragement shader.

  5. WebGL textures from YouTube video frames - Stack Overflow

    Jan 7, 2022 · I'm using the technique described here (code, demo) for using video frames as WebGL textures, and the simple scene (just showing the image in 2D, rather than a 3D rotating cube) from …

  6. html - WebGL - wait for texture to load - Stack Overflow

    Nov 1, 2013 · WebGL - wait for texture to load Asked 12 years, 2 months ago Modified 8 years, 3 months ago Viewed 18k times

  7. webgl - How to handle 3d texture on webgl2 - Stack Overflow

    Aug 11, 2020 · I am trying to work with 3D texture in webgl2 and I came to know about the gl.texImage3D(); I have experience with 2d texture and I found it very convenient but there is another …

  8. Read pixels from a WebGL texture - Stack Overflow

    Nov 29, 2012 · How do I get pixels of that texture (similar to WebGL's readPixels, but for a texture)? One idea I have is to create a canvas and a WebGL context with preserveDrawingBuffer=true, and render …

  9. Use WebGL texture as a Three.js Texture map - Stack Overflow

    Mar 10, 2019 · I have a scene with plane which should use WebGL texture (created using gl.createTexture()) as a map for material. Basically, it doesn't matter how this texture will be used, I …

  10. How to use multiple textures in WebGL? - Stack Overflow

    I wanted to use 6 different textures on a cube, one per side, but can't find the mistake. Here's my current code: var texturen = new Array(); function initTexture(sFilename,texturen) { var a...