Skip to content

Commit 77c4f4c

Browse files
author
CubeCoders
committed
README: document WATER_REFLECT/ADDITIVE/SSR, Phong normals, animated palettes, Sprite2D, ParticleSystem, LensFlare
1 parent d7b7ec3 commit 77c4f4c

1 file changed

Lines changed: 39 additions & 1 deletion

File tree

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,19 @@ documentation):
6666
- Per-object distance-based fade in / fade out (LOD pop reduction) and
6767
scene-wide depth fog.
6868
- Interlaced or Checkerboard rendering (with optional reconstruction)
69+
- **`WATER_REFLECT` shading mode** — animated screen-space water surface.
70+
Reflects the background sky gradient about a camera-pitch-correct waterline,
71+
with per-material ripple amplitude (`specular`) and vertical bias
72+
(`waterYBias`). Blended toward a flat tint by `material->alpha`.
73+
- **`ADDITIVE` shading mode** — saturating-add blend (src × alpha + dst).
74+
Fully emissive; intended for neon signs, lamp coronas, explosion halos,
75+
and faked dynamic lights.
76+
- **`SSR_FIELD_REFLECT`** — when `FIELD_BUFFERS` is active, `WATER_REFLECT`
77+
samples mirror pixels from the *previous* committed field buffer so
78+
reflections are never depth-order dependent and never show render-order
79+
artefacts across parallel rendering bands.
80+
- Perspective-correct Phong normal interpolation (complements the existing
81+
perspective-correct UV path).
6982

7083
### Lighting
7184
- Ambient + directional lights with FLAT / GOURAUD / PHONG shading.
@@ -82,10 +95,35 @@ documentation):
8295
pyramid / grid / plane / quad / billboard.
8396
- Minimal Wavefront `.obj` loader.
8497
- Optional screen-space picking (compile-time bounded; zero cost when set to
85-
0).
98+
0). Returns the closest hit object, triangle index, depth and snapped pixel
99+
coordinate.
100+
- Animated palette textures — `Texture::advancePalette(dt, fps)` cycles the
101+
palette offset by `dt × fps` entries per call; no-op when `paletteSize` is 0.
86102
- A small custom shader entry point if you need to step outside the
87103
fixed-function path.
88104

105+
### 2D Sprites
106+
- `Sprite2D` — a lightweight composited 2D sprite drawn over the scene after
107+
`render()`. Supports textured or solid-colour fills, colour-key transparency,
108+
optional alpha blend, additive blend, integer upscaling, and `zOrder`-based
109+
draw order. On `HALF_WIDTH_BUFFERS` builds sprites are composited at full
110+
output resolution during display scanout.
111+
112+
### Particles
113+
- `ParticleSystem` — a fixed-pool (no-heap) particle system rendered directly
114+
through the rasteriser after `scene->render()`. Ships with a spark emitter
115+
(impact sparks with white → blue lifecycle) and a water-splash emitter
116+
(short-lived foam-to-blue spray). Distance LOD culls particles that are too
117+
far from the camera; emitter count and lifetime are tunable.
118+
119+
### Lens flare
120+
- `LensFlare` — an n-element sprite chain that projects a directional light
121+
source to screen space, optionally queries a pick slot for sun occlusion
122+
testing, and repositions flare elements along the sun → screen-centre axis
123+
each frame. Fade speed, per-element axis offset (`axisT`), base alpha, blend
124+
mode and integer scale are all configurable. Works without picking
125+
(`MAX_PICK_QUERIES = 0`), in which case the sun is treated as unobstructed.
126+
89127
## Getting started
90128

91129
Jet is a library — it owns no window, display driver, or main loop.

0 commit comments

Comments
 (0)