Anyone managed to get 2-sided GLSL lighting working in QC? I'm actually trying to implement a very simple 'fake' lighting effect in a GLSL Shader patch, whereby the colour at each fragment is a product of it's distance from an arbitrary light-source position. I have this working already, but I'd like to be able to shade the front and back-facing sides of a mesh with different base-colours.
I've tried using gl_FrontColor and gl_BackColor set to different colours in the Vertex Shader, but the front color is always used for both faces, even if I embed the GLSL Shader patch inside a Lighting Patch with the 'Use 2-sided lighting' option enabled. I've also tried using the gl_FrontFacing boolean in the Fragment Shader, to create a conditional colouring of the fragment. This causes a massive drop in framerate, and nasty flashing of portions of the mesh, where presumably some fragments are close to the forward/backward-facing threshold, so the lighting keeps switching from one state to the other. Is this some kind of Quartz Composer bug, I wonder? Cheers, a|x http://machinesdontcare.wordpress.com __________________________________________________________ Not happy with your email address?. Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.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]

