[Partially Solved] shader writing to texture

Ok found it !



cf TestRenderToTexture example in jme examples !



[edit] Actually it only solves part of the question: you can have your shader render to a texture, not write to a texture. For example, in the example of scattering light I'm using, it is totally useful, because it means I can actually play multipass within my shader. Now the pb is what about 3d textures I want to write on ? in that case, I don't see any obvious way, using that technique, to output my shader into a 3d texture, render the scene so that I catch all the info of my 3Dtexture, and go to the next step with shaders … (and actually even for 2d texture, not so easy because you'd have to render a scene where a quad is located in front of you and takes up the exact whole space of the screen (maybe needing to change the screen resolution ?))



any suggestion ?