TODOExperimentation.txt 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ------------------------- STUDY --------------------------------
  2. Study shadow rendering implementations
  3. Study how is transparency handled (is it order independant?)
  4. Figure out what is skylight
  5. Determine how is light bleeding handled (if at all)
  6. ---------------------- IMPLEMENTATION ---------------------------
  7. Assign ViewOrigin, PreViewTranslation, TransViewProj
  8. - Dont use pre-view translation for ortographic
  9. - Modify view and view projecion matrices so othey use translated
  10. - Apply PreViewTranslation when generating world position in shader (multiply 3x3 rotation col by col, then add translation to last col and add that to rotated position)
  11. - Perhaps do all these modifcations outside of shader (i.e. have the world matrix be pre-transformed)
  12. - Do this after I have basic rendering working, to avoid additional issues when I'm initially trying to get it to work
  13. Replace param buffer generation by using a dummy shader with manual generation
  14. Next week:
  15. - Deferred base and light passes use different PerCamera buffers, unify them (both in shader and in code)
  16. - Need to generate a full screen quad for directional light pass
  17. - Finish up DefferedPointLightPass by generating cone geometry in shader
  18. - Generate C++ code for populating cbuffers for deferred shaders (2+ days)
  19. - Modify Light so it generated adequate number of vertices required for cone geometry, without actually creating the cone
  20. - Think about how to handle post-processing shaders (HDR tone mapping)
  21. - Add cube and 3D support for render texture pool
  22. - Lights aren't being culled
  23. - Load up and set up a test-bed with Ribek's scene
  24. Notes:
  25. - When doing viewport clear in DX11 it will only clear the first render target
  26. - Quantize buffer sizes so they're divideable by 8 when requesting them from RenderTexturePool
  27. - R11G11B10 and R10G10B10A2 formats haven't been tested
  28. - Will need to ensure the code works in OpenGL (means porting shaders or building the cross compiler). I cannot delay
  29. this as later it will be hard to debug when the pipeline is more complex.
  30. Generate different RenderableController for each set of elements
  31. - Will likely want to rename current LitTexRenderableController to OpaqueSomething
  32. - Each controller would be connected to its own render queue (generated in above step)
  33. - Renderable controller should probably be notified when rendering starts/ends so it may bind gbuffer and/or other resoures.
  34. Light queues:
  35. - Will likely need to generate a set of visible lights per camera similar to renderables (separate them by type most likely)
  36. - Will also need a set of renderables per light when rendering shadows
  37. (Optionally) Optimize visibility determination
  38. - Instead of doing frustum culling + layer culling every frame do it only when renderable or camera is updated
  39. - I'll need to add _notifyCameraUpdated method
  40. - I'll need to store various queue IDs in Renderable's in order to avoid scanning the queues when adding/removing/updating
  41. - Since removing/adding elements would unsort the queue, sorting should be delayed and done once per-frame
  42. - It might just be possible its more efficient to test all elements every frame
  43. GUI rendering can be more efficient - I re-apply all materials for every frame, while I should check if it
  44. differs from previous material and avoid re-applying, or just re-apply the few different states
  45. --------------------------- DESIGN ---------------------------
  46. How will cameras interact with the renderer? The cameras currently available shouldn't have depth buffers
  47. - Need to modify RenderWindow so it doesn't create depth buffers
  48. - Find all places where I create windows and modify this
  49. - Modify render target creation in SceneWindow
  50. - What happens when a user creates a camera with a depth buffer?
  51. - Print out a warning and ignore it?
  52. - Or resolve the gbuffer into it? Probably this, as I want to be able to read the depth buffer from script code if needed
  53. - This still isn't perfect as I'd have duplicate buffers when using non-MSAA buffer that require no resolve
  54. - Similar issue when a multisampled buffer is used for the camera
  55. Separate GUI rendering into a separate part to be rendered after gbuffer is resolved?
  56. Will likely need an easy way to determine supported feature set (likely just depending on shader model)
  57. Consider encapsulating shaders together with methods for setting their parameters (and possibly retrieving output)
  58. - So that external code doesn't need to know about its internal and do less work
  59. - This would contain a reference to the shader and its parameters
  60. - It would then have a SetParameters method (custom per each shader) which updates its params in a simple manner
  61. - (Later) Possibly allow them to return a feature level and/or platform they're to be used on
  62. - (Later) It might be important to be easily able to use different versions of the shader (e.g. different defines)
  63. - This might require handling compilation on this class, instead on resource load (But then again I could potentially
  64. have the shader in an include file and then specific shader files for each define version)
  65. --------------------------- LONG TERM ------------------------
  66. Deferred:
  67. - Create a tile deferred renderer
  68. - Support for point, directional and spot lights
  69. - Basic lambert shading initially
  70. - Create brand new default shaders
  71. - HDR, tone mapping and gamma correct (toggle-able)
  72. - Will likely need a simple framework for rendering full-screen effects
  73. (e.g. I will need to downsample scene to determine brightness here, but will
  74. also need that framework for all post-processing)
  75. Implement shadows
  76. - Start with hard shadows
  77. - Move to PCF soft shadows (see if there's anything better)
  78. - Then cascaded maps
  79. Later:
  80. - Reflection probes
  81. - Proper PBR materials with reflection
  82. - Post-processing system - FXAA, SSAO, Color correction, Depth of field (Bokeh)
  83. - Forward rendering for transparent objects
  84. - Occlusion culling
  85. - GI
  86. - Volumetric lighting
  87. - SSR
  88. - Depth pre-pass - Make sure this can be toggled on and off as needed
  89. - HDR skybox, skylight stuff
  90. - Skin & vegetation shaders
  91. - Tesselation/displacement/parallax
  92. - Water
  93. - Fog
  94. - Motion blur
  95. - Per object shadows
  96. - Extend camera with shutter speed (motion blur), aperture size and focal distance (depth of field), exposure (HDR)
  97. --------------------------- TEST -----------------------------
  98. Test all APIs with new changes regarding depth buffer creation on windows