Submitted by , posted on 02 January 2003



Image Description, by


After one and a half month of work, here are the screenshots of my latest work - A 3d engine with per-pixel lighting + real time shadows.

These screenshots are rendered under a ATI Radeon 9000 and P4 1.6GHz system.

My demo uses the DirectX8.1 API and I perform per-pixel lighting using pixel shader 1.4. and the shadows are using shadow volume technique (Z-fail).

Here are the steps of how I render the scene:

1. clear color and depth buffer
2. draw the scene with ambient color

3. for each light
   3.1 clear stencil buffer
   3.2 for each object in the scene
      3.2.1 update the shadow volume of the object.
      3.2.2 draw the shadow volume to the stencil buffer (check for z-fail)
   3.3 draw the attenuation + diffuse + spectular color of the light

That means for a scene that has n lights, it will be rendered in n+1 passes.

Also, I would like to give a big thanks to those people who had answered my questions that I posted on flipcode's Message Center.

Finally, please feel free to contact me. I can be reached at MiNg.cs@student.cityu.edu.hk .

MiNg



[prev]
Image of the Day Gallery
www.flipcode.com

[next]


 


Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.