-
Notifications
You must be signed in to change notification settings - Fork 0
Self Tests
Yahasi edited this page Jul 10, 2026
·
3 revisions
🌐 English · Русский
← GPU Renderer · Project Structure →
Nova ships a suite of headless self-tests that run as argument branches of the sample app — no interactive input, no rendering to a live terminal — so they can run on CI and guard against regressions. Each prints a PASS / FAIL line.
Build once, then run a test by name:
dotnet build -c Release
dotnet run --project SampleGame -c Release --no-build -- <testname>For example:
dotnet run --project SampleGame -c Release --no-build -- gputestContributors typically build with
dotnet build -c Release --no-incremental(a plain incremental build can report a false "0 warnings").
| Name | What it guards |
|---|---|
impulsetest |
The impulse-based physics solver — a sphere and box dropping, resting, bouncing, sliding, tumbling, stacking, scattering and sleeping across a dt sweep (Stages 1–6). |
jointtest |
The joints — a ball-socket pendulum, a hinge with an angle limit + motor, and a distance joint as a rigid rod and a soft spring, all solved in the same constraint solver as contacts. |
hulltest |
The convex hull — quickhull, the support function, and closed-polyhedron mass properties (volume / centre of mass / inertia vs the analytic cube). |
gjktest |
GJK / EPA — closest distance + witness points between separated convex shapes, and the penetration normal + depth for overlapping ones. |
hullphystest |
The dynamic convex-hull collider — a hull rests flat on a box / another hull / a mesh floor (at the same height), stacks, rests and slides on a real sloped mesh (not its bounding box), and tumbles to rest. |
cutovertest |
Stale-engine-key world loads, and the physics net-sync roundtrip (authority steps → serialize → client dead-reckons + eases → converges). |
bvhtest |
The BVH build/traversal. |
worldtest |
The world system. |
editortest |
The in-scene editor end-to-end: lights, camera objects (Fixed/Follow, F7/F8 cycles, clip-avoidance, split-screen aim), HUD layout, pure editor math, joint authoring + net sync, the dynamic mesh→hull bridge, and the player capsule. |
picktest |
Aim-select / object picking. |
worldsynctest |
A full world round-trip through WorldSync (every object/light/camera/physics/texture field + compare). |
collisiontest |
The pure camera-bubble collision resolvers and 3D SAT. |
physicstest |
The shared pure physics math (quaternion orientation, angle lerp, dead-reckon, restitution combine, closest-point-on-triangle). |
gputest |
CPU↔GPU parity — renders fixed scenes (incl. textured) on both paths and compares pixel-by-pixel. |
texturetest |
The PNG decode / sampling / UV / params / mip pipeline. |
splashtest |
The startup-splash block-letter helpers. |
uitest |
The setup-wizard console-UI toolkit (layout, focus nav, widgets, mouse hit-test, wizard flow). |
colortest |
A visual-only color diagnostic (no PASS/FAIL line). |
uidemo |
A visual-only interactive demo of the console-UI toolkit (font-zoom check). |
gputest renders the same scene with the CPU raytracer and the GPU kernel and compares them pixel-by-pixel:
- With shadows off, every feature is deterministic, so the two images must be exactly equal — the pixel difference Δ = 0.
- With shadows on, only a thin shadow-boundary band is allowed to differ.
- For textures, mesh primitives and imported meshes stay Δ = 0; the sphere's analytic UV allows a thin seam/pole band, and a mipmapped object allows a thin band.
A Δ=0 result is the proof that a change to shading / intersection / compositing / BVH / texture math kept the CPU and GPU renderers in lockstep. See GPU Renderer.