directx - What is the best way to have lights in Direct3D 9 -


the current method use drops fps 30 when having 5 lights. best way have lights in aaa title. have lights everywhere runs smooth. use is

device->lightenable(lightindex,true); device->setlight(lightindex,&light); 

many aaa titles using deferred shading lightcomputation. against forward-renderer it's capable of rendering many lights little performance impact (however plain usage drains performance more forward-renderer).

with forward-renderer must iterate on lights in pixelcomputation, limits amount of lights can use, on 1 hand because limited shaderinstructions or shaderconstants on other hand because pixelshaders shouldn't complex.

with deferred shading lighting postprocessed on scene , lights geometry special pixelshader, must rendered consecutively.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -