-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo.TODO
134 lines (122 loc) · 9.3 KB
/
todo.TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
General:
- @high Some auto-generated draw overrides are a bit too excessive
Circle for example has 48 overrides
- @high Ordering of some auto-generated parameters should be moved around to be consistent between calls
- @low Wireframe shader highlights faces on the back that has normals towards the camera
probably need another heuristic to also account for depth and not just surface normal against view direction
- @low Persisting draw-calls, where the user can define a time/duration it will be active for
- @high comments on public facing methods/types
- @low flickering when lots of alpha overlap in close proximity
- @low some materials should be shared between drawers
- MeshDrawer
- @high CullCompute has some sign mismatches
# @high Handle unregistering textures, etc. from content drawers when source object is destroyed
i.e. add an unregister method
- @high Some issue with depth sorting (renderFront/renderBack)
OIT:
- @high sprite-shader needs OIT support
Culling:
- @high Circle drawer
- @high Triangle drawer
- @high PolyLine drawer
- @high culling frustum doesnt scale properly with viewport rect
- @high culling AABB on some drawers doesn scale properly
mostly an issue with meshes, might need to pre-compute the bounding box
Z-Sort:
- @high allow drawers to overlay other objects
Has to be set per material, cant be set via MaterialPropertyBlock
material.SetInt("_ZTest", (int)UnityEngine.Rendering.CompareFunction.Always);
As such a different queue/drawer is needed for each ZTest mode, for this library it's either LEqual or Always, so two drawers per draw type is needed
Another issue is the sorting/ordering of rendering, doing this per drawing type is easy, but more complex when sorting between them
Sprite Drawer:
- @low Make base for Sprite Drawer a texture drawer with UVs so the same drawer can be shared for each sprite texture
Fonts:
- @low make a pre-pass for font/text drawing to generate bounding box in screen and world space
since Text Culling requires converting to and from screen space it would be better to do this in a pre-pass
and that calculates data for both rendering and culling.
- @high Label drawer that combines a rounded background rectangle with text in front
2D Drawing:
- @high Unit scaling doesnt work for free billboard drawing mode
- @high Pixel scaling doesnt work for axis aligned and billboard aligned drawing modes
- @low visible Z fighting when <1 alpha
- @low Polygon drawing
SDF is an option here to avoid having to generate a mesh on the CPU side,
but the generated mesh can be cached
Circles:
- @high Requires some more work on the sampling side with smaller inner radius
- @low for some reason culling needs to be off for it to render, probably related to the normal the quad is generated around
Arrows:
- @high Line overlaps with arrow, should probably reduce length of line to start of triangle base
Lines:
- @low Poly lines needs proper miters, mostly a requirements for thicker lines
- @low flickering issue when many lines are overlapping in close proximity
- @high flipped projection(?) issue with Lines in GL
Generator:
- @low Code Generator is extremely hard-coded atm, so some work here would be nice
f.ex. Lines are currently not generated, since they require a more sophisticated generator to work
In general, this work is mostly unecessary since it's a utility only used in development and not in production
Samples:
- @high need to clean up a lot of the samples
Testing:
- ShaderDataBuffer should have test cases
- ComputeBufferPool should have test cases
- ComputeArray should have test cases
Readme:
- Add a Known Issues section
- Add a third-party library section
- will automatically enabled depth texture
- requires that depth texture is enabled in the renderer settings
Archive:
✔ @low Proper Z-Sorting within and between each drawer @done(21-06-28 23:30) @project(Z-Sort)
Avoids an issue where two drawers are overlapping, causing the AA area to not blend
Would be a nice feature, but feels out of scope for a project aiming to draw gizmos
The cost of drawing would also go up and would be very expensive once the amount of gizmos is high
This would allow for shaders to overlay others though, so more benefits than just avoiding the AA blend issue
✘ @high store mesh primitives as assets to avoid generating them each reload @cancelled(21-06-15 18:55) @project(General)
✔ @high refactor color.ToVector3() to instead set the values directly to the shader data @done(21-06-14 23:16) @project(General)
use Color::Copy extension method
✔ @high refactor Vector3 additions to use Vector3::SetAdd(a, b) extension method @done(21-06-14 23:16) @project(General)
✔ @critical ComputeBufferParam crash in CullingHandler @done(21-06-14 23:16) @project(General)
✔ @high change Text and SDFText to use GetShaderDataRange to avoid concurrency issues @done(21-06-14 23:16) @project(General)
✔ @high need a different Capsule to visualize Physics Capsules, since the current ones dont scale correctly @done(21-06-07 21:26) @project(Physics)
✔ @critical ensure proper frustum culling is done @done(21-06-07 21:26) @project(General)
This is mostly ignore now, need to set up proper render bounds in the draw call and
offset the vertices in the shader
Probably wont find a "perfect" solution as one instance might be several times larger than another
✔ @high Legacy currently doesnt render in game view when outside of play mode, would be a nice thing but not a huge deal @done(21-06-01 11:35) @project(General)
✔ @high Another mode for wireframe is just the general outline or shape, this is needed for all the basic shapes, at least those present for Physics @done(21-05-31 15:01) @project(3D Outline)
Should probably replace all the current wireframe drawers with this, except the custom mesh / mesh wireframes
Can either be done with SDF or by using Lines
Lines requires more work on CPU side to offload generating the vertices (Burst/Threading)
SDF is very cheap on the CPU side, but can get expensive to do on the GPU with many instances
✔ @critical Make sure 2D shapes works for HDRP @done(21-05-16 11:03) @project(2D Drawing)
✔ @high more Helpers for 3D Physics @done(21-05-16 11:02) @project(Physics)
✔ @high Helpers for 2D Physics @done(21-05-16 11:02) @project(Physics)
✔ @low move some of the unique stuff for screenspace line from LineUtils into Line shader @done(21-05-16 11:02) @project(2D Drawing.Lines)
✔ @high Triangles are now centered on the Quad @done(21-05-16 11:02) @project(2D Drawing.Triangle)
✔ @critical Make sure 2D shapes works for URP @done(21-05-13 11:21) @project(2D Drawing)
✔ @high input color alpha support @done(21-05-13 11:16) @project(2D Drawing)
✔ @high smoothing is set a bit high @done(21-05-13 10:16) @project(Lines)
✔ SDF Text doesnt scale correctly with aspect ratio @done(21-05-13 10:09) @project(Text)
✔ @high figure out best way to do scaling/default scaling @done(21-05-12 09:18) @project(General)
✔ @low Can probably slightly optimize the data transfer from PolyLine into the Drawer by storing an internal struct in the PolyLine equal to the shader data @done(21-05-12 08:10) @project(Lines)
✔ @high Need a system for adding end-caps to lines, this will be easier when 2D drawers are added @done(21-05-11 17:18) @project(Lines)
It can be as simple as adding an enum for all the end cap types that is used together with the Line call
and then calling the draw method for the 2D shapes
For now only Arrows are used, might expand on this in the future but it's largely uncessessary
✔ @low clean up some of the #pragma targets in shaders @done(21-05-11 17:16) @project(General)
✔ @low backface culling on wireframe shader @done(21-05-11 17:16) @project(General)
✔ @high One option is to use SDF for everything, although it is expensive it's probably the easiest way to support 2D shapes @done(21-05-11 11:21) @project(2D Drawing)
SDFs also has the huge benefit of easily producing nice AA, so the cost might be worth it
✔ font should scale by pixels @done(21-05-08 13:06) @project(General)
✔ SDF Font Shader is fucked in in general, seems like the sampling is off for thinner fonts @done(21-05-08 13:06) @project(General)
✘ Scopes doesnt work on font drawers @cancelled(21-05-06 14:33) @project(General)
✔ Change font to scale in screenspace (like lines) @done(21-05-06 13:52) @project(General)
✔ World space lines @done(21-05-06 13:51) @project(Line Drawer)
✔ Currently not implemented @done(21-05-06 13:51) @project(Poly Line Drawer)
✔ Gotta clean up the line drawer shaders @done(21-05-06 13:51) @project(Line Drawer)
✔ ortho scaling on Icon drawer @done(21-05-06 13:29) @project(General)
✔ Change icons to scale in screenspace (like lines) @done(21-05-06 13:29) @project(General)
✔ Any GPU buffers are not cleared up atm @done(21-05-06 13:17) @project(General)
✔ Should probably move Graphics calls to CommandBuffer instead @done(21-05-03 06:29) @project(General)
✔ event hooks are not attaching after exiting playmode outside of dev project @done(21-05-03 05:47) @project(General)