TODOExperimentation.txt 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. Later:
  14. - Output skylight color in base pass (hook up color buffer as well as gbuffer as render target so I can output scene color)
  15. - For now just use a constant color, later add a SH environment map lookup
  16. - Lights already existing in scene on load don't seem to render (seems they get converted to point lights for some reason)
  17. - I changed how unsupported texture formats work, I should test if I didn't break OpenGL
  18. - When rendering lights right now I need to bind Gbuffer and light parameters to material, and then bind the material parameters to the pipeline
  19. - Either unify these two processes by finding a better way, or hide the binding in light material class
  20. - Too many depth buffers. Main render surface has one, game viewport has one and gbuffer has one
  21. - Disable main depth buffer by default, disable depth buffer in SceneWindow and GameWindow RT's
  22. - When rendering to scene target use the gbuffers depth buffer (what if their sizes don't match due to quantization?)
  23. - Although having an extra depth buffer won't be the worst thing as even at full HD it's only 8MB
  24. - Finish up DefferedPointLightPass by generating cone geometry in shader
  25. - Modify Light so it generated adequate number of vertices required for cone geometry, without actually creating the cone
  26. - Think about how to handle post-processing shaders (HDR tone mapping)
  27. - Add cube and 3D support for render texture pool
  28. - Lights aren't being culled
  29. - Load up and set up a test-bed with Ribek's scene
  30. Notes:
  31. - When doing viewport clear in DX11 it will only clear the first render target
  32. - Quantize buffer sizes so they're divideable by 8 when requesting them from RenderTexturePool
  33. - R11G11B10 and R10G10B10A2 formats haven't been tested
  34. - Will need to ensure the code works in OpenGL (means porting shaders or building the cross compiler). I cannot delay
  35. this as later it will be hard to debug when the pipeline is more complex.
  36. - Consider having a debug toggle that makes the gbuffer use floating point storage, to compare quality quickly
  37. - I'll need to add sky-lighting and perhaps other form of pre-computed lighting. Base pass should output colors resulting
  38. from those operations during its base pass.
  39. Generate different RenderableController for each set of elements
  40. - Will likely want to rename current LitTexRenderableController to OpaqueSomething
  41. - Each controller would be connected to its own render queue (generated in above step)
  42. - Renderable controller should probably be notified when rendering starts/ends so it may bind gbuffer and/or other resoures.
  43. Light queues:
  44. - Will likely need to generate a set of visible lights per camera similar to renderables (separate them by type most likely)
  45. - Will also need a set of renderables per light when rendering shadows
  46. (Optionally) Optimize visibility determination
  47. - Instead of doing frustum culling + layer culling every frame do it only when renderable or camera is updated
  48. - I'll need to add _notifyCameraUpdated method
  49. - I'll need to store various queue IDs in Renderable's in order to avoid scanning the queues when adding/removing/updating
  50. - Since removing/adding elements would unsort the queue, sorting should be delayed and done once per-frame
  51. - It might just be possible its more efficient to test all elements every frame
  52. GUI rendering can be more efficient - I re-apply all materials for every frame, while I should check if it
  53. differs from previous material and avoid re-applying, or just re-apply the few different states
  54. --------------------------- DESIGN ---------------------------
  55. How will cameras interact with the renderer? The cameras currently available shouldn't have depth buffers
  56. - Need to modify RenderWindow so it doesn't create depth buffers
  57. - Find all places where I create windows and modify this
  58. - Modify render target creation in SceneWindow
  59. - What happens when a user creates a camera with a depth buffer?
  60. - Print out a warning and ignore it?
  61. - Or resolve the gbuffer into it? Probably this, as I want to be able to read the depth buffer from script code if needed
  62. - This still isn't perfect as I'd have duplicate buffers when using non-MSAA buffer that require no resolve
  63. - Similar issue when a multisampled buffer is used for the camera
  64. Separate GUI rendering into a separate part to be rendered after gbuffer is resolved?
  65. Will likely need an easy way to determine supported feature set (likely just depending on shader model)
  66. Consider encapsulating shaders together with methods for setting their parameters (and possibly retrieving output)
  67. - So that external code doesn't need to know about its internal and do less work
  68. - This would contain a reference to the shader and its parameters
  69. - It would then have a SetParameters method (custom per each shader) which updates its params in a simple manner
  70. - (Later) Possibly allow them to return a feature level and/or platform they're to be used on
  71. - (Later) It might be important to be easily able to use different versions of the shader (e.g. different defines)
  72. - This might require handling compilation on this class, instead on resource load (But then again I could potentially
  73. have the shader in an include file and then specific shader files for each define version)
  74. --------------------------- LONG TERM ------------------------
  75. Deferred:
  76. - Create a tile deferred renderer
  77. - Support for point, directional and spot lights
  78. - Basic lambert shading initially
  79. - Create brand new default shaders
  80. - HDR, tone mapping and gamma correct (toggle-able)
  81. - Will likely need a simple framework for rendering full-screen effects
  82. (e.g. I will need to downsample scene to determine brightness here, but will
  83. also need that framework for all post-processing)
  84. Implement shadows
  85. - Start with hard shadows
  86. - Move to PCF soft shadows (see if there's anything better)
  87. - Then cascaded maps
  88. Later:
  89. - Reflection probes
  90. - Proper PBR materials with reflection
  91. - Post-processing system - FXAA, SSAO, Color correction, Depth of field (Bokeh)
  92. - Forward rendering for transparent objects
  93. - Occlusion culling
  94. - GI
  95. - Volumetric lighting
  96. - SSR
  97. - Depth pre-pass - Make sure this can be toggled on and off as needed
  98. - HDR skybox, skylight stuff
  99. - Skin & vegetation shaders
  100. - Tesselation/displacement/parallax
  101. - Water
  102. - Fog
  103. - Motion blur
  104. - Per object shadows
  105. - Extend camera with shutter speed (motion blur), aperture size and focal distance (depth of field), exposure (HDR)
  106. --------------------------- TEST -----------------------------
  107. Test all APIs with new changes regarding depth buffer creation on windows