Jump to content
  • Advertisement

Swartz27

Member
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

144 Neutral

About Swartz27

  • Rank
    Newbie

Personal Information

  • Interests
    Programming
  1.   I don't care if you're a moderator: you're a dick. 
  2. Hi, yes I likely butchered the terms.   Basically, what I am looking for, is to be able to assign a special shader to a given material that I have, like you said, PBR.   I'll just go ahead and say that the project I'm working on is with Xray Engine 1.6 (note: I have "unofficial" permission to be using their source code, I am not doing anything illegal/immoral, GSC just won't come right out and say it's ok due to 3rd party code it contains [which is being removed]). To clarify, I did contact GSC about it.   The whole renderer, and well, the whole engine, is a total mess.    So I guess I have a question for a moderator rather than creating a brand new topic: would it be ok if I make a topic where I ask someone that has experience to look through the rendering code, and let me know of what needs to be fixed and improved for it's DX11 renderer? I don't expect anyone to do any work for me, I just would like some hints in the right direction.
  3. It's not "Diffuse light" and "Specular light", but material properties of a pixel. On this stage you are writing to GBuffer properties for each pixel. These MATERIAL properties will be used with Light-related data on step 2.       I've done it via packed structured buffer. Each type of light (direct, ambient, point, and spot) will be written to this kind of structure: struct LightData {     uint   type;          //All lights     float3 color;         //All lights     float3 dirToLightVS;  //Directional, Spot     float  innerAngleCos; //Spot     float3 posVS;         //Point, Spot     float  outerAngleCos; //Spot }; //48 bytes StructuredBuffer<LightData> Lights; The buffer will contain n elements (== light count + 1-last stub "LIGHT_NO" to break a loop). The shader unpacks the data, calculate amount of light from each light source, and sum it with different light: for (each pixel/sample) { for (uint i = 0; i < 102400; ++i) // i - index of Light in LightBuffer     {         if (lights[i].type == LIGHT_NO)             break; //No more lights         DiffSpec curr = (DiffSpec)0;         switch (lights[i].type)         {         //Sorted by occurrence         case LIGHT_POINT:             curr = CalcPoint(Lights[i], ...);             break;         case LIGHT_SPOT:             curr = CalcSpot(Lights[i], ...);             break;         case LIGHT_DIRECTIONAL:             curr = CalcDirectional(Lights[i], ...);             break;         case LIGHT_AMBIENT:             curr = CalcAmbient(Lights[i], ...);             break;         case LIGHT_SHADOW_PRIM:             curr = CalcDirectional(Lights[i], ...);             break;         } totalLight += curr; } You're awesome (same with Hodgman) :)  This is very helpful, thank you so much!
  4. Thanks :)   I just want to make sure I understand this 100% Step 1: Create thin gbuffer: by "thin" I suppose you mean either less things in the gbuffer, a lower DXGI format, or both? The current Gbuffer consists of Position, Normal, Diffuse Light, Specular Light, and Material type.    Step 2: Create intermediate lighting buffer, so include all lights here, and then have it read the necessary info from the thin Gbuffer?   Step 3: Draw opaque objects to light buffer: straightforward As for how neat the code is, even though I'm a beginner I can tell that this game engine is pretty much held together by duct-tape. The renderer is a huge mess as well, but I know how to navigate around it.
  5. Hi, Unfortunately I haven't had much luck searching for information on this.   Basically I'm looking to take the source code to a game, take their deferred shading renderer, and switch it over to deferred lighting, or better yet, Tiled Index Deferred Lighting.   I'm very new to all this (still working through DirectX11 tutorials) but I've learned a lot in that time.   There are many reasons for wanting to switch the method of rendering, with the main one being adding a more complex  BRDF system to the game.   Any help or useful links on this subject would be very much appreciated.
  6. Hi,   One of the biggest problems in the game I'm talking of is shadow aliasing.   I tried enabling jittering in the shader but it still doesn't mask the problem enough.   I recently came across this great GPU gems article that sounds like it would solve the problem:   http://http.developer.nvidia.com/GPUGems/gpugems_ch11.html   Specifically, the "brute-force method".   Here is the shadows shader for the game: http://pastebin.com/SghPgsTq   The problem is I don't really understand HLSL that well yet so I was hoping someone would be willing to take the time to walk me through it.   I have access to the engine code in addition to that shader so if there is any information pertaining to shadowing that you need to know about the engine then let me know and I'll post it.   Thank you for your time.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!