Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / Game Design & Programming / per pixelshading vs standard lighting Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
adrian1

February 14, 2005, 03:39 PM

I ran a test. Scene: inside a cube wit w & h & d=128
on nvidia 5700/256mb, p4 2.4Ghz, running win2k.
I had 7 point lights spinning around.
I used dx9 and a sample from shader programming language.
Simple per pixel lighting Code was pretty straight forward so
there nothing to be speed up. I got barely 3-40 fps.
Now I subdivided the cube faces and I use straight
Material/light settings. The subdivision level
of one face was 20x20 quads.
The difference between per pixel and standard way is barely noticeable.
Frame rate was 200 260 fps.
Did I do something wrong? Or per pixel shader has to wait a bit
For more powerful machines.

 
Axel

February 14, 2005, 04:04 PM

It's well known that the NV30 (GeForce FX) has a horrible pixelshader performance.

R300 (Radeon 9500+) or NV40 (GeForce 6) perform much better

 
Scali

February 14, 2005, 06:54 PM

The cube is not a very good case...
Per-pixel lighting is interesting because you can get perfect results even with low tesselation.
So on scenes with relatively low polycount, you will still get very good results. And the low polycount will give very good performance, because you have a lot less vertex processing and triangle setup overhead.
Especially when you also use normalmaps to replace geometry detail.

But indeed, a cube doesn't need to be very highpoly to get decent lighting.
Look at the ATI normalmapper tool, it comes with a model of a Ferrari... There's a highpoly model and a lowpoly model with a normalmap. The lowpoly model with normalmap looks almost exactly the same with per-pixel lighting as the highpoly model does with per-vertex lighting, but the lowpoly model will run much faster.

 
This thread contains 3 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.