----- "Emmanuel Roche" a écrit : > Just let me know if you need some code to have a better idea of what > I'm doing (but almost everything is written in Lua).
If you have OSG 2.9.8, there is a new possible value for the face parameter : osg::Camera::FACE_CONTROLLED_BY_GEOMETRY_SHADER To render to a 3d texture in one run, with only one camera, you can : * draw a quad with draw instancing, the number of instance being the number of slice, * in the vertex shader, copy the gl_InstanceID uniform to a varying * in the geometry shader, copy the varying holding the instance id into gl_Layer that control the slice * do what you want in the fragment shader. If you get http://www-evasion.imag.fr/Membres/Eric.Bruneton/PrecomputedAtmosphericScattering2.zip Look in Main.cpp and in copyInscatter1.glsl, there is a variant of this, without instancing, drawing each quad separately. Regards, -Fred _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org