@genex-ai/cli-demo 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -0
- package/package.json +1 -1
- package/templates/skills/genex-threejs-atmosphere-aerial-perspective/SKILL.md +30 -18
- package/templates/skills/genex-threejs-atmosphere-aerial-perspective/references/atmosphere.md +204 -20
- package/templates/skills/genex-threejs-bloom/SKILL.md +29 -18
- package/templates/skills/genex-threejs-bloom/references/bloom.md +176 -20
- package/templates/skills/genex-threejs-camera-direction/SKILL.md +38 -26
- package/templates/skills/genex-threejs-camera-direction/references/camera-rigs.md +359 -27
- package/templates/skills/genex-threejs-exposure-color-grading/SKILL.md +27 -18
- package/templates/skills/genex-threejs-exposure-color-grading/references/exposure-grading.md +196 -21
- package/templates/skills/genex-threejs-image-pipeline/SKILL.md +38 -17
- package/templates/skills/genex-threejs-image-pipeline/references/image-pipeline.md +185 -29
- package/templates/skills/genex-threejs-procedural-animation/SKILL.md +34 -21
- package/templates/skills/genex-threejs-procedural-animation/references/procedural-motion.md +353 -24
- package/templates/skills/genex-threejs-procedural-architecture/SKILL.md +36 -17
- package/templates/skills/genex-threejs-procedural-architecture/references/architecture-systems.md +500 -22
- package/templates/skills/genex-threejs-procedural-fields/SKILL.md +59 -24
- package/templates/skills/genex-threejs-procedural-fields/references/field-systems.md +222 -25
- package/templates/skills/genex-threejs-procedural-geometry/SKILL.md +34 -20
- package/templates/skills/genex-threejs-procedural-geometry/references/mesh-systems.md +192 -26
- package/templates/skills/genex-threejs-procedural-materials/SKILL.md +55 -18
- package/templates/skills/genex-threejs-procedural-materials/references/material-systems.md +189 -22
- package/templates/skills/genex-threejs-procedural-planets/SKILL.md +36 -18
- package/templates/skills/genex-threejs-procedural-planets/references/planet-systems.md +489 -21
- package/templates/skills/genex-threejs-procedural-vegetation/SKILL.md +35 -25
- package/templates/skills/genex-threejs-procedural-vegetation/references/vegetation-systems.md +304 -27
- package/templates/skills/genex-threejs-procedural-vfx/SKILL.md +26 -18
- package/templates/skills/genex-threejs-procedural-vfx/references/vfx-systems.md +208 -20
- package/templates/skills/genex-threejs-raymarched-space-effects/SKILL.md +25 -18
- package/templates/skills/genex-threejs-raymarched-space-effects/references/space-effects.md +185 -21
- package/templates/skills/genex-threejs-screen-space-ambient-occlusion/SKILL.md +23 -17
- package/templates/skills/genex-threejs-screen-space-ambient-occlusion/references/ambient-occlusion.md +430 -20
- package/templates/skills/genex-threejs-shadow-systems/SKILL.md +29 -18
- package/templates/skills/genex-threejs-shadow-systems/references/shadow-systems.md +420 -21
- package/templates/skills/genex-threejs-skill-router/SKILL.md +21 -21
- package/templates/skills/genex-threejs-spectral-ocean/SKILL.md +30 -20
- package/templates/skills/genex-threejs-spectral-ocean/references/spectral-ocean.md +462 -22
- package/templates/skills/genex-threejs-temporal-surfaces/SKILL.md +26 -17
- package/templates/skills/genex-threejs-temporal-surfaces/references/temporal-surfaces.md +198 -20
- package/templates/skills/genex-threejs-visual-validation/SKILL.md +34 -18
- package/templates/skills/genex-threejs-visual-validation/references/visual-validation.md +396 -32
- package/templates/skills/genex-threejs-volumetric-clouds/SKILL.md +33 -17
- package/templates/skills/genex-threejs-volumetric-clouds/references/volumetric-clouds.md +570 -21
- package/templates/skills/genex-threejs-water-optics/SKILL.md +33 -18
- package/templates/skills/genex-threejs-water-optics/references/water-optics.md +184 -20
|
@@ -5,26 +5,47 @@ description: Design the final image pipeline for Genex Three.js games. Use for r
|
|
|
5
5
|
|
|
6
6
|
# Genex Three.js Image Pipeline
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
own depth, color, history, or tone mapping path.
|
|
8
|
+
Use this skill only when composing several image-space systems or defining shared buffers. For one effect, load its atomic skill instead.
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
ordering, signal ownership, diagnostics, and cleanup.
|
|
10
|
+
Load:
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
- `$genex-threejs-screen-space-ambient-occlusion` for GTAO, bent normals, denoising, or AO application;
|
|
13
|
+
- `$genex-threejs-bloom` for HDR extraction and bloom;
|
|
14
|
+
- `$genex-threejs-exposure-color-grading` for metering, adaptation, tone mapping, LUTs, and output conversion.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
The pipeline must expose its signals and ordering. Do not install a pile of effects and tune the final frame blindly.
|
|
17
|
+
|
|
18
|
+
## Signal order
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
scene HDR color + depth + normals + albedo where required
|
|
22
|
+
→ lighting-related screen effects
|
|
23
|
+
→ atmosphere/transparency composition
|
|
24
|
+
→ bloom
|
|
25
|
+
→ exposure
|
|
26
|
+
→ tone mapping
|
|
27
|
+
→ grading
|
|
28
|
+
→ lens/presentation effects
|
|
29
|
+
→ output conversion
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Read [references/image-pipeline.md](references/image-pipeline.md)
|
|
33
|
+
for four production pass graphs, their buffer/resolution contracts, and the
|
|
34
|
+
ownership boundaries between whole-scene and effect-local graphs.
|
|
23
35
|
|
|
24
36
|
## Rules
|
|
25
37
|
|
|
26
|
-
-
|
|
27
|
-
- Keep
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
38
|
+
- Tone-map once.
|
|
39
|
+
- Keep HDR bloom before tone mapping.
|
|
40
|
+
- Meter exposure from a small luminance target, not the final 8-bit screen.
|
|
41
|
+
- Separate direct and indirect light before applying bent-normal ambient tint when possible.
|
|
42
|
+
- Upsample low-resolution effects with depth/normal-aware weights.
|
|
43
|
+
- Build pass toggles and effect-only views before tuning.
|
|
44
|
+
- UI rendered in the same target needs an explicit protection strategy.
|
|
45
|
+
- Do not load all atomic post skills by default. Route only the effects actually requested.
|
|
46
|
+
|
|
47
|
+
## Routing boundary
|
|
48
|
+
|
|
49
|
+
Use this skill when multiple image-space systems must share buffers, ordering,
|
|
50
|
+
or output ownership. For one isolated effect, use its atomic skill without
|
|
51
|
+
loading this coordinator.
|
|
@@ -1,39 +1,195 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Production image-pipeline contracts
|
|
2
2
|
|
|
3
|
-
Use this reference
|
|
3
|
+
Use this reference to compose shared scene buffers, lighting effects, atmosphere, bloom, exposure, tone mapping, grading, and feature-local render targets with explicit ownership.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Contents
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
- production WebGPU pipeline WebGPU graph
|
|
8
|
+
- selective gallery pipeline selective gallery graph
|
|
9
|
+
- atlas-based renderer composer graph
|
|
10
|
+
- Temporal-surface effect-local graph
|
|
11
|
+
- Buffer and ownership rules
|
|
12
|
+
- Resolution policies
|
|
13
|
+
- Failure analysis
|
|
14
|
+
- Diagnostics
|
|
14
15
|
|
|
15
|
-
## Shared signals
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
- Normals: document space and packing.
|
|
19
|
-
- Color: document linear/HDR/display state.
|
|
20
|
-
- History: document reset and reprojection rules.
|
|
21
|
-
- Masks: document semantic meaning and lifetime.
|
|
17
|
+
## production WebGPU pipeline WebGPU graph
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
When GTAO is enabled, the scene pass writes MRT:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
output HDR color
|
|
23
|
+
view-space normal
|
|
24
|
+
diffuse albedo
|
|
25
|
+
depth
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Graph:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
scene MRT
|
|
32
|
+
-> reduced GTAO + bent normal
|
|
33
|
+
-> full-resolution bilateral/lighting composite
|
|
34
|
+
-> atmosphere
|
|
35
|
+
-> bloom
|
|
36
|
+
-> adapted exposure
|
|
37
|
+
-> renderOutput / tone map
|
|
38
|
+
-> 3D LUT
|
|
39
|
+
-> FXAA
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Near/far values, environment intensity, and environment texture remain
|
|
43
|
+
updateable inputs. AO is applied through its dedicated composite rather than
|
|
44
|
+
blindly multiplying the final image.
|
|
45
|
+
|
|
46
|
+
The atmosphere pass reconstructs view/world position from depth,
|
|
47
|
+
classifies sky, and owns aerial haze, height fog, sun disc/shaft, lens flare,
|
|
48
|
+
and distance grading. Its optional post-process cloud shadow is explicitly
|
|
49
|
+
disabled in its configuration, avoiding duplicate ownership with material
|
|
50
|
+
lighting.
|
|
51
|
+
|
|
52
|
+
## selective gallery pipeline selective gallery graph
|
|
53
|
+
|
|
54
|
+
The gallery owns three composers:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
neon selective bloom
|
|
58
|
+
chandelier selective bloom
|
|
59
|
+
base + final additive composite + OutputPass
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Selective renders use layer membership plus temporary black material
|
|
63
|
+
substitution with `try/finally` restoration. CSS3D content is rendered by a
|
|
64
|
+
separate renderer after WebGL when invalidated.
|
|
65
|
+
|
|
66
|
+
Shadows use VSM and manual invalidation:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
shadowMap.autoUpdate = false
|
|
70
|
+
shadowMap.needsUpdate = true only after relevant scene/light changes
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
This is a bounded-scene optimization. It depends on every moving caster and
|
|
74
|
+
light correctly invalidating the cache.
|
|
75
|
+
|
|
76
|
+
## atlas-based renderer composer graph
|
|
77
|
+
|
|
78
|
+
atlas-based renderer performs a separate depth prepass into a depth-stencil target before
|
|
79
|
+
the composer:
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
depth prepass target
|
|
83
|
+
main render
|
|
84
|
+
SSAO
|
|
85
|
+
volumetric lighting
|
|
86
|
+
bloom
|
|
87
|
+
lens flare
|
|
88
|
+
fog/color grading
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The depth target uses nearest filtering and a
|
|
92
|
+
`DepthStencilFormat`/`UnsignedInt248Type` depth texture. Every depth consumer
|
|
93
|
+
receives that same texture.
|
|
94
|
+
|
|
95
|
+
The composer recalculates effective pixel dimensions from renderer pixel ratio
|
|
96
|
+
and resizes the depth target and all passes together.
|
|
97
|
+
|
|
98
|
+
The composer can exist alongside another application post path. Verify the
|
|
99
|
+
actual render-loop call path before claiming that this graph owns runtime
|
|
100
|
+
output.
|
|
24
101
|
|
|
25
|
-
|
|
102
|
+
## Temporal-surface effect-local graph
|
|
103
|
+
|
|
104
|
+
The temporal frost graph is not a whole-scene post stack. It is a
|
|
105
|
+
self-contained material effect:
|
|
106
|
+
|
|
107
|
+
```text
|
|
108
|
+
scene at full resolution
|
|
109
|
+
-> vertical blur at 0.4 DPR
|
|
110
|
+
-> horizontal blur at 0.4 DPR
|
|
111
|
+
-> frost composite at full resolution
|
|
112
|
+
-> pointer history write/swap at full resolution
|
|
113
|
+
-> final normal/refraction output
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Three static procedural texture targets render once. This is a feature-local
|
|
117
|
+
example of mixing persistent, static, low-resolution, and full-resolution
|
|
118
|
+
signals in one feature.
|
|
119
|
+
|
|
120
|
+
## Buffer and ownership rules
|
|
121
|
+
|
|
122
|
+
Before implementation, write:
|
|
123
|
+
|
|
124
|
+
| Signal | Producer | Consumers | Space/format | Resolution | History |
|
|
125
|
+
| --- | --- | --- | --- | --- | --- |
|
|
126
|
+
| HDR scene | scene pass | AO/atmosphere/bloom | linear HDR | full | no |
|
|
127
|
+
| depth | scene or prepass | AO/fog/flare | renderer-defined | full | no |
|
|
128
|
+
| normal | MRT/geometry | AO composite | view space | full | no |
|
|
129
|
+
| albedo | MRT | indirect composite | linear | full | no |
|
|
130
|
+
| bloom contributions | selective passes | final composite | HDR | full/pyramid | no |
|
|
131
|
+
| exposure | meter | final color | scalar | 64x36 source | adapted |
|
|
132
|
+
| interaction | ping-pong pass | frost/output | half-float | full | yes |
|
|
133
|
+
|
|
134
|
+
Every signal has one producer. If a scene pass already owns depth and normal,
|
|
135
|
+
do not add an uncoordinated duplicate prepass without measuring the reason.
|
|
136
|
+
|
|
137
|
+
## Resolution policies
|
|
138
|
+
|
|
139
|
+
selective gallery pipeline caps DPR from both device and pixel budget:
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
mobile budget = 1,000,000 pixels, max DPR 1.25
|
|
143
|
+
desktop budget = 1,650,000 pixels, max DPR 1.5
|
|
144
|
+
minimum DPR = 1
|
|
145
|
+
budget DPR = sqrt(pixelBudget / CSS pixel count)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
All composers receive the same selected DPR and CSS size.
|
|
149
|
+
|
|
150
|
+
The temporal frost graph instead gives individual passes fixed roles:
|
|
151
|
+
|
|
152
|
+
```text
|
|
153
|
+
blur and coarse noise = 0.4 DPR
|
|
154
|
+
composite, history, output = display DPR
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Choose global DPR budgeting for scene cost and per-pass scaling for effect
|
|
158
|
+
bandwidth. They solve different problems.
|
|
159
|
+
|
|
160
|
+
## Failure analysis
|
|
161
|
+
|
|
162
|
+
- production WebGPU pipeline API names are version-sensitive; `PostProcessing` was renamed
|
|
163
|
+
and deprecated in favor of `RenderPipeline` in current Three.js history.
|
|
164
|
+
- selective gallery pipeline selective bloom renders the scene multiple times.
|
|
165
|
+
- selective gallery pipeline manual shadow invalidation can freeze unregistered motion.
|
|
166
|
+
- atlas-based renderer depth prepass renders regular scene materials, not an explicit depth
|
|
167
|
+
override; verify transparent and alpha-tested behavior.
|
|
168
|
+
- atlas-based renderer composer may not be the active runtime path.
|
|
169
|
+
- The frost blur has a zero-weight division risk and pointer decay is frame
|
|
170
|
+
based.
|
|
171
|
+
- None of these graphs provides a complete velocity/motion-vector
|
|
172
|
+
contract for general temporal effects.
|
|
173
|
+
- Do not advertise velocity ownership or TAA merely because a generic pipeline
|
|
174
|
+
could include them.
|
|
175
|
+
|
|
176
|
+
## Diagnostics
|
|
26
177
|
|
|
27
|
-
|
|
28
|
-
- depth;
|
|
29
|
-
- normals;
|
|
30
|
-
- masks;
|
|
31
|
-
- AO;
|
|
32
|
-
- bloom source and result;
|
|
33
|
-
- exposure;
|
|
34
|
-
- final output.
|
|
178
|
+
Expose a graph inspector or equivalent stable views:
|
|
35
179
|
|
|
36
|
-
|
|
180
|
+
```text
|
|
181
|
+
scene HDR
|
|
182
|
+
depth raw and reconstructed
|
|
183
|
+
normal/albedo MRT
|
|
184
|
+
GTAO and bent normal
|
|
185
|
+
atmosphere only
|
|
186
|
+
each selective bloom contribution
|
|
187
|
+
exposure meter and current exposure
|
|
188
|
+
pre/post tone map and LUT
|
|
189
|
+
frost static/history/composite targets
|
|
190
|
+
pass resolution, format, memory, and GPU time
|
|
191
|
+
manual invalidation state
|
|
192
|
+
```
|
|
37
193
|
|
|
38
|
-
|
|
39
|
-
|
|
194
|
+
The pipeline is accepted only when every enabled pass has a named input,
|
|
195
|
+
output, owner, resolution, and disable path.
|
|
@@ -5,27 +5,40 @@ description: Build procedural animation systems for Genex Three.js games. Use fo
|
|
|
5
5
|
|
|
6
6
|
# Genex Three.js Procedural Animation
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Read [references/procedural-motion.md](references/procedural-motion.md) for
|
|
12
|
-
timeline, spring, rotating-frame, and debris patterns.
|
|
8
|
+
Animate semantic state, not unrelated transform curves. Define phases,
|
|
9
|
+
coordinate frames, velocities, and ownership before writing per-frame updates.
|
|
13
10
|
|
|
14
11
|
## Build order
|
|
15
12
|
|
|
16
|
-
1. Define the
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
5.
|
|
23
|
-
6.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
13
|
+
1. Define the timeline phases and event boundaries.
|
|
14
|
+
2. Choose the frame for each motion: world, subject local, orbital radial,
|
|
15
|
+
docking axis, or camera shot.
|
|
16
|
+
3. Derive target position/orientation from that frame.
|
|
17
|
+
4. Use analytic kinematics for authored travel and springs for responsive
|
|
18
|
+
convergence.
|
|
19
|
+
5. Preserve world transforms when detaching children from a hierarchy.
|
|
20
|
+
6. Separate translation, alignment, spin, and secondary debris state.
|
|
21
|
+
7. Clamp integration delta and reset every state variable on replay/disposal.
|
|
22
|
+
|
|
23
|
+
Read [references/procedural-motion.md](references/procedural-motion.md)
|
|
24
|
+
for the launch, staging, docking, debris, spring, quaternion, and
|
|
25
|
+
frame-rate-independent response implementations.
|
|
26
|
+
|
|
27
|
+
## Non-negotiable rules
|
|
28
|
+
|
|
29
|
+
- Use elapsed seconds and `deltaSeconds`; do not make motion frame-count based.
|
|
30
|
+
- Derive orientation from direction/frame, then apply roll or spin as a
|
|
31
|
+
separate quaternion.
|
|
32
|
+
- Decompose docking error into axial and radial components.
|
|
33
|
+
- Switch from spring convergence to an exact terminal pose at the end of a
|
|
34
|
+
sequence.
|
|
35
|
+
- When reparenting an animated object, capture world position, quaternion, and
|
|
36
|
+
scale before removal.
|
|
37
|
+
- Use seeded randomness when motion must be reproducible.
|
|
38
|
+
- Keep visual shake in a bounded envelope and separate it from trajectory.
|
|
39
|
+
|
|
40
|
+
## Routing boundary
|
|
41
|
+
|
|
42
|
+
Use `$genex-threejs-camera-direction` for shot composition and camera handoffs.
|
|
43
|
+
Use `$genex-threejs-procedural-vfx` when the deliverable is primarily plasma, sparks,
|
|
44
|
+
or effect pooling rather than object transform motion.
|