Author: TheTutor
Real-time shadows are a must if you want to pull off realistic real-time rendered scenes. This tutorial shows how to do planar shadows, which is the rendering of the shadow of an object onto a flat “plane like” surface. To accomplish this, the tutorial uses a two render pass shader, the stencil buffer, and what is known as the “shadow matrix”.
Functions/Methods Used: Direct3DCreate9(), D3DXCreateEffectFromFile(), D3DXMatrixShadow(), assert()
IDirect3D9:: CreateDevice(), Release()
IDirect3DDevice9:: BeginScene(), EndScene(), SetStreamSource(), SetIndices(), SetFVF(), DrawIndexedPrimitive(), Clear(), SetTransform(), Release()
ID3DXEffect:: Begin(), End(), OnLostDevice(), OnResetDevice(), BeginPass(), EndPass(), SetTechnique(), SetMatrix(), SetFloatArray(), Release()
ID3DXBuffer:: GetBufferPointer()
ID3DXMesh:: CloneMeshFVF(), LockVertexBuffer(), UnlockVertexBuffer(), GetVertexBuffer(), GetIndexBuffer(), GetNumVertices(), GetNumFaces(), Release()
HLSL: mul(), normalize(), pow(), max(), dot()
purchase full version
Access EXE