Generate a 3D Texture

What would be the best method to create a 3d texture with like lets say a solid black and white gradient in the Y Axis so if you were to just display it would like like this:
image

And then the second part of the question is I know I can get a image passed back from the GPU when its 2d, as a renderTarget, but what about a 3d, I kinda feel like that might not be possible and if its not then I will have to look at doing a flipbook setup for simulations…

I would recommend using RawTexture3d that you can fill with the data you want:
https://doc.babylonjs.com/api/classes/babylon.rawtexture3d

Is it possible to have the GPU create a 3d texture in a similar manner as a rtt?

I’m trying to do simulations on the GPU with 3d volume maps, but I’m not sure how to ping-pong the data when its a 3d texture.

so far this is not something we do. you can render to multiple textures but not to a texture3D

But that could be nice to add :wink:

is it technically possible?

Ill hope on some research here, cause if its possible lets mock up a GOL simulation as a 3d volume.

I don’t think so but it is worth checking:)

1 Like