@aethervtt/shard-render 0.0.1 → 0.2.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.
- package/dist/ablation.d.ts +74 -0
- package/dist/ablation.js +117 -0
- package/dist/assets.d.ts +3 -0
- package/dist/assets.js +43 -2
- package/dist/atmosphere-nodes.d.ts +9 -0
- package/dist/atmosphere-nodes.js +157 -30
- package/dist/atmosphere-plugin.js +8 -2
- package/dist/atmosphere-shaders.js +17 -5
- package/dist/baseline/atmosphere.d.ts +16 -0
- package/dist/baseline/atmosphere.js +301 -0
- package/dist/baseline/data-texture.d.ts +36 -0
- package/dist/baseline/data-texture.js +181 -0
- package/dist/baseline/environment.d.ts +14 -0
- package/dist/baseline/environment.js +368 -0
- package/dist/baseline/exposure.d.ts +25 -0
- package/dist/baseline/exposure.js +133 -0
- package/dist/baseline/lights.d.ts +33 -0
- package/dist/baseline/lights.js +133 -0
- package/dist/baseline/textures.d.ts +97 -0
- package/dist/baseline/textures.js +203 -0
- package/dist/camera.d.ts +2 -0
- package/dist/camera.js +4 -0
- package/dist/crowd.d.ts +21 -0
- package/dist/crowd.js +121 -0
- package/dist/culling-shaders.js +21 -2
- package/dist/culling.d.ts +11 -2
- package/dist/culling.js +44 -18
- package/dist/cutaway-plugin.d.ts +48 -0
- package/dist/cutaway-plugin.js +364 -0
- package/dist/cutaway.d.ts +27 -0
- package/dist/cutaway.js +49 -0
- package/dist/data-store.d.ts +69 -0
- package/dist/data-store.js +105 -0
- package/dist/debug-shaders.js +17 -3
- package/dist/debug-views.js +4 -2
- package/dist/decals-plugin.d.ts +5 -0
- package/dist/decals-plugin.js +54 -0
- package/dist/decals.d.ts +69 -0
- package/dist/decals.js +326 -0
- package/dist/deferred-shaders.js +2 -0
- package/dist/deferred.js +28 -4
- package/dist/deform.d.ts +5 -4
- package/dist/deform.js +4 -9
- package/dist/describe-plugin.d.ts +4 -2
- package/dist/describe-plugin.js +75 -3
- package/dist/display-nodes.js +37 -13
- package/dist/dynamic-resolution.d.ts +2 -0
- package/dist/dynamic-resolution.js +6 -1
- package/dist/environment-plugin.js +17 -2
- package/dist/environment-state.d.ts +7 -3
- package/dist/environment-state.js +20 -9
- package/dist/environment.js +7 -1
- package/dist/features.d.ts +49 -0
- package/dist/features.js +106 -0
- package/dist/foliage-budget.d.ts +64 -0
- package/dist/foliage-budget.js +108 -0
- package/dist/foliage-path.d.ts +19 -0
- package/dist/foliage-path.js +7 -0
- package/dist/foliage-shaders.d.ts +11 -0
- package/dist/foliage-shaders.js +504 -0
- package/dist/foliage.d.ts +194 -0
- package/dist/foliage.js +1027 -0
- package/dist/forward.d.ts +38 -2
- package/dist/forward.js +608 -186
- package/dist/fxaa.js +12 -2
- package/dist/gizmos-plugin.js +7 -0
- package/dist/gizmos.d.ts +3 -3
- package/dist/gizmos.js +11 -13
- package/dist/gpu-assets.d.ts +58 -4
- package/dist/gpu-assets.js +191 -8
- package/dist/graph.d.ts +45 -0
- package/dist/graph.js +169 -19
- package/dist/health.d.ts +58 -0
- package/dist/health.js +112 -0
- package/dist/index.d.ts +40 -11
- package/dist/index.js +343 -9
- package/dist/instances.d.ts +119 -8
- package/dist/instances.js +387 -78
- package/dist/interior-plugin.d.ts +121 -0
- package/dist/interior-plugin.js +465 -0
- package/dist/interior.d.ts +24 -0
- package/dist/interior.js +13 -0
- package/dist/layers.d.ts +35 -0
- package/dist/layers.js +49 -0
- package/dist/lens-plugin.d.ts +43 -0
- package/dist/lens-plugin.js +304 -0
- package/dist/lens.d.ts +41 -0
- package/dist/lens.js +99 -0
- package/dist/lights.d.ts +50 -5
- package/dist/lights.js +101 -22
- package/dist/material-pipelines.d.ts +37 -4
- package/dist/material-pipelines.js +102 -5
- package/dist/materials.d.ts +23 -0
- package/dist/materials.js +44 -1
- package/dist/outline-plugin.d.ts +48 -0
- package/dist/outline-plugin.js +529 -0
- package/dist/outline.d.ts +15 -0
- package/dist/outline.js +42 -0
- package/dist/overlay-registry.d.ts +3 -1
- package/dist/overlay-registry.js +3 -1
- package/dist/overlays.js +6 -2
- package/dist/perf-overlay.d.ts +9 -0
- package/dist/perf-overlay.js +125 -0
- package/dist/picking.d.ts +17 -0
- package/dist/picking.js +40 -11
- package/dist/pixel-perfect-plugin.js +10 -2
- package/dist/plugin.d.ts +69 -7
- package/dist/plugin.js +223 -25
- package/dist/post-common.d.ts +22 -2
- package/dist/post-common.js +82 -2
- package/dist/post-nodes.d.ts +7 -1
- package/dist/post-nodes.js +235 -111
- package/dist/post-plugin.js +5 -3
- package/dist/post-scene.d.ts +130 -0
- package/dist/post-scene.js +164 -0
- package/dist/post-shaders.js +85 -62
- package/dist/post.js +11 -1
- package/dist/projection.d.ts +24 -0
- package/dist/projection.js +87 -0
- package/dist/readback.d.ts +1 -0
- package/dist/readback.js +1 -0
- package/dist/render-scale.js +1 -0
- package/dist/ribbons-plugin.d.ts +5 -0
- package/dist/ribbons-plugin.js +59 -0
- package/dist/ribbons.d.ts +44 -0
- package/dist/ribbons.js +288 -0
- package/dist/scenario.d.ts +70 -0
- package/dist/scenario.js +125 -0
- package/dist/screen-effects.d.ts +97 -0
- package/dist/screen-effects.js +192 -0
- package/dist/shaders.d.ts +13 -0
- package/dist/shaders.js +189 -34
- package/dist/shadow-catcher.d.ts +9 -0
- package/dist/shadow-catcher.js +133 -0
- package/dist/shadows.d.ts +27 -2
- package/dist/shadows.js +100 -20
- package/dist/standard-fields.d.ts +1 -0
- package/dist/standard-fields.js +5 -0
- package/dist/standard.js +18 -0
- package/dist/stats.d.ts +45 -1
- package/dist/stats.js +91 -3
- package/dist/surface-model.d.ts +57 -0
- package/dist/surface-model.js +289 -0
- package/dist/surface-shaders.d.ts +3 -0
- package/dist/surface-shaders.js +160 -0
- package/dist/surface.d.ts +40 -0
- package/dist/surface.js +86 -0
- package/dist/target.d.ts +1 -13
- package/dist/target.js +1 -26
- package/dist/testing.d.ts +11 -0
- package/dist/testing.js +39 -1
- package/dist/tier.d.ts +13 -0
- package/dist/tier.js +14 -0
- package/dist/timer.d.ts +18 -1
- package/dist/timer.js +73 -20
- package/dist/variants.d.ts +37 -0
- package/dist/variants.js +104 -0
- package/dist/vfx-draw.d.ts +37 -0
- package/dist/vfx-draw.js +291 -0
- package/dist/vfx-state.d.ts +42 -0
- package/dist/vfx-state.js +81 -0
- package/dist/vfx.d.ts +69 -0
- package/dist/vfx.js +103 -0
- package/dist/view-visibility-plugin.d.ts +61 -0
- package/dist/view-visibility-plugin.js +267 -0
- package/dist/view-visibility.d.ts +28 -0
- package/dist/view-visibility.js +46 -0
- package/dist/view.d.ts +29 -1
- package/dist/view.js +57 -34
- package/package.json +23 -11
package/dist/forward.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type World } from '@aethervtt/shard-core';
|
|
2
2
|
import { GpuBuffer, type GpuContext } from '@aethervtt/shard-gpu';
|
|
3
3
|
import { type Plugin } from '@aethervtt/shard-runtime';
|
|
4
|
+
import type { BaselineViewLights } from './baseline/lights.js';
|
|
4
5
|
import { ClusterBuffers, ViewLightList } from './clusters.js';
|
|
6
|
+
import { DataStore } from './data-store.js';
|
|
5
7
|
import { type ColorAttachment, type NodeContext, type RenderView } from './graph.js';
|
|
6
8
|
import { type DrawList, Mesh3d, MeshMaterial } from './instances.js';
|
|
7
9
|
import { MaterialPipelines } from './material-pipelines.js';
|
|
@@ -15,8 +17,12 @@ export interface ViewGpu {
|
|
|
15
17
|
/** This frame's SSAO texture, when the camera has Ssao. */
|
|
16
18
|
ao: GPUTexture | undefined;
|
|
17
19
|
lightList: ViewLightList;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
/** GPU clustering's buffers (full tier). */
|
|
21
|
+
clusters: ClusterBuffers | undefined;
|
|
22
|
+
/** Packed lights and cluster bits, binned on the CPU (baseline, 0064). */
|
|
23
|
+
baseline: BaselineViewLights | undefined;
|
|
24
|
+
/** Shadow cascades, spot and point matrices: `@data(uniform)`. */
|
|
25
|
+
shadowData: DataStore;
|
|
20
26
|
cascades: Cascades;
|
|
21
27
|
bindGroup: GPUBindGroup | undefined;
|
|
22
28
|
bound: string;
|
|
@@ -24,7 +30,11 @@ export interface ViewGpu {
|
|
|
24
30
|
clusterBound: string;
|
|
25
31
|
}
|
|
26
32
|
interface Layouts {
|
|
33
|
+
/** Group 0 as this frame binds it: `viewBase`, or with the interior bindings (0069) while on. */
|
|
27
34
|
view: GPUBindGroupLayout;
|
|
35
|
+
viewBase: GPUBindGroupLayout;
|
|
36
|
+
/** Made on first use: few apps turn interior lighting on. */
|
|
37
|
+
viewInterior: GPUBindGroupLayout | undefined;
|
|
28
38
|
pipeline: GPUPipelineLayout;
|
|
29
39
|
cluster: GPUBindGroupLayout;
|
|
30
40
|
clusterPipeline: GPUPipelineLayout;
|
|
@@ -58,13 +68,30 @@ export interface ForwardState {
|
|
|
58
68
|
globals: GpuBuffer;
|
|
59
69
|
globalsData: Float32Array;
|
|
60
70
|
pipelines: MaterialPipelines;
|
|
71
|
+
/** The baseline tier's strategies (0064), loaded only on a baseline device. */
|
|
72
|
+
baseline: typeof import('./baseline/lights.js') | undefined;
|
|
61
73
|
/** G-buffer color targets (the emissive format depends on the device). */
|
|
62
74
|
gbufferTargets: GPUColorTargetState[];
|
|
63
75
|
/** Whether GPU culling ran this frame (the cull node reads it). */
|
|
64
76
|
cullerActive: boolean;
|
|
77
|
+
/** Interior lighting's mode this frame (0069): INTERIOR_SKY | INTERIOR_BLOCKED, or 0. */
|
|
78
|
+
interiorMode: number;
|
|
65
79
|
}
|
|
66
80
|
export declare const ForwardStateResource: import("@aethervtt/shard-core").ResourceDef<ForwardState>;
|
|
81
|
+
export declare const forwardQueue: import("@aethervtt/shard-core").SystemDef<undefined>;
|
|
82
|
+
/** `ViewUniform.pixelScale` for a camera: see the field. */
|
|
83
|
+
export declare function viewPixelScale(cam: CameraData, out: Float32Array): Float32Array;
|
|
67
84
|
export declare const upload: import("@aethervtt/shard-core").SystemDef<undefined>;
|
|
85
|
+
export declare const VERTEX_BUFFERS: GPUVertexBufferLayout[];
|
|
86
|
+
/** Interior lighting's defines (0069) by mode: sky visibility (1), wall-blocked lights (2). */
|
|
87
|
+
export declare const INTERIOR_DEFINES: readonly [undefined, {
|
|
88
|
+
readonly SKY_VISIBILITY: true;
|
|
89
|
+
}, {
|
|
90
|
+
readonly BLOCKED_LIGHTS: true;
|
|
91
|
+
}, {
|
|
92
|
+
readonly SKY_VISIBILITY: true;
|
|
93
|
+
readonly BLOCKED_LIGHTS: true;
|
|
94
|
+
}];
|
|
68
95
|
export declare const PASS_OPAQUE = 0;
|
|
69
96
|
export declare const PASS_TRANSPARENT = 1;
|
|
70
97
|
export declare const PASS_GBUFFER = 3;
|
|
@@ -72,6 +99,15 @@ export declare const PASS_GBUFFER = 3;
|
|
|
72
99
|
export declare const PASS_PREPASS = 5;
|
|
73
100
|
/** Entity ids, normals, and depth for GPU picking (picking.ts). */
|
|
74
101
|
export declare const PASS_PICK = 7;
|
|
102
|
+
/** Ground bands (0057): forward shading, depth tested but not written. */
|
|
103
|
+
export declare const PASS_GROUND = 9;
|
|
104
|
+
/** Picking ground bands: they share their floor's depth, so equal depth passes. */
|
|
105
|
+
export declare const PASS_PICK_GROUND = 11;
|
|
106
|
+
/**
|
|
107
|
+
* Baseline (0064): opaque depth alone, single-sampled, drawn with the prepass's vertex stage. It
|
|
108
|
+
* stands in for resolving multisampled depth, which GLSL ES 3.00 can't read.
|
|
109
|
+
*/
|
|
110
|
+
export declare const PASS_DEPTH = 13;
|
|
75
111
|
/**
|
|
76
112
|
* The picking pass's color targets: entity id, and the world normal with the depth in w (0 where
|
|
77
113
|
* nothing drew). Depth rides in a color target because depth formats only copy out whole.
|