I have a PNG file with dimensions 128x32128 (equivalent to 251 128x128 layers) and when I try the following:  gl.texStorage3D(gl.TEXTURE_2D_ARRAY, 1, gl.SRGB8_ALPHA8, 128, 128, 251) gl.texSubImage3D(gl.TEXTURE_2D_ARRAY, 0, 0, 0, 0, 128, 128, 251, gl....
is it possible to retrieve pixels value as a float on framebuffer with multiple attachments ? (WebGL 2)  I tried this :  var framebuffer = _gl.createFramebuffer();  _gl.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer);  _gl.framebufferTexture2D(_gl.FRAM...
I am trying to render a 3D medical data in a brower using WebGL 2.0.  AFAIK 3D textures are now supported in WebGL 2.0.  texImage3D() is a recognized function call.  I am writing a fragment shader and declaring a uniform sampler:  uniform sampler3D s...
I am trying to get the pixel RGBA data from a canvas for further processing. I think the canvas is actually a Unity game if that makes a difference.  I am trying to do this with the canvas of the game Shakes and Fidget. I use the readPixels method fr...
Question  I'm trying to use Vue JS to display some very simple WebGL. I use a Vue method call inside my canvas element to start the function that renders the WebGL. It all works fine, except that the rendered image flashes on the screen in a flas...
I have the following javascript code:  // convenience function. function v(x, y, z){     var v = vec3.create();     vec3.set(v, x, y, z);     return v; }  window.onload = function() {     gl = get_gl('c', {antialias: true})     var vert_shade...
I need to transform colors in an image obtained from an s3 server which disallows crossOrigin.  This is the functionality I need:    const img = new Image();   img.src = src;   ctx.drawImage(img, 0, 0);   const imageData = ctx.getImageData(0, 0, canv...
In WebGL2, there are additional versions of most existing functions that accept ArrayBuffers that allow passing in offset and length inside these buffers. Supposedly, this should make it easier to pass in data from WebAssembly memory without creating...
Given a WebGL scene (created from THREE.js), how would you go about accessing the floating point values (as an array of data outside of the WebGL context) from the DEPTH_ATTACHMENT given the framebuffer has been bound to texture using framebufferText...
I am attempting to load a short 3D texture in WebGL 2.0 in Firefox.  While unsigned 1 byte 3D textures load without any problem, I am struggling to do the same for any other pixel type. My js code:  var SIZE = 512; var data = new Int16Array(SIZE * SI...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.