How to do per-pixel lighting

Started by
2 comments, last by mdias 21 years, 4 months ago
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
Advertisement
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.

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.
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

This topic is closed to new replies.

Advertisement