POV-Ray : Newsgroups : povray.off-topic : Geometric puzzle : Re: Geometric puzzle Server Time
4 Sep 2024 23:20:34 EDT (-0400)
  Re: Geometric puzzle  
From: Warp
Date: 19 Dec 2009 19:49:28
Message: <4b2d7497@news.povray.org>
Slime <fak### [at] emailaddress> wrote:
> >> I thought all games used per-pixel lighting now?
> >
> > Apparently HL2 doesn't. (They've upgraded the Source engine several times 
> > since then, so maybe it does now. I doubt it.)

> HL2 has normal mapping, so it definitely does use per-pixel lighting, at 
> least on some surfaces. It samples from three lightmaps representing the 
> light coming from three directions, and then does dot products with the 
> normal to determine the total light on a pixel.

> Characters do something similar but without light maps.

  I think it all comes down to how you *define* "per-pixel lighting".

  In the good old days gouraud shading was the standard because it was
inexpensive, as opposed to phong shading which was (at the time of
software renderers and even with the early 3D graphics acceleration cards)
very heavy, as it required calculating lighting on each pixel, as opposed
to gouraud shading, where it was enough to calculate it only on each vertex
point (but naturally the result was not even nearly as good).

  (Basically gouraud shading is calculating accurate lighting at the three
vertices of a triangle and then interpolating these lighting values linearly
throughout the surface of the triangle. Linear interpolation is inexpensive,
especially with early acceleration cards. Full-fledged phong-shading requires
making accurate lighting calculations on every single pixel, which was very
heavy at the time.)

  So you could say that phong-sading is per-pixel lighting.

  On the other hand, nowadays when people talk about "per-pixel lighting"
in conjunction with 3D graphics acceleration cards, what they are really
talking about is per-pixel shaders (usually as opposed to lightmapping
and/or vertex shaders).

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.