Possibly not the right forum for this kind of query (if not, I apologise in advance), but someone may know the answer.
I have a GLSL shader that uses a simple Phong Directional lighting algorithm, with per-pixel illumination calculated in the Fragment shader. Lighting properties are based on the properties of gl_LightSource[0]. I've discovered I can nest the GLSL patch inside a Lighting macro patch and change light position, ambient color etc of the lightsource. Just wondering; for this kind of basic lighting, is it best to let the Lighting patch handle all the lighting (ie remove all the lighting code from the GLSL patch)? Are there advantages, in terms of quality and efficiency, to writing lighting code in the shader, assuming we're not using any sort of fancy lighting effects? Alternatively, would I be better off without the Lighting patch, and setting the light position, ambient color etc. manually inside the shader? I assume if I were to do this, I'd have calculate the halfVector in the shader also. Cheers, alx http://machinesdontcare.wordpress.com __________________________________________________________ Sent from Yahoo! Mail. The World's Favourite Email http://uk.docs.yahoo.com/nowyoucan.html _______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]

