Original Post
im working on a volumetric renderer and want to implement updating mechanisms to the volume (wich is represented as 3D texture)
i wanted to know wether and how rendering to 3D textures is possibly (there is glFramebufferTexture3D but i dont quite get the rest)
so normally(when rendering to 2D textures) i would bind a framebuffer with the target texture and in my fragment shader do something like:
but since the fragment shader is run after the projection, coordinates should be 2d.
basically what im looking for is a way to write to a specific position in the 3D texture, lets say [0.43,0.5,0.7] without uploading the data from RAM
but instead writing it from a shader
i wanted to know wether and how rendering to 3D textures is possibly (there is glFramebufferTexture3D but i dont quite get the rest)
so normally(when rendering to 2D textures) i would bind a framebuffer with the target texture and in my fragment shader do something like:
gl_FragData[0] = stuff.xyzw;
but since the fragment shader is run after the projection, coordinates should be 2d.
basically what im looking for is a way to write to a specific position in the 3D texture, lets say [0.43,0.5,0.7] without uploading the data from RAM
but instead writing it from a shader