iDevGames Forums
Per pixel lightning - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Per pixel lightning (/thread-5876.html)



Per pixel lightning - MACnus - Feb 15, 2005 03:41 AM

Can somebody give me an example (with source code for objc) for per pixel lighting with opengl shading language?

tnx


Per pixel lightning - TomorrowPlusX - Feb 15, 2005 05:51 AM

GLSL isn't available on the mac... and god knows if it ever will be. You'll have to read up on the assembly-like ARB_fragment_program 1.0 -- I recommend _The OpenGL Superbible_. It's a good resource, with a lot of working sample code.


Per pixel lightning - OneSadCookie - Feb 15, 2005 10:43 AM

and even if GLSL was supported, the asnwer would be "no" -- cocoa GL sample code is here, http://onesadcookie.com/book.html . GLSL sample code is all over the web. If you need help combining them, you should be starting somewhere simpler!


Per pixel lightning - FCCovett - Feb 15, 2005 11:06 AM

Good job, OSC.


Per pixel lightning - arekkusu - Feb 15, 2005 08:43 PM

You don't need GLSL or fragment programs to do "per-pixel lighting."

ARB_texture_env_dot3 will do per pixel bump mapping, and works on a plain old Radeon or GeForce 2MX.