Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

unreason

Per-Pixel lighting

This topic is 5950 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know how to do per-pixel lighting in opengl? I''ve been looking for source code and maybe a tutorial, but I haven''t found much. Anyone had better luck?

Share this post


Link to post
Share on other sites
Advertisement
You can perform per-pixel lighting by overriding OpenGL's standard lighting and by using a cube map texture in order to interpolate vectors instead of interpolating colors.
This method uses the ARB_texture_cube_map and ARB_texture_env_dot3 extensions that are also part of the OpenGL1.3 kernel.

It's not vary hard to implement, but obviously slower than standard OpenGL lighting, even though you can minimize alot of that loss thanks to vertex programs (ARB) and register combiners (NV) or fragment shaders (ATI).


I've got a demo with source code if you want. I can send it to you by email (or to anyone else, of course).

[edited by - vincoof on August 29, 2002 2:05:49 PM]

Share this post


Link to post
Share on other sites
@vincoof:
i''m interested in your demo. Can you send me your source code

my email: bondigl@yahoo.de

thanks in advance.

Share this post


Link to post
Share on other sites
I''d be very interested in a demo too,
could you please e-mail it to the_eternal@wanadoo.nl
thanks.

probably not gonna use it in the stuff i''m building but hey.. knowledge is power

Share this post


Link to post
Share on other sites
Could you send that demo to someone@openfun.de, too?
Thanks ;c)

__________________
Oregon Ghost
---
Wenn NULL besonders gross ist, ist es fast schon wie ein bisschen eins ;c)

if NULL is very big, it is almost like a little ONE.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
vincoof, could you mail me a copy of the demo & source? my address is rjg@wam.umd.edu

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!