@woosh/meep-engine 3.60.7 → 3.60.9
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/package.json +1 -1
- package/src/engine/graphics3/AnimationGraphSystem.d.ts +4 -1
- package/src/engine/graphics3/AnimationGraphSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationGraphSystem.js +35 -5
- package/src/engine/graphics3/AnimationSystem.d.ts +1 -1
- package/src/engine/graphics3/AnimationSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationSystem.js +34 -5
- package/src/engine/graphics3/FoliageWindSystem.d.ts +2 -1
- package/src/engine/graphics3/FoliageWindSystem.d.ts.map +1 -1
- package/src/engine/graphics3/FoliageWindSystem.js +50 -3
- package/src/engine/graphics3/GPUFluidSystem.d.ts.map +1 -1
- package/src/engine/graphics3/GPUFluidSystem.js +16 -14
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +2 -2
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.js +84 -32
- package/src/engine/graphics3/LightSystem.d.ts +4 -0
- package/src/engine/graphics3/LightSystem.d.ts.map +1 -1
- package/src/engine/graphics3/LightSystem.js +23 -6
- package/src/engine/graphics3/MeshSkinSystem.d.ts +1 -1
- package/src/engine/graphics3/MeshSkinSystem.d.ts.map +1 -1
- package/src/engine/graphics3/MeshSkinSystem.js +50 -5
- package/src/engine/graphics3/MeshSystem.d.ts +1 -0
- package/src/engine/graphics3/MeshSystem.d.ts.map +1 -1
- package/src/engine/graphics3/MeshSystem.js +22 -8
- package/src/engine/graphics3/ShadedGeometrySystem.d.ts +5 -1
- package/src/engine/graphics3/ShadedGeometrySystem.d.ts.map +1 -1
- package/src/engine/graphics3/ShadedGeometrySystem.js +56 -7
- package/src/engine/graphics3/WaterSystem.d.ts +3 -0
- package/src/engine/graphics3/WaterSystem.d.ts.map +1 -1
- package/src/engine/graphics3/WaterSystem.js +10 -2
- package/src/engine/graphics3/animation/AnimationClipsSink.d.ts +15 -7
- package/src/engine/graphics3/animation/AnimationClipsSink.d.ts.map +1 -1
- package/src/engine/graphics3/animation/AnimationClipsSink.js +42 -8
- package/src/engine/network/state/ReplicationSlotTable.d.ts +9 -5
- package/src/engine/network/state/ReplicationSlotTable.d.ts.map +1 -1
- package/src/engine/network/state/ReplicationSlotTable.js +36 -8
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/generation/markers/GridActionRuleSet.d.ts.map +1 -1
- package/src/generation/markers/GridActionRuleSet.js +12 -3
- package/src/shade/renderer/GraphicsContext.d.ts +8 -0
- package/src/shade/renderer/GraphicsContext.d.ts.map +1 -1
- package/src/shade/renderer/GraphicsContext.js +29 -0
- package/src/shade/renderer/Renderer.d.ts +10 -0
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +22 -2
- package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +6 -6
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
- package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +1 -1
- package/src/shade/renderer/light/GPULightCollection.d.ts +3 -1
- package/src/shade/renderer/light/GPULightCollection.d.ts.map +1 -1
- package/src/shade/renderer/light/GPULightCollection.js +34 -9
- package/src/shade/renderer/light/LightCollection.d.ts +13 -3
- package/src/shade/renderer/light/LightCollection.d.ts.map +1 -1
- package/src/shade/renderer/light/LightCollection.js +19 -3
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.d.ts +22 -0
- package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.js +30 -0
- package/src/shade/renderer/material/dispatch/GPUMaterialComputeDispatch.d.ts +75 -0
- package/src/shade/renderer/material/dispatch/GPUMaterialComputeDispatch.d.ts.map +1 -0
- package/src/shade/renderer/material/dispatch/GPUMaterialComputeDispatch.js +338 -0
- package/src/shade/renderer/material/dispatch/MATERIAL_DISPATCH_CONSTANTS.d.ts +50 -0
- package/src/shade/renderer/material/dispatch/MATERIAL_DISPATCH_CONSTANTS.d.ts.map +1 -0
- package/src/shade/renderer/material/dispatch/MATERIAL_DISPATCH_CONSTANTS.js +54 -0
- package/src/shade/renderer/material/dispatch/MaterialDispatch.d.ts +37 -0
- package/src/shade/renderer/material/dispatch/MaterialDispatch.d.ts.map +1 -0
- package/src/shade/renderer/material/dispatch/MaterialDispatch.js +31 -0
- package/src/shade/renderer/material/dispatch/MaterialDispatchRecords.d.ts +42 -0
- package/src/shade/renderer/material/dispatch/MaterialDispatchRecords.d.ts.map +1 -0
- package/src/shade/renderer/material/dispatch/MaterialDispatchRecords.js +132 -0
- package/src/shade/renderer/material/dispatch/chunk_material_mesh_key.d.ts +21 -0
- package/src/shade/renderer/material/dispatch/chunk_material_mesh_key.d.ts.map +1 -0
- package/src/shade/renderer/material/dispatch/chunk_material_mesh_key.js +46 -0
- package/src/shade/renderer/material/dispatch/chunk_material_quad_keys.d.ts +20 -0
- package/src/shade/renderer/material/dispatch/chunk_material_quad_keys.d.ts.map +1 -0
- package/src/shade/renderer/material/dispatch/chunk_material_quad_keys.js +111 -0
- package/src/shade/renderer/material/dispatch/chunk_material_quad_pack.d.ts +18 -0
- package/src/shade/renderer/material/dispatch/chunk_material_quad_pack.d.ts.map +1 -0
- package/src/shade/renderer/material/dispatch/chunk_material_quad_pack.js +33 -0
- package/src/shade/renderer/material/dispatch/gbuffer_compute.d.ts +116 -0
- package/src/shade/renderer/material/dispatch/gbuffer_compute.d.ts.map +1 -0
- package/src/shade/renderer/material/dispatch/gbuffer_compute.js +249 -0
- package/src/shade/renderer/material/dispatch/graph_material_dispatch_compute.d.ts +56 -0
- package/src/shade/renderer/material/dispatch/graph_material_dispatch_compute.d.ts.map +1 -0
- package/src/shade/renderer/material/dispatch/graph_material_dispatch_compute.js +315 -0
- package/src/shade/renderer/material/dispatch/shader_material_dispatch_commands.d.ts +16 -0
- package/src/shade/renderer/material/dispatch/shader_material_dispatch_commands.d.ts.map +1 -0
- package/src/shade/renderer/material/dispatch/shader_material_dispatch_commands.js +83 -0
- package/src/shade/renderer/material/dispatch/shader_material_pixel_count.d.ts +22 -0
- package/src/shade/renderer/material/dispatch/shader_material_pixel_count.d.ts.map +1 -0
- package/src/shade/renderer/material/dispatch/shader_material_pixel_count.js +133 -0
- package/src/shade/renderer/material/dispatch/shader_material_pixel_scatter.d.ts +14 -0
- package/src/shade/renderer/material/dispatch/shader_material_pixel_scatter.d.ts.map +1 -0
- package/src/shade/renderer/material/dispatch/shader_material_pixel_scatter.js +98 -0
- package/src/shade/renderer/material/standard/VT_MATERIAL_TEMPLATE.d.ts +1 -0
- package/src/shade/renderer/material/standard/VT_MATERIAL_TEMPLATE.d.ts.map +1 -1
- package/src/shade/renderer/material/standard/VT_MATERIAL_TEMPLATE.js +11 -0
- package/src/shade/renderer/material/standard/fragment_gbuffer.d.ts +41 -6
- package/src/shade/renderer/material/standard/fragment_gbuffer.d.ts.map +1 -1
- package/src/shade/renderer/material/standard/fragment_gbuffer.js +88 -29
- package/src/shade/renderer/material/template/ShadeMaterialTemplate.d.ts +13 -1
- package/src/shade/renderer/material/template/ShadeMaterialTemplate.d.ts.map +1 -1
- package/src/shade/renderer/material/template/ShadeMaterialTemplate.js +18 -1
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +6 -0
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +17 -7
- package/src/shade/renderer/scene/Scene.d.ts +4 -3
- package/src/shade/renderer/scene/Scene.d.ts.map +1 -1
- package/src/shade/renderer/scene/Scene.js +54 -53
- package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts +16 -0
- package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
- package/src/shade/renderer/scene/rows/GPUSceneRows.js +34 -0
- package/src/shade/renderer/shader/chunk/geometry/normal/chunk_anti_alias_roughness_kaplanyan.d.ts +19 -0
- package/src/shade/renderer/shader/chunk/geometry/normal/chunk_anti_alias_roughness_kaplanyan.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/normal/chunk_anti_alias_roughness_kaplanyan.js +55 -20
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_keyed_append.d.ts +31 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_keyed_append.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_keyed_append.js +77 -0
- package/src/shade/renderer/texture/virtual/VirtualTextureManager.d.ts +6 -0
- package/src/shade/renderer/texture/virtual/VirtualTextureManager.d.ts.map +1 -1
- package/src/shade/renderer/texture/virtual/VirtualTextureManager.js +15 -1
- package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
package/src/shade/renderer/shader/chunk/geometry/normal/chunk_anti_alias_roughness_kaplanyan.js
CHANGED
|
@@ -1,45 +1,80 @@
|
|
|
1
1
|
import { CodeChunk } from "../../../compiler/CodeChunk.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
+
* Kaplanyan's roughness filtering, given the screen-space footprint of the plane-plane half vector
|
|
5
|
+
* rather than taking it — so a stage without implicit derivatives can hand in its own.
|
|
6
|
+
*
|
|
7
|
+
* ```wgsl
|
|
8
|
+
* fn kaplanyan_plane_half_vector(normal: vec3<f32>, tangent: vec3<f32>, bitangent: vec3<f32>) -> vec2<f32>
|
|
9
|
+
* fn anti_alias_roughness_kaplanyan_footprint(roughness: f32, footprint_bounding_box: vec2<f32>) -> f32
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* `footprint_bounding_box` is `fwidth` of the half vector, as {@link chunk_anti_alias_roughness_kaplanyan}
|
|
13
|
+
* takes it.
|
|
14
|
+
*
|
|
4
15
|
* @param sigma screen space variance
|
|
5
16
|
* @param Kappa clamping treshold
|
|
6
17
|
* @see "Filtering Distributions of Normals for Shading Antialiasing" by A.S. Kaplanyan et al (NVIDIA) 2016, Eurographics Proceedings
|
|
7
18
|
* @see https://github.com/tksuoran/erhe/blob/57734a5ae170aa2a50c3068fe19ffc3a667c52d0/src/editor/res/shaders/circular_brushed_metal.frag#L53
|
|
8
19
|
* @type {CodeChunk}
|
|
9
20
|
*/
|
|
10
|
-
export const
|
|
21
|
+
export const chunk_anti_alias_roughness_kaplanyan_footprint = CodeChunk.from(
|
|
11
22
|
//language=WGSL
|
|
12
23
|
`
|
|
13
|
-
fn
|
|
14
|
-
|
|
15
|
-
normal:vec3<f32>,
|
|
24
|
+
fn kaplanyan_plane_half_vector(
|
|
25
|
+
normal:vec3<f32>,
|
|
16
26
|
tangent: vec3<f32>,
|
|
17
27
|
bitangent: vec3<f32>
|
|
28
|
+
) -> vec2<f32> {
|
|
29
|
+
// Compute plane-plane half vector (hpp)
|
|
30
|
+
let hpp_ws = normal; // assume normal
|
|
31
|
+
|
|
32
|
+
return vec2(dot(hpp_ws, tangent), dot(hpp_ws, bitangent));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
fn anti_alias_roughness_kaplanyan_footprint (
|
|
36
|
+
roughness:f32,
|
|
37
|
+
footprint_bounding_box: vec2<f32>
|
|
18
38
|
) -> f32{
|
|
19
|
-
|
|
39
|
+
|
|
20
40
|
const sigma = 0.50;
|
|
21
41
|
const Kappa = 0.18;
|
|
22
|
-
|
|
42
|
+
|
|
23
43
|
const sigma2 = sigma * sigma;
|
|
24
|
-
|
|
25
|
-
// Compute plane-plane half vector (hpp)
|
|
26
|
-
let hpp_ws = normal; // assume normal
|
|
27
|
-
|
|
28
|
-
let hpp = vec2(dot(hpp_ws, tangent), dot(hpp_ws, bitangent));
|
|
29
|
-
|
|
30
|
-
// compute filtering region
|
|
31
|
-
// Use ddx/ddy, thanks to quad shading!
|
|
32
|
-
let footprint_bounding_box = fwidth(hpp);
|
|
33
|
-
|
|
44
|
+
|
|
34
45
|
let max_footprint = clamp( max(footprint_bounding_box.x , footprint_bounding_box.y), 1e-3, 0.3);
|
|
35
|
-
|
|
46
|
+
|
|
36
47
|
let variance = sigma2 * max_footprint * max_footprint;
|
|
37
|
-
|
|
48
|
+
|
|
38
49
|
let kernel_roughness = min( Kappa, variance * 2.0 );
|
|
39
|
-
|
|
50
|
+
|
|
40
51
|
// Beckmann proxy convolution (for GGX)
|
|
41
|
-
let filtered_roughness = sqrt(roughness * roughness + kernel_roughness);
|
|
52
|
+
let filtered_roughness = sqrt(roughness * roughness + kernel_roughness);
|
|
42
53
|
|
|
43
54
|
return filtered_roughness;
|
|
44
55
|
}`);
|
|
45
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Kaplanyan's roughness filtering with the footprint from the fragment's own `fwidth` — fragment
|
|
59
|
+
* stage only.
|
|
60
|
+
*
|
|
61
|
+
* @see chunk_anti_alias_roughness_kaplanyan_footprint
|
|
62
|
+
* @type {CodeChunk}
|
|
63
|
+
*/
|
|
64
|
+
export const chunk_anti_alias_roughness_kaplanyan = CodeChunk.from(
|
|
65
|
+
//language=WGSL
|
|
66
|
+
`
|
|
67
|
+
fn anti_alias_roughness_kaplanyan (
|
|
68
|
+
roughness:f32,
|
|
69
|
+
normal:vec3<f32>,
|
|
70
|
+
tangent: vec3<f32>,
|
|
71
|
+
bitangent: vec3<f32>
|
|
72
|
+
) -> f32{
|
|
73
|
+
let hpp = kaplanyan_plane_half_vector(normal, tangent, bitangent);
|
|
74
|
+
|
|
75
|
+
// compute filtering region
|
|
76
|
+
// Use ddx/ddy, thanks to quad shading!
|
|
77
|
+
return anti_alias_roughness_kaplanyan_footprint(roughness, fwidth(hpp));
|
|
78
|
+
}`, [
|
|
79
|
+
chunk_anti_alias_roughness_kaplanyan_footprint,
|
|
80
|
+
]);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The key {@link chunk_subgroup_keyed_append} skips, and the place it hands a lane that holds no key.
|
|
3
|
+
*
|
|
4
|
+
* @type {number}
|
|
5
|
+
*/
|
|
6
|
+
export const SUBGROUP_KEYED_APPEND_NONE: number;
|
|
7
|
+
/**
|
|
8
|
+
* Count each lane into `counters[key]`, one atomic per distinct key the subgroup holds: the
|
|
9
|
+
* subgroup takes its smallest outstanding key, the lanes holding it count themselves in, the first
|
|
10
|
+
* of them adds that many with one `atomicAdd`, and the round repeats until no key is left. Each
|
|
11
|
+
* lane comes away with its place among everything counted into its key — the counter's value
|
|
12
|
+
* before the round, plus its rank among the round's lanes.
|
|
13
|
+
*
|
|
14
|
+
* `fn subgroup_keyed_append(counters: ptr<storage, array<atomic<u32>>, read_write>, key: u32) -> u32`
|
|
15
|
+
*
|
|
16
|
+
* A lane with key {@link SUBGROUP_KEYED_APPEND_NONE} counts into nothing and gets that word back.
|
|
17
|
+
* Every lane of the subgroup calls it, from subgroup-uniform control flow.
|
|
18
|
+
*
|
|
19
|
+
* A subgroup runs one round per distinct key it holds, so the loop is bounded by its lane count.
|
|
20
|
+
* Keys that follow the screen — a material per pixel, read a block of pixels per subgroup — come in
|
|
21
|
+
* runs, and a subgroup ordinarily holds one or two.
|
|
22
|
+
*
|
|
23
|
+
* The order of places across subgroups is whatever order their atomics land in.
|
|
24
|
+
* Nothing here assumes how subgroups map onto `local_invocation_index`.
|
|
25
|
+
*
|
|
26
|
+
* @see chunk_subgroup_append_slot for one counter
|
|
27
|
+
* @type {CodeChunk}
|
|
28
|
+
*/
|
|
29
|
+
export const chunk_subgroup_keyed_append: CodeChunk;
|
|
30
|
+
import { CodeChunk } from "../../compiler/CodeChunk.js";
|
|
31
|
+
//# sourceMappingURL=chunk_subgroup_keyed_append.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_subgroup_keyed_append.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_keyed_append.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,yCAFU,MAAM,CAEqC;AAErD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,0CAFU,SAAS,CA2ChB;0BAxEuB,6BAA6B"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { UINT32_MAX } from "../../../../../core/binary/UINT32_MAX.js";
|
|
2
|
+
import { WebGPUExtensionType } from "../../../../descriptor/WebGPUExtensionType.js";
|
|
3
|
+
import { CodeChunk } from "../../compiler/CodeChunk.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The key {@link chunk_subgroup_keyed_append} skips, and the place it hands a lane that holds no key.
|
|
7
|
+
*
|
|
8
|
+
* @type {number}
|
|
9
|
+
*/
|
|
10
|
+
export const SUBGROUP_KEYED_APPEND_NONE = UINT32_MAX;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Count each lane into `counters[key]`, one atomic per distinct key the subgroup holds: the
|
|
14
|
+
* subgroup takes its smallest outstanding key, the lanes holding it count themselves in, the first
|
|
15
|
+
* of them adds that many with one `atomicAdd`, and the round repeats until no key is left. Each
|
|
16
|
+
* lane comes away with its place among everything counted into its key — the counter's value
|
|
17
|
+
* before the round, plus its rank among the round's lanes.
|
|
18
|
+
*
|
|
19
|
+
* `fn subgroup_keyed_append(counters: ptr<storage, array<atomic<u32>>, read_write>, key: u32) -> u32`
|
|
20
|
+
*
|
|
21
|
+
* A lane with key {@link SUBGROUP_KEYED_APPEND_NONE} counts into nothing and gets that word back.
|
|
22
|
+
* Every lane of the subgroup calls it, from subgroup-uniform control flow.
|
|
23
|
+
*
|
|
24
|
+
* A subgroup runs one round per distinct key it holds, so the loop is bounded by its lane count.
|
|
25
|
+
* Keys that follow the screen — a material per pixel, read a block of pixels per subgroup — come in
|
|
26
|
+
* runs, and a subgroup ordinarily holds one or two.
|
|
27
|
+
*
|
|
28
|
+
* The order of places across subgroups is whatever order their atomics land in.
|
|
29
|
+
* Nothing here assumes how subgroups map onto `local_invocation_index`.
|
|
30
|
+
*
|
|
31
|
+
* @see chunk_subgroup_append_slot for one counter
|
|
32
|
+
* @type {CodeChunk}
|
|
33
|
+
*/
|
|
34
|
+
export const chunk_subgroup_keyed_append = CodeChunk.from(
|
|
35
|
+
//language=WGSL
|
|
36
|
+
`
|
|
37
|
+
// the trip count is uniform across the subgroup by construction: every lane sees the same minimum
|
|
38
|
+
@diagnostic(off, subgroup_uniformity)
|
|
39
|
+
fn subgroup_keyed_append(counters: ptr<storage, array<atomic<u32>>, read_write>, key: u32) -> u32 {
|
|
40
|
+
const NONE = ${SUBGROUP_KEYED_APPEND_NONE}u;
|
|
41
|
+
|
|
42
|
+
var outstanding = key;
|
|
43
|
+
var place = NONE;
|
|
44
|
+
|
|
45
|
+
loop {
|
|
46
|
+
let round_key = subgroupMin(outstanding);
|
|
47
|
+
|
|
48
|
+
if (round_key == NONE) {
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
let in_round = outstanding == round_key;
|
|
53
|
+
let one = select(0u, 1u, in_round);
|
|
54
|
+
|
|
55
|
+
let rank = subgroupExclusiveAdd(one);
|
|
56
|
+
let total = subgroupAdd(one);
|
|
57
|
+
|
|
58
|
+
var base = 0u;
|
|
59
|
+
|
|
60
|
+
if (in_round && rank == 0u) {
|
|
61
|
+
base = atomicAdd(&counters[round_key], total);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// only the adding lane holds anything but 0
|
|
65
|
+
base = subgroupAdd(base);
|
|
66
|
+
|
|
67
|
+
if (in_round) {
|
|
68
|
+
place = base + rank;
|
|
69
|
+
outstanding = NONE;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return place;
|
|
74
|
+
}
|
|
75
|
+
`);
|
|
76
|
+
|
|
77
|
+
chunk_subgroup_keyed_append.addExtension(WebGPUExtensionType.Subgroups);
|
|
@@ -83,6 +83,12 @@ export class VirtualTextureManager {
|
|
|
83
83
|
* @returns {RenderPipelineDescriptor}
|
|
84
84
|
*/
|
|
85
85
|
get material_pipeline_descriptor(): import("../../../descriptor/pipeline/render/RenderPipelineDescriptor.js").RenderPipelineDescriptor;
|
|
86
|
+
/**
|
|
87
|
+
* The surface function of the virtual-texture material variant for this manager's cache
|
|
88
|
+
* geometry — the one {@link material_pipeline_descriptor} is built around.
|
|
89
|
+
* @returns {CodeChunk}
|
|
90
|
+
*/
|
|
91
|
+
get material_surface(): import("../../shader/compiler/CodeChunk.js").CodeChunk;
|
|
86
92
|
/**
|
|
87
93
|
* Register a stack (idempotent per stack — shared stacks ref-count).
|
|
88
94
|
* Allocates the page-table region, publishes the info row, and pins the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualTextureManager.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/texture/virtual/VirtualTextureManager.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VirtualTextureManager.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/texture/virtual/VirtualTextureManager.js"],"names":[],"mappings":"AAmHA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IA4KI;;;OAGG;IACH,+BAIC;IAvBD;;OAEG;IACH;;;;;;;;;;MAUE;IAYF;;;OAGG;IACH,8BAIC;IAED;;OAEG;IACH,sBAEC;IAED;;OAEG;IACH,kBAEC;IAED;;;OAGG;IACH,2EAIC;IAED;;OAEG;IACH,qCAIC;IAED;;OAEG;IACH,mCAIC;IAED;;OAEG;IACH,6BAIC;IAED;;OAEG;IACH,sCAIC;IAED;;OAEG;IACH,gCAIC;IAED;;;;OAIG;IACH,uIAQC;IAED;;;;OAIG;IACH,+EAIC;IA8DD;;;;;;;OAOG;IACH,sBAHW,mBAAmB,GACjB,MAAM,CA6FlB;IAED;;;;;OAKG;IACH,wBAFW,mBAAmB,QAgF7B;IA8ED;;;;;;;;;OASG;IACH,wBAFW,WAAW,QAoFrB;IA8KD;;;;;;OAMG;IACH,wBAqBC;IAED;;;OAGG;IACH,eAkHC;IAID;;;;;;;;;;;;OAYG;IACH;QAN4B,KAAK,EAAtB,UAAU;QACW,IAAI,EAAzB,cAAc;QACD,gBAAgB,EAA7B,MAAM;QACO,oBAAoB,EAAjC,MAAM;QACU,wBAAwB;aA6FlD;IAED,gBA8BC;;CACJ;yBAvvCY,OAAO,8DAA8D,EAAE,UAAU;uCACjF,OAAO,iEAAiE,EAAE,wBAAwB;wBAClG,OAAO,oCAAoC,EAAE,SAAS;6BACtD,OAAO,8BAA8B,EAAE,cAAc;kCACrD,OAAO,0BAA0B,EAAE,mBAAmB;gCAPnC,sBAAsB"}
|
|
@@ -3,7 +3,10 @@ import { isPowerOfTwo } from "../../../../core/math/isPowerOfTwo.js";
|
|
|
3
3
|
import { write_gpu_typed_buffer } from "../../shader/type/serde/write_gpu_typed_buffer.js";
|
|
4
4
|
import { BufferResourceDescriptor } from "../../../device/graph/BufferResourceDescriptor.js";
|
|
5
5
|
import { graph_read_buffer } from "../../buffer/graph_read_buffer.js";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
build_chunk_vt_material_surface,
|
|
8
|
+
build_vt_material_pipeline_descriptor
|
|
9
|
+
} from "../../material/standard/fragment_gbuffer_vt.js";
|
|
7
10
|
import { build_chunk_vt_lookup } from "./build_chunk_vt_lookup.js";
|
|
8
11
|
import { build_shader_vt_feedback, VT_FEEDBACK_WORKGROUP_SIZE } from "./build_shader_vt_feedback.js";
|
|
9
12
|
import {
|
|
@@ -407,6 +410,17 @@ export class VirtualTextureManager {
|
|
|
407
410
|
return this.#material_pipeline_descriptor;
|
|
408
411
|
}
|
|
409
412
|
|
|
413
|
+
/**
|
|
414
|
+
* The surface function of the virtual-texture material variant for this manager's cache
|
|
415
|
+
* geometry — the one {@link material_pipeline_descriptor} is built around.
|
|
416
|
+
* @returns {CodeChunk}
|
|
417
|
+
*/
|
|
418
|
+
get material_surface() {
|
|
419
|
+
this.#ensure_initialized();
|
|
420
|
+
|
|
421
|
+
return build_chunk_vt_material_surface(this.#chunk_lookup);
|
|
422
|
+
}
|
|
423
|
+
|
|
410
424
|
#ensure_initialized() {
|
|
411
425
|
if (this.#initialized) {
|
|
412
426
|
return;
|
|
@@ -24,7 +24,7 @@ export class GPUWaterQueries {
|
|
|
24
24
|
* @param {PipelineEnquiry} enquiry
|
|
25
25
|
*/
|
|
26
26
|
static enquirePipelines(enquiry: PipelineEnquiry): void;
|
|
27
|
-
static "__#
|
|
27
|
+
static "__#279@#execute"(pass: any, resources: any, context: any): void;
|
|
28
28
|
/**
|
|
29
29
|
* @param {object} options
|
|
30
30
|
* @param {GPUDevice} options.device
|