TODO.txt 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. --------- ALL LONG TERM TASKS / FIXES BELONG TO GOOGLE DOCS: ImplementationTODO OR PossibleImprovements ----------
  2. TODO - CoreObject refactor:
  3. Resource
  4. - Material -> Remove MaterialProxy
  5. - Shader -> Remove ShaderProxy
  6. Also:
  7. - Make CameraHandler a Coreobject and remove CameraProxy
  8. - Make RenderableHandler a CoreObject and remove CameraProxy
  9. - Rename CoreObject initialize_internal and destroy_internal to initializeCore/destroyCore and make them private
  10. GpuParams refactor:
  11. Missing:
  12. GpuParams::createCore
  13. GpuParams::getCore
  14. GpuParam versions for Core objects
  15. Sync methods
  16. I need to ensure renderer buffers get set properly after GpuParams are synced
  17. - This used to up in updateMaterialProxy along with updating dirty params but since syncing
  18. is now internal to GpuParams I need to figure out a better way of doing it.
  19. (In case user overrides Renderer buffers)
  20. - Likely just an extra field on GPuParamsCore
  21. - Other:
  22. - PerObjectData should store core version of GpuParamBlockBuffer
  23. Should I force CoreObject sync whenever submitCoreAccessors is called?
  24. - This way I ensure the data is up to date. e.g. if user updates GpuParams and immediately performs
  25. some rendering use CoreAccessor that update will not register.
  26. - Also I can properly handle cases where sim thread needs to access core thread data immediately (e.g. RenderWindow HWND)
  27. - I'd have to remove submit() calls from CoreAccessors themselves and leave just the one on CoreThread
  28. Disallow CoreObject creation from core thread
  29. - Add asserts in CoreObject::destroy and CoreObject::initialize
  30. - Possibly also add asserts to CoreThread::queueCommand and CoreThread::queueReturnCommand
  31. New issues:
  32. - Since Mesh refactor when I select/deselect a gizmo the entire render texture flashes white for one frame (might be related to RT refactor instead)
  33. -----------------
  34. Refactor GizmoManager and HandleManager so they accept a CameraHandler
  35. - I need to ensure scene CameraHandler has proper position/rotation before being passed to handle and gizmo manager
  36. - Delete SceneViewLocator, I don't think it's used anywhere
  37. Port SceneCameraController to C#
  38. Port RenderTexture to C# and likely extend Texture2D so it accepts renderable flags. While at it add TextureCube and Texture3D as well.
  39. - Actually Texture2D doesn't seem to be implemented at all. Will also need to add PixelData wrapper.
  40. - Will I need to add support for readable textures? e.g. what happens when you try to read a texture from C#?
  41. - Almost certainly. It's very useful to be able to read textures.
  42. - I can't sync the threads when reading, it would be too slow. Have an AsyncOp similar to c++ code?
  43. - Also DX11 already creates a temporary staging buffer when reading from a texture, so keeping yet another CPU
  44. copy seems like a waste.
  45. Ensure that EditorWindow resize callback works properly.
  46. - Perhaps add OnResizeEnd callback that can be used for updating the render texture
  47. Create a C# wrapper around ProjectSettings
  48. Make a Script version of SceneEditorWindow
  49. - This would replace SceneEditorWidget so it would initialize scene grid and call
  50. update on handle manager and scene grid, as well as apply ProjectSettings to them.
  51. Move handle is buggy as hell - It moves in wrong direction sometimes, sometimes it skips, other times collision seems to be wrong
  52. Need a way to drag and drop items from Scene tree view to Scene view
  53. When dragging a handle make sure it works when cursor leaves the scene view
  54. Also make sure that handle manager receives mouse up event if its done outside of scene view
  55. AFTER I have scene widget in C#:
  56. - Finish up C# Handles class so it returns proper values
  57. - Ensure fixed handle size and handle snapping works
  58. - Implement free move handle and remaining handles
  59. - Test custom handles from C#
  60. IMPLEMENT SELECTION RENDERING
  61. IMPROVE SceneGrid LOOK
  62. - LIKELY USE PIXEL SceneGrid WITH AA
  63. - OR (better) instead of drawing rows and columns of lines, just draw a plane with procedural texture
  64. ---------------------------------------------------------------------
  65. Render textures in C#:
  66. - In C# have Texture2D, TextureCube, TextureVolume. They should have a common Texture base.
  67. - Each of those can be created with a Renderable flag
  68. - Render textures mirror what we have in C++
  69. - RenderTexture and MultiRenderTexture (since we have these separate representation we don't need RenderBuffer that Unity has)
  70. - You can provide an existing texture from types listed above, or create a new render target and
  71. create a basic 2D texture (multiple constructors)
  72. - Both RT types should have their color buffer (s) and depth buffer accessible as a texture to be used for rendering, or for reading
  73. ----------------------------------------------------------------------
  74. Handles
  75. SliderLine - position, direction, length
  76. - When initially activated it records position nearest so the line as the starting point
  77. - Further mouse dragging also finds nearest position to the line
  78. - Difference between those two results in a float value (how much to move along direction from position to reach new position)
  79. - Slider line has a capsule + sphere collider size of which can be set manually
  80. SliderPlane - position, normal, size
  81. - Similar to line slider only the direction is determined dynamically as well as distance
  82. - Outputs a Vector2 (direction * distance moved)
  83. - A OOB is used as a collider
  84. SliderDisc - position, normal, radius
  85. - When initially activated it records position nearest so the disc as the starting point
  86. - Further movement calculates the dynamic direction from the starting point to the current point on the plane the disc lies on
  87. - Distance along that direction is returned as amount of movement (similar to line slider)
  88. - Outputs a single float
  89. - A torus is used as a collider
  90. Free move/rotate/scale handles need to exist as well
  91. - Scale is easy, just perform uniform scale. Use SliderPlane oriented towards camera
  92. - Move also use SliderPlane oriented towards camera
  93. - Rotation use SliderDisc oriented towards camera
  94. ----------------------------------------------------
  95. STAGE 1
  96. CONCRETE TODO:
  97. HandleSliderPlane/HandleSliderDisc
  98. - update() implementation
  99. ----------------------------------------------------
  100. STAGE 2
  101. Implement RotateHandle & ScaleHandle in C#
  102. - Nearest point to disc/arc code
  103. Add free move, free rotate, free scale functionality
  104. Handles that remain the same size regardless of distance from camera
  105. - For both drawing and collision
  106. More complex types for drawing like DrawArrow in HandleDrawManager
  107. ----------------------------------------------------------------------
  108. SelectionRenderer
  109. Retrieve a list of selected objects from SelectionManager
  110. Find ones with Renderable components
  111. Retrieve Meshes, and world transforms from them
  112. Draw that same mesh with either a wireframe or a grayed out shader with a slight depth bias
  113. ---------------------------------------------------------------------