I believe each of the uniforms needs to be added with a line such as: myshlchunk->setUniform(OSGLight0Active, 0);
So the user can add as many or as few as he wants to add, and the unused ones will not hurt performance. If this is all true, then adding all 32 shouldn't be damaging in any way. Sorry I didn't wait to hear from you before submitting the patch; I might have added more lights. -- Terry Welsh - mogumbo 'at' gmail.com www.reallyslick.com | www.infiscape.com | www.vrsource.org On 7/1/05, Matthias Stiller <[EMAIL PROTECTED]> wrote: > As promised in my yesterdays post, I can confirm that the Wildcat > Realizm 800 supports 32 (!) active lights in hardware. Don't ask me > about performance, we usually do not have scene with so many lights > enabled at the same time though :) > > Now the question how to deal with this. Maybe an additional field in the > SHLShader that specifies how many light masks to send to the shader. > The default could be 8, so everything works on common graphics cards > and those wo need to increase/decrease the number usually know why they > are changing that value. Comments ? > > Regards > > Matthias > > Yes, we could probably make as many of those bools as we want. You > > would only need to use as many of them as you want for your > > application. For example, I would probably cap my current project at > > 4 to 8 lights. At least for now. Some people might want more. > > > > On 6/30/05, Matthias Stiller <[EMAIL PROTECTED]> wrote: > > > Just want to throw in a short hint. 3DLabs cards support much more > > > than 8 active lights in hardware. If I remember right, there are 16 > > > or maybe 32 hardware accelerated lights. Don't know if it is a good > > > idea to add so much uniforms to *every* shader. Does anybody know > > > if this is critical in terms of speed ? > > > > > > Regards > > > > > > Matthias > > > > > > PS: Will check the exact number tomorrow > > > > > > On Thursday 30 June 2005 19:04, Terry Welsh wrote: > > > > Another thing that might help with the whole speed vs. > > > > flexibility issue is to allow the linking of many shader objects. > > > > I believe the SHL framework currently allows one vertex shader > > > > and one fragment shader. But if more could be linked together, > > > > then it would be possible to spend less time compiling and just > > > > link together the correct already-compiled objects. Or maybe an > > > > object that only handles lighting could be recompiled and linked > > > > without having to recompile the rest of the shader. > > > > > > > > Anyway, has there been any more progress with > > > > OSGActiveLightsMask? Since bitwise operators aren't available in > > > > GLSL I was thinking of trying to add the following bools to the > > > > SHL framework: > > > > OSGLight0Active > > > > OSGLight1Active > > > > OSGLight2Active > > > > OSGLight3Active > > > > OSGLight4Active > > > > OSGLight5Active > > > > OSGLight6Active > > > > OSGLight7Active > > > > > > > > This is the best solution I can think of for detecting which > > > > lights to use at runtime. Comments and suggestions are welcome. > > > > > > ------------------------------------------------------- > > > SF.Net email is sponsored by: Discover Easy Linux Migration > > > Strategies from IBM. Find simple to follow Roadmaps, > > > straightforward articles, informative Webcasts and more! Get > > > everything you need to get up to speed, fast. > > > http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > > > _______________________________________________ > > > Opensg-users mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/opensg-users > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Opensg-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensg-users > ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
