# SergeyAS

Members

4

171 Neutral

• Rank
Newbie
1. ## Shading graphs and how they map to implementation in a game engine.

Different nodes in graph correspond to GPU computation via shaders. It works like in post-process when you have done some effect having put result into surface of render target texture. Then you make it  be input for the next pass with other effect. Same way in a graph when the primary nodes have been done the next nodes can be passed. And after this process repeats. Output from the prev node is input for the next node. It will be textures for example.
2. ## Energy conservation of diffuse term

Lout(y) = Integral( BRDF(x,y) * Visibility(x) * Lin(x) * cos(angle between x and normal) * dx ) over hemisphere Energy conservation it's just                                                   Integral( Lout(x) * dx ) <= Integral( Lin(x) * dx ) (here out and in flux density values are) You can substitute constant Lin and Visibility equaling to 1. And in the case of diffuse term BRDF is just albedo. It'll be                                                 Integral( Lout(x) * dx ) <= Integral( Lin(x) * dx )  (condition of not emission)                                                Integral( Integral( BRDF(x,y) * Visibility(x) * Lin(x) * cos(x,n) * dx ) * dy ) <= Integral( 1 * dx )                                                Integral( BRDF(x,y) * 1 * 1 * cos(x,n) * dx ) * Integral( 1 * dy) <= 2 * Pi                                                Integral( BRDF(x,y) * cos(x,n) * dx ) * Integral( 1 * dy) <= 2 * Pi diffuse BRDF is just constant                                                Integral(a * cos(x,n) * dx ) * 2 * Pi <= 2 * Pi                                                a * Integral(cos(x,n) * dx ) <= 1                                                a * Pi <= 1                                                a <= 1 / Pi it's constraint for albedo Like this way you can check different BRDF.   And also when you use direct light source in Integral over hemisphere its integration is changed by computing by single ray via delta function. Lin(x) = delta(xlight directoin - x) * c, where c is flux density of light source, being measured in Watt /  m2 units, and delta func is measured  steradian-1. Then                                         Lout(y) = Integral( BRDF(x,y) * Visibility(x) * Lin(x) * cos(x,n) * dx )                                         Lout(y) = Integral( BRDF(x,y) * Visibility(x) * delta(xlight directoin - x) * c * cos(x,n) * dx )                                         Lout(y) = BRDF(xlight directoin,y) * Visibility(xlight directoin) * c * cos(xlight directoin,n) where Visibility(xlight directoin) is filtered sample from shadow map (for example).
3. ## DX11 RPG Shadows, CSM, TSM, what else?

It seems you want to have dynamic illumination with shadowing from everything on everything (aka global direct illumination).  Cascaded shadow mapping is gold standard for now in large-scale environment. Use CSM with PCF on Poison Kernel. It works well. This method is used in many titles in the market. Some time ago I had been testing many others. This had given max result for scalability and perf. Also you should use deferred tech instead forward even in large-scale scene. And hold in mind what types of BRDF you want to see in your game. May be it's just diffuse and specular terms. Or may be complex aniso BRDF, or may be you'll have decided to add local subsurface scattering via spherical harmonics or wavelets. You should have chosen a good solution at the beginning, because there are 4 render targets in Direct3d9.
4. ## C++ rendering engines to look at for learning purposes

I would recommend you Torque3d engine (http://www.garagegames.com/products/torque-3d) which is made professionally and full featured.