diff --git a/Display.md b/Display.md new file mode 100644 index 0000000..c908ecf --- /dev/null +++ b/Display.md @@ -0,0 +1,10 @@ +A display prototype is under development on the [`app-proto`](../src/branch/app-proto) branch, in the `app-proto/inversive-display` folder. It only displays spheres so far. + +## Concept + +Right now, we're drawing all the spheres in a single fragment shader. For each pixel, we do ray-casting to get a fragment for each sphere, and then we depth-sort the fragments to handle translucency. + +## Performance limits + +* **Array size.** As of commit `a34fd0f`, the SPHERE_MAX array size seems to affect frame rate a lot, even though we should only be using the first few elements of each array. Not sure whether this is coming from a depth-sorting bug, a memory handling detail, or something else. +* **Shader variables.** Browsers seem to limit the number of variables that fragment shaders can store. For example, see this [vulnerability report](https://issues.chromium.org/issues/40067239) and [code review](https://chromium-review.googlesource.com/c/angle/angle/+/4503753) for Chromium. This limit doesn't seem to be part of the OpenGL standard, so it's hard to pin down. \ No newline at end of file