regl-project / regl

👑 Functional WebGL
https://regl-project.github.io/
MIT License
5.21k stars 322 forks source link

Any possible way to use gl.TEXTURE_3D with webgl2? #649

Open chwan1 opened 2 years ago

chwan1 commented 2 years ago

I'd like to port this using regl, since the functional nature of regl makes a good developing experience.

I've wrapped webgl2 using the technique in #561. And I'm wondering is there any way I can use texture 3d under this wrapper? Perhaps a custom binding of 3d texture to shader uniform is possible?

Currently, I have uniform mediump sampler3D tex; in my shader.

deluksic commented 1 year ago

I started a fork in which I implement regl.texture3D. You can also use EXT_texture_norm16 extension with (for now only) r16 and r16_snorm texture formats.

It is a WIP, but it works for our needs.

https://github.com/deluksic/regl