Skip to content

Official Codebase of 3DCodeVerse

Python

starter: the lib comments and the effects catalog drop the draw-call and one-RTT caps

gaoypeng7499eae79302
diff --git a/harness/codeverse3d/languages/scene_threejs/starter/src/lib/celestial.js b/harness/codeverse3d/languages/scene_threejs/starter/src/lib/celestial.js
index c3aa01aa..2d80c83d 100644
--- a/harness/codeverse3d/languages/scene_threejs/starter/src/lib/celestial.js
+++ b/harness/codeverse3d/languages/scene_threejs/starter/src/lib/celestial.js
@@ -8,8 +8,7 @@
* silhouette and no shape — it is the image behind it, moved. So this
* one never emits a pixel of its own: it grabs the frame drawn so far
* into a texture and resamples it at displaced coordinates. That grab
- * is a framebuffer COPY, not a second scene render, so it does not
- * touch the scene's one RTT budget (a `Reflector`
+ * is a framebuffer COPY, not a second scene render (a `Reflector`
* re-renders the WHOLE scene at +48 ms/frame on SwiftShader; a copy of
* a frame already drawn is a blit). What it costs and what it cannot
* do is written out on `makeHeatShimmer`.
@@ -67,7 +66,7 @@ const _SIZE = new THREE.Vector2();
* three allocates SRGB8_ALPHA8 and the copy is refused again.
*
* This is a resolve of a frame already drawn, not a second pass over
- * the scene: it does not spend the scene's one RTT budget.
+ * the scene: it does not render the scene again.
*/
function frameGrabber(mat) {
let tex = null;
diff --git a/harness/codeverse3d/languages/scene_threejs/starter/src/lib/merge.js b/harness/codeverse3d/languages/scene_threejs/starter/src/lib/merge.js
index 8f5495f1..55d173a3 100644
--- a/harness/codeverse3d/languages/scene_threejs/starter/src/lib/merge.js
+++ b/harness/codeverse3d/languages/scene_threejs/starter/src/lib/merge.js
@@ -1,7 +1,7 @@
/**
* Draw-call collapse for static props: many positioned meshes in, ONE
* mesh out. Software GL is DRAW-CALL-bound, making this the biggest
- * SwiftShader perf lever (scene contract: <150 draw calls). Never
+ * SwiftShader perf lever. Never
* merge anything tick() animates or a fix round must retarget alone.
*
* The merge is also where a batch stops looking like a batch: 40 stones
diff --git a/harness/codeverse3d/languages/scene_threejs/starter/src/lib/submerged.js b/harness/codeverse3d/languages/scene_threejs/starter/src/lib/submerged.js
index 0746142d..538eb58d 100644
--- a/harness/codeverse3d/languages/scene_threejs/starter/src/lib/submerged.js
+++ b/harness/codeverse3d/languages/scene_threejs/starter/src/lib/submerged.js
@@ -15,8 +15,8 @@
* `makeRainRings` is the open-water half of `rain.js`, whose splashes
* are for hard ground.
*
- * NOT a second reflective surface: `water.js` owns the scene's one RTT
- * plane. Everything here shades what is under that plane or lies on it.
+ * NOT a reflective surface: the reflection is `water.js`'s RTT plane.
+ * Everything here shades what is under that plane or lies on it.
*/
import * as THREE from 'three';
diff --git a/harness/codeverse3d/languages/scene_threejs/starter/src/lib/waterside.js b/harness/codeverse3d/languages/scene_threejs/starter/src/lib/waterside.js
index d981aeea..ed235fa6 100644
--- a/harness/codeverse3d/languages/scene_threejs/starter/src/lib/waterside.js
+++ b/harness/codeverse3d/languages/scene_threejs/starter/src/lib/waterside.js
@@ -10,7 +10,7 @@
* compiled program while keeping their own values.
*
* They complement `water.js` instead of fighting it: the addon Water is
- * the scene's ONE RTT surface and its raw ShaderMaterial has no
+ * a reflective (RTT) surface and its raw ShaderMaterial has no
* `<color_fragment>` hook, so `patchShallowWater` belongs on a plain
* standard-material reach (a shallow bay, a river) beside it.
*/
@@ -286,8 +286,8 @@ function fitBedPlane(bedAt, bounds, level) {
* bank is; with no `bedAt` it degenerates to the constant `bedLevel`.
*
* Not for the addon Water from `water.js` — that is a raw
- * ShaderMaterial with no `<color_fragment>` hook (and the scene's one
- * RTT surface). Use this on a plain standard-material reach beside it.
+ * ShaderMaterial with no `<color_fragment>` hook (and a reflective RTT
+ * surface). Use this on a plain standard-material reach beside it.
*
* @param {THREE.Material} material The water surface's built-in
* material, patched in place.
diff --git a/harness/codeverse3d/languages/scene_threejs/starter/src/lib/wetground.js b/harness/codeverse3d/languages/scene_threejs/starter/src/lib/wetground.js
index 41e3436f..fc8fe739 100644
--- a/harness/codeverse3d/languages/scene_threejs/starter/src/lib/wetground.js
+++ b/harness/codeverse3d/languages/scene_threejs/starter/src/lib/wetground.js
@@ -1,9 +1,9 @@
/**
* Mirror and rain-wet floors: a real planar reflection under a rough
* overlay. A bare Reflector is SHARP (reads as marble, never damp
- * asphalt), so the overlay sets the finish. COST CONTRACT: the
- * Reflector re-renders the WHOLE scene per frame — AT MOST ONE RTT
- * surface per scene (mirror floor OR water plane, never both).
+ * asphalt), so the overlay sets the finish. COST: the Reflector
+ * re-renders the WHOLE scene per frame — use a mirror floor OR a water
+ * plane, never both.
*
* PORT NOTE (2026-09-01, our renderer: ACES, exposure 1.0, no post
* chain). The shipped pair blends the two layers by a CONSTANT, and
diff --git a/harness/codeverse3d/prompts/scene_threejs/effects_catalog.md b/harness/codeverse3d/prompts/scene_threejs/effects_catalog.md
index 78c5c7d2..87acd411 100644
--- a/harness/codeverse3d/prompts/scene_threejs/effects_catalog.md
+++ b/harness/codeverse3d/prompts/scene_threejs/effects_catalog.md
@@ -30,7 +30,7 @@ says `import { makeGrass } from '../lib/grass.js';`, `src/scene.js` says
| anything BELOW the water, rain rings, thin ice | `patchUnderwater` · `makeRainRings` · `patchThinIce` — `lib/submerged.js` |
| the moving net of light under water | `patchCaustics(material, { level, sunDir })` — `lib/caustics.js`; goes on the surface being LIT, not on the water |
| moss, damp near water, dried mud | `patchMoss` · `patchMoisture` · `patchCrackedMud` — `lib/damp.js` |
-| a polished or wet floor | `makeMirrorFloor(w, d)` — `lib/wetground.js`; spends the same one-RTT budget as `makeOcean` |
+| a polished or wet floor | `makeMirrorFloor(w, d)` — `lib/wetground.js`; re-renders the scene like `makeOcean` — use one or the other |
| rock, cliff, ground | `patchTriplanar` · `patchSlopeSplat` — `lib/terrain_shade.js` |
| ground and cliff geometry | `ground({ size, rand: mulberry32(seed), relief, flat })` returns `{ mesh, height }` — seat every asset at height(x, z); with no seeded rand the ground is flat · `cliff({ length, height, rand })` — `lib/terrain.js` |
| placing a camera or a prop by intent | `seat` · `establishingShot` · `faceToward` · `alongPath` · `crowdOn` — `lib/place.js` |