A 3D Texture stores multiple layers of a normal texture, thus requiring a three texture-coordinates (U,V and W). The hardware can also apply texture filters and address modes to it.
Questions tagged [3d-texture]
38 questions
7
votes
1 answer
Rendering to a full 3D Render Target in one pass
Using DirectX 11, I created a 3D volume texture that can be bound as a render target:
D3D11_TEXTURE3D_DESC texDesc3d;
// ...
texDesc3d.Usage = D3D11_USAGE_DEFAULT;
texDesc3d.BindFlags = D3D11_BIND_RENDER_TARGET;
// Create volume texture and…

Daerst
- 954
- 7
- 24
6
votes
1 answer
OpenGL - how to render object to 3D texture as a volumetric billboard
I'm trying to implement volumetric billboards in OpenGL 3.3+ as described here
and video here.
The problem I'm facing now (quite basic) is: how do I render a 3D object to a 3D texture (as described in the paper) efficiently? Assuming the object…

hun7er
- 157
- 3
- 7
4
votes
1 answer
Specifying the target layer of a 3D rendertarget in vertex shader? [HLSL]
When working in HLSL/Directx11 I see there are two methods for binding a 3D rendertarget: either you bind the entire target or you bind it while specifying a layer.
If you bind the entire target how does one specify the layer in HLSL code to which…

James
- 1,973
- 1
- 18
- 32
4
votes
2 answers
Texturing on 3d Blocks using pycollada
I am developing a python script which will be able to generate .DAE (COLLADA) files along with the associated KML files for developing 3D models of buildings. I have the street images of the buildings. By street images, I mean the front face image…

unrealsoul007
- 3,809
- 1
- 17
- 33
3
votes
1 answer
Write to mutiple 3Dtextures in fragment shader OpenGL
I have a 3D texture where I write data and use it as voxels in the fragment shader in this way:
#extension GL_ARB_shader_image_size : enable
...
layout (binding = 0, rgba8) coherent uniform image3D volumeTexture;
...
void main(){
vec4 fragmentColor…

tigeradol
- 259
- 2
- 16
3
votes
1 answer
3D texture in WebGL/three.js using 2D texture workaround?
I would like to use some 3D textures for objects that I'm rendering in WebGL. I'm currently using the following method in a fragment shader, as suggested on WebGL and OpenGL Differences:
// tex is a texture with each slice of the cube placed…

Steve
- 78
- 1
- 8
3
votes
1 answer
GLSL: simulating 3D texture with 2D texture
I came up with some code that simulates 3D texture lookup using a big 2D texture that contains the tiles. 3D Texture is 128x128x64 and the big 2D texture is 1024x1024, divided into 64 tiles of 128x128.
The lookup code in the fragment shader looks…

shoosh
- 76,898
- 55
- 205
- 325
2
votes
1 answer
iOS Metal API draw 3d texture inside the volume
So, I'm trying to render a cube with 3d texture. Texture contains 3 slices of 3 diferent colors, red green and blue. Each slice consists of 4 pixels with the same color. Works fine. https://i.stack.imgur.com/ZoiUi.jpg
private func makeTexture() {
…

Yura Sorokin
- 51
- 5
2
votes
0 answers
How does the coordinate system work for 3D textures in OpenGL?
I am attempting to write and read from a 3D texture, but it seems my mapping is wrong. I have used Render doc to check the textures and they look ok.
A random layer of this voluemtric texture looks like:
So just some blue to denote absence and some…

Makogan
- 8,208
- 7
- 44
- 112
2
votes
1 answer
webgl 3D texture from 2D image, working but with rendering issue
I am trying to use the 3D textures in WebGL, but since it's not currently nativelly supported, I have to use to tricks with a 2D image. It is composed of 64 images, each are 64px by 64px (for a total of 64x4096). I wanted to post a link but I dont…

Jonathan Lurie
- 61
- 1
- 3
2
votes
2 answers
Convert stack of 2d images into 3d image, volume rendering
I want to do a texture based volume render of CT data. I have a stack of 2d CT images that I'd like to use as a 3d texture in opengl (jogl really). I have to do it the way with polygon proxy geometry that shifts when viewing parameters change. How…

AAB
- 674
- 3
- 14
- 27
1
vote
1 answer
3D texture array data format three.js
I'm exploring using 3d textures for video playback in three.js.
Three.js has a good example of this – https://threejs.org/examples/webgl2_rendertarget_texture2darray.html,
but the data format isn't documented. I'm guessing each video frame is packed…

Jay
- 309
- 3
- 13
1
vote
1 answer
How to keep coordination between particles and which texture pixel contains each one’s information?
Using a 4x4x4 grid as an example, I have 64 vertices (which I’ll call particles) which start with specific positions relative to each other. These 64 particles will move in the x, y and z directions, losing their initial positions relative to each…

billvh
- 57
- 5
1
vote
2 answers
Using Sampler3D to read from a 3D texture in OpenGL ES 3.x
I am using OpenGL ES 3.2 to read from a 3D texture in the fragment shader and write that value out to an FBO. I then read from the FBO attachment using glReadPixels, and print out the values obtained.
I am attaching the sampler as:
GLuint texLoc =…

Kirit Thadaka
- 79
- 9
1
vote
1 answer
OpenGL mixes colors for GL_TEXTURE_3D in compute shader
I am not sure whether it is a driver bug but following happens:
compute-shader.glsl:
#version 320 es
precision mediump float;
layout(local_size_x = 16, local_size_y = 8, local_size_z = 1) in;
layout(rgba8ui, binding = 0) writeonly uniform mediump…

Armen Avetisyan
- 1,140
- 10
- 29