Invisible <voi### [at] dev null> wrote:
> >> I also assumed that scenery is always static in games so that you can
> >> precompute light maps
> >
> > Actually nowadays games tend to use less and less precomputed light maps
> > and more real-time lighting.
> How is it possible to do that?
> (I'm not denying that games do it - they obviously do - I'm curios as to
> how it's possible to do this given that the GPU only knows about
> polygons and texture mapping.)
The GPU also knows about vertex normals and can interpolate them and
calculate the lighting of the surface according to the normal. In a similar
way as POV-Ray does.
Nowadays you can even write a shader which calculates the lighting from
the normal vector and positions of light sources in special ways, if you
want.
--
- Warp
Post a reply to this message
|