Deferred Shading with Alpha support!!!
Please do it, as I'd like to know how they fit together. I mean how MRTs and G-Buffers work with shadowMaps, bumpMaps, Etc.
What was demoed here was diffuse and specular. Not sure if emissive was in there, maybe not. I'm sure calculation of normals were not shown as well.
I'm assuming bump maps will have to be shader-driven, though. Coz, I still have no idea how fixed-function and shaders work together to produce all these effects.
Anyway, I've got hold of a sample opengl code showing deferred shading. The code will teach me how it works, I guess.
http://www.paulsprojects.net/opengl/def ... fshad.html
I had to update my dev machine to use glext.h and wglext.h
see: http://www.opengldistilled.com/downloads.html
What was demoed here was diffuse and specular. Not sure if emissive was in there, maybe not. I'm sure calculation of normals were not shown as well.
I'm assuming bump maps will have to be shader-driven, though. Coz, I still have no idea how fixed-function and shaders work together to produce all these effects.
Anyway, I've got hold of a sample opengl code showing deferred shading. The code will teach me how it works, I guess.
http://www.paulsprojects.net/opengl/def ... fshad.html
I had to update my dev machine to use glext.h and wglext.h
see: http://www.opengldistilled.com/downloads.html
nice
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
Hi, In deferred shading You don't use fixed function of shader. You use standard shaders, but parameters eg. Position, Normal, VF for DiffuseMap etc. You don't read from current rendering vertices, but from textures writes in G-Buffer, thats is all idea about Deferred Shading. Of course You can add some optimization for You deferred shading, eg pack all values to RGBA8 or pack all into one RGBA32F (You don't need MRTS at these moment), but this isn't standard operations;)dlangdev wrote:Please do it, as I'd like to know how they fit together. I mean how MRTs and G-Buffers work with shadowMaps, bumpMaps, Etc.
What was demoed here was diffuse and specular. Not sure if emissive was in there, maybe not. I'm sure calculation of normals were not shown as well.
I'm assuming bump maps will have to be shader-driven, though. Coz, I still have no idea how fixed-function and shaders work together to produce all these effects.
Anyway, I've got hold of a sample opengl code showing deferred shading. The code will teach me how it works, I guess.
http://www.paulsprojects.net/opengl/def ... fshad.html
I had to update my dev machine to use glext.h and wglext.h
see: http://www.opengldistilled.com/downloads.html
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Hi Nadro.
Following the dlangdev infos on the video card:
Here the spec from the IRRlicht screens:
Here is the screen from the high poly deferred method (steps: A,A,B,B)
Only 27 FPS difference between the low and high poly, not too bad! (Considering that I got over 300 on each tests! )
Is there a way to test with 100,000 poly as you talked about? The current limit of your demo is 40K poly
Following the dlangdev infos on the video card:
Here the spec from the IRRlicht screens:
Here is the screen from the low poly deferred method (steps: A,A,B,A)Irrlicht Engine version 1.4.1
Microsoft Windows Vista Personal Service Pack 1 (Build 6001)
Using renderer: Direct3D 9.0
NVIDIA GeForce 9800 GX2 nvd3dum.dll 7.15.11.7516
Loaded mesh: media/room.3ds
Loaded texture: media/wall.jpg
Loaded texture: media/Dwarf/axe.jpg
Loaded texture: media/Dwarf/dwarf.jpg
} found in dataObject
Loaded mesh: media/Dwarf/dwarf_hipoly.x
Here is the screen from the high poly deferred method (steps: A,A,B,B)
Only 27 FPS difference between the low and high poly, not too bad! (Considering that I got over 300 on each tests! )
Is there a way to test with 100,000 poly as you talked about? The current limit of your demo is 40K poly
Thanks for test it:) I release today version with 100 000 poly on scene in VBO for DirectX and OpenGL. How is difference in FPS on Your High-End card between Hi poly in forward rendering and deferred shading? In normal games some objects are animated, so we can't use full VBOs for all objects. I think than in current games 100 000 poly per frame is standard, but in my demos I set all models are static, so We will full VBOs support for it, so difference between forward rendering and deferred shading will be smaller than in normal game, but difference is visible also on my Radeon 2600 PRO, of course deferred shading is faster:)
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Hi Nadro,
Thanks for the help, really appreciate all you're doing, helping me and others go forward with Irrlicht.
So far, I have bits and pieces of information, and no complete knowledge on how they fit seamlessly.
Fortunately, I stumbled into Paul's Octogon Engine, he made a demo engine for others to study. Looks like I'll be sitting down and will be be studying that code for awhile.
And it looks like the code has some examples of bumpmapping, shadowmapping, emmisions in there as well. I'm hoping to figure how the code runs it and hopefully implement them on Irrlicht.
So, yeah, thanks for all the help, keep up the good work.
http://www.paulsprojects.net/opengl/oct ... tagon.html
Thanks for the help, really appreciate all you're doing, helping me and others go forward with Irrlicht.
So far, I have bits and pieces of information, and no complete knowledge on how they fit seamlessly.
Fortunately, I stumbled into Paul's Octogon Engine, he made a demo engine for others to study. Looks like I'll be sitting down and will be be studying that code for awhile.
And it looks like the code has some examples of bumpmapping, shadowmapping, emmisions in there as well. I'm hoping to figure how the code runs it and hopefully implement them on Irrlicht.
So, yeah, thanks for all the help, keep up the good work.
http://www.paulsprojects.net/opengl/oct ... tagon.html
I release version 1.01 (I replace link for download it in first post). In new demo I up camera visible range (now scene not bluring when we go back with our camera) and I add 3 nodes for scene, so low poly scene now Is around 8000 poly and hi poly scene 100 000 poly in VBO;)
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
By the way, I have a question, about what I encountered in something about deferred shading.
One is, do you know how you are going to overcome the transparency problems? And will there be a possible demo that shows this?
Also, what about the one material thing that I have heard about. I don't know how to explain it exactly, but it can be seen in new games coming out like The Hulk video game. His skin is obviously to shiny, just like his jeans, and they appear to have the same material.
I think it has something to do with a one material problem or something, because of the limited amount of MRT buffers. By the way here is a picture of what I'm talking about:
http://media.movieweb.com/news/03.2008/hulkgame/01.jpg
One is, do you know how you are going to overcome the transparency problems? And will there be a possible demo that shows this?
Also, what about the one material thing that I have heard about. I don't know how to explain it exactly, but it can be seen in new games coming out like The Hulk video game. His skin is obviously to shiny, just like his jeans, and they appear to have the same material.
I think it has something to do with a one material problem or something, because of the limited amount of MRT buffers. By the way here is a picture of what I'm talking about:
http://media.movieweb.com/news/03.2008/hulkgame/01.jpg
TheQuestion = 2B || !2B
Wow the Hulk looks like hes from PS3 and the background looks like its from PSONE :O
For the transparency thing, you can just draw em' forward rendering style. Another way is through "deep deferred shading", heres an example of that: http://www.humus.ca/index.php?page=3D&ID=75
You can have quite a few different material types with deferred shading, just render different indexes to a "material id" buffer, and switch between different lighting models etc inside the lighting pixel shader. Also, alot of people would encode the specular strength of the materials (Kinda like a specular map), in the alpha channel of the depth or normal textures.
Cheers
For the transparency thing, you can just draw em' forward rendering style. Another way is through "deep deferred shading", heres an example of that: http://www.humus.ca/index.php?page=3D&ID=75
You can have quite a few different material types with deferred shading, just render different indexes to a "material id" buffer, and switch between different lighting models etc inside the lighting pixel shader. Also, alot of people would encode the specular strength of the materials (Kinda like a specular map), in the alpha channel of the depth or normal textures.
Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Hi Halifax,
Yes, in deferred shading is problem with transparent objects but I will try implementation it in Friday, when I go back to home:)
BTW. christianclavet and dlangdev can You compare performance of deferred shading with forward rendering test? What rendering technique is better on Yours card? In low poly probably forward rendering, but in hi poly?:)
Yes, in deferred shading is problem with transparent objects but I will try implementation it in Friday, when I go back to home:)
BTW. christianclavet and dlangdev can You compare performance of deferred shading with forward rendering test? What rendering technique is better on Yours card? In low poly probably forward rendering, but in hi poly?:)
Last edited by Nadro on Wed Jun 25, 2008 10:03 pm, edited 3 times in total.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Hi. Tested again with the new version:
My current system: (French Vista 64)
For IRRlicht a QUAD CORE serve nothing, only the MHZ and CPU type count. So about ANY cpu running at 2,66Ghz should be an equivalent in processing.
Video card report: (NVidia 9800GX2)
TEST1 - DIRECTX9.0 - FORWARD RENDERING:
TEST2 - DIRECTX9.0 - DEFERRED SHADING:
TEST3 - OPENGL - FORWARD RENDERING:
TEST4 - OPENGL - DEFERRED SHADING:
Strangely the output give me 603396 on the forward rendering not 100578 like the deferred ones.
My current system: (French Vista 64)
For IRRlicht a QUAD CORE serve nothing, only the MHZ and CPU type count. So about ANY cpu running at 2,66Ghz should be an equivalent in processing.
Video card report: (NVidia 9800GX2)
Only High poly have been tested:Irrlicht Engine version 1.4.1
Microsoft Windows Vista Personal Service Pack 1 (Build 6001)
Using renderer: Direct3D 9.0
NVIDIA GeForce 9800 GX2 nvd3dum.dll 7.15.11.7516
TEST1 - DIRECTX9.0 - FORWARD RENDERING:
TEST2 - DIRECTX9.0 - DEFERRED SHADING:
TEST3 - OPENGL - FORWARD RENDERING:
TEST4 - OPENGL - DEFERRED SHADING:
Strangely the output give me 603396 on the forward rendering not 100578 like the deferred ones.