Game Download ZeroOne Realm
How do shadows work in 3D?
Viewing some screenshots of the new Abe''s Munch XBox game, I noticed the level of detail of the shadows on the ground and it got me wandering, are the shadows a feature of the GeForce cards'' T&L capability or do the shadows have to be calculated and drawn by software?
The geForce 3 (and presumably the XBox) support a feature called hardware shadow buffers (find the docs on the nVidia site). The problem is, they are not supported by DX8 (yet...) but they do work in OpenGL.
The performance of this feature on the geForce 3 doesn''t seem amazingly incredible, and for the moment, you''d probably want to do them in software to suit your needs.
There are couple of ways to do it - there are good docs at nVidia explaining different methods. I think the coolest one (and I think this is basically how the hardware feature works) is when you create a depth map of the light''s viewpoint and a depth map from the light in the camera''s viewpoint and use a combination of texture matrices and pixel shaders to basically say - if this pixel if farther from the light in the camera view than in the light view, it must be in shadow. This works great for selfshadowing and I think that''s what alot of the new XBox games are doing.
The short answer - there are software algorithms, but much of the hard work can be hardware accelerated / streamlined with shaders, etc.
The performance of this feature on the geForce 3 doesn''t seem amazingly incredible, and for the moment, you''d probably want to do them in software to suit your needs.
There are couple of ways to do it - there are good docs at nVidia explaining different methods. I think the coolest one (and I think this is basically how the hardware feature works) is when you create a depth map of the light''s viewpoint and a depth map from the light in the camera''s viewpoint and use a combination of texture matrices and pixel shaders to basically say - if this pixel if farther from the light in the camera view than in the light view, it must be in shadow. This works great for selfshadowing and I think that''s what alot of the new XBox games are doing.
The short answer - there are software algorithms, but much of the hard work can be hardware accelerated / streamlined with shaders, etc.
Here is the doc about how they do the shadow: http://www.cbloom.com/3d/techdocs/shadowmap_advanced.txt
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement