Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

chore(gates): notes for the ground's lengths, the water's reflections and a param's range

yhhfe9fa4eb8b6b
diff --git a/CHANGELOG.md b/CHANGELOG.md
index edc2d397d..bc683a683 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,10 +18,13 @@ published separately; it ships inside the editor.
- **A texture says whether it is a picture or numbers.** Import settings have a **Use**: Colour, or Data for an image read a number a texel (a heightmap, a mask of measured values, a lookup table). A build treats Data as what it is: never compressed, never decoded as sRGB or filled, kept at its depth, and at its own size unless Max Size (which now offers Source size) says otherwise, in which case it is resampled at 16 bits and not through 8. Nobody has to know to set it: a PNG of 16 bits a sample is imported as Data from the editor and the CLI alike, a texture put in a `Terrain`'s heightmap or splatmap is marked Data there and then (a splatmap cooked as a picture had its weights overwritten wherever the fourth was 0, and the ground fell back to grass everywhere), and Project Health lists textures a component reads as numbers that are still set up as pictures, with the fix on the row.
- **An ocean reaches the horizon.** The sea's surface is rings of mesh round the camera, and it ended where they did: from a hill, or with a small `cells` and `rings`, a straight edge with nothing past it. A flat apron now carries it on to 80 km, at the cost of one row of quads.
+- **A shader param's range is where its slider runs.** `range(min,max)` on a `#pragma param` set the slider in the material inspector and also clamped the number typed beside it, so a value the shader's author had not thought of could not be entered. The range is now the slider's reach only, as a UI range is in Unreal: the box takes any number, and the thumb rests at the end of the track.
- **One setting says what a unit is, for materials too.** A shader param declares `unit(length)` or `unit(perLength)` and its default and range follow the project's Units per Metre, as a component's lengths and a post-process effect's already did; the inspector shows the project's numbers. The water was the reason: its shader, `WaterBody`, `WaterZone` and the sky's World Units per km held their defaults in metres while the engine's reference is centimetres, so stock water in a default project was a hundredth of its size and a scene in metres copied from one in centimetres drew clear water. They are now written once, at the reference, and are the same water in either. **A scene that relied on the old defaults in a centimetre project** (a `WaterBody` or `WaterZone` field left unset, a Water material with unset lengths, clouds with World Units per km unset) draws them a hundred times larger than before, which is what they were meant to be; state the values, or set Units per Metre to 1 if the scene is in metres.
### Fixed
+- **The ground's lengths follow the project's units.** A `Terrain`'s size, height, cell, draw distance and collision distance were plain numbers, and so were its shaders' layer tiles, relief and wet line and a layer file's default tile: a new terrain in a default project was ten metres of ground on 2 cm cells with collision built 64 cm round a body. They are lengths now (`worldUnitFields`, `unit(length)`), written at 100 units a metre: a kilometre of ground on 2 m cells, collision 64 m round a body, a layer 24 m across, in a centimetre project and a metre one. What a scene, a material or a layer file states is untouched; a scene that left `collisionDistance` or `drawDistance` to the default gets the new one, so state the old (64, 4000) to keep it. Ground with `layers` is also no longer sent the four layer colours of the plain shader, which warned four times a load.
+- **Water mirrors only what is there.** Over open sea with no ground behind it the water's reflection went black: the ray through the picture took a sky pixel for something it had met, and the sky is painted after that picture is taken. From above, the sea darkened along the edge of the terrain under it, a line across the water. And a ripple steep enough to send the ray down met the sea bed in the picture, undimmed by its water: white flecks all over a shallow sea. The copy of the scene's distances now marks where the picture holds nothing, a ray sent down goes on up as off the next wave, and waves finer than a pixel widen the sun's highlight instead of flashing pixel by pixel. The ray's step and the thickness of what it meets are shares of the distance to the water, where they were a number of units (a centimetre in one project, a metre in another).
- **A 16-bit heightmap keeps its depth and size in a build.** A texture is capped at its Max Size (2048 unless set) when a build cooks it, and the cap decodes a PNG to 8 bits a channel on the way. A `Terrain` heightmap of 4096 samples and 16 bits therefore shipped as 2048 samples of 256 steps: the exported ground was terraced and coarser than the same ground in the editor, which reads the file itself, and nothing said so. See Use, above; a PNG of 16 bits that is still marked Colour ships byte for byte and the build says so.
## [0.103.0] - 2026-11-12
diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjs
index 1cc54456c..2b834fd0a 100644
--- a/tools/releaseNotes.mjs
+++ b/tools/releaseNotes.mjs
@@ -4520,6 +4520,16 @@ export const NOTED = {
{"note": "A texture says whether it is a picture or numbers."},
"feat(editor): a texture given to a Terrain as its heightmap is marked Data, and Project Health lists the ones read as numbers that are still pictures":
{"note": "A texture says whether it is a picture or numbers."},
+ "fix(terrain): the ground's lengths follow the project's units - a new Terrain is a kilometre on 2 m cells in a centimetre project and a metre one, its shaders' tiles, relief and wet line say unit(length), a layer with no tile repeats every 4 m, and ground with layers is no longer sent four colours its shader does not have":
+ {"note": "The ground's lengths follow the project's units."},
+ "fix(water): water mirrors only what is there - over open sea with nothing behind it the reflection took the unpainted sky for something met and went black, and a ripple that sent the ray down drew the sea bed as white flecks; the copy of the scene's distances marks the sky, a ray goes on up, and waves finer than a pixel widen the highlight":
+ {"note": "Water mirrors only what is there."},
+ "feat(material): a shader param's range is where its slider runs, not a limit on the value - a material may hold a number typed past it, as a UI range does in Unreal":
+ {"note": "A shader param's range is where its slider runs."},
+ "fix(water): a reflection's step and the thickness of what it meets are shares of the distance, not a number of units, and the sky in the copy of distances is as far as the copy can say":
+ {"note": "Water mirrors only what is there."},
+ "feat(material): a shader param's range is where its slider runs, not a limit - a typed value may go past it":
+ {"note": "A shader param's range is where its slider runs."},
"fix(terrain): a splatmap is numbers too - cooked as a picture its three weights were overwritten wherever the fourth was 0, and the whole ground was painted as grass; it is marked Data when it is set, as the heightmap is":
{"note": "A texture says whether it is a picture or numbers."},
};