@aethervtt/shard-render 0.0.1 → 0.1.0

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.
Files changed (134) hide show
  1. package/dist/assets.d.ts +3 -0
  2. package/dist/assets.js +43 -2
  3. package/dist/atmosphere-nodes.d.ts +9 -0
  4. package/dist/atmosphere-nodes.js +57 -18
  5. package/dist/atmosphere-plugin.js +8 -2
  6. package/dist/baseline/atmosphere.d.ts +16 -0
  7. package/dist/baseline/atmosphere.js +301 -0
  8. package/dist/baseline/data-texture.d.ts +36 -0
  9. package/dist/baseline/data-texture.js +181 -0
  10. package/dist/baseline/environment.d.ts +14 -0
  11. package/dist/baseline/environment.js +368 -0
  12. package/dist/baseline/exposure.d.ts +25 -0
  13. package/dist/baseline/exposure.js +120 -0
  14. package/dist/baseline/lights.d.ts +33 -0
  15. package/dist/baseline/lights.js +133 -0
  16. package/dist/baseline/textures.d.ts +97 -0
  17. package/dist/baseline/textures.js +203 -0
  18. package/dist/camera.d.ts +2 -0
  19. package/dist/camera.js +4 -0
  20. package/dist/culling-shaders.js +21 -2
  21. package/dist/culling.d.ts +11 -2
  22. package/dist/culling.js +44 -18
  23. package/dist/cutaway-plugin.d.ts +48 -0
  24. package/dist/cutaway-plugin.js +364 -0
  25. package/dist/cutaway.d.ts +27 -0
  26. package/dist/cutaway.js +49 -0
  27. package/dist/data-store.d.ts +69 -0
  28. package/dist/data-store.js +105 -0
  29. package/dist/debug-shaders.js +17 -3
  30. package/dist/debug-views.js +4 -2
  31. package/dist/deferred-shaders.js +2 -0
  32. package/dist/deferred.js +24 -3
  33. package/dist/deform.d.ts +5 -4
  34. package/dist/deform.js +4 -9
  35. package/dist/describe-plugin.d.ts +4 -2
  36. package/dist/describe-plugin.js +75 -3
  37. package/dist/display-nodes.js +15 -4
  38. package/dist/dynamic-resolution.d.ts +2 -0
  39. package/dist/dynamic-resolution.js +6 -1
  40. package/dist/environment-plugin.js +17 -2
  41. package/dist/environment-state.d.ts +7 -3
  42. package/dist/environment-state.js +20 -9
  43. package/dist/environment.js +7 -1
  44. package/dist/features.d.ts +49 -0
  45. package/dist/features.js +106 -0
  46. package/dist/forward.d.ts +38 -2
  47. package/dist/forward.js +582 -184
  48. package/dist/fxaa.js +12 -2
  49. package/dist/gizmos-plugin.js +7 -0
  50. package/dist/gizmos.d.ts +3 -3
  51. package/dist/gizmos.js +11 -13
  52. package/dist/gpu-assets.d.ts +58 -4
  53. package/dist/gpu-assets.js +191 -8
  54. package/dist/graph.d.ts +11 -0
  55. package/dist/graph.js +30 -5
  56. package/dist/health.d.ts +58 -0
  57. package/dist/health.js +112 -0
  58. package/dist/index.d.ts +30 -11
  59. package/dist/index.js +286 -9
  60. package/dist/instances.d.ts +119 -8
  61. package/dist/instances.js +387 -78
  62. package/dist/interior-plugin.d.ts +121 -0
  63. package/dist/interior-plugin.js +465 -0
  64. package/dist/interior.d.ts +24 -0
  65. package/dist/interior.js +13 -0
  66. package/dist/layers.d.ts +35 -0
  67. package/dist/layers.js +49 -0
  68. package/dist/lens-plugin.d.ts +43 -0
  69. package/dist/lens-plugin.js +304 -0
  70. package/dist/lens.d.ts +41 -0
  71. package/dist/lens.js +99 -0
  72. package/dist/lights.d.ts +50 -5
  73. package/dist/lights.js +101 -22
  74. package/dist/material-pipelines.d.ts +37 -4
  75. package/dist/material-pipelines.js +102 -5
  76. package/dist/materials.d.ts +23 -0
  77. package/dist/materials.js +44 -1
  78. package/dist/outline-plugin.d.ts +48 -0
  79. package/dist/outline-plugin.js +529 -0
  80. package/dist/outline.d.ts +15 -0
  81. package/dist/outline.js +42 -0
  82. package/dist/overlays.js +1 -0
  83. package/dist/picking.d.ts +17 -0
  84. package/dist/picking.js +40 -11
  85. package/dist/pixel-perfect-plugin.js +10 -2
  86. package/dist/plugin.d.ts +58 -6
  87. package/dist/plugin.js +191 -24
  88. package/dist/post-common.d.ts +2 -0
  89. package/dist/post-common.js +3 -0
  90. package/dist/post-nodes.d.ts +2 -1
  91. package/dist/post-nodes.js +111 -19
  92. package/dist/post-plugin.js +5 -3
  93. package/dist/post-shaders.js +51 -6
  94. package/dist/projection.d.ts +24 -0
  95. package/dist/projection.js +87 -0
  96. package/dist/readback.d.ts +1 -0
  97. package/dist/readback.js +1 -0
  98. package/dist/render-scale.js +1 -0
  99. package/dist/screen-effects.d.ts +97 -0
  100. package/dist/screen-effects.js +192 -0
  101. package/dist/shaders.d.ts +13 -0
  102. package/dist/shaders.js +131 -29
  103. package/dist/shadow-catcher.d.ts +9 -0
  104. package/dist/shadow-catcher.js +133 -0
  105. package/dist/shadows.d.ts +25 -1
  106. package/dist/shadows.js +97 -19
  107. package/dist/standard-fields.d.ts +1 -0
  108. package/dist/standard-fields.js +5 -0
  109. package/dist/standard.js +12 -0
  110. package/dist/stats.d.ts +45 -1
  111. package/dist/stats.js +91 -3
  112. package/dist/surface-model.d.ts +57 -0
  113. package/dist/surface-model.js +289 -0
  114. package/dist/surface-shaders.d.ts +3 -0
  115. package/dist/surface-shaders.js +160 -0
  116. package/dist/surface.d.ts +40 -0
  117. package/dist/surface.js +86 -0
  118. package/dist/target.d.ts +1 -13
  119. package/dist/target.js +1 -26
  120. package/dist/testing.d.ts +10 -0
  121. package/dist/testing.js +33 -1
  122. package/dist/tier.d.ts +13 -0
  123. package/dist/tier.js +14 -0
  124. package/dist/timer.d.ts +2 -0
  125. package/dist/timer.js +7 -1
  126. package/dist/variants.d.ts +37 -0
  127. package/dist/variants.js +104 -0
  128. package/dist/view-visibility-plugin.d.ts +61 -0
  129. package/dist/view-visibility-plugin.js +267 -0
  130. package/dist/view-visibility.d.ts +28 -0
  131. package/dist/view-visibility.js +46 -0
  132. package/dist/view.d.ts +29 -1
  133. package/dist/view.js +57 -34
  134. package/package.json +15 -11
package/dist/graph.js CHANGED
@@ -1,4 +1,6 @@
1
1
  import { ShardError } from "@aethervtt/shard-core";
2
+ import { flushDataStores } from "./data-store.js";
3
+ import { unsupportedNodes } from "./features.js";
2
4
  import { TexturePool } from "./pool.js";
3
5
  import { BYTES_PER_TEXEL, toFloats } from "./readback.js";
4
6
  import { GpuTimer } from "./timer.js";
@@ -10,8 +12,14 @@ const RenderPhase = {
10
12
  Opaque: 300,
11
13
  Lighting: 350,
12
14
  Sky: 400,
15
+ /** Coplanar ground bands (0057): after the sky, which draws where no depth was written. */
16
+ Ground: 420,
13
17
  Sprites: 450,
14
18
  Transparent: 500,
19
+ /** Projected fog's composite (0058): after transparent objects, before the overlay band. */
20
+ Fog: 520,
21
+ /** Ground bands from the overlay band up, over fog (0058). */
22
+ Overlay3d: 530,
15
23
  Effects3d: 550,
16
24
  Resolve: 600,
17
25
  Post: 700,
@@ -127,6 +135,12 @@ class RenderGraph {
127
135
  this.pool = new TexturePool(gpu);
128
136
  this.timer = new GpuTimer(gpu);
129
137
  }
138
+ /** Rejects pending captures and destroys the timer's query set (the app is being disposed). */
139
+ dispose() {
140
+ const error = new ShardError("render/disposed", "The app was disposed before the capture ran");
141
+ for (const capture of this.captures.splice(0)) capture.reject(error);
142
+ this.timer.destroy();
143
+ }
130
144
  addNode(name, node) {
131
145
  if (this.nodes.has(name)) {
132
146
  throw new ShardError("render/duplicate-node", `Render graph node "${name}" already exists`);
@@ -141,6 +155,10 @@ class RenderGraph {
141
155
  hasNode(name) {
142
156
  return this.nodes.has(name);
143
157
  }
158
+ /** Every node's name, in the order they were added. */
159
+ nodeNames() {
160
+ return [...this.nodes.keys()];
161
+ }
144
162
  /** The data of a view rendered in the last frame. */
145
163
  lastViewData(view) {
146
164
  return this.viewData.get(view);
@@ -153,11 +171,12 @@ class RenderGraph {
153
171
  resolve() {
154
172
  return this.resolveFor(void 0);
155
173
  }
156
- resolveFor(view) {
174
+ /** `off`: nodes that don't run on this device (features the baseline tier doesn't support). */
175
+ resolveFor(view, off) {
157
176
  let key = "";
158
177
  const enabled = /* @__PURE__ */ new Map();
159
178
  for (const [name, node] of this.nodes) {
160
- const on = !view || !node.enabled || node.enabled(view);
179
+ const on = (!view || !node.enabled || node.enabled(view)) && !off?.has(name);
161
180
  key += on ? "1" : "0";
162
181
  if (on) enabled.set(name, node);
163
182
  }
@@ -233,8 +252,9 @@ class RenderGraph {
233
252
  this.lastViews = sorted.map((v) => v.name);
234
253
  this.viewData.clear();
235
254
  for (const v of sorted) this.viewData.set(v.name, v.data);
255
+ const off = this.gpu.tier === "baseline" ? unsupportedNodes(world) : void 0;
236
256
  for (const view of sorted) {
237
- const resolved = this.resolveFor(view);
257
+ const resolved = this.resolveFor(view, off);
238
258
  const order = resolved.order;
239
259
  this.lastByView.set(view.name, resolved);
240
260
  const textures = /* @__PURE__ */ new Map();
@@ -264,13 +284,17 @@ class RenderGraph {
264
284
  const vh = view.height ?? view.target.height;
265
285
  const px = size === "view" ? [vw, vh] : Array.isArray(size) ? size : [Math.max(1, Math.ceil(vw / size.divide)), Math.max(1, Math.ceil(vh / size.divide))];
266
286
  const format = perView(desc.format, view);
287
+ const sampleCount = perView(desc.sampleCount ?? 1, view);
288
+ let usage = (desc.usage ?? GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.TEXTURE_BINDING) | GPUTextureUsage.COPY_SRC;
289
+ if (sampleCount > 1 && this.gpu.tier === "baseline")
290
+ usage &= ~GPUTextureUsage.TEXTURE_BINDING;
267
291
  t = this.pool.acquire({
268
292
  label: `${view.name}/${canonical}`,
269
293
  format: format === "view" ? view.target.format : format,
270
294
  size: px,
271
- sampleCount: perView(desc.sampleCount ?? 1, view),
295
+ sampleCount,
272
296
  mipLevelCount: perView(desc.mipLevelCount ?? 1, view),
273
- usage: (desc.usage ?? GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.TEXTURE_BINDING) | GPUTextureUsage.COPY_SRC
297
+ usage
274
298
  });
275
299
  textures.set(canonical, t);
276
300
  return t;
@@ -358,6 +382,7 @@ class RenderGraph {
358
382
  }
359
383
  this.captures = this.captures.filter((c) => !readbacks.some((r) => r.capture === c));
360
384
  this.timer.resolve(encoder);
385
+ flushDataStores(this.gpu);
361
386
  device.queue.submit([encoder.finish()]);
362
387
  this.timer.readback(world);
363
388
  for (const fn of submitted) fn();
@@ -0,0 +1,58 @@
1
+ import { type World } from '@aethervtt/shard-core';
2
+ import type { GpuStatus } from '@aethervtt/shard-gpu';
3
+ export type RenderHealthState = 'ok' | 'degraded' | 'lost' | 'failed';
4
+ export interface RenderHealthIssue {
5
+ /** `package/what-happened`, e.g. `assets/load-failed`, `render/material-fallback`. */
6
+ code: string;
7
+ message: string;
8
+ /** What it's about: an asset path, a material type, a feature. */
9
+ ref?: string;
10
+ /** When it was first seen, in ms since the epoch. */
11
+ since: number;
12
+ /**
13
+ * `degraded` issues make the state `degraded` (something draws a fallback or not at all); `info`
14
+ * ones are reported without changing it (a shader cache miss in a dev build).
15
+ */
16
+ severity: 'degraded' | 'info';
17
+ }
18
+ export interface RenderHealthValue {
19
+ /**
20
+ * `ok`; `degraded` while any fallback, failed pipeline or unsupported feature is in use; `lost`
21
+ * between a device loss and its recovery; `failed` when recovery gave up.
22
+ */
23
+ state: RenderHealthState;
24
+ issues: RenderHealthIssue[];
25
+ }
26
+ export declare const RenderHealth: import("@aethervtt/shard-core").ResourceDef<RenderHealthValue>;
27
+ export declare const RenderHealthChanged: import("@aethervtt/shard-core").EventDef<{
28
+ from: RenderHealthState;
29
+ to: RenderHealthState;
30
+ issues: RenderHealthIssue[];
31
+ }>;
32
+ type Raised = Omit<RenderHealthIssue, 'since'>;
33
+ /** Issues raised by code other than the renderer's own checks (unsupported features, 0064). */
34
+ export declare const RenderHealthReports: import("@aethervtt/shard-core").ResourceDef<{
35
+ issues: Map<string, Raised>;
36
+ version: number;
37
+ }>;
38
+ /** Raises an issue until `clearHealthIssue` (same code and ref). Raising it again does nothing. */
39
+ export declare function raiseHealthIssue(world: World, issue: Raised): void;
40
+ export declare function clearHealthIssue(world: World, code: string, ref?: string): void;
41
+ /** Material types drawing through the standard fallback (filled by the forward plugin). */
42
+ export declare const MaterialFallbacks: import("@aethervtt/shard-core").ResourceDef<{
43
+ count(): number;
44
+ list(): readonly {
45
+ type: string;
46
+ error: {
47
+ code: string;
48
+ message: string;
49
+ };
50
+ }[];
51
+ }>;
52
+ /** Where the device status comes from (the render plugin's GPU context). */
53
+ export interface HealthSources {
54
+ status(): GpuStatus;
55
+ }
56
+ /** Rebuilds RenderHealth when its inputs change, and sends RenderHealthChanged on transitions. */
57
+ export declare function healthSystem(sources: HealthSources): import("@aethervtt/shard-core").SystemDef<undefined>;
58
+ export {};
package/dist/health.js ADDED
@@ -0,0 +1,112 @@
1
+ import { AssetServerResource } from "@aethervtt/shard-assets";
2
+ import { defineEvent, defineResource, defineSystem } from "@aethervtt/shard-core";
3
+ const RenderHealth = defineResource("render/Health", {
4
+ description: "The renderer's health: ok, degraded (fallbacks in use), lost (device reset in progress) or failed, with the issues behind it.",
5
+ init: () => ({ state: "ok", issues: [] })
6
+ });
7
+ const RenderHealthChanged = defineEvent("render/HealthChanged", {
8
+ description: "RenderHealth moved to another state (ok, degraded, lost, failed)."
9
+ });
10
+ const RenderHealthReports = defineResource(
11
+ "render/HealthReports",
12
+ {
13
+ description: "Health issues raised by features and backends, by code and ref.",
14
+ init: () => ({ issues: /* @__PURE__ */ new Map(), version: 0 })
15
+ }
16
+ );
17
+ function raiseHealthIssue(world, issue) {
18
+ const reports = world.initResource(RenderHealthReports);
19
+ const key = `${issue.code}|${issue.ref ?? ""}`;
20
+ const had = reports.issues.get(key);
21
+ if (had && had.message === issue.message && had.severity === issue.severity) return;
22
+ reports.issues.set(key, issue);
23
+ reports.version++;
24
+ }
25
+ function clearHealthIssue(world, code, ref) {
26
+ const reports = world.tryResource(RenderHealthReports);
27
+ if (reports?.issues.delete(`${code}|${ref ?? ""}`)) reports.version++;
28
+ }
29
+ const MaterialFallbacks = defineResource("render/MaterialFallbacks", {
30
+ description: "Material types whose shader or pipeline failed, drawn with the standard one."
31
+ });
32
+ function healthSystem(sources) {
33
+ const seen = { status: "", fallbacks: -1, materials: -1, reports: -1 };
34
+ const since = /* @__PURE__ */ new Map();
35
+ return defineSystem({
36
+ name: "render/health",
37
+ description: "Keeps RenderHealth current: device status, fallbacks in use, raised issues.",
38
+ run: (_, world) => {
39
+ const status = sources.status();
40
+ const server = world.tryResource(AssetServerResource);
41
+ const fallbacks = server?.fallbackCount ?? 0;
42
+ const fallbackMaterials = world.tryResource(MaterialFallbacks);
43
+ const materials = fallbackMaterials?.count() ?? 0;
44
+ const reports = world.tryResource(RenderHealthReports)?.version ?? 0;
45
+ if (status === seen.status && fallbacks === seen.fallbacks && materials === seen.materials && reports === seen.reports)
46
+ return;
47
+ seen.status = status;
48
+ seen.fallbacks = fallbacks;
49
+ seen.materials = materials;
50
+ seen.reports = reports;
51
+ const now = Date.now();
52
+ const issues = [];
53
+ const add = (issue) => {
54
+ const key = `${issue.code}|${issue.ref ?? ""}`;
55
+ let at = since.get(key);
56
+ if (at === void 0) {
57
+ at = now;
58
+ since.set(key, at);
59
+ }
60
+ issues.push({ ...issue, since: at });
61
+ };
62
+ if (status === "lost") {
63
+ add({
64
+ code: "gpu/device-lost",
65
+ message: "The GPU device was lost; recovering",
66
+ severity: "degraded"
67
+ });
68
+ } else if (status === "failed") {
69
+ add({
70
+ code: "gpu/recovery-failed",
71
+ message: "The GPU device couldn't be replaced",
72
+ severity: "degraded"
73
+ });
74
+ }
75
+ for (const f of server?.failed() ?? []) {
76
+ add({ code: f.code, message: f.message, ref: f.path, severity: "degraded" });
77
+ }
78
+ for (const f of fallbackMaterials?.list() ?? []) {
79
+ add({
80
+ code: "render/material-fallback",
81
+ message: `Drawn with the standard material: ${f.error.message}`,
82
+ ref: f.type,
83
+ severity: "degraded"
84
+ });
85
+ }
86
+ for (const issue of world.tryResource(RenderHealthReports)?.issues.values() ?? []) add(issue);
87
+ for (const key of since.keys()) {
88
+ if (!issues.some((i) => `${i.code}|${i.ref ?? ""}` === key)) since.delete(key);
89
+ }
90
+ const state = status === "failed" ? "failed" : status === "lost" ? "lost" : issues.some((i) => i.severity === "degraded") ? "degraded" : "ok";
91
+ const health = world.initResource(RenderHealth);
92
+ const from = health.state;
93
+ health.state = state;
94
+ health.issues = issues;
95
+ world.touchResource(RenderHealth);
96
+ if (from !== state) {
97
+ const change = { from, to: state, issues };
98
+ world.send(RenderHealthChanged, change);
99
+ world.trigger(RenderHealthChanged, change);
100
+ }
101
+ }
102
+ });
103
+ }
104
+ export {
105
+ MaterialFallbacks,
106
+ RenderHealth,
107
+ RenderHealthChanged,
108
+ RenderHealthReports,
109
+ clearHealthIssue,
110
+ healthSystem,
111
+ raiseHealthIssue
112
+ };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,14 @@
1
- export { AssetStore, MaterialAsset, MaterialAssetType, MaterialImporter, Materials, type MaterialValue, MeshAsset, Meshes, materialFields, materialFromJson, materialTypeOf, RenderTargets, STANDARD_TYPE, StandardMaterial, type StandardMaterialValue, validateMaterial, } from './assets.js';
1
+ export { AssetStore, MaterialAsset, MaterialAssetType, MaterialImporter, Materials, type MaterialValue, MeshAsset, Meshes, materialFields, materialFromJson, materialTypeOf, missingMesh, RenderTargets, STANDARD_TYPE, StandardMaterial, type StandardMaterialValue, validateMaterial, } from './assets.js';
2
2
  export { Atmosphere, type AtmospherePreset, AtmospherePresets, type AtmosphereRecord, type AtmosphereSampleResult, AtmosphereSettings, AtmosphereStore, Atmospheres, type AtmosphereValue, atmosphereMethods, atmosphereModel, type CameraAtmosphere, describeAtmospheres, sampleAtmosphere, selectAtmospheres, sunTransmittanceAt, } from './atmosphere.js';
3
3
  export { type AtmosphereModel, createSkySample, integrateSky, multiscatterLut, transmittanceLut, transmittanceToTop, } from './atmosphere-model.js';
4
4
  export { AtmosphereGpu, AtmosphereGpuResource, LUT_LAYERS } from './atmosphere-nodes.js';
5
5
  export { atmospherePlugin } from './atmosphere-plugin.js';
6
6
  export { applyPhysicalCameras, Camera3d, type Camera3dValue, camera2d, Exposure, type ExposurePreset, ExposurePresets, ev100, ev100FromCamera, ev100FromIlluminance, exposureScale, type LightPreset, LightPresets, lux, PhysicalCamera, } from './camera.js';
7
7
  export { CLUSTER_COUNT, CLUSTER_X, CLUSTER_Y, CLUSTER_Z, ClusterBuffers, type ClusterStats, clusterAabb, clusterAabbs, clusterLightsCpu, clusterRange, MAX_LIGHTS_PER_CLUSTER, ViewLightList, } from './clusters.js';
8
- export { Culler, GpuCuller, readVisibleSlots, visibleSlots } from './culling.js';
8
+ export { Culler, cullGround, GpuCuller, readVisibleSlots, visibleSlots } from './culling.js';
9
+ export { Cutaway, CutawayPath, type CutawaySupport, CutawayView, MAX_REVEAL_POINTS, } from './cutaway.js';
10
+ export { CUTAWAY_SHADERS, CutawayCameras, type CutawayState, cutawayPlugin, describeCutaways, extractCutaways, } from './cutaway-plugin.js';
11
+ export { DATA_WIDTH, DataStore, type DataStoreOptions, dataEntry, flushDataStores, loadDataTextures, } from './data-store.js';
9
12
  export { captureShadowMap, DEBUG_VIEWS, type DebugView, describeCulling, describeLighting, readBuffer, readTextureLayer, setDebugView, } from './debug-views.js';
10
13
  export { captureGBuffer, describeDeferred, GBUFFER_CHANNELS, type GBufferChannel, } from './deferred.js';
11
14
  export { deferredPlugin } from './deferred-plugin.js';
@@ -15,39 +18,55 @@ export { whiteBalance } from './display-nodes.js';
15
18
  export { dynamicResolutionPlugin, type FrameTimings, RenderScaleController, updateRenderScale, } from './dynamic-resolution.js';
16
19
  export { type CameraEnvironment, DefaultEnvironment, type DefaultEnvironmentValue, describeEnvironment, Environment, type EnvironmentBaker, EnvironmentMap, type EnvironmentMapValue, EnvironmentPresets, EnvironmentStore, Environments, environmentBakers, ProceduralSky, type ProceduralSkyValue, Skybox, } from './environment.js';
17
20
  export { environmentPlugin } from './environment-plugin.js';
18
- export { type ForwardPluginOptions, type ForwardState, ForwardStateResource, forwardCorePlugin, PICK_TARGETS, sceneColor, type ViewGpu, viewBindGroup, } from './forward.js';
21
+ export { addRenderFeatures, type BaselineStrategy, clearUnsupported, describeFeatures, featureOfNode, type RenderFeature, RenderFeatures, reportUnsupported, unsupportedNodes, } from './features.js';
22
+ export { type ForwardPluginOptions, type ForwardState, ForwardStateResource, forwardCorePlugin, forwardQueue, PASS_GROUND, PICK_TARGETS, sceneColor, VERTEX_BUFFERS, type ViewGpu, viewBindGroup, viewPixelScale, } from './forward.js';
19
23
  export { fxaaPlugin } from './fxaa.js';
20
- export { LABEL_FONT, labelWidth } from './gizmo-font.js';
24
+ export { LABEL_FONT, labelAtlas, labelWidth } from './gizmo-font.js';
21
25
  export { GIZMO_LINE_FLOATS, type GizmoOptions, GizmoStore, Gizmos, packGizmoColor, } from './gizmos.js';
22
26
  export { gizmosPlugin } from './gizmos-plugin.js';
23
27
  export { GpuAssets, GpuAssetsResource, type GpuMaterial, type GpuMesh, type GpuTexture, } from './gpu-assets.js';
24
28
  export { type CapturedBuffer, type CapturedImage, type ColorAttachment, type DepthAttachment, type NodeContext, type NodeDescriptor, RenderGraph, RenderPhase, type RenderView, type ResolvedGraph, type ResourceRef, resolveGraph, type TransientTexture, VIEW_TARGET, } from './graph.js';
25
- export { type Batch, createDrawList, DeformPath, type DrawItem, type DrawList, INSTANCE_BYTES, INSTANCE_FLOATS, InstanceData, InstanceFlags, InstanceSlot, InstanceStore, Instances, LOD_BIT, Lod, lodSize, Mesh3d, MeshMaterial, MorphWeights, NotShadowCaster, NotShadowReceiver, SkinnedMesh, selectLod, VisibilityRange, } from './instances.js';
29
+ export { clearHealthIssue, MaterialFallbacks, RenderHealth, RenderHealthChanged, type RenderHealthIssue, RenderHealthReports, type RenderHealthState, type RenderHealthValue, raiseHealthIssue, } from './health.js';
30
+ export { type Batch, CUTAWAY_BIT, createDrawList, DeformPath, type DrawItem, type DrawList, groundKey, INSTANCE_BYTES, INSTANCE_FLOATS, InstanceData, InstanceFlags, InstanceSlot, InstanceStore, Instances, LOD_BIT, Lod, lodSize, Mesh3d, MeshMaterial, MorphWeights, NotShadowCaster, NotShadowReceiver, recordFlags, ShadowWhenHidden, SkinnedMesh, selectLod, VisibilityRange, } from './instances.js';
31
+ export { INTERIOR_BINDINGS, INTERIOR_BLOCKED, INTERIOR_SKY, InteriorPath, type InteriorSupport, } from './interior.js';
32
+ export { COVER_SCALE, COVER_ZERO, describeInterior, INTERIOR_GROUND, INTERIOR_LEVELS, INTERIOR_SHADERS, InteriorLighting, InteriorLightingResource, interiorPlugin, LINK_X, LINK_Z, ROW_CLEAR, ROW_SCALE, ROW_ZERO, VISIBILITY_MAX, } from './interior-plugin.js';
26
33
  export { observeOriginShifts, shiftRenderHistory } from './large-world.js';
27
- export { AmbientLight, type AmbientLightValue, CascadeSettings, DirectionalLight, LIGHT_FLOATS, LightingSettings, type LightingSettingsValue, type LightRecord, LightStore, Lights, type LuminousPowerPreset, LuminousPowerPresets, lumens, PointLight, SpotLight, } from './lights.js';
34
+ export { GROUND_BANDS, type GroundBand, GroundLayer, RenderLayers } from './layers.js';
35
+ export { clearLensFields, expireLensFields, forwardLensFields, LENS_DEMAND, Lens, type LensField, LensFields, LensPath, MAX_LENS_FIELDS, publishLensField, } from './lens.js';
36
+ export { describeLens, extractLens, LENS_SHADERS, type LensView, LensViews, lensPlugin, MAX_LENS_PIXELS, } from './lens-plugin.js';
37
+ export { AmbientLight, type AmbientLightValue, CascadeSettings, DirectionalLight, extractLights, FALLOFFS, LIGHT_FLOATS, LIGHT_ROW_WORD, LightingSettings, type LightingSettingsValue, type LightRecord, LightStore, Lights, type LuminousPowerPreset, LuminousPowerPresets, lumens, PointLight, SHADOW_UPDATES, SpotLight, setLightRow, tabletopFalloff, } from './lights.js';
28
38
  export { MaterialNoise, type MaterialNoiseSupport } from './material-noise.js';
29
39
  export { registerMaterialModule, typeOrdinal } from './material-pipelines.js';
30
40
  export { allMaterialTypes, BLEND_MODES, type BlendMode, defineMaterial, findMaterialType, isTransparent, type MaterialNoiseSlot, MaterialType, type MaterialTypeOptions, materialModulePath, onMaterialTypeChange, } from './materials.js';
41
+ export { MAX_OUTLINE_STYLES, OUTLINE_OCCLUSION, Outline, OutlinePath, } from './outline.js';
42
+ export { describeOutlines, OUTLINE_SHADERS, type OutlineView, OutlineViews, outlinePlugin, queueOutlines, } from './outline-plugin.js';
31
43
  export { allOverlays, DebugOverlays, type DebugOverlaysValue, defineOverlay, gridsOverlay, isOverlayOn, OVERLAYS, type Overlay, type OverlayDef, type OverlayFilter, overlayNames, setOverlays, } from './overlays.js';
32
44
  export { descendantPaths, entityName, findModelRoot } from './paths.js';
33
- export { type PickBlocker, type PickDrawer, type PickHit, Picking, pick, primaryView, type RaycastOptions, raycast, } from './picking.js';
45
+ export { type PickBlocker, type PickDetail, type PickDetailer, type PickDrawer, type PickHit, Picking, pick, primaryView, type RaycastOptions, raycast, } from './picking.js';
34
46
  export { pickingPlugin } from './picking-plugin.js';
35
47
  export { PixelPerfect, type PixelPerfectLayout, PixelPerfectPath, PixelTargets, pixelPerfectLayout, } from './pixel-perfect.js';
36
48
  export { pixelPerfectPlugin } from './pixel-perfect-plugin.js';
37
- export { captureBuffer, captureView, describeRender, Gpu, GpuDeviceLost, Graph, RenderDescribers, type RenderPluginOptions, RenderSet, renderPlugin, Shaders, Views, Window, } from './plugin.js';
49
+ export { captureBuffer, captureView, describeRender, Gpu, GpuDeviceLost, Graph, RenderDescribers, RenderOptions, type RenderOptionsValue, type RenderPluginOptions, RenderSet, renderOwner, renderPlugin, Shaders, Views, Window, } from './plugin.js';
38
50
  export { TexturePool } from './pool.js';
39
51
  export { ANTIALIASING_MODES, Antialiasing, AutoExposure, Bloom, ColorGrading, cocRadiusPixels, DepthOfField, Fog, METERING_MODES, MotionBlur, PostEffect, type PostSettings, SSAO_QUALITIES, Ssao, Vignette, } from './post.js';
40
52
  export { bloomLevels, describePost, ExposureMeters, type ExposureState, histogramEv, METER_READBACKS, POST_NODES, } from './post-nodes.js';
41
53
  export { postPlugin } from './post-plugin.js';
54
+ export { screenToPlane, screenToRay, worldToScreen } from './projection.js';
42
55
  export { describeRenderScale, RenderScale, type RenderScaleValue, SCALE_STEP, scaledSize, } from './render-scale.js';
56
+ export { clearScreenEffects, describeScreenEffects, expireScreenEffects, forwardScreenEffects, MAX_SCREEN_EFFECT_PARAMS, MAX_SCREEN_EFFECTS, onScreenEffect, publishScreenEffect, runScreenEffects, SCREEN_EFFECTS_DEMAND, type ScreenEffect, type ScreenEffectHandler, ScreenEffectHandlers, type ScreenEffectParams, ScreenEffects, } from './screen-effects.js';
43
57
  export { ENGINE_SHADERS, materialLayout, registerEngineShaders, registerShaders, ViewUniform, viewLayout, } from './shaders.js';
58
+ export { SHADOW_CATCHER_SHADERS, ShadowCatcher, shadowCatcherPlugin } from './shadow-catcher.js';
44
59
  export { Cascades, cascadeSplits, LocalShadows, ShadowsResource, sliceSphere, } from './shadows.js';
45
60
  export { MAX_JOINTS, type SkinAsset, SkinAssetType, Skins, skinArtifact } from './skin-asset.js';
46
61
  export { prepareDeforms } from './skinning.js';
47
62
  export { skinningPlugin } from './skinning-plugin.js';
48
63
  export { forwardPlugin } from './standard.js';
49
- export { GpuMemory, type GpuMemoryData, RenderCounters, type RenderCountersData, RenderStats, type ViewStats, } from './stats.js';
50
- export { OffscreenTarget, type OffscreenTargetOptions, type RenderTarget, WindowTarget, } from './target.js';
64
+ export { type FrameCounts, type FrameRecord, GpuMemory, type GpuMemoryData, RECENT_FRAMES, RenderCounters, type RenderCountersData, RenderStats, RenderStatsMap, type ViewStats, } from './stats.js';
65
+ export { OffscreenTarget, type OffscreenTargetOptions, type RenderTarget, } from './target.js';
66
+ export { bindingDimension, depthReadEntry } from './tier.js';
51
67
  export { GpuTimer } from './timer.js';
52
- export { type CameraData, Cameras, cameraOf, DEFAULT_CURVE, isScaled, RenderPath, shiftCameraHistory, TONEMAP_CURVES, type TonemapCurve, Tonemapping, ViewSettings, type ViewSettingsValue, viewAliases, } from './view.js';
68
+ export { addShaderVariantSource, type MaterialVariantEntry, materialVariants, type ShaderVariantManifest, type ShaderVariantSource, ShaderVariantSources, showToCamera, showVariants, } from './variants.js';
69
+ export { type CameraData, CameraMoved, Cameras, cameraOf, DEFAULT_CURVE, isScaled, RenderPath, shiftCameraHistory, TONEMAP_CURVES, type TonemapCurve, Tonemapping, ViewSettings, type ViewSettingsValue, viewAliases, } from './view.js';
70
+ export { type HiddenSet, HiddenSetsResource, NO_HIDDEN, observeViewVisibilityWithoutPlugin, VIEW_SHADOWS, ViewVisibility, } from './view-visibility.js';
71
+ export { describeViewVisibility, HiddenSets, resolveViewVisibility, viewVisibilityPlugin, } from './view-visibility-plugin.js';
53
72
  export { ComputedVisibility, computeVisibility, Visibility } from './visibility.js';