Deferred Shading with Alpha support!!!

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

gpu: Radeon 9550

Image

Image

Image

Image
Last edited by dlangdev on Thu Jun 26, 2008 6:47 pm, edited 1 time in total.
Image
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

Thanks for tests. I see than Deferred Shading is faster in Hi Poly scene than standard forward rendering. christianclavet this is normal situation than is forward rendering You will be have 6x hi poly scene counts, because 6 lights need 6 passes, so we need rewrite all geometries 6x times, but for Deferred Shading we have to rewrite all only one:)

BTW. dlangdev have You got Radeon 9950? I don't remember than ATI released this model, maybe Radeon 9550?
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

yup. that was a 9550. typo is now corrected.
Image
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

Hi, I done Alpha support in my Deferred Shading:) No depth peeling, so it isn't Deep Deferred Shading. This is link to this demo:
http://nadro.net46.net/Demos/DeferredSh ... haDemo.rar
I think than it's the best possible solution for it. Mid-Transparent objects need some modification of it, but for full transparent eg. for trees, plants etc (Mainly problem eg. in STALKER, where there are rendering via Forward Rendering), this is very good idea;)

With Alpha looks this:
Image
Image
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Mirror
Posts: 218
Joined: Sat Dec 01, 2007 4:09 pm

Post by Mirror »

some feedback from me :

nvidia 6600 :

D3D9 : 800x600, high poly, forward shading : 25 FPS
D3D9 : 800x600, high poly, deferred shading : 25 FPS

OPENGL : 800x600, high poly, forward shading : 19 FPS
OPENGL : 800x600, high poly, deferred shading : 31 FPS
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

Well nadro just a small correction to your idea.. you dont need a pass per 6 lights, you can do them all in one pass but you have to do some workarounds.. I did 68 lights Deffered Shading in just 2 passes (because irrlicht has options and functions like GLSL you can call them but they dont do anything, I mean the availibillity of 8 textures per material, I had 5 and irrlicht only passes 4 to a shader, if I had 8 max textures then I could do it all in one pass.

http://www.youtube.com/watch?v=3-r88vbo-LE

EDIT: I know the topic is dead but,

I get 300FPS on deffered shading in low poly mode
150 FPS in forward
50 to 60 in deffered high poly
1-14 in forward rendering

this would cause to say lets go deffered on 8800GT and above because its faster than forward even with 4000 poly. but the thing is that nadro drew the geometry each time he did a pass for the light in ForwardRendering... if i am correct.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

devsh wrote:Well nadro just a small correction to your idea.. you dont need a pass per 6 lights, you can do them all in one pass but you have to do some workarounds.. I did 68 lights Deffered Shading in just 2 passes (because irrlicht has options and functions like GLSL you can call them but they dont do anything, I mean the availibillity of 8 textures per material, I had 5 and irrlicht only passes 4 to a shader, if I had 8 max textures then I could do it all in one pass.

http://www.youtube.com/watch?v=3-r88vbo-LE

EDIT: I know the topic is dead but,

I get 300FPS on deffered shading in low poly mode
150 FPS in forward
50 to 60 in deffered high poly
1-14 in forward rendering

this would cause to say lets go deffered on 8800GT and above because its faster than forward even with 4000 poly. but the thing is that nadro drew the geometry each time he did a pass for the light in ForwardRendering... if i am correct.
So, in this example we have got 1 lighting calculation per pass for both forward and deferred shading, why? Because example is compatible with Shader Model 2.0 ;) This example isn't optimalized, eg for each light draw is full screen quad. Irrlicht has got support for GLSL and? I don't see differences between GLSL and Cg in this example. You have to remember that in this example 4000 tris per dwarf in forward = 4000 * 4 (4 dwarwes) * 6 (6 passes), so You can't say that deferred is faster than forward with 4000 tris, because it's not true. Fill G-Buffer isn't cheap operation :]
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

kind of exactly what i was saying...
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

Why 68 lights? Why not, say, 100 or 500 or 5000?

BTW It's spelt DEFERRED.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

If I had to guess that number sounds like he's drawing all the lights in one draw call and passing the transformation matrices through the shader constants.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

cause that was howmany lights my PC could handle with a decent FPS, and the cap is 96 anyway.
netpipe
Posts: 670
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada
Contact:

Re: Deferred Shading with Alpha support!!!

Post by netpipe »

please repost code for this, thanks.
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
Post Reply