As an addendum to the example I posted, it's possible to add a loop to account 
for extra lights, but I'd recommend against it, and keep it "unrolled".

I don't think the fixed function pipeline lighting is going to look much, it 
any, different from what I posted. It's also not a particularly complicated 
lighting model that can't just be done in a shader (as posted) instead, but I 
guess one's view on that is relative.

On May 10, 2013, at 12:01 PM, Christopher Wright <christopher_wri...@apple.com> 
wrote:

> 
> On May 9, 2013, at 9:55 PM, Achim Breidenbach <ac...@boinx.com> wrote:
>> I don't have any experience with lighting calculations in shaders yet. I 
>> don't want to dive deep into materials and such, but simply want to have the 
>> left cube look the same way as the right cube.
> 
> 
> Getting identical results is actually shockingly complicated.  There's a 
> _ton_ of computation in the fixed-function pipeline, and you'll have to 
> duplicate all of it.  As the number of lights increases, the shader 
> complexity increases as well.  Fully expect the need to dive deep if you're 
> going to have a complicated pipeline that behaves comparably with Fixed 
> Function and Shaders with non-trivial GL state.
> 
> --
> Christopher Wright
> christopher_wri...@apple.com
> 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to