> > On 05/19/2011 08:37 AM, Henn, Thomas wrote: > > > I'm trying to draw a geometry using two different materials. While > a > > plane intersects the geometry into two halves, the materials should > be > > applied to these two half geometries. As I don't want to duplicate my > > geometry, I tried to solve this with a MultiPassMaterial. So I > defined > > two materials with two ClipPlaneChunks having different plane > > definitions and added them to the MultiPassMaterial. > > > > > > Although the geometry is rendered twice using both material's color > > information, only the second clip plane definition is used for both > > rendering passes. > > > > > > Might this be a bug or did I hit any OpenGL specific limitation? > > > > i think it's a bug in ClipPlaneChunk::changeFrom, it is a bit too > > aggressive in trying to avoid unnecessary state changes and does not > > consider the case that old and new chunk may both be enabled and have > > the same beacon but a different plane equation. > > Can you try the attached patch and see if that fixes it? > > That did the trick. It works perfectly now...
...almost. There's another issue showing up. The two different materials I mentioned before have different transparencies as well. So one material has no transparency set, but the other one has. Now it seems that the MultiPassMaterial, which I added the two materials to, is not able to handle this mixed transparency settings. Either both render passes use the SimpleMaterial's automatic BlendChunk, or both don't, depending on which material was added to the MultiPassMaterial first. Could that be fixed too? Thanks and regards, Thomas ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users