On Thu, Dec 11, 2008 at 4:43 PM, Peter Verswyvelen <span dir="ltr">&lt;<a href="mailto:bugfact@gmail.com">bugfact@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m think 8 is the minimum number of lights hardware must support to be OpenGL compiant, but hardware can support more.<div><br></div><div>Most games use some kind of &quot;light virtualization technique&quot;, were any number of lights are allowed but only the closest lights are used for doing the shading.</div>
</blockquote><div><br>Thanks for the input Peter (&amp; Conal).<br>&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div></div>
<div>I&#39;m not sure if the maximum number of lights applies when using custom GPU shaders...&nbsp;</div></blockquote><div><br>I looked into this. An example shader application [1] used normal glLight* commands to set up the lighting.&nbsp; This tutorial [2] shows that shaders have access the light information via. the gl_LightSource array and have the option to use it or not. I can imagine someone defining unlimited light parameters with uniform variables in glsl if they really wanted to.<br>
<br>[1] <a href="http://cs.anu.edu.au/Student/comp4610/2007/labs/gpu.html">http://cs.anu.edu.au/Student/comp4610/2007/labs/gpu.html</a><br>[2] <a href="http://www.clockworkcoders.com/oglsl/tutorial5.htm">http://www.clockworkcoders.com/oglsl/tutorial5.htm</a><br>
<br>David<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div></div><div><div></div><div class="Wj3C7c"><div class="gmail_quote">
On Thu, Dec 11, 2008 at 10:14 PM, Conal Elliott <span dir="ltr">&lt;<a href="mailto:conal@conal.net" target="_blank">conal@conal.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">In TBAG, ActiveVRML/DirectAnimation, and Fran, I embedded lights into geometry, which allows them to be spatially transformed.&nbsp; Looking in Graphics.FieldTrip.Geometry3, you&#39;ll see a comment placeholder for lights.<br>

<br>
OpenGL is a temporary implementation convenience, so I wouldn&#39;t design the API around it.&nbsp; If more lights get added to a geometry than the current implementation can handle, we can document the limitation and drop some of them at run-time.<br>


<br>&nbsp; - Conal<br><br><div class="gmail_quote"><div><div>On Thu, Dec 11, 2008 at 12:52 PM, David Sankel <span dir="ltr">&lt;<a href="mailto:camior@gmail.com" target="_blank">camior@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div>
Hello All,<br><br>I&#39;m working on adding lighting to the FieldTrip library (ticket <a href="http://trac.haskell.org/FieldTrip/ticket/16" target="_blank">http://trac.haskell.org/FieldTrip/ticket/16</a>). I have some initial data types here:<br>



<br><a href="http://hpaste.org/12975" target="_blank">http://hpaste.org/12975</a><br><br>I&#39;m thinking that the GContext will keep track of which of the 8 opengl lights are used and enable them if they are.<br><br>I was wondering what ideas folks have had with lighting. Some issues that are on my mind:<br>



<ul><li>OpenGL limits the number of lights to 8.</li><li>It would be nice, for a spotlight primitive, to allow the light&#39;s position and a point it is pointing toward to go through different transformations. This would allow a fixed light to follow an object, for example. I don&#39;t know yet how to provide this functionality.<br>



</li></ul>Thanks,<br><font color="#888888"><br>David<br>
</font><br></div></div>_______________________________________________<br>
FieldTrip mailing list<br>
<a href="mailto:FieldTrip@haskell.org" target="_blank">FieldTrip@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/fieldtrip" target="_blank">http://www.haskell.org/mailman/listinfo/fieldtrip</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
FieldTrip mailing list<br>
<a href="mailto:FieldTrip@haskell.org" target="_blank">FieldTrip@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/fieldtrip" target="_blank">http://www.haskell.org/mailman/listinfo/fieldtrip</a><br>
<br></blockquote></div><div><div><div><div><div><br></div></div></div></div></div>
</div></div></blockquote></div>