Single Pass lighting speed issue....

Started by
8 comments, last by eviltwigflipper 18 years, 2 months ago
I have my lighting and bump mapping the way I want them. The problem I'm having atm is related to speed. I just wanted to ask if this was the type of output I should be expecting(which doesn't seem right)... Currentlly when looking down one hallway there is about 10-12 lights, and its rendering 3000ish verticies I believe. The problem is it runs at about 7-10 fps. My graphics card is a Geforce 6600 299/501. When its NOT overclocked I get 5-9 fps. When I overclock the GPU(377/501), I get 9-13. This still doesn't seem right to be because other games have dynmaic lighting with more vertices/dlights and they have to render them in multiple passes. I would use deluxel maps but right now im really consindered with backwords cabaility. And I just wanted to know, is the GPU really the bottleneck? Theres screenshots of the test level, and the hallway that runs really slow: http://photobucket.com/albums/c335/justinmarshall23/darklight_build_2045_private/
Advertisement
If you would send the file to rapidshare.de or something i could download it for you just to back it up. I have a gf6 6600DP turbo edition, shouldn't make a very big difference. What are your cpu and ram specs?
Hello?
Where do you store properties of each light and how do you update those when you switch between the lights?
I store the properties of the lights in two RGBA textures. The first texture is the origin(RGB) + light radius(Alpha), and the other texture holds the light color values. Which is the way the NVIDIA example shows how to do single pass lighting.

RAM: 1GB
CPU: P4 3.0ghz w/ emt64
Do you do one pass per light ? If so, then you could perhaps improve speed by rendering several lights per pass.

3000 vertices doesn't sound too big. Does the performance scale down by each light you add to scene ? I suppose that you have a ROI system so that each object is rendered only as many times as there are lights close enough to contribute some lighting on it.

Nice screenshots by the way.

Regards

[Edited by - Demus79 on January 27, 2006 3:10:42 AM]
No I do ALL lights in one pass. Which is the advantage of sending light data in textures because you can draw as many lights as you want in a single pass(odviouslly maxed at 4096 but who would that many lights in scene anyway). Yes the performance does scale down each time I add a light. I do cull out lights that wouldn't be visible, but sense all lights are drawn in one pass, even lights that wouldn't hit a surface get calculated as well. But still that is the concept of single pass lighting ;).

If one light is being drawn I get about 40-60 fps and it drops from there(12 = 10-12 fps).

Thks Demus79 ;)
Loving the screenshots, looking damn fine.

I'm just getting into lighting myself for my engine but wouldn't doing multiple passes increase the framerate? Or is there a reason you prefer single pass?
Quote:Original post by AndyEsser
I'm just getting into lighting myself for my engine but wouldn't doing multiple passes increase the framerate? Or is there a reason you prefer single pass?


Doing lights in multiple passes will only give you higher FPS because you can detect what light hit what verts so lights don't calculate surfaces that the light value is < 0. If you just draw all lights that visible in the frustum(and cull out the ones that arent) and just cull the lights that cant directlly be seen(for example behind a wall ex TraceLine)(which is what Im doing now), it would be slower(depending on many verts are in the scene) in multi pass lighting.

Figures do sound very low, should easily be able to do 200+ lights on a 6600gt without issues (though that was without bump mapping - depends how expensive your code is for that).

GOCP
The only main difference I can see is that CGC generates LOOP and ENDLOOP plus the BRK command where as the NVIDIA example has the REP/ENDREP, but I don't think that would directlly cause it either.

This topic is closed to new replies.

Advertisement