|
Vertex Lighting with HLSL
Author: TheTutor
The first step to having a professional looking 3D application is to add lighting. With HLSL, you can apply the standard lighting model per vertex or per pixel. This tutorial does vertex lighting through the programmable pipeline. You'll also find three diagrams that hopefully shed some light on how vertex lighting works.
Functions/Methods Used: Direct3DCreate9(), D3DXCreateEffectFromFile(), assert()
IDirect3D9:: CreateDevice(), Release()
IDirect3DDevice9:: BeginScene(), EndScene(), SetFVF(), DrawPrimitiveUP(), Clear(), Release()
ID3DXEffect:: Begin(), End(), BeginPass(), EndPass(), SetTechnique(), SetMatrix(), SetFloat(), Release()
ID3DXBuffer:: GetBufferPointer()
ID3DXMesh:: CloneMeshFVF(), LockVertexBuffer(), UnlockVertexBuffer(), GetVertexBuffer(), GetIndexBuffer(), GetNumVertices(), GetNumFaces(), Release()
HLSL: mul(), normalize(), pow(), max(), dot()
purchase full version
Access EXE
|