AriusEso
Customers
Community Member
    
Posts: 791
Esoteric
|
 |
« on: January 18, 2009, 10:01:57 PM » |
|
124 lights in TV3D: http://uk.youtube.com/watch?v=jhSuwRB9glkUnoptimized, does not pack g-buffer and does not yet use MRT. It also does not switch light volume face culling. I haven't worked out a transparency solution. 
|
|
|
|
« Last Edit: January 19, 2009, 01:13:08 AM by AriusEso »
|
Logged
|
-...- 
|
|
|
|
|
AriusEso
Customers
Community Member
    
Posts: 791
Esoteric
|
 |
« Reply #2 on: January 19, 2009, 01:12:39 AM » |
|
Here it is, as usual, do whatever you want with the code  . http://esoteric-float.co.uk/releases/deferreddemo/deferred.rarYou will need the C++ DLL installed and registered. Should work fine on any card with SM2 and floating point target support. Enjoy. 
|
|
|
|
|
Logged
|
-...- 
|
|
|
ZaPPZion
Community Member

Posts: 477
|
 |
« Reply #3 on: January 19, 2009, 03:16:32 AM » |
|
WOA!  Didn't know this would be possible on today's hardware. I didn't really know about deferred rendering, untill yesterday. This is awesome.
|
|
|
|
|
Logged
|
|
|
|
|
Raine
|
 |
« Reply #4 on: January 19, 2009, 04:35:40 AM » |
|
Arius, very good job there.
|
|
|
|
|
Logged
|
|
|
|
AriusEso
Customers
Community Member
    
Posts: 791
Esoteric
|
 |
« Reply #5 on: January 19, 2009, 05:17:46 AM » |
|
Thanks guys. I just thought I'd mention, outside of MRT and data packing. I was very loose about my formats as this was test code. They are all FP32, when they don't need to be. By changing them to the following: colourBuffer = m_Scene->CreateRenderSurface(W, H, true, cTV_TEXTUREFORMAT_A8R8G8B8, "colour buffer"); positionBuffer = m_Scene->CreateRenderSurface(W, H, true, cTV_TEXTUREFORMAT_HDR_FLOAT16, "position buffer"); normalBuffer = m_Scene->CreateRenderSurface(W, H, true, cTV_TEXTUREFORMAT_A8R8G8B8, "normal buffer"); screenBuffer = m_Scene->CreateRenderSurface(W, H, true, cTV_TEXTUREFORMAT_A8R8G8B8, "screen buffer");
I gained 300fps. This is before any actual optimization. So I would advise you don't just plug this code in to your projects, but rather read up on the subject and optimize your hearts out.  
|
|
|
|
|
Logged
|
-...- 
|
|
|
AriusEso
Customers
Community Member
    
Posts: 791
Esoteric
|
 |
« Reply #6 on: January 19, 2009, 06:27:40 AM » |
|
Did a very basic perf test, FPS only. 8500GT, Intel C2D 6300 @ 1.86ghz 2gig RAM Windows Server 2008, 32 bit.
[ BEFORE MRT ] 1280x720 @ 250fps 800x600 @ 460fps 640x480 @ 520fps
[ AFTER MRT ] 1280x720 @ 312fps 800x600 @ 572fps 640x480 @ 600fps
This was done with no lights on the screen - because rendering to the gbuffer has nothing to do with the end lighting calculation( and I didn't want that calc interfering with my results ).
|
|
|
|
|
Logged
|
-...- 
|
|
|
ZaPPZion
Community Member

Posts: 477
|
 |
« Reply #7 on: January 19, 2009, 08:27:12 AM » |
|
I did it as well: 8400GS, Intel C2D T7300 @ 2.00ghz 2gig RAM Windows Vista Business x64
[ BEFORE MRT ] 1280x720 @ 71fps 800x600 @ 127fps 640x480 @ 220fps
[ AFTER MRT ] (fullscreen) 1280x720 @ 182fps 800x600 @ 395fps 640x480 @ 391fps
|
|
|
|
|
Logged
|
|
|
|
|
JohnB
|
 |
« Reply #8 on: January 19, 2009, 11:20:21 AM » |
|
WOW - That's amazing Arius!
John B.
|
|
|
|
|
Logged
|
|
|
|
|
Hawthorne
|
 |
« Reply #9 on: January 19, 2009, 12:03:42 PM » |
|
Whatever, I was doing this back in 1975. This is not new. I used to melt crayons on black cardboard paper in 3rd grade. I just did not take a picture of it.... I JOKE! Nice job! -Pat
|
|
|
|
|
Logged
|
|
|
|
AriusEso
Customers
Community Member
    
Posts: 791
Esoteric
|
 |
« Reply #10 on: January 19, 2009, 12:26:41 PM » |
|
Whatever, I was doing this back in 1975. This is not new. I used to melt crayons on black cardboard paper in 3rd grade. I just did not take a picture of it....
I JOKE! Nice job!
-Pat
Actually, it's smurf jizz. 
|
|
|
|
|
Logged
|
-...- 
|
|
|
WEst
Customers
Community Member
    
Posts: 908
Daniel Martinek
|
 |
« Reply #11 on: January 19, 2009, 12:44:35 PM » |
|
Very nice job Arius, tried this too quite a time ago but I got stuck somewhere  .
|
|
|
|
|
Logged
|
Greetings
Daniel Martinek Technical Director 23 Volts
|
|
|
|
Zaknafein
|
 |
« Reply #12 on: January 19, 2009, 01:55:22 PM » |
|
That is amazing, Arius. Thank you so much for sharing it! 
|
|
|
|
|
Logged
|
|
|
|
AriusEso
Customers
Community Member
    
Posts: 791
Esoteric
|
 |
« Reply #13 on: January 19, 2009, 06:00:55 PM » |
|
That is amazing, Arius. Thank you so much for sharing it!  Did I finally make a demo that your laptop can run? 
|
|
|
|
|
Logged
|
-...- 
|
|
|
rootsage
Customers
Community Member
    
Posts: 446
Gamer Enthusiast
|
 |
« Reply #14 on: January 20, 2009, 12:46:36 AM » |
|
This is some sweet-ness, this will give me an excuse to take a break from my current project and start learning about some newer rendering techniques like this  Thanks for the source... Oh, and P.S. Actually, it's smurf jizz.  hehehe  funny
|
|
|
|
|
Logged
|
while( !( succeed = try_again()) ); ------ 10 print "Is this recursive?" 20 goto 10
|
|
|
Toaster
Community Member

Posts: 272
Crap I burnt the toast! :P
|
 |
« Reply #15 on: January 20, 2009, 01:13:40 PM » |
|
Hey Arius got it to work! Apparently my card doesn't like so many FP32 Render surfaces.  After changing all of them except position to A8R8G8B8 it works perfectly. This is lights on screen at one time... 500 lights @ 10-15 fps 200 lights @ 30 fps 500 lights scattered everywhere @ 50-60 fps This might solve mith's problem as well. Maybe he'll be able to run it at like 5 fps. 
|
|
|
|
|
Logged
|
|
|
|
|
Zaknafein
|
 |
« Reply #16 on: January 20, 2009, 01:19:16 PM » |
|
I probably have the same problem as Toaster because I'm not seeing anything (except the light globes, no actual light emitting from them). The FPS is about the same as Toaster too. I suppose with MRT and better resource usage it could be much speedier.
|
|
|
|
|
Logged
|
|
|
|
Toaster
Community Member

Posts: 272
Crap I burnt the toast! :P
|
 |
« Reply #17 on: January 20, 2009, 01:24:49 PM » |
|
lol funny it was the other way around for me I could see the light emitting just not the light globes.  Really if you think about it why would you have 500 lights on the screen at once anyways so he's getting pretty decent fps already. I think the most any game should have on screen at once is like 50 max and with 50 lights I got 200 fps. MRT would certainly make it run faster though.
|
|
|
|
|
Logged
|
|
|
|
AriusEso
Customers
Community Member
    
Posts: 791
Esoteric
|
 |
« Reply #18 on: January 20, 2009, 01:41:46 PM » |
|
Yea, I have it running with MRT on my end and it is a might faster. Sorry about the fp targets, it was just test code. Changing the position from 32 to 16 should also grant you a few more frames  . As for Mith, his problem is he has an fx5200 lol.
|
|
|
|
|
Logged
|
-...- 
|
|
|
Enzi
Community Member

Posts: 67
|
 |
« Reply #19 on: January 20, 2009, 02:13:19 PM » |
|
Nice job! A pity that there is still no proper way to get Anti Aliasing on Rendertargets. At least none that I'm aware of. But no doubt about it, that DR is the future.
|
|
|
|
|
Logged
|
|
|
|
|