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
feat(render): sharpen works without a compute stage
yhh9222c274b17a
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex e053f4a6a..0c10889d2 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -16,6 +16,7 @@ published separately; it ships inside the editor.### Added+- **Sharpen on WebGL2.** The `sharpen` effect was a compute shader, so a device with no compute stage (WebGL2, which is most of the small-game targets) left it out and showed the picture as it was. It now has a fragment pass of the same arithmetic that stands in where there is no compute stage: on WebGPU the two draw the identical picture, pixel for pixel, and a test switch in the render host (`noCompute`) checks that. Flat areas are untouched and an edge cannot overshoot past what is on either side of it.- **Blob shadows.** A `BlobShadow` component puts a soft dark disc on the ground under an entity: no shadow map, no light, no extra pass, which is the shadow a phone can afford. It fades and shrinks as the thing leaves the ground (`fadeHeight`, `shrink`), follows the ground (`groundY`, or a height function from `setBlobShadowGround` for ground that is not flat) and is hidden by what stands in front of it. It is a disc, not the light's shadow: it does not stretch with the sun or land on a wall. The same picture on WebGL2 and WebGPU.- **Edge Outline, a coloured line at silhouettes and creases.** A post effect (`edgeOutline`) that draws a line of `u_lineColor` where the scene's surface changes: where the distance from the camera steps (a silhouette) and where the surface's normal turns (the edge of a face, a fold), so a box on a floor is inked along its corners as well as its outline, which `depthOutline` (depth only, black only) does not do. Distance is measured in the world, so one threshold holds across a perspective view, and a plane at a grazing angle draws no line. Creases need surfaces that write their normal (lit meshes, Model and Toon materials); the same picture on WebGL2 and WebGPU.- **Filled polygons and joined strokes.** `setPath(app, entity, points, style)` draws a path on a MeshRenderer: an ear-clipped fill of any simple polygon (concave ones, holes), and a stroke with mitered, rounded or bevelled corners and butt, round or square caps that does not overlap itself at a corner, so a translucent line is even; `feather` fades the outer edge for a quality level without multisampling. It sorts, batches and saves with the scene like any mesh. `Graphics` still fills only rects and circles; `buildPathGeometry`, `cubicBezier`, `quadraticBezier` and `circlePoints` are the pieces. The same picture on WebGL2 and WebGPU.diff --git a/docs/astro/src/content/docs/graphics/post-processing.mdx b/docs/astro/src/content/docs/graphics/post-processing.mdxindex 5b5d03747..1e61025ad 100644--- a/docs/astro/src/content/docs/graphics/post-processing.mdx+++ b/docs/astro/src/content/docs/graphics/post-processing.mdx@@ -28,7 +28,7 @@ several can stack in one frame at no extra target cost beyond the passes.| `heightFog` | Exponential height fog with the sun's glow and a hazy horizon | `density`, `heightFalloff`, `baseHeight`, `sunAzimuth`, `sunElevation`, `skyFog`, colours || `skyAtmosphere` | An atmosphere that scatters the sun's light, with sun, moon, stars and volumetric clouds, drawn where there is no surface | `intensity`, `haze`, `altitude`, `clouds`, `cloudBase`, `cloudThickness`, `windSpeed`, `overcast`, `sunAzimuth`, `sunElevation` || `voxelGI` | Diffuse global illumination from a world-space voxel cache the camera remembers (WebGPU compute; fragment passes on WebGL2) | `intensity`, `rays`, `voxelSize`, `range`, `maxBounce`, `decay`, `blend`, `divisor` |-| `sharpen` | Sharpening that cannot make a halo (a compute effect: WebGPU only) | `intensity`, `limit` |+| `sharpen` | Sharpening that cannot make a halo (a compute pass on WebGPU, a fragment pass of the same arithmetic on WebGL2) | `intensity`, `limit` || `lightShafts` | Sun rays through whatever stands in front of it | `intensity`, `sunAzimuth`, `sunElevation`, `decay`, `reach` || `ssao` | Ambient occlusion from a ring of depth samples around each point | `radius`, `intensity`, `bias`, `power` || `gtao` | Ground-truth ambient occlusion: the horizon each point can see, integrated against its own normal | `radius`, `intensity`, `power`, `thickness` |@@ -243,9 +243,9 @@ An effect can be a **compute shader** instead of a draw: WGSL run over the wholemany neighbours or keeps a result of its own is written without a render pass per step. `sharpen` is one: each pixel ispushed away from the mean of its neighbours and then held inside the range they span, so an edge gets steeper without a halo.-A compute effect needs a device with a compute stage, which is **WebGPU**. On WebGL2 the effect-is left out of the chain and the picture goes through as it was — a compute effect is for refining a picture that is already whole,-so write one that way. Ask `postprocess_supportsCompute` (or check the backend) if your game needs to know.+A compute effect needs a device with a compute stage, which is **WebGPU**. On WebGL2 an effect that has a `fallback` (a fragment pass of the same+arithmetic, as `sharpen` does: the two draw the identical picture) runs that instead; one that has none is left out of the chain and the picture goes+through as it was, so a compute effect without a fallback is for refining a picture that is already whole: write one that way. Ask `postprocess_supportsCompute` (or check the backend) if your game needs to know.Register your own like any other effect, with `compute` in place of `factory`:diff --git a/docs/astro/src/content/docs/zh-cn/graphics/post-processing.mdx b/docs/astro/src/content/docs/zh-cn/graphics/post-processing.mdxindex edd1a510b..fbb246a1a 100644--- a/docs/astro/src/content/docs/zh-cn/graphics/post-processing.mdx+++ b/docs/astro/src/content/docs/zh-cn/graphics/post-processing.mdx@@ -30,7 +30,7 @@ Estella 通过 ping-pong 帧缓冲运行全屏后处理。加一个 `PostProcess| `heightFog` | 指数高度雾,带太阳辉光和朦胧的地平线 | `density`、`heightFalloff`、`baseHeight`、`sunAzimuth`、`sunElevation`、`skyFog`、颜色 || `skyAtmosphere` | 散射太阳光的大气,带太阳、月亮、星星和体积云,画在没有表面的地方 | `intensity`、`haze`、`altitude`、`clouds`、`cloudBase`、`cloudThickness`、`windSpeed`、`overcast`、`sunAzimuth`、`sunElevation` || `voxelGI` | 基于相机记住的世界空间体素缓存的漫反射全局光照(WebGPU 用计算 pass,WebGL2 用片元 pass) | `intensity`、`rays`、`voxelSize`、`range`、`maxBounce`、`decay`、`blend`、`divisor` |-| `sharpen` | 不会出光晕的锐化(计算特效:仅 WebGPU) | `intensity`、`limit` |+| `sharpen` | 不会出光晕的锐化(WebGPU 上是计算 pass,WebGL2 上是同样算术的片元 pass) | `intensity`、`limit` || `lightShafts` | 太阳光穿过前方遮挡物形成的光束 | `intensity`、`sunAzimuth`、`sunElevation`、`decay`、`reach` || `ssao` | 由每个点周围一圈深度采样得出的环境光遮蔽 | `radius`、`intensity`、`bias`、`power` || `gtao` | 真值环境光遮蔽:每个点能看见的地平线,按它自身法线积分 | `radius`、`intensity`、`power`、`thickness` |@@ -175,8 +175,7 @@ Estella 通过 ping-pong 帧缓冲运行全屏后处理。加一个 `PostProcess一个特效可以是**计算着色器**而不是绘制:在整张画面上运行的 WGSL,适合需要读取很多相邻像素、或要保留自己结果的特效,不必每一步都开一个渲染 pass。`sharpen` 就是一个:每个像素被推离邻居的均值,再被限制在邻居所张成的范围内,所以边缘变陡却不会出光晕。-计算特效需要有计算阶段的设备,也就是 **WebGPU**。在 WebGL2 里,这个特效会被从链路中拿掉,画面原样通过——-计算特效是用来精修一张已经完整的画面的,所以请按这个思路写。游戏需要知道时,可以问 `postprocess_supportsCompute`(或检查后端)。+计算特效需要有计算阶段的设备,也就是 **WebGPU**。在 WebGL2 里,带 `fallback`(同样算术的片元 pass,`sharpen` 就是这样,两者画出完全相同的画面)的特效会改跑它;没有的会被从链路中拿掉,画面原样通过,所以没有 fallback 的计算特效是用来精修一张已经完整的画面的:请按这个思路写。游戏需要知道时,可以问 `postprocess_supportsCompute`(或检查后端)。像注册其他特效一样注册你自己的,用 `compute` 代替 `factory`:diff --git a/fixtures/scenes/sharpen.esscene b/fixtures/scenes/sharpen.esscenenew file mode 100644index 000000000..32d74bc65--- /dev/null+++ b/fixtures/scenes/sharpen.esscene@@ -0,0 +1 @@+{"version": "1.0", "name": "sharpen", "entities": [{"id": 0, "name": "Camera", "parent": null, "children": [], "visible": true, "components": [{"type": "Transform", "data": {"position": {"x": 0, "y": 0, "z": 10}}}, {"type": "Camera", "data": {"projectionType": 1, "orthoSize": 130, "isActive": true, "priority": 0}}, {"type": "PostProcessVolume", "data": {"isGlobal": true, "priority": 0, "weight": 1, "effects": [{"type": "sharpen", "enabled": true, "uniforms": {"u_intensity": 1.0, "u_limit": 0.25}}]}}]}, {"id": 1, "name": "Star", "parent": null, "children": [], "visible": true, "components": [{"type": "Transform", "data": {"position": {"x": -250, "y": 0, "z": 0}}}, {"type": "MeshRenderer", "data": {"color": {"r": 1, "g": 1, "b": 1, "a": 1}, "layer": 0, "enabled": true, "geometry": {"positions": [5.5109105961630896e-15, 90, -22.335839587113973, 30.742645786248005, -85.59508646656381, 27.811529493745276, -36.14014761921584, -11.742645786247996, -52.900672706322595, -72.81152949374525, -6.980486755139913e-15, -38, -2.5717582782094417e-15, -14, -5.357568053111264, -12.934313455158012, -9.899494936611667, -9.899494936611664, -12.934313455158016, -5.3575680531112555, -14, 1.7145055188062944e-15, -12.934313455158014, 5.357568053111258, -9.899494936611664, 9.899494936611665, -5.357568053111256, 12.934313455158014, 8.572527594031472e-16, 14, 5.357568053111258, 12.934313455158014, 9.899494936611665, 9.899494936611664, 12.934313455158014, 5.357568053111257, 14, 0, 12.934313455158012, -5.357568053111265, 9.899494936611664, -9.899494936611667, 5.35756805311126, -12.934313455158012, -2.5717582782094417e-15, -14, -6.980486755139913e-15, -38, 52.90067270632256, -72.81152949374528, 36.14014761921583, -11.74264578624801, 85.59508646656383, 27.811529493745244, 22.335839587113988, 30.742645786247994, 1.94110067258445e-15, 78.65910245470413, 9.080720519741729e-15, 101.34089754529587, -25.150378124287567, 34.61652574328313, -19.52130104994038, 26.868765829212883, -74.80925195547447, 24.306999420783722, -96.38092097765316, 31.31605956670683, -40.694166635009125, -13.222336261498429, -31.58612860342255, -10.262955310997564, -46.23466038143776, -63.63655064813577, -59.56668503120743, -81.98650833935474, -8.25327824394178e-15, -42.78837896356937, -5.707695266338046e-15, -33.21162103643063, 46.234660381437735, -63.63655064813579, 59.566685031207385, -81.98650833935478, 40.69416663500912, -13.222336261498445, 31.586128603422544, -10.262955310997576, 74.80925195547447, 24.306999420783693, 96.38092097765319, 31.316059566706794, 25.150378124287585, 34.61652574328311, 19.52130104994039, 26.868765829212876], "colors": [1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 1, 0.55, 0.1, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1, 0.2, 0.1, 0.05, 1], "indices": [27, 0, 1, 27, 1, 2, 3, 4, 5, 3, 5, 6, 3, 6, 7, 3, 7, 8, 3, 8, 9, 3, 9, 10, 3, 10, 11, 3, 11, 12, 21, 22, 23, 21, 23, 24, 21, 24, 25, 21, 25, 26, 26, 27, 2, 2, 3, 12, 2, 12, 13, 2, 13, 14, 20, 21, 26, 26, 2, 14, 26, 14, 15, 26, 15, 16, 26, 16, 17, 26, 17, 18, 26, 18, 19, 26, 19, 20, 28, 29, 30, 28, 30, 31, 31, 30, 33, 31, 33, 32, 32, 33, 34, 32, 34, 35, 35, 34, 37, 35, 37, 36, 36, 37, 38, 36, 38, 39, 39, 38, 41, 39, 41, 40, 40, 41, 42, 40, 42, 43, 43, 42, 45, 43, 45, 44, 44, 45, 46, 44, 46, 47, 47, 46, 29, 47, 29, 28]}}}]}, {"id": 2, "name": "Wave", "parent": null, "children": [], "visible": true, "components": [{"type": "Transform", "data": {"position": {"x": 0, "y": 0, "z": 0}}}, {"type": "MeshRenderer", "data": {"color": {"r": 1, "g": 1, "b": 1, "a": 1}, "layer": 0, "enabled": true, "geometry": {"positions": [-106.25709608986084, 3.1382715819776, -93.74290391013916, -3.1382715819776, -90.13443176675075, 4.056311916923847, -102.51077784143148, 10.607693093563329, -102.21151891642366, 11.144224406585144, -86.57160425505329, 9.832607072791067, -98.2954410881855, 17.493232691433015, -97.88042446535985, 18.093607037072807, -82.97962480964571, 14.489653163719538, -93.80329267679036, 23.379659183733477, -93.23983584178613, 24.024434897460885, -79.39716933804293, 18.115368474979423, -89.0103557123626, 28.304987994485018, -88.27378427208069, 28.95268389589952, -75.84668385634471, 20.820993907747983, -83.90066142128049, 32.28519503183777, -82.99191501203249, 32.872555373461005, -72.31633768253708, 22.73331209587744, -78.48385505933302, 35.31448163686402, -77.44547016788073, 35.77233420491311, -68.75191492881372, 23.970704691158733, -72.81117873275934, 37.381132684331575, -71.7243759652313, 37.66309955024296, -65.0726722460119, 24.615779850995327, -66.97255866716543, 38.496227334227534, -65.92914677561843, 38.59944325255738, -61.204477584618076, 24.707230900900516, -61.06850923408537, 38.7143574296587, -60.13745838879393, 38.67431903768588, -57.105157876806395, 24.25617384501319, -55.176706223271104, 38.12847669645462, -54.38977688470224, 37.99613084093762, -52.76776644181862, 23.269610371001036, -49.33761571466697, 36.84698906992442, -48.69594845981334, 36.668544831112996, -48.209144654378115, 21.764840104799283, -43.561083904743036, 34.97356071886854, -43.04924420096591, 34.7821438311365, -43.45675741403035, 19.77280881809307, -37.84038188033794, 32.598774466211445, -37.43761718281277, 32.41476356485234, -38.53999280816635, 17.33566260988241, -32.163462716104505, 29.800466035797335, -31.849818058475062, 29.634972439310395, -33.48603969532521, 14.50302781130797, -26.519077065163902, 26.647203834676112, -26.277784091350043, 26.505553825625718, -28.31857269683477, 11.328945708377642, -20.8991621909133, 23.201771233962802, -20.717097465207544, 23.08603771785525, -23.05774173697623, 7.869815506812383, -15.299300277122647, 19.523698227714377, -15.166670279051594, 19.434303718767126, -17.72061464119338, 4.183146995216757, -9.71840342279588, 15.670864418698924, -9.628231125251085, 15.607522908872959, -12.321681566006976, 0.3268480602401125, -4.158200220301934, 11.700440887428108, -4.105852338975166, 11.662684667768747, -6.873270484134726, -3.6411638422549366, 1.377236995190045, 7.669417013497917, 1.3944006454098918, 7.656877008025761, 6.873270484134731, 3.6411638422549295, -1.3944006454098847, -7.656877008025768, -1.377236995190036, -7.6694170134979265, 12.32168156600698, -0.3268480602401125, 4.105852338975169, -11.662684667768751, 4.158200220301933, -11.700440887428108, 17.720614641193386, -4.183146995216765, 9.62823112525109, -15.607522908872966, 9.718403422795888, -15.670864418698931, 23.057741736976215, -7.869815506812377, 15.16667027905158, -19.43430371876712, 15.299300277122631, -19.523698227714366, 28.318572696834778, -11.328945708377645, 20.717097465207544, -23.086037717855252, 20.89916219091331, -23.20177123396281, 33.48603969532521, -14.503027811307971, 26.277784091350043, -26.505553825625725, 26.519077065163902, -26.647203834676112, 38.539992808166375, -17.335662609882426, 31.84981805847509, -29.634972439310413, 32.16346271610455, -29.80046603579736, 43.45675741403036, -19.77280881809307, 37.43761718281281, -32.41476356485235, 37.84038188033795, -32.598774466211445, 48.20914465437812, -21.764840104799283, 43.0492442009659, -34.7821438311365, 43.561083904743036, -34.97356071886854, 52.767766441818615, -23.269610371001036, 48.69594845981334, -36.668544831112996, 49.337615714666974, -36.84698906992442, 57.10515787680638, -24.256173845013183, 54.389776884702236, -37.99613084093761, 55.176706223271076, -38.128476696454605, 61.20447758461807, -24.707230900900512, 60.13745838879392, -38.67431903768588, 61.06850923408539, -38.7143574296587, 65.07267224601192, -24.61577985099531, 65.92914677561846, -38.599443252557364, 66.9725586671654, -38.49622733422752, 68.75191492881375, -23.970704691158733, 71.72437596523129, -37.66309955024297, 72.81117873275936, -37.381132684331575, 72.31633768253707, -22.73331209587745, 77.44547016788073, -35.772334204913115, 78.48385505933304, -35.31448163686402, 75.84668385634471, -20.82099390774798, 82.9919150120325, -32.87255537346099, 83.90066142128049, -32.285195031837766, 79.39716933804293, -18.115368474979416, 88.27378427208069, -28.95268389589951, 89.0103557123626, -28.30498799448501, 82.97962480964571, -14.489653163719526, 93.23983584178613, -24.02443489746088, 93.80329267679033, -23.379659183733487, 86.5716042550533, -9.83260707279107, 97.88042446535985, -18.093607037072832, 98.29544108818553, -17.49323269143301, 90.13443176675075, -4.0563119169238595, 102.21151891642367, -11.144224406585138, 102.51077784143148, -10.607693093563334, 93.74290391013916, 3.138271581977599, 106.25709608986084, -3.138271581977599, -100, 0, -106.82631379765466, 1.5496580061257386, -106.99881096016986, -0.12901606026449117, -106.76456266932274, -1.8001921821864468, -106.13718258431943, -3.3667476779120644, -105.1531317552665, -4.7376400362273134, -103.86959963946929, -5.833197976257888, -102.36118045804852, -6.58975165272029, -100.71553805094771, -6.963332915899249, -99.02831117320082, -6.932230580691445, -97.39755531812233, -6.498252201766765, -95.91804408845303, -5.686619025061091, -94.6757612990568, -4.544500220637991, 100, 0, 106.82631379765466, -1.5496580061257337, 106.99881096016986, 0.1290160602644946, 106.76456266932274, 1.800192182186449, 106.13718258431943, 3.366747677912067, 105.1531317552665, 4.737640036227319, 103.86959963946929, 5.833197976257891, 102.36118045804851, 6.589751652720292, 100.71553805094771, 6.963332915899249, 99.02831117320082, 6.932230580691445, 97.39755531812231, 6.498252201766763, 95.91804408845303, 5.686619025061089, 94.6757612990568, 4.544500220637986], "colors": [0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1, 0.2, 0.8, 0.9, 1], "indices": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 0, 1, 2, 0, 2, 3, 4, 2, 5, 4, 5, 6, 7, 5, 8, 7, 8, 9, 10, 8, 11, 10, 11, 12, 13, 11, 14, 13, 14, 15, 16, 14, 17, 16, 17, 18, 19, 17, 20, 19, 20, 21, 22, 20, 23, 22, 23, 24, 25, 23, 26, 25, 26, 27, 28, 26, 29, 28, 29, 30, 31, 29, 32, 31, 32, 33, 34, 32, 35, 34, 35, 36, 37, 35, 38, 37, 38, 39, 40, 38, 41, 40, 41, 42, 43, 41, 44, 43, 44, 45, 46, 44, 47, 46, 47, 48, 49, 47, 50, 49, 50, 51, 52, 50, 53, 52, 53, 54, 55, 53, 56, 55, 56, 57, 58, 56, 59, 58, 59, 60, 61, 59, 63, 61, 63, 62, 62, 64, 66, 62, 66, 65, 65, 67, 69, 65, 69, 68, 68, 70, 72, 68, 72, 71, 71, 73, 75, 71, 75, 74, 74, 76, 78, 74, 78, 77, 77, 79, 81, 77, 81, 80, 80, 82, 84, 80, 84, 83, 83, 85, 87, 83, 87, 86, 86, 88, 90, 86, 90, 89, 89, 91, 93, 89, 93, 92, 92, 94, 96, 92, 96, 95, 95, 97, 99, 95, 99, 98, 98, 100, 102, 98, 102, 101, 101, 103, 105, 101, 105, 104, 104, 106, 108, 104, 108, 107, 107, 109, 111, 107, 111, 110, 110, 112, 114, 110, 114, 113, 113, 115, 117, 113, 117, 116, 116, 118, 120, 116, 120, 119, 119, 121, 123, 119, 123, 122, 124, 0, 125, 124, 125, 126, 124, 126, 127, 124, 127, 128, 124, 128, 129, 124, 129, 130, 124, 130, 131, 124, 131, 132, 124, 132, 133, 124, 133, 134, 124, 134, 135, 124, 135, 136, 124, 136, 1, 137, 123, 138, 137, 138, 139, 137, 139, 140, 137, 140, 141, 137, 141, 142, 137, 142, 143, 137, 143, 144, 137, 144, 145, 137, 145, 146, 137, 146, 147, 137, 147, 148, 137, 148, 149, 137, 149, 122]}}}]}, {"id": 3, "name": "Hex", "parent": null, "children": [], "visible": true, "components": [{"type": "Transform", "data": {"position": {"x": 250, "y": 0, "z": 0}}}, {"type": "MeshRenderer", "data": {"color": {"r": 1, "g": 1, "b": 1, "a": 1}, "layer": 0, "enabled": true, "geometry": {"positions": [80, 0, 40.00000000000001, 69.28203230275508, -39.999999999999986, 69.2820323027551, -80, 9.797174393178826e-15, -40.000000000000036, -69.28203230275508, 40.00000000000001, -69.28203230275508, 80, 0, 81.73205080756888, 0, 40.00000000000001, 69.28203230275508, 40.86602540378445, 70.78203230275508, -39.999999999999986, 69.2820323027551, -40.86602540378443, 70.7820323027551, -80, 9.797174393178826e-15, -81.73205080756888, 1.0352285905491404e-14, -40.000000000000036, -69.28203230275508, -40.86602540378448, -70.78203230275508, 40.00000000000001, -69.28203230275508, 40.86602540378445, -70.78203230275508, 74.22649730810375, 0, 84.3301270189222, -2.5, 84.3301270189222, 2.5, 37.11324865405188, 64.28203230275508, 44.3301270189222, 71.78203230275508, 40.00000000000001, 74.28203230275508, -37.11324865405186, 64.2820323027551, -39.999999999999986, 74.2820323027551, -44.33012701892218, 71.7820323027551, -74.22649730810375, 7.946802685470233e-15, -84.3301270189222, 2.5000000000000107, -84.3301270189222, -2.4999999999999885, -37.11324865405191, -64.28203230275508, -44.33012701892223, -71.78203230275508, -40.000000000000036, -74.28203230275508, 37.11324865405188, -64.28203230275508, 40.00000000000001, -74.28203230275508, 44.3301270189222, -71.78203230275508, 72.72649730810375, 0, 36.36324865405188, 62.982994197078426, -36.36324865405186, 62.98299419707844, -72.72649730810375, 7.466062013874341e-15, -36.36324865405191, -62.982994197078426, 36.36324865405188, -62.982994197078426, 85.62916512459886, -3.25, 85.62916512459886, 3.25, 45.629165124598856, 72.53203230275508, 40.00000000000001, 75.78203230275508, -39.999999999999986, 75.7820323027551, -45.629165124598835, 72.5320323027551, -85.62916512459886, 3.250000000000011, -85.62916512459886, -3.249999999999988, -45.629165124598885, -72.53203230275508, -40.000000000000036, -75.78203230275508, 40.00000000000001, -75.78203230275508, 45.629165124598856, -72.53203230275508], "colors": [0.4, 0.4, 1, 0.55, 0.4, 0.4, 1, 0.55, 0.4, 0.4, 1, 0.55, 0.4, 0.4, 1, 0.55, 0.4, 0.4, 1, 0.55, 0.4, 0.4, 1, 0.55, 0.4, 0.4, 1, 0.55, 0.4, 0.4, 1, 0, 0.4, 0.4, 1, 0.55, 0.4, 0.4, 1, 0, 0.4, 0.4, 1, 0.55, 0.4, 0.4, 1, 0, 0.4, 0.4, 1, 0.55, 0.4, 0.4, 1, 0, 0.4, 0.4, 1, 0.55, 0.4, 0.4, 1, 0, 0.4, 0.4, 1, 0.55, 0.4, 0.4, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0], "indices": [5, 0, 1, 5, 1, 2, 5, 2, 3, 5, 3, 4, 6, 7, 9, 6, 9, 8, 8, 9, 11, 8, 11, 10, 10, 11, 13, 10, 13, 12, 12, 13, 15, 12, 15, 14, 14, 15, 17, 14, 17, 16, 16, 17, 7, 16, 7, 6, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 18, 20, 22, 18, 22, 21, 21, 23, 25, 21, 25, 24, 24, 26, 28, 24, 28, 27, 27, 29, 31, 27, 31, 30, 30, 32, 34, 30, 34, 33, 33, 35, 19, 33, 19, 18, 18, 36, 37, 18, 37, 21, 21, 37, 38, 21, 38, 24, 24, 38, 39, 24, 39, 27, 27, 39, 40, 27, 40, 30, 30, 40, 41, 30, 41, 33, 33, 41, 36, 33, 36, 18, 19, 42, 43, 19, 43, 20, 20, 43, 44, 20, 44, 22, 22, 44, 45, 22, 45, 23, 23, 45, 46, 23, 46, 25, 25, 46, 47, 25, 47, 26, 26, 47, 48, 26, 48, 28, 28, 48, 49, 28, 49, 29, 29, 49, 50, 29, 50, 31, 31, 50, 51, 31, 51, 32, 32, 51, 52, 32, 52, 34, 34, 52, 53, 34, 53, 35, 35, 53, 42, 35, 42, 19]}}}]}]}\ No newline at end of filediff --git a/fixtures/scenes/sharpen.textures.json b/fixtures/scenes/sharpen.textures.jsonnew file mode 100644index 000000000..9e26dfeeb--- /dev/null+++ b/fixtures/scenes/sharpen.textures.json@@ -0,0 +1 @@+{}\ No newline at end of filediff --git a/sdk/src/postprocess/effects.ts b/sdk/src/postprocess/effects.tsindex 96b7efa52..dffa3c250 100644--- a/sdk/src/postprocess/effects.ts+++ b/sdk/src/postprocess/effects.ts@@ -407,11 +407,12 @@ registerEffect({],});-// A compute effect: only a device with a compute stage (WebGPU) runs it; on WebGL2 the picture goes through as it was.+// A compute effect on a device with a compute stage (WebGPU); a fragment pass of the same arithmetic stands in for it on one without (WebGL2).registerEffect({type: 'sharpen',label: 'Sharpen',compute: { get source() { return computeSourceOf('sharpen'); } },+ fallback: [{ name: 'sharpen_fs', factory: () => postProcessEffects.createSharpen() }],uniforms: [// How hard a pixel is pushed away from the mean of its neighbours. 0 leaves the picture alone.{ name: 'u_intensity', label: 'Intensity', min: 0, max: 2, step: 0.01, defaultValue: 0.5, neutralValue: 0 },diff --git a/sdk/src/postprocess/sources/basic.ts b/sdk/src/postprocess/sources/basic.tsindex f75d1a495..8abed605f 100644--- a/sdk/src/postprocess/sources/basic.ts+++ b/sdk/src/postprocess/sources/basic.ts@@ -934,6 +934,69 @@ fn viewDistance(t : vec2i, size : vec2i) -> f32 {return vec4f(mix(src.rgb, mc.u_lineColor.rgb, vec3f(edge)), src.a);}#pragma end+`;+ return Material.compileShader(source);+ },+ createSharpen(): ShaderHandle {+ // The fragment version of the compute `sharpen`, for a device with no compute stage (WebGL2): the same arithmetic on the same five taps, so the two+ // draw the same picture. Each pixel is pushed away from the mean of its four neighbours by `u_intensity`, and held to the range those neighbours and+ // the pixel span, widened by `u_limit`: a flat area has nothing to push against and an edge cannot overshoot past what is on either side of it, which+ // is what a plain unsharp mask gets wrong. It runs on the chain's own (HDR) values.+ const source = `#pragma shader "PP Sharpen"+#pragma version 300 es+#pragma domain PostProcess+#pragma param u_intensity float default(0.5) range(0,2)+#pragma param u_limit float default(0.25) range(0,1)++#pragma fragment+precision highp float;++in vec2 v_texCoord;+uniform sampler2D u_texture;+out vec4 fragColor;++vec4 tap(ivec2 p, ivec2 size) {+ return texelFetch(u_texture, clamp(p, ivec2(0), size - ivec2(1)), 0);+}++void main() {+ ivec2 size = textureSize(u_texture, 0);+ ivec2 p = clamp(ivec2(v_texCoord * vec2(size)), ivec2(0), size - ivec2(1));+ vec4 c = tap(p, size);+ vec3 n = tap(p + ivec2(0, -1), size).rgb;+ vec3 s = tap(p + ivec2(0, 1), size).rgb;+ vec3 w = tap(p + ivec2(-1, 0), size).rgb;+ vec3 e = tap(p + ivec2(1, 0), size).rgb;+ vec3 lo = min(min(min(n, s), min(w, e)), c.rgb);+ vec3 hi = max(max(max(n, s), max(w, e)), c.rgb);+ vec3 sharp = c.rgb + u_intensity * (4.0 * c.rgb - n - s - w - e);+ vec3 room = (hi - lo) * u_limit;+ sharp = clamp(sharp, lo - room, hi + room);+ fragColor = vec4(max(sharp, vec3(0.0)), c.a);+}+#pragma end++#pragma fragment wgsl+fn tap(p : vec2i, size : vec2i) -> vec4f {+ return textureLoad(t0, clamp(p, vec2i(0), size - vec2i(1)), 0);+}++@fragment fn fs_main(v : VSOut) -> @location(0) vec4f {+ let size = vec2i(textureDimensions(t0, 0));+ let p = clamp(vec2i(v.v_texCoord * vec2f(size)), vec2i(0), size - vec2i(1));+ let c = tap(p, size);+ let n = tap(p + vec2i(0, -1), size).rgb;+ let s = tap(p + vec2i(0, 1), size).rgb;+ let w = tap(p + vec2i(-1, 0), size).rgb;+ let e = tap(p + vec2i(1, 0), size).rgb;+ let lo = min(min(min(n, s), min(w, e)), c.rgb);+ let hi = max(max(max(n, s), max(w, e)), c.rgb);+ var sharp = c.rgb + mc.u_intensity * (4.0 * c.rgb - n - s - w - e);+ let room = (hi - lo) * mc.u_limit;+ sharp = clamp(sharp, lo - room, hi + room);+ return vec4f(max(sharp, vec3f(0.0)), c.a);+}+#pragma end`;return Material.compileShader(source);},diff --git a/sdk/src/postprocess/volumeSystem.ts b/sdk/src/postprocess/volumeSystem.tsindex 972001bfb..1e22b2208 100644--- a/sdk/src/postprocess/volumeSystem.ts+++ b/sdk/src/postprocess/volumeSystem.ts@@ -225,7 +225,7 @@ function applyBlendedEffects(applyTextures(stack, subPass.name, effectData.textures);applyColors(stack, subPass.name, effectData.colors);}- } else if (def.native && def.fallback && !deviceHasCompute()) {+ } else if ((def.native || def.compute) && def.fallback && !deviceHasCompute()) {// No compute stage: the fragment version of the same effect stands in for it.for (const [index, subPass] of def.fallback.entries()) {const shader = getOrCreateShader(api, subPass.name, subPass.factory);diff --git a/sdk/tests/shader-twins.test.ts b/sdk/tests/shader-twins.test.tsindex cb20d5769..a196c9e56 100644--- a/sdk/tests/shader-twins.test.ts+++ b/sdk/tests/shader-twins.test.ts@@ -53,7 +53,7 @@ describe('embedded .esshader structure', () => {it('found the filter, effect and grid sources', () => {expect(CASES.filter((c) => c.name.startsWith('filters.ts')).length).toBe(1);expect(CASES.filter((c) => c.name.startsWith('spriteFilter.ts')).length).toBe(2);- expect(CASES.filter((c) => c.name.startsWith('postProcessEffects.ts')).length).toBe(38);+ expect(CASES.filter((c) => c.name.startsWith('postProcessEffects.ts')).length).toBe(39);expect(CASES.filter((c) => c.name.startsWith('editorGridRenderer.ts')).length).toBe(1);});diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex 02b96c7d5..8494da22e 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -3010,4 +3010,6 @@ export const NOTED = {{"note":"Edge Outline, a coloured line at silhouettes and creases."},"feat(render): blob shadows, a soft disc on the ground under a thing":{"note":"Blob shadows."},+ "feat(render): sharpen works without a compute stage":+ {"note":"Sharpen on WebGL2."},};diff --git a/tools/render-host/host.ts b/tools/render-host/host.tsindex f41c1d84f..c834c2137 100644--- a/tools/render-host/host.ts+++ b/tools/render-host/host.ts@@ -116,6 +116,9 @@ async function boot(): Promise<void> {// engine, not the page, so attaching it only gives the compositor work.module = await createModule(moduleArg);+ // A device that has a compute stage, told it has none: the fragment version of an effect that has both is the one that draws, so the two+ // can be compared on one backend, pixel for pixel.+ if (params.get('noCompute') === '1') (module as unknown as { postprocess_supportsCompute?: () => boolean }).postprocess_supportsCompute = () => false;let renderSurface: RenderSurfaceSource;if (backend === 'webgpu') {diff --git a/tools/render-host/run.mjs b/tools/render-host/run.mjsindex 75984d1e9..f0e372b54 100644--- a/tools/render-host/run.mjs+++ b/tools/render-host/run.mjs@@ -258,7 +258,7 @@ app.whenReady().then(async () => {let server;try {server = await serveHost(DIST);- const url = `http://127.0.0.1:${server.address().port}/${PAGE}?w=${W}&h=${H}&backend=${BACKEND}${COLORSPACE ? `&colorSpace=${COLORSPACE}` : ''}${OUTPUT_TRANSFORM ? `&outputTransform=${OUTPUT_TRANSFORM}` : ''}${MSAA ? `&msaa=${MSAA}` : ''}${PREPASS ? '&prepass=1' : ''}${TEXTURES ? `&textures=${TEXTURES}` : ''}${DEPTH_LAYERS ? `&depthLayers=${DEPTH_LAYERS}` : ''}${RENDER_RESOLUTION ? `&renderResolution=${RENDER_RESOLUTION}` : ''}${SEED ? `&seed=${SEED}` : ''}`;+ const url = `http://127.0.0.1:${server.address().port}/${PAGE}?w=${W}&h=${H}&backend=${BACKEND}${COLORSPACE ? `&colorSpace=${COLORSPACE}` : ''}${OUTPUT_TRANSFORM ? `&outputTransform=${OUTPUT_TRANSFORM}` : ''}${MSAA ? `&msaa=${MSAA}` : ''}${PREPASS ? '&prepass=1' : ''}${TEXTURES ? `&textures=${TEXTURES}` : ''}${DEPTH_LAYERS ? `&depthLayers=${DEPTH_LAYERS}` : ''}${RENDER_RESOLUTION ? `&renderResolution=${RENDER_RESOLUTION}` : ''}${SEED ? `&seed=${SEED}` : ''}${process.env.ESTELLA_VERIFY_NO_COMPUTE === '1' ? '&noCompute=1' : ''}`;// useContentSize: the capture rectangle must be the page area, not the// outer frame (the same trap the parity runner documents).diff --git a/tools/renderScenes.mjs b/tools/renderScenes.mjsindex e87072150..0ecd0a54e 100644--- a/tools/renderScenes.mjs+++ b/tools/renderScenes.mjs@@ -659,6 +659,8 @@ export const SCENES = [{ id: "material-builtin-lit", tier: "nightly", webgpu: true, env: { ESTELLA_VERIFY_SCENE: "/scenes/mat-builtin-lit.esscene", ESTELLA_VERIFY_MANIFEST: "/scenes/mat-builtin-lit.textures.json", ESTELLA_VERIFY_W: "256", ESTELLA_VERIFY_H: "256", ESTELLA_VERIFY_STEPS: "2", ESTELLA_VERIFY_EXPECT: "[{\"x\":0.5,\"y\":0.5,\"rgb\":[0,255,0],\"tol\":30}]" } },{ id: "material-toon", tier: "nightly", webgpu: true, env: { ESTELLA_VERIFY_SCENE: "/scenes/toon.esscene", ESTELLA_VERIFY_MANIFEST: "/scenes/toon.textures.json", ESTELLA_VERIFY_W: "900", ESTELLA_VERIFY_H: "360", ESTELLA_VERIFY_STEPS: "4", ESTELLA_VERIFY_EXPECT: "[{\"x\":0.2,\"y\":0.45,\"rgb\":[229,136,80],\"tol\":20},{\"x\":0.27,\"y\":0.4,\"rgb\":[195,114,74],\"tol\":20},{\"x\":0.3,\"y\":0.62,\"rgb\":[126,70,62],\"tol\":20},{\"x\":0.67,\"y\":0.42,\"rgb\":[255,255,255],\"tol\":20},{\"x\":0.77,\"y\":0.65,\"rgb\":[37,37,37],\"tol\":20},{\"x\":0.05,\"y\":0.5,\"rgb\":[0,0,0],\"tol\":10}]" } },{ id: "vector-paths", tier: "pr", webgpu: true, env: { ESTELLA_VERIFY_SCENE: "/scenes/vector-paths.esscene", ESTELLA_VERIFY_MANIFEST: "/scenes/vector-paths.textures.json", ESTELLA_VERIFY_W: "900", ESTELLA_VERIFY_H: "300", ESTELLA_VERIFY_STEPS: "3", ESTELLA_VERIFY_EXPECT: "[{\"x\":0.2,\"y\":0.55,\"rgb\":[255,140,26],\"tol\":20},{\"x\":0.168,\"y\":0.5,\"rgb\":[0,0,0],\"tol\":10},{\"x\":0.5,\"y\":0.5,\"rgb\":[51,204,230],\"tol\":20},{\"x\":0.82,\"y\":0.52,\"rgb\":[56,56,140],\"tol\":20},{\"x\":0.05,\"y\":0.5,\"rgb\":[0,0,0],\"tol\":10}]" } },+ { id: "sharpen", tier: "pr", webgpu: true, env: { ESTELLA_VERIFY_SCENE: "/scenes/sharpen.esscene", ESTELLA_VERIFY_MANIFEST: "/scenes/sharpen.textures.json", ESTELLA_VERIFY_W: "900", ESTELLA_VERIFY_H: "300", ESTELLA_VERIFY_STEPS: "4", ESTELLA_VERIFY_EXPECT: "[{\"x\":0.2,\"y\":0.55,\"rgb\":[255,140,26],\"tol\":20},{\"x\":0.5,\"y\":0.5,\"rgb\":[51,204,230],\"tol\":20},{\"x\":0.05,\"y\":0.5,\"rgb\":[0,0,0],\"tol\":10},{\"x\":0.8928,\"y\":0.615,\"rgb\":[207,207,229],\"tol\":10},{\"x\":0.7583,\"y\":0.6617,\"rgb\":[26,26,123],\"tol\":10}]" } },+ { id: "sharpen-fragment", tier: "pr", webgpu: true, env: { ESTELLA_VERIFY_NO_COMPUTE: "1", ESTELLA_VERIFY_SCENE: "/scenes/sharpen.esscene", ESTELLA_VERIFY_MANIFEST: "/scenes/sharpen.textures.json", ESTELLA_VERIFY_W: "900", ESTELLA_VERIFY_H: "300", ESTELLA_VERIFY_STEPS: "4", ESTELLA_VERIFY_EXPECT: "[{\"x\":0.2,\"y\":0.55,\"rgb\":[255,140,26],\"tol\":20},{\"x\":0.5,\"y\":0.5,\"rgb\":[51,204,230],\"tol\":20},{\"x\":0.05,\"y\":0.5,\"rgb\":[0,0,0],\"tol\":10},{\"x\":0.8928,\"y\":0.615,\"rgb\":[207,207,229],\"tol\":10},{\"x\":0.7583,\"y\":0.6617,\"rgb\":[26,26,123],\"tol\":10}]" } },{ id: "material-dissolve", tier: "nightly", webgpu: true, env: { ESTELLA_VERIFY_SCENE: "/scenes/mat-dissolve.esscene", ESTELLA_VERIFY_MANIFEST: "/scenes/mat-dissolve.textures.json", ESTELLA_VERIFY_W: "256", ESTELLA_VERIFY_H: "256", ESTELLA_VERIFY_STEPS: "2", ESTELLA_VERIFY_EXPECT: "[{\"x\":0.5,\"y\":0.5,\"rgb\":[255,0,0],\"tol\":30}]" } },{ id: "material-graph", tier: "nightly", webgpu: true, env: { ESTELLA_VERIFY_SCENE: "/scenes/mat-graph.esscene", ESTELLA_VERIFY_MANIFEST: "/scenes/mat-graph.textures.json", ESTELLA_VERIFY_W: "256", ESTELLA_VERIFY_H: "256", ESTELLA_VERIFY_STEPS: "2", ESTELLA_VERIFY_EXPECT: "[{\"x\":0.5,\"y\":0.5,\"rgb\":[255,0,0],\"tol\":40}]" } },{ id: "material-preview", tier: "pr", host: "editor", webgpu: { ESTELLA_VERIFY_EXPECT: "[{\"x\":0.5,\"y\":0.5,\"rgb\":[255,0,0],\"tol\":40}]" }, env: { ESTELLA_VERIFY_SCENE: "/scenes/mat-tint.esscene", ESTELLA_VERIFY_MANIFEST: "/scenes/mat-tint.textures.json", ESTELLA_VERIFY_W: "256", ESTELLA_VERIFY_H: "256", ESTELLA_VERIFY_STEPS: "2", ESTELLA_VERIFY_PREVIEW: "{\"w\":64,\"h\":64,\"rgb\":[255,0,0],\"tol\":45}" } },