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.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
docs(material): which way a wet map's rows run
yhhacb4ca6ccdb6
diff --git a/docs/astro/src/content/docs/graphics/materials.mdx b/docs/astro/src/content/docs/graphics/materials.mdxindex cec81c261..e0d89dca6 100644--- a/docs/astro/src/content/docs/graphics/materials.mdx+++ b/docs/astro/src/content/docs/graphics/materials.mdx@@ -70,6 +70,8 @@ the world corner it starts at (`u_wetOrigin`) and how big it is (`u_wetSize`, 0| a puddle (red) | goes flat (the normal map is let go of) and nearly a mirror, roughness 0.05 || outside the map | stays dry |+The picture is laid over the ground the way a map is read from the map's own corner: its left column is at the origin's X and its **top row is the far (largest Z) edge**, so a map painted as a plan with +Z up lines up with the world.+Put a **Planar Reflection** on the same mesh (see Lighting) and the puddles show the scene. The map is data, not a picture: import it without sRGB (theshader's `texel(data)` says so). With `u_wetness` at 0, which is the default, a surface pays one comparison.diff --git a/docs/astro/src/content/docs/zh-cn/graphics/materials.mdx b/docs/astro/src/content/docs/zh-cn/graphics/materials.mdxindex 42e258b84..b2db2e429 100644--- a/docs/astro/src/content/docs/zh-cn/graphics/materials.mdx+++ b/docs/astro/src/content/docs/zh-cn/graphics/materials.mdx@@ -61,6 +61,8 @@ Model 材质可以在地面上铺一张**潮湿贴图**,让一个堆场有的地| 水坑(红色) | 变平(不再读法线贴图),近乎镜面,粗糙度 0.05 || 贴图之外 | 保持干燥 |+这张图按地图的读法铺在地面上:最左一列在原点的 X 处,**最上一行是远端(Z 最大)的边缘**,所以按 +Z 朝上画的平面图会和世界对齐。+在同一个网格上放一个**平面反射**(见光照一章),水坑就会映出场景。这张图是数据而不是画面:导入时不要按 sRGB(着色器的 `texel(data)` 已经声明)。`u_wetness` 为 0(默认)时,表面只多付一次比较的代价。