Optimizing Static lights?

Dec 6, 2011 at 7:57 PM


I just wanted to ask if optimizing static lights was possible, by rendering it only once and then drawing that. This way the shadows wouldn't be calculated every frame.

I am pretty sure I am going to try this with my current project, any ideas / suggestions on how this could be done? I am thinking about having a render target for each light (if the light is set as static)


Dec 7, 2011 at 5:43 AM

If your game has static lights and static hulls, this may be worth checking out. However, recall that if a non-static hull encounters a static light, that light will need to be redrawn until no non-static hulls are within range. This is the reason I've held off on doing this.

Let me know if you have any questions. I'd be happy to bounce ideas around.

Dec 7, 2011 at 5:47 AM

Also, drawing lights in Krypton is not as expensive as one might thing. There's a good deal of culling and stencil testing that goes into reducing the vertex and pixel shader instructions. If you're worried about the actual *number* of draw calls being made (aka: 100+ lights), then there starts to be an issue, because by doing that you've already used over 400 draw calls within krypton. Doing that on an Xbox is just about the limit.

It may worth looking into finding out how to draw more than one light with a single draw call.