Sign in to follow this  
ZaiPpA

Rendering to 3D textures?

Recommended Posts

Hi! I've read that on the GeForce 8800 it is possible to render to a 3D texture using an FBO. (i don't have an 8800 so i can't test it) I'm a bit confused about what this means exactly. Is it:
  • the fragment shader can render to any slice of the 3D texture during a single pass (i.e. 3D instead of 2D) (The entire 3D texture is attached to the FBO and maybe the shader selects which one to render to)
  • the fragment shader can only render to one 2D slice per pass (i.e. still just 2D, like for 2D textures) (Only one slice of the 3D texture is attached to the FBO)
? I haven't really been able to find any info on it, except for other people asking this question :) It would be really cool if it was now possible to truely render to a 3D texture, instead of just rendering to a slice

Share this post


Link to post
Share on other sites
I think you can render to any slice of a 3D texture by using geometry shaders to select the slice while having the 3D texture bound using glFramebufferTextureEXT (GL_EXT_geometry_shader4)

Quote:
From the specs
Section 2.16.4, Geometry Shader Execution Environment

...

Layered rendering

Geometry shaders can be used to render to one of several different layers of cube map textures, three-dimensional textures, plus one- dimensional and two-dimensional texture arrays. This functionality allows an application to bind an entire "complex" texture to a framebuffer object, and render primitives to arbitrary layers computed at run time. For example, this mechanism can be used to project and render a scene onto all six faces of a cubemap texture in one pass. The layer to render to is specified by writing to the built-in output variable gl_layer. Layered rendering requires the use of framebuffer objects.


I don't have an 8x00 so i haven't tried it.

HellRaiZer

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this