• Advertisement

Archived

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

How to do per-pixel lighting

This topic is 5562 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

How can we render per-pixel lighting instead of per-vertex lighting ? I know it''s possible to do it with Shaders, but is there another way ??? If not can you tell me the code of the shader ??? I''m a very newbie in shaders, I don''t like it Oh, and by the way, wich method is faster, per-pixel lighting or add more polygons to the meshes, so I can get a more realistic scene ? Kamikaze

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Try
http://www.gamedev.net/columns/hardcore/dxshader5/

If you want per-pixel diffuse bumpmapping, you can do ist on a Geforce2 MX. (Normalcube + bumpmap)

Per-Pixel lightning ist at the same quality faster then more polygons(bumpmapping).(I have Per-Pixel Diffuse+Specular+Opcity+Gloss in a singel PS.1.1 at 100000 Polys on 35 FPS on a Radeon 8500 by 1280x1024x16)

P.S. the (R dot eye) Specular term in the link realy works, and looks fine for per-pixel specular term.

Share this post


Link to post
Share on other sites
You may want to look in to using textures as look up tables. They allow for very nice spot light and projection effects and are relativly easy. I started with shaders a mounth ago using Cg, a C style language for shaders. (developer.nvidia.com) It simplifies thigs a lot for me but there is not ps 1.4 support.

Share this post


Link to post
Share on other sites
Do we really need to set texture stages to make per-pixel
lighting ???

geeez, I think I''ll add more polygons to the scene, it''s
much easier... Anyway thanks for helping guys. And If there''s
another way to do that without having to set textures, tell me
thanx again for the replies.

Kamikaze

Share this post


Link to post
Share on other sites

  • Advertisement