Advertisement
5_2007-2008 DirectX #193152

DirectX, Realtime Lighting with Dynamic Stencil Shadows

This code shows how to use DirectX to render realtime lightmaps. 2 buffers are used, a scene buffer and a light buffer. The lights & shadows of a scene are first rendered to the backbuffer(stencil shadows), and then the backbuffer's contents are copied to the light buffer. The backbuffer is then cleared and the scene is rendered, after which the backbuffer is copied to the scenebuffer. The final part is to render the scene buffer multiplied by the light buffer onto the backbuffer. 1 of the 3 lights in this demo can be moved around with the mouse. Note that this demo does not work properly if 2 objects are intersecting as on the area they intersect, they cut out the shadows and cast shadows from around the point of intersection. Please post any comments you have...

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
Upload
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine