Hi J.P.
J.P. Delport wrote: > > Do you want TextureRectangle support in osgPPU? > Yes, of course. However I thought that rectangular textures might not be used in future anymore, because the support of non-power-of-two (npt) textures can actually replace the rectangular textures. The main difference, imho, is in specifying coordinates, so that one can use also npt textures while recomputing the coordintes in the shaders. So, to be honest, I do not know of any case where rectangular textures are really helpful. This was the reason, why I have never tried to add support for them into the pipeline. > > The main difference is the setup of the quad to be rendered: if the > input texture is a rect, then the quad coords must be set up correctly. > I've done this at the top of init() in UnitInOut, but want to know if > you think this approach is correct? Maybe a change in the utility function? > Yes, this seems to be the trick part. I would not prefer to have a special case in UnitInOut::init which changes the coordinates in case of rectangular texture. I would propose to use multiple texture coordinates. As soon as a unit becames dirty, so that it has to setup its inputs, one do creates screen sized quads with multiple texture coordinates. The coordinates should of course correspond to the input index. So that if rect-texture is on 2nd input then only 2nd coordinates should be changed. This would guarantee that always correct coordinates are used in the shaders as long as user do understand what he is doing ;) > > Some language and spelling things were changed. You can merge them if > you like. > Oh thank you very much. I will merge the changes soon. Regards, art ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20802#20802 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

