@woosh/meep-engine 3.78.0 → 3.78.1
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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/engine/graphics3/GraphicsEngine.d.ts +19 -1
- package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics3/GraphicsEngine.js +24 -2
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +4 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +36 -2
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +60 -3
- package/src/shade/device/pipeline/ComputePipelineManager.d.ts +8 -0
- package/src/shade/device/pipeline/ComputePipelineManager.d.ts.map +1 -1
- package/src/shade/device/pipeline/ComputePipelineManager.js +18 -0
- package/src/shade/device/pipeline/RenderPipelineManager.d.ts +8 -0
- package/src/shade/device/pipeline/RenderPipelineManager.d.ts.map +1 -1
- package/src/shade/device/pipeline/RenderPipelineManager.js +17 -0
- package/src/shade/playground/avboit_footprint/index.html +20 -0
- package/src/shade/playground/avboit_footprint/main.d.ts +2 -0
- package/src/shade/playground/avboit_footprint/main.d.ts.map +1 -0
- package/src/shade/playground/avboit_footprint/main.js +428 -0
- package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
- package/src/shade/playground/probe_clipmap/main.js +7 -3
- package/src/shade/playground/screen_probes/main.d.ts.map +1 -1
- package/src/shade/playground/screen_probes/main.js +7 -3
- package/src/shade/renderer/Renderer.d.ts +18 -8
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +201 -16
- package/src/shade/renderer/RendererConfiguration.d.ts +95 -0
- package/src/shade/renderer/RendererConfiguration.d.ts.map +1 -0
- package/src/shade/renderer/RendererConfiguration.js +119 -0
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +8 -0
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +34 -0
- package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts +7 -0
- package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.js +15 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +10 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +37 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +6 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +31 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +7 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js +20 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts +8 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.js +14 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.d.ts +7 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.js +13 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts +6 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.js +9 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +11 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +71 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.d.ts +6 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.js +9 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts +6 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.js +9 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/graph_probe_clipmap_want_meshlets.d.ts +6 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/graph_probe_clipmap_want_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/graph_probe_clipmap_want_meshlets.js +13 -0
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +9 -0
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +47 -0
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +6 -0
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +17 -0
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts +8 -0
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
- package/src/shade/renderer/particles/GPUParticleSystem.js +20 -1
- package/src/shade/renderer/particles/bounds/graph_particle_bounds.d.ts +6 -0
- package/src/shade/renderer/particles/bounds/graph_particle_bounds.d.ts.map +1 -1
- package/src/shade/renderer/particles/bounds/graph_particle_bounds.js +11 -1
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts +6 -0
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts.map +1 -1
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.js +15 -0
- package/src/shade/renderer/particles/graph_particles.d.ts +8 -0
- package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles.js +28 -3
- package/src/shade/renderer/particles/graph_particles_avboit.d.ts +7 -0
- package/src/shade/renderer/particles/graph_particles_avboit.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles_avboit.js +14 -0
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.js +5 -7
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts +7 -0
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts.map +1 -1
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.js +15 -0
- package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.d.ts +6 -0
- package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.js +16 -2
- package/src/shade/renderer/path_tracer/accumulating/graph_float32rgba_to_float16rgba.d.ts +6 -0
- package/src/shade/renderer/path_tracer/accumulating/graph_float32rgba_to_float16rgba.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/accumulating/graph_float32rgba_to_float16rgba.js +9 -0
- package/src/shade/renderer/path_tracer/accumulating/graph_flood_fill.d.ts +11 -0
- package/src/shade/renderer/path_tracer/accumulating/graph_flood_fill.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/accumulating/graph_flood_fill.js +10 -0
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts +6 -0
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.js +10 -1
- package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.d.ts +7 -0
- package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.js +21 -0
- package/src/shade/renderer/postprocess/dof/raymarch/DepthOfField.d.ts +7 -0
- package/src/shade/renderer/postprocess/dof/raymarch/DepthOfField.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/dof/raymarch/DepthOfField.js +11 -1
- package/src/shade/renderer/postprocess/dof/raymarch/graph_postprocess_dof.d.ts +9 -0
- package/src/shade/renderer/postprocess/dof/raymarch/graph_postprocess_dof.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/dof/raymarch/graph_postprocess_dof.js +29 -0
- package/src/shade/renderer/postprocess/motion_blur/MotionBlur.d.ts +6 -0
- package/src/shade/renderer/postprocess/motion_blur/MotionBlur.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/motion_blur/MotionBlur.js +13 -1
- package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.d.ts +6 -0
- package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.js +11 -0
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +9 -0
- package/src/shade/renderer/postprocess/nss/NSS.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/NSS.js +33 -18
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts +8 -0
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/SSR.js +42 -2
- package/src/shade/renderer/postprocess/ssr/ssr_graph_denoise_tiles.d.ts +6 -0
- package/src/shade/renderer/postprocess/ssr/ssr_graph_denoise_tiles.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/ssr_graph_denoise_tiles.js +10 -0
- package/src/shade/renderer/postprocess/ssr/ssr_graph_prefilter_color.d.ts +6 -0
- package/src/shade/renderer/postprocess/ssr/ssr_graph_prefilter_color.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/ssr_graph_prefilter_color.js +11 -0
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts +8 -0
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +27 -3
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSettings.d.ts +6 -0
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSettings.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSettings.js +10 -0
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts +5 -4
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +5 -4
- package/src/shade/renderer/rasterize/native/avboit/AVBOIT_CONSTANTS.d.ts +3 -3
- package/src/shade/renderer/rasterize/native/avboit/AVBOIT_CONSTANTS.js +3 -3
- package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.js +5 -7
- package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.js +5 -7
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.d.ts +34 -0
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.js +42 -0
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.d.ts +5 -4
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.js +8 -7
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.d.ts +2 -2
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.js +4 -5
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts +9 -0
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js +18 -0
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts +9 -0
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.js +15 -0
- package/src/shade/renderer/restir/di/ReSTIRDI.d.ts +6 -0
- package/src/shade/renderer/restir/di/ReSTIRDI.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/ReSTIRDI.js +10 -1
- package/src/shade/renderer/restir/di/graph_restir_di.d.ts +9 -0
- package/src/shade/renderer/restir/di/graph_restir_di.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/graph_restir_di.js +19 -1
- package/src/shade/renderer/restir/di/graph_restir_di_denoise.d.ts +6 -0
- package/src/shade/renderer/restir/di/graph_restir_di_denoise.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/graph_restir_di_denoise.js +9 -0
- package/src/shade/renderer/scene/movers/graph_scene_movers.d.ts +7 -0
- package/src/shade/renderer/scene/movers/graph_scene_movers.d.ts.map +1 -1
- package/src/shade/renderer/scene/movers/graph_scene_movers.js +11 -0
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts +10 -0
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +25 -1
- package/src/shade/renderer/shadow/vsm/graph_vsm_feedback.d.ts +7 -0
- package/src/shade/renderer/shadow/vsm/graph_vsm_feedback.d.ts.map +1 -1
- package/src/shade/renderer/shadow/vsm/graph_vsm_feedback.js +14 -0
- package/src/shade/renderer/text/shaders/shader_text_avboit.d.ts.map +1 -1
- package/src/shade/renderer/text/shaders/shader_text_avboit.js +5 -7
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts +9 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js +16 -1
- package/src/shade/renderer/water/shader_water_avboit.d.ts.map +1 -1
- package/src/shade/renderer/water/shader_water_avboit.js +16 -13
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_bias.d.ts +0 -33
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_bias.d.ts.map +0 -1
- package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_bias.js +0 -45
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
cpu_hash_table_word_count
|
|
9
9
|
} from "../../gpu_primitive/hash_table/cpu_build_hash_table.js";
|
|
10
10
|
import {
|
|
11
|
+
enquire_prefix_scan_csdldf_pipelines,
|
|
11
12
|
graph_prefix_scan_csdldf,
|
|
12
13
|
prefix_scan_csdldf_output_descriptor
|
|
13
14
|
} from "../../gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.js";
|
|
@@ -19,10 +20,14 @@ import { graph_record_stat } from "../../util/graph_record_stat.js";
|
|
|
19
20
|
import {
|
|
20
21
|
build_indirect_compute_dispatch_command,
|
|
21
22
|
graph_build_indirect_dispatch_command,
|
|
22
|
-
INDIRECT_COMPUTE_COMMAND_DESCRIPTOR
|
|
23
|
+
INDIRECT_COMPUTE_COMMAND_DESCRIPTOR,
|
|
24
|
+
indirect_compute_dispatch_command_pipeline
|
|
23
25
|
} from "../../gpu_primitive/indirect/IndirectComputeCommandBuildPass.js";
|
|
24
|
-
import { graph_mesh_filter_one_way } from "../expand/graph_mesh_filter_one_way.js";
|
|
25
|
-
import {
|
|
26
|
+
import { enquire_mesh_filter_one_way_pipelines, graph_mesh_filter_one_way } from "../expand/graph_mesh_filter_one_way.js";
|
|
27
|
+
import {
|
|
28
|
+
enquire_expand_meshes_to_meshlets_pipelines,
|
|
29
|
+
graph_expand_meshes_to_meshlets
|
|
30
|
+
} from "../expand/mesh/graph_expand_meshes_to_meshlets.js";
|
|
26
31
|
import { graph_vgeo_expand_if_enabled } from "../../geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js";
|
|
27
32
|
import { RasterizationCollectionType } from "../expand/RasterizationCollectionType.js";
|
|
28
33
|
import { CullPolicy } from "./construct_primitive_state.js";
|
|
@@ -33,6 +38,25 @@ import {
|
|
|
33
38
|
import { shader_read_out_bucket } from "./shader_read_out_bucket.js";
|
|
34
39
|
import { shader_sort_meshlets_by_material } from "./shader_sort_meshlets_by_material.js";
|
|
35
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Offer the pipelines {@link graph_prepare_meshlet_draw_commands_by_material} dispatches — see
|
|
43
|
+
* {@link PipelineEnquiry}: a bucket's meshes read out, culled and expanded to meshlets, and those culled, counted
|
|
44
|
+
* and sorted into a draw command a material. Virtual geometry's expansion is its scenes' to offer.
|
|
45
|
+
*
|
|
46
|
+
* @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
|
|
47
|
+
*/
|
|
48
|
+
export function enquire_prepare_meshlet_draw_commands_by_material_pipelines(enquiry) {
|
|
49
|
+
enquiry.compute.push(shader_read_out_bucket.pipeline);
|
|
50
|
+
enquire_mesh_filter_one_way_pipelines(enquiry);
|
|
51
|
+
enquire_expand_meshes_to_meshlets_pipelines(enquiry);
|
|
52
|
+
enquiry.compute.push(indirect_compute_dispatch_command_pipeline(enquiry.device, COMPUTE_SHADER_DEFAULT_GROUP_SIZE, true));
|
|
53
|
+
enquiry.compute.push(shader_hzb_meshlet_filter_1way_full.pipeline);
|
|
54
|
+
enquiry.compute.push(shader_count_meshlets_by_material.pipeline);
|
|
55
|
+
enquire_prefix_scan_csdldf_pipelines(enquiry);
|
|
56
|
+
enquiry.compute.push(shader_sort_meshlets_by_material.pipeline);
|
|
57
|
+
enquiry.compute.push(shader_make_meshlet_indirect_draw_commands_by_material.pipeline);
|
|
58
|
+
}
|
|
59
|
+
|
|
36
60
|
/**
|
|
37
61
|
*
|
|
38
62
|
* @param {FrameGraph} graph
|
|
@@ -31,5 +31,11 @@ export class AVBOITSettings {
|
|
|
31
31
|
* @type {number}
|
|
32
32
|
*/
|
|
33
33
|
warp_steps_per_octave: number;
|
|
34
|
+
/**
|
|
35
|
+
* Take every field's value from `other`, which is left as it was. The two share nothing afterwards.
|
|
36
|
+
*
|
|
37
|
+
* @param {AVBOITSettings} other
|
|
38
|
+
*/
|
|
39
|
+
copy(other: AVBOITSettings): void;
|
|
34
40
|
}
|
|
35
41
|
//# sourceMappingURL=AVBOITSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AVBOITSettings.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/AVBOITSettings.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH;IAEI;;;;;;;;;;;;;OAaG;IACH,mCAFU,OAAO,CAEyB;IAE1C;;;;;;OAMG;IACH,uBAFU,MAAM,CAEU;
|
|
1
|
+
{"version":3,"file":"AVBOITSettings.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/AVBOITSettings.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH;IAEI;;;;;;;;;;;;;OAaG;IACH,mCAFU,OAAO,CAEyB;IAE1C;;;;;;OAMG;IACH,uBAFU,MAAM,CAEU;IAE1B;;;;OAIG;IACH,YAFW,cAAc,QAKxB;CACJ"}
|
|
@@ -33,4 +33,14 @@ export class AVBOITSettings {
|
|
|
33
33
|
* @type {number}
|
|
34
34
|
*/
|
|
35
35
|
warp_steps_per_octave = 4;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Take every field's value from `other`, which is left as it was. The two share nothing afterwards.
|
|
39
|
+
*
|
|
40
|
+
* @param {AVBOITSettings} other
|
|
41
|
+
*/
|
|
42
|
+
copy(other) {
|
|
43
|
+
this.transmission_tint_from_base_color = other.transmission_tint_from_base_color;
|
|
44
|
+
this.warp_steps_per_octave = other.warp_steps_per_octave;
|
|
45
|
+
}
|
|
36
46
|
}
|
|
@@ -96,10 +96,11 @@ export type AVBOITSideChannel = {
|
|
|
96
96
|
/**
|
|
97
97
|
* draw the
|
|
98
98
|
* channel's fragments into the accumulators; returns their handles after the draw. A channel
|
|
99
|
-
* whose fragments splat into the volume
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* nothing into the volume
|
|
99
|
+
* whose fragments splat into the volume looks the integral up in front of `avboit_footprint_depth` (of
|
|
100
|
+
* the fragment's view depth and `fwidth` of its reciprocal, taken in uniform control flow), as the mesh
|
|
101
|
+
* draw does, and splats at the depth under each voxel column's centre, or a surface it draws at an angle
|
|
102
|
+
* occludes itself in an 8-pixel pattern; one whose fragments write nothing into the volume looks in
|
|
103
|
+
* front of the fragment's own depth.
|
|
103
104
|
* `volumetrics_irradiance` is what a fragment standing in a froxel is lit by
|
|
104
105
|
* (`chunk_volumetrics_irradiance_sh`), for a channel whose fragments are lit: the renderer's
|
|
105
106
|
* indirect lighting, whichever mode it runs, and the scene's lights, shadowed — lit as the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AVBOITSideChannel.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoCc,CAAC,IAAI,EAAE;QAAC,KAAK,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QACjH,QAAc,EAAE,OAAO,iCAAiC,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QACzF,aAAmB,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAChG,WAAiB,EAAE,MAAM,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAC;QACvD,wBAA8B,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,MAAM,CAAC;QAAC,kBAAkB,EAAE,MAAM,CAAC;QACjG,eAAqB,EAAE,MAAM,CAAC;QAC9B,eAAqB,EAAE,OAAO,6CAA6C,EAAE,eAAe,CAAC;QAC7F,MAAY,EAAE,OAAO,iEAAiE,EAAE,iBAAiB,CAAC;KACvG,KAAK;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAC;;;;;sBAMtB,CAAC,IAAI,EAAE;QACpB,KAAW,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QAClG,MAAY,EAAE,MAAM,CAAC;QACrB,kBAAwB,EAAE,UAAU,MAAM,CAAC,CAAC;QAC5C,SAAe,EAAE,MAAM,CAAC;KACrB,KAAK,MAAM;;;;;;;;kBAED,CAAC,IAAI,EAAE;QACpB,KAAW,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QAClG,MAAY,EAAE,MAAM,CAAC;QACrB,IAAU,EAAE,MAAM,CAAC;QACnB,aAAmB,EAAE,MAAM,CAAC;QAC5B,gBAAsB,EAAE,MAAM,EAAE,CAAC;QACjC,MAAY,EAAE;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,CAAC;KACjE,KAAK;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC
|
|
1
|
+
{"version":3,"file":"AVBOITSideChannel.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoCc,CAAC,IAAI,EAAE;QAAC,KAAK,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QACjH,QAAc,EAAE,OAAO,iCAAiC,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QACzF,aAAmB,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAChG,WAAiB,EAAE,MAAM,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAC;QACvD,wBAA8B,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,MAAM,CAAC;QAAC,kBAAkB,EAAE,MAAM,CAAC;QACjG,eAAqB,EAAE,MAAM,CAAC;QAC9B,eAAqB,EAAE,OAAO,6CAA6C,EAAE,eAAe,CAAC;QAC7F,MAAY,EAAE,OAAO,iEAAiE,EAAE,iBAAiB,CAAC;KACvG,KAAK;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAC;;;;;sBAMtB,CAAC,IAAI,EAAE;QACpB,KAAW,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QAClG,MAAY,EAAE,MAAM,CAAC;QACrB,kBAAwB,EAAE,UAAU,MAAM,CAAC,CAAC;QAC5C,SAAe,EAAE,MAAM,CAAC;KACrB,KAAK,MAAM;;;;;;;;kBAED,CAAC,IAAI,EAAE;QACpB,KAAW,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QAClG,MAAY,EAAE,MAAM,CAAC;QACrB,IAAU,EAAE,MAAM,CAAC;QACnB,aAAmB,EAAE,MAAM,CAAC;QAC5B,gBAAsB,EAAE,MAAM,EAAE,CAAC;QACjC,MAAY,EAAE;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,CAAC;KACjE,KAAK;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC;;;;;;;;;;;;;;;iBAKhD,CAAC,IAAI,EAAE;QACpB,KAAW,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QAClG,QAAc,EAAE,OAAO,iCAAiC,EAAE,cAAc,CAAC;QACzE,MAAY,EAAE,MAAM,CAAC;QACrB,aAAmB,EAAE,MAAM,CAAC;QAC5B,IAAU,EAAE,MAAM,CAAC;QACnB,QAAc,EAAE,MAAM,CAAC;QACvB,eAAqB,EAAE,MAAM,CAAC;QAC9B,oBAA0B,EAAE,MAAM,CAAC;QACnC,sBAA4B,EAAE;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAC,CAAC;QACxD,YAAkB,EAAE;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAC,CAAC;KACrF,KAAK;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC;;;;;;sBAY9D,CAAC,IAAI,EAAE,OAAO,iCAAiC,EAAE,cAAc,KAAK,OAAO"}
|
|
@@ -80,10 +80,11 @@
|
|
|
80
80
|
* accumulators: {color: number, norm: number, extinction: number, emission: number},
|
|
81
81
|
* }) => {color: number, norm: number, extinction: number, emission: number}} avboit_draw draw the
|
|
82
82
|
* channel's fragments into the accumulators; returns their handles after the draw. A channel
|
|
83
|
-
* whose fragments splat into the volume
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* nothing into the volume
|
|
83
|
+
* whose fragments splat into the volume looks the integral up in front of `avboit_footprint_depth` (of
|
|
84
|
+
* the fragment's view depth and `fwidth` of its reciprocal, taken in uniform control flow), as the mesh
|
|
85
|
+
* draw does, and splats at the depth under each voxel column's centre, or a surface it draws at an angle
|
|
86
|
+
* occludes itself in an 8-pixel pattern; one whose fragments write nothing into the volume looks in
|
|
87
|
+
* front of the fragment's own depth.
|
|
87
88
|
* `volumetrics_irradiance` is what a fragment standing in a froxel is lit by
|
|
88
89
|
* (`chunk_volumetrics_irradiance_sh`), for a channel whose fragments are lit: the renderer's
|
|
89
90
|
* indirect lighting, whichever mode it runs, and the scene's lights, shadowed — lit as the
|
|
@@ -81,9 +81,9 @@ export const AVBOIT_FIELD_BITS: number;
|
|
|
81
81
|
* How far toward the camera, in virtual slices, the draw pass samples the integral so that a surface
|
|
82
82
|
* does not occlude itself through its own linear splat. With the exclusive-prefix storage convention
|
|
83
83
|
* the analytic minimum is 1.5; the deck uses 2. Events closer together than this do not occlude each
|
|
84
|
-
* other and degrade to weighted blending. A surface tilted away from the camera
|
|
85
|
-
*
|
|
86
|
-
* draw also reads the neighbouring voxel columns, where a tilted one was splatted nearer.
|
|
84
|
+
* other and degrade to weighted blending. A surface tilted away from the camera takes it in front of
|
|
85
|
+
* its footprint depth (`avboit_footprint_depth`): the base bias is for a surface splatted at its own
|
|
86
|
+
* depth, and the draw also reads the neighbouring voxel columns, where a tilted one was splatted nearer.
|
|
87
87
|
* @type {number}
|
|
88
88
|
*/
|
|
89
89
|
export const AVBOIT_SAMPLE_BIAS_SLICES: number;
|
|
@@ -91,9 +91,9 @@ export const AVBOIT_FIELD_BITS = 10;
|
|
|
91
91
|
* How far toward the camera, in virtual slices, the draw pass samples the integral so that a surface
|
|
92
92
|
* does not occlude itself through its own linear splat. With the exclusive-prefix storage convention
|
|
93
93
|
* the analytic minimum is 1.5; the deck uses 2. Events closer together than this do not occlude each
|
|
94
|
-
* other and degrade to weighted blending. A surface tilted away from the camera
|
|
95
|
-
*
|
|
96
|
-
* draw also reads the neighbouring voxel columns, where a tilted one was splatted nearer.
|
|
94
|
+
* other and degrade to weighted blending. A surface tilted away from the camera takes it in front of
|
|
95
|
+
* its footprint depth (`avboit_footprint_depth`): the base bias is for a surface splatted at its own
|
|
96
|
+
* depth, and the draw also reads the neighbouring voxel columns, where a tilted one was splatted nearer.
|
|
97
97
|
* @type {number}
|
|
98
98
|
*/
|
|
99
99
|
export const AVBOIT_SAMPLE_BIAS_SLICES = 2.0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avboit_draw_fragment_body.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"avboit_draw_fragment_body.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.js"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wCAFU,MAAM,CAyEV;AAEN;;;GAGG;AACH,gDAFU,WAAW,CAWnB;AAEF;;;GAGG;AACH,kCAFU,qBAAqB,CAiB3B"}
|
|
@@ -5,8 +5,7 @@ import { chunk_view_mip_bias } from "../../../view/chunk_view_mip_bias.js";
|
|
|
5
5
|
import { FORWARD_VERTEX_SHADER_STRUCT } from "../../forward/FORWARD_VERTEX_SHADER_STRUCT.js";
|
|
6
6
|
import { OIT_COVERAGE_MAX } from "../oit/OIT_CONSTANTS.js";
|
|
7
7
|
import { AVBOIT_EXTINCT_TRANSMITTANCE } from "./AVBOIT_CONSTANTS.js";
|
|
8
|
-
import {
|
|
9
|
-
import { chunk_avboit_footprint_bias } from "./chunk_avboit_footprint_bias.js";
|
|
8
|
+
import { chunk_avboit_footprint_depth } from "./chunk_avboit_footprint_depth.js";
|
|
10
9
|
import { chunk_avboit_sample_transmittance } from "./chunk_avboit_sample_transmittance.js";
|
|
11
10
|
import { chunk_avboit_transmission_tint } from "./chunk_avboit_transmission_tint.js";
|
|
12
11
|
|
|
@@ -72,11 +71,11 @@ fn main(
|
|
|
72
71
|
let frag_view_depth = get_view_space_depth(vert_adjusted.position.z, camera);
|
|
73
72
|
let frag_screen_uv = vert_adjusted.position.xy / vec2<f32>(f32(view.width), f32(view.height));
|
|
74
73
|
|
|
75
|
-
//
|
|
74
|
+
// the nearest the surface's own depth runs across a voxel, so it does not occlude itself through the
|
|
76
75
|
// neighbouring columns; taken here, in uniform control flow, before anything can discard
|
|
77
|
-
let footprint =
|
|
76
|
+
let footprint = avboit_footprint_depth(frag_view_depth, fwidth(1.0 / frag_view_depth));
|
|
78
77
|
|
|
79
|
-
let transmittance = avboit_sample_transmittance(&warp, tIntegral, sLinear, frag_screen_uv,
|
|
78
|
+
let transmittance = avboit_sample_transmittance(&warp, tIntegral, sLinear, frag_screen_uv, footprint);
|
|
80
79
|
|
|
81
80
|
if (all(transmittance <= vec3<f32>(${AVBOIT_EXTINCT_TRANSMITTANCE}))) {
|
|
82
81
|
// nothing this fragment contributes survives what is in front of it; skip the shading
|
|
@@ -125,8 +124,7 @@ export const AVBOIT_DRAW_FRAGMENT_DEPENDENCIES = [
|
|
|
125
124
|
chunk_get_view_space_depth,
|
|
126
125
|
chunk_random_initialize,
|
|
127
126
|
chunk_sample_volumetrics,
|
|
128
|
-
|
|
129
|
-
chunk_avboit_footprint_bias,
|
|
127
|
+
chunk_avboit_footprint_depth,
|
|
130
128
|
chunk_avboit_sample_transmittance,
|
|
131
129
|
chunk_avboit_transmission_tint,
|
|
132
130
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avboit_unlit_draw.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"avboit_unlit_draw.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.js"],"names":[],"mappings":"AA+GA;;;;;;;;;;;GAWG;AACH;IAP0B,KAAK,EAApB,MAAM;IACgG,SAAS,EAA/G,OAAO,yDAAyD,EAAE,2BAA2B;IAE9E,MAAM,EAArB,MAAM;IAEJ,wBAAwB,CAoBpC;AA3HD;;;;GAIG;AACH,2CAFU,6BAA6B,CAEyC;AAahF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,+CAFU,SAAS,CAsDjB;yCA3GuC,oEAAoE;8CAI/D,2DAA2D;0BAD/E,uCAAuC"}
|
|
@@ -11,11 +11,10 @@ import { VOLUMETRICS_METADATA_STRUCT } from "../../../volumetrics/VOLUMETRICS_ME
|
|
|
11
11
|
import { AVBOIT_EXTINCT_TRANSMITTANCE } from "./AVBOIT_CONSTANTS.js";
|
|
12
12
|
import { AVBOIT_WARP_STRUCT } from "./AVBOIT_WARP_STRUCT.js";
|
|
13
13
|
import { AVBOIT_DRAW_TARGETS } from "./avboit_draw_fragment_body.js";
|
|
14
|
-
import {
|
|
14
|
+
import { chunk_avboit_footprint_depth } from "./chunk_avboit_footprint_depth.js";
|
|
15
15
|
import { chunk_avboit_premultiplied_contribution } from "./chunk_avboit_premultiplied_contribution.js";
|
|
16
16
|
import { chunk_avboit_sample_transmittance } from "./chunk_avboit_sample_transmittance.js";
|
|
17
17
|
import { chunk_avboit_unlit_varyings } from "./chunk_avboit_unlit_varyings.js";
|
|
18
|
-
import { chunk_avboit_view_depth_to_virtual } from "./chunk_avboit_view_depth_to_virtual.js";
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
20
|
* What the unlit draw reads once per pass: the view, the warp, the integral and the fog.
|
|
@@ -68,9 +67,9 @@ struct AVBOITUnlitDrawOutput {
|
|
|
68
67
|
|
|
69
68
|
@fragment
|
|
70
69
|
fn fs_main(fragment : AVBOITUnlitVaryings) -> AVBOITUnlitDrawOutput {
|
|
71
|
-
// a ribbon seen at an angle runs through depth across a voxel; see
|
|
70
|
+
// a ribbon seen at an angle runs through depth across a voxel; see avboit_footprint_depth. Taken
|
|
72
71
|
// first, in uniform control flow
|
|
73
|
-
let footprint =
|
|
72
|
+
let footprint = avboit_footprint_depth(fragment.view_depth, fwidth(1.0 / fragment.view_depth));
|
|
74
73
|
|
|
75
74
|
if (fragment.color.a <= 0.0) {
|
|
76
75
|
// faded out: covers nothing, and straight alpha carries no light without coverage
|
|
@@ -79,7 +78,7 @@ fn fs_main(fragment : AVBOITUnlitVaryings) -> AVBOITUnlitDrawOutput {
|
|
|
79
78
|
|
|
80
79
|
let screen_uv = fragment.clip.xy / vec2<f32>(f32(view.width), f32(view.height));
|
|
81
80
|
|
|
82
|
-
let transmittance = avboit_sample_transmittance(&warp, tIntegral, sLinear, screen_uv,
|
|
81
|
+
let transmittance = avboit_sample_transmittance(&warp, tIntegral, sLinear, screen_uv, footprint);
|
|
83
82
|
|
|
84
83
|
if (all(transmittance <= vec3<f32>(${AVBOIT_EXTINCT_TRANSMITTANCE}))) {
|
|
85
84
|
// nothing this fragment contributes survives what is in front of it; skip the shading
|
|
@@ -103,8 +102,7 @@ fn fs_main(fragment : AVBOITUnlitVaryings) -> AVBOITUnlitDrawOutput {
|
|
|
103
102
|
}
|
|
104
103
|
`, [
|
|
105
104
|
chunk_avboit_unlit_varyings,
|
|
106
|
-
|
|
107
|
-
chunk_avboit_footprint_bias,
|
|
105
|
+
chunk_avboit_footprint_depth,
|
|
108
106
|
chunk_avboit_sample_transmittance,
|
|
109
107
|
chunk_sample_volumetrics,
|
|
110
108
|
chunk_avboit_premultiplied_contribution,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The nearest view depth a fragment's own surface reaches within one voxel of it — the depth the
|
|
3
|
+
* fragment has to look the integral up in front of (`avboit_sample_transmittance`), so that its own
|
|
4
|
+
* surface does not occlude it through the neighbouring voxel columns. Given the fragment's view depth
|
|
5
|
+
* and `inverse_depth_fwidth`, its `fwidth` of `1 / z_view`, which the caller takes in the fragment
|
|
6
|
+
* stage, in uniform control flow.
|
|
7
|
+
*
|
|
8
|
+
* The volume is 1/8 resolution and every column holds a surface at the depth under the column's
|
|
9
|
+
* centre. The draw reads the four nearest columns bilinearly, up to one voxel away along each screen
|
|
10
|
+
* axis. On a surface tilted away from the camera, the neighbour on its near side holds the same
|
|
11
|
+
* surface nearer by the surface's depth change over that distance, and a fragment that looked the
|
|
12
|
+
* integral up at its own depth would be occluded by it — by an amount that depends on where the pixel
|
|
13
|
+
* sits in its voxel, so the surface stripes in an 8-pixel pattern wherever something else shares its
|
|
14
|
+
* pixels (ledger entry 26).
|
|
15
|
+
*
|
|
16
|
+
* `1 / z_view` is linear across the screen for a plane, as device depth is, so its `fwidth` is the
|
|
17
|
+
* same everywhere on the plane and `AVBOIT_VOXEL_DOWNSCALE` times it is exactly how far the plane's
|
|
18
|
+
* `1 / z_view` runs over one voxel along both axes. The result is the plane's own depth there, the
|
|
19
|
+
* nearest any column the lookup reads can hold it: nearer than the fragment, and never nearer than
|
|
20
|
+
* the camera.
|
|
21
|
+
*
|
|
22
|
+
* What it costs: a tilted fragment is not occluded by what lies between that depth and itself, the
|
|
23
|
+
* depth the volume cannot tell apart from the surface at this resolution. On screen that is a band of
|
|
24
|
+
* at most the lookup's own reach beside where another surface crosses this one. A surface that curves
|
|
25
|
+
* away faster than its plane — the last pixel of a rim — is given more than it needs.
|
|
26
|
+
*
|
|
27
|
+
* A fragment that writes nothing into the volume — an additive particle's — has nothing of its own
|
|
28
|
+
* there to occlude it: its footprint depth is its own depth.
|
|
29
|
+
*
|
|
30
|
+
* @type {CodeChunk}
|
|
31
|
+
*/
|
|
32
|
+
export const chunk_avboit_footprint_depth: CodeChunk;
|
|
33
|
+
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
34
|
+
//# sourceMappingURL=chunk_avboit_footprint_depth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_avboit_footprint_depth.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,2CAFU,SAAS,CASjB;0BAzCwB,uCAAuC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
2
|
+
import { AVBOIT_VOXEL_DOWNSCALE } from "./AVBOIT_CONSTANTS.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The nearest view depth a fragment's own surface reaches within one voxel of it — the depth the
|
|
6
|
+
* fragment has to look the integral up in front of (`avboit_sample_transmittance`), so that its own
|
|
7
|
+
* surface does not occlude it through the neighbouring voxel columns. Given the fragment's view depth
|
|
8
|
+
* and `inverse_depth_fwidth`, its `fwidth` of `1 / z_view`, which the caller takes in the fragment
|
|
9
|
+
* stage, in uniform control flow.
|
|
10
|
+
*
|
|
11
|
+
* The volume is 1/8 resolution and every column holds a surface at the depth under the column's
|
|
12
|
+
* centre. The draw reads the four nearest columns bilinearly, up to one voxel away along each screen
|
|
13
|
+
* axis. On a surface tilted away from the camera, the neighbour on its near side holds the same
|
|
14
|
+
* surface nearer by the surface's depth change over that distance, and a fragment that looked the
|
|
15
|
+
* integral up at its own depth would be occluded by it — by an amount that depends on where the pixel
|
|
16
|
+
* sits in its voxel, so the surface stripes in an 8-pixel pattern wherever something else shares its
|
|
17
|
+
* pixels (ledger entry 26).
|
|
18
|
+
*
|
|
19
|
+
* `1 / z_view` is linear across the screen for a plane, as device depth is, so its `fwidth` is the
|
|
20
|
+
* same everywhere on the plane and `AVBOIT_VOXEL_DOWNSCALE` times it is exactly how far the plane's
|
|
21
|
+
* `1 / z_view` runs over one voxel along both axes. The result is the plane's own depth there, the
|
|
22
|
+
* nearest any column the lookup reads can hold it: nearer than the fragment, and never nearer than
|
|
23
|
+
* the camera.
|
|
24
|
+
*
|
|
25
|
+
* What it costs: a tilted fragment is not occluded by what lies between that depth and itself, the
|
|
26
|
+
* depth the volume cannot tell apart from the surface at this resolution. On screen that is a band of
|
|
27
|
+
* at most the lookup's own reach beside where another surface crosses this one. A surface that curves
|
|
28
|
+
* away faster than its plane — the last pixel of a rim — is given more than it needs.
|
|
29
|
+
*
|
|
30
|
+
* A fragment that writes nothing into the volume — an additive particle's — has nothing of its own
|
|
31
|
+
* there to occlude it: its footprint depth is its own depth.
|
|
32
|
+
*
|
|
33
|
+
* @type {CodeChunk}
|
|
34
|
+
*/
|
|
35
|
+
export const chunk_avboit_footprint_depth = CodeChunk.from(
|
|
36
|
+
//language=WGSL
|
|
37
|
+
`
|
|
38
|
+
fn avboit_footprint_depth(z_view: f32, inverse_depth_fwidth: f32) -> f32 {
|
|
39
|
+
return 1.0 / (1.0 / z_view + ${AVBOIT_VOXEL_DOWNSCALE.toFixed(1)} * inverse_depth_fwidth);
|
|
40
|
+
}
|
|
41
|
+
`
|
|
42
|
+
);
|
package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The normalized depth coordinate into the integral texture for a fragment
|
|
2
|
+
* The normalized depth coordinate into the integral texture for a fragment that has to look in front
|
|
3
|
+
* of view depth `z_front` (plan §3.8): its own depth, or its `avboit_footprint_depth`.
|
|
3
4
|
*
|
|
4
5
|
* The sample bias is applied in *virtual* slices before the warp: inside an occupied run that is the
|
|
5
6
|
* same as biasing the physical coordinate; at the start of a run it walks into the gap before it,
|
|
@@ -10,9 +11,9 @@
|
|
|
10
11
|
* centre `(p + 0.5) / (P + 1)`: a run boundary lands exactly on a texel and the sample is the sum of
|
|
11
12
|
* the slices before it, with no share of the slice after.
|
|
12
13
|
*
|
|
13
|
-
* `
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* `z_front` is the nearest depth the fragment's own surface was written at in the voxel columns the
|
|
15
|
+
* lookup reads (`avboit_footprint_depth`), and the base bias is taken in front of that; for a surface
|
|
16
|
+
* that writes nothing into the volume it is the fragment's own depth.
|
|
16
17
|
*
|
|
17
18
|
* @type {CodeChunk}
|
|
18
19
|
*/
|
package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_avboit_integral_depth_coordinate.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.js"],"names":[],"mappings":"AAMA
|
|
1
|
+
{"version":3,"file":"chunk_avboit_integral_depth_coordinate.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;GAkBG;AACH,qDAFU,SAAS,CAgBjB;0BAvCwB,uCAAuC"}
|
package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.js
CHANGED
|
@@ -5,7 +5,8 @@ import { chunk_avboit_view_depth_to_virtual } from "./chunk_avboit_view_depth_to
|
|
|
5
5
|
import { chunk_avboit_warp } from "./chunk_avboit_warp.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* The normalized depth coordinate into the integral texture for a fragment
|
|
8
|
+
* The normalized depth coordinate into the integral texture for a fragment that has to look in front
|
|
9
|
+
* of view depth `z_front` (plan §3.8): its own depth, or its `avboit_footprint_depth`.
|
|
9
10
|
*
|
|
10
11
|
* The sample bias is applied in *virtual* slices before the warp: inside an occupied run that is the
|
|
11
12
|
* same as biasing the physical coordinate; at the start of a run it walks into the gap before it,
|
|
@@ -16,18 +17,18 @@ import { chunk_avboit_warp } from "./chunk_avboit_warp.js";
|
|
|
16
17
|
* centre `(p + 0.5) / (P + 1)`: a run boundary lands exactly on a texel and the sample is the sum of
|
|
17
18
|
* the slices before it, with no share of the slice after.
|
|
18
19
|
*
|
|
19
|
-
* `
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* `z_front` is the nearest depth the fragment's own surface was written at in the voxel columns the
|
|
21
|
+
* lookup reads (`avboit_footprint_depth`), and the base bias is taken in front of that; for a surface
|
|
22
|
+
* that writes nothing into the volume it is the fragment's own depth.
|
|
22
23
|
*
|
|
23
24
|
* @type {CodeChunk}
|
|
24
25
|
*/
|
|
25
26
|
export const chunk_avboit_integral_depth_coordinate = CodeChunk.from(
|
|
26
27
|
//language=WGSL
|
|
27
28
|
`
|
|
28
|
-
fn avboit_integral_depth_coordinate(warp: ptr<storage, ${AVBOIT_WARP_STRUCT.wgsl_ref}, read>,
|
|
29
|
-
let v = avboit_view_depth_to_virtual(warp,
|
|
30
|
-
let v_biased = max(v - ${AVBOIT_SAMPLE_BIAS_SLICES}
|
|
29
|
+
fn avboit_integral_depth_coordinate(warp: ptr<storage, ${AVBOIT_WARP_STRUCT.wgsl_ref}, read>, z_front: f32) -> f32 {
|
|
30
|
+
let v = avboit_view_depth_to_virtual(warp, z_front);
|
|
31
|
+
let v_biased = max(v - ${AVBOIT_SAMPLE_BIAS_SLICES}, 0.0);
|
|
31
32
|
let p = avboit_warp(warp, v_biased);
|
|
32
33
|
return (p + 0.5) / f32((*warp).physical_count + 1u);
|
|
33
34
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The RGB transmittance of everything in front of a fragment: a trilinear sample of the integral
|
|
3
3
|
* texture at the biased, warped depth, turned back into transmittance. The draw weights a fragment's
|
|
4
|
-
* whole contribution by it. `
|
|
5
|
-
* surface that writes nothing into the volume; see `avboit_integral_depth_coordinate`.
|
|
4
|
+
* whole contribution by it. `z_front` is the fragment's `avboit_footprint_depth`, or its own view depth
|
|
5
|
+
* for a surface that writes nothing into the volume; see `avboit_integral_depth_coordinate`.
|
|
6
6
|
*
|
|
7
7
|
* @type {CodeChunk}
|
|
8
8
|
*/
|
package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_avboit_sample_transmittance.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.js"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,gDAFU,SAAS,
|
|
1
|
+
{"version":3,"file":"chunk_avboit_sample_transmittance.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.js"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,gDAFU,SAAS,CAqBjB;0BAhCwB,uCAAuC"}
|
|
@@ -6,8 +6,8 @@ import { chunk_avboit_integral_depth_coordinate } from "./chunk_avboit_integral_
|
|
|
6
6
|
/**
|
|
7
7
|
* The RGB transmittance of everything in front of a fragment: a trilinear sample of the integral
|
|
8
8
|
* texture at the biased, warped depth, turned back into transmittance. The draw weights a fragment's
|
|
9
|
-
* whole contribution by it. `
|
|
10
|
-
* surface that writes nothing into the volume; see `avboit_integral_depth_coordinate`.
|
|
9
|
+
* whole contribution by it. `z_front` is the fragment's `avboit_footprint_depth`, or its own view depth
|
|
10
|
+
* for a surface that writes nothing into the volume; see `avboit_integral_depth_coordinate`.
|
|
11
11
|
*
|
|
12
12
|
* @type {CodeChunk}
|
|
13
13
|
*/
|
|
@@ -19,10 +19,9 @@ fn avboit_sample_transmittance(
|
|
|
19
19
|
integral: texture_3d<f32>,
|
|
20
20
|
integral_sampler: sampler,
|
|
21
21
|
screen_uv: vec2<f32>,
|
|
22
|
-
|
|
23
|
-
footprint_bias: f32,
|
|
22
|
+
z_front: f32,
|
|
24
23
|
) -> vec3<f32> {
|
|
25
|
-
let w = avboit_integral_depth_coordinate(warp,
|
|
24
|
+
let w = avboit_integral_depth_coordinate(warp, z_front);
|
|
26
25
|
let extinction = textureSampleLevel(integral, integral_sampler, vec3<f32>(screen_uv, w), 0.0).rgb;
|
|
27
26
|
return avboit_extinction_to_transmittance(extinction);
|
|
28
27
|
}
|
package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Offer the pipelines {@link graph_rasterize_meshes_transparent_avboit} runs with whatever is transparent — see
|
|
3
|
+
* {@link PipelineEnquiry}: the meshlets' draw commands, the occupancy, the warp, the integral and the resolve. The
|
|
4
|
+
* splat and the draw are a pipeline a material template, which arrive with the materials, and a side channel's
|
|
5
|
+
* passes are the channel's to offer.
|
|
6
|
+
*
|
|
7
|
+
* @param {import("../../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
|
|
8
|
+
*/
|
|
9
|
+
export function enquire_rasterize_meshes_transparent_avboit_pipelines(enquiry: import("../../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry): void;
|
|
1
10
|
/**
|
|
2
11
|
* Extinction volume XY resolution for an internal resolution.
|
|
3
12
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph_rasterize_meshes_transparent_avboit.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graph_rasterize_meshes_transparent_avboit.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js"],"names":[],"mappings":"AAuDA;;;;;;;GAOG;AACH,+EAFW,OAAO,gDAAgD,EAAE,eAAe,QASlF;AAQD;;;;;GAKG;AACH,oDAHW,UAAU,MAAM,CAAC,GACf,MAAM,EAAE,CAOpB;AAED;;;;;;;;;;;;GAYG;AACH;IAT+B,KAAK;IACA,KAAK;IACd,MAAM,EAAtB,MAAM;IACqB,kBAAkB,EAA7C,UAAU,MAAM,CAAC;IACD,kBAAkB,EAAlC,MAAM;IACU,wBAAwB,EAAxC,MAAM;IACW,SAAS,GAA1B,MAAM;IACJ,MAAM,CA4DlB;AAED;;;;;;;;;;GAUG;AACH;IAP+B,KAAK;IACT,SAAS,EAAzB,MAAM;IACY,gBAAgB,EAAlC,MAAM,EAAE;IACmB,kBAAkB,EAA7C,UAAU,MAAM,CAAC;IACQ,MAAM,GAA/B,cAAc;IACZ,MAAM,CAuDlB;AAED;;;;;;;;;;;;;;;GAeG;AACH,6KAFa;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAiJjE;AAED;;;;;;;;;;GAUG;AACH;IAP+B,KAAK;IACT,IAAI,EAApB,MAAM;IACU,UAAU,EAA1B,MAAM;IACU,QAAQ,EAAxB,MAAM;IACY,gBAAgB,EAAlC,MAAM,EAAE;IACN,MAAM,CAoClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,sUAFa;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAC,CA4M7D;AAED;;;;;;;;GAQG;AACH,+EAHW,UAAU,MAAM,CAAC,GACf;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAe/E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH;IA3B+B,KAAK;IACT,OAAO,EAAvB,MAAM;IACkB,QAAQ;IACd,QAAQ,EAA1B,MAAM,EAAE;IACQ,aAAa,EAA7B,MAAM;IACU,aAAa,EAA7B,MAAM;IACuB,MAAM;IACnB,wBAAwB,EAAxC,MAAM;IACU,oBAAoB,EAApC,MAAM;IACU,kBAAkB,EAAlC,MAAM;IACU,eAAe,EAA/B,MAAM;IACU,eAAe,EAA/B,MAAM;IACU,oBAAoB,EAApC,MAAM;IAC6B,sBAAsB,EAAzD;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC;IAGC,eAAe,GAAzC,eAAe;IAGsF,MAAM,EAA3G,OAAO,iEAAiE,EAAE,iBAAiB;IAGlE,MAAM,GAA/B,cAAc;IACiD,aAAa,GAA5E,OAAO,wBAAwB,EAAE,iBAAiB,EAAE;IAElD,MAAM,CA4UlB;+BAhgC8B,qBAAqB;gCAIpB,6CAA6C"}
|
package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js
CHANGED
|
@@ -19,6 +19,7 @@ import { rasterization_material_bucket } from "../../expand/bucket/chunk_rasteri
|
|
|
19
19
|
import { construct_primitive_state } from "../../bucket/construct_primitive_state.js";
|
|
20
20
|
import { filter_materials_by_bucket } from "../../bucket/filter_materials_by_bucket.js";
|
|
21
21
|
import {
|
|
22
|
+
enquire_prepare_meshlet_draw_commands_by_material_pipelines,
|
|
22
23
|
graph_prepare_meshlet_draw_commands_by_material
|
|
23
24
|
} from "../../bucket/prepare_meshlet_draw_commands_by_material.js";
|
|
24
25
|
import { FORWARD_LIGHT_LAYOUT } from "../../forward/forward_template_pipeline.js";
|
|
@@ -52,6 +53,23 @@ import {
|
|
|
52
53
|
|
|
53
54
|
const WARP_BUFFER_SIZE = AVBOIT_WARP_STRUCT.size;
|
|
54
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Offer the pipelines {@link graph_rasterize_meshes_transparent_avboit} runs with whatever is transparent — see
|
|
58
|
+
* {@link PipelineEnquiry}: the meshlets' draw commands, the occupancy, the warp, the integral and the resolve. The
|
|
59
|
+
* splat and the draw are a pipeline a material template, which arrive with the materials, and a side channel's
|
|
60
|
+
* passes are the channel's to offer.
|
|
61
|
+
*
|
|
62
|
+
* @param {import("../../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
|
|
63
|
+
*/
|
|
64
|
+
export function enquire_rasterize_meshes_transparent_avboit_pipelines(enquiry) {
|
|
65
|
+
enquire_prepare_meshlet_draw_commands_by_material_pipelines(enquiry);
|
|
66
|
+
|
|
67
|
+
enquiry.compute.push(shader_avboit_occupancy.pipeline);
|
|
68
|
+
enquiry.compute.push(shader_avboit_build_warp.pipeline);
|
|
69
|
+
enquiry.compute.push(shader_avboit_integrate.pipeline);
|
|
70
|
+
enquiry.render.push(shader_avboit_resolve.pipeline);
|
|
71
|
+
}
|
|
72
|
+
|
|
55
73
|
/**
|
|
56
74
|
* What a caller that passes no settings gets: every switch at its documented default.
|
|
57
75
|
* @type {AVBOITSettings}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Offer the pipelines {@link graph_rasterize_meshes_transparent_oit} runs with whatever is transparent — see
|
|
3
|
+
* {@link PipelineEnquiry}: the meshlets' draw commands and the blend over the scene. The moments and their resolve
|
|
4
|
+
* are a pipeline a material template, which arrive with the materials.
|
|
5
|
+
*
|
|
6
|
+
* @param {import("../../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
|
|
7
|
+
* @param {GPUTextureFormat} color_format the scene colour's, which the blend draws into
|
|
8
|
+
*/
|
|
9
|
+
export function enquire_rasterize_meshes_transparent_oit_pipelines(enquiry: import("../../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry, color_format: GPUTextureFormat): void;
|
|
1
10
|
/**
|
|
2
11
|
* Order-independent transparency. Does not write depth.
|
|
3
12
|
*
|
package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph_rasterize_meshes_transparent_oit.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graph_rasterize_meshes_transparent_oit.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.js"],"names":[],"mappings":"AAkCA;;;;;;;GAOG;AACH,4EAHW,OAAO,gDAAgD,EAAE,eAAe,wCAOlF;AAkXD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wSAFa,MAAM,CA6OlB"}
|
|
@@ -17,6 +17,7 @@ import { rasterization_material_bucket } from "../../expand/bucket/chunk_rasteri
|
|
|
17
17
|
import { construct_primitive_state } from "../../bucket/construct_primitive_state.js";
|
|
18
18
|
import { filter_materials_by_bucket } from "../../bucket/filter_materials_by_bucket.js";
|
|
19
19
|
import {
|
|
20
|
+
enquire_prepare_meshlet_draw_commands_by_material_pipelines,
|
|
20
21
|
graph_prepare_meshlet_draw_commands_by_material
|
|
21
22
|
} from "../../bucket/prepare_meshlet_draw_commands_by_material.js";
|
|
22
23
|
import {
|
|
@@ -31,6 +32,20 @@ import { ShaderSwitchSet } from "../../../shader/compiler/ShaderSwitchSet.js";
|
|
|
31
32
|
import { FORWARD_LIGHT_LAYOUT } from "../../forward/forward_template_pipeline.js";
|
|
32
33
|
import { SHADING_SCENE_LAYOUT } from "../../forward/SHADING_SCENE_RESOURCE_GROUP.js";
|
|
33
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Offer the pipelines {@link graph_rasterize_meshes_transparent_oit} runs with whatever is transparent — see
|
|
37
|
+
* {@link PipelineEnquiry}: the meshlets' draw commands and the blend over the scene. The moments and their resolve
|
|
38
|
+
* are a pipeline a material template, which arrive with the materials.
|
|
39
|
+
*
|
|
40
|
+
* @param {import("../../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
|
|
41
|
+
* @param {GPUTextureFormat} color_format the scene colour's, which the blend draws into
|
|
42
|
+
*/
|
|
43
|
+
export function enquire_rasterize_meshes_transparent_oit_pipelines(enquiry, color_format) {
|
|
44
|
+
enquire_prepare_meshlet_draw_commands_by_material_pipelines(enquiry);
|
|
45
|
+
|
|
46
|
+
enquiry.render.push(shader_oit_blend.pipeline_for([color_format]));
|
|
47
|
+
}
|
|
48
|
+
|
|
34
49
|
/**
|
|
35
50
|
*
|
|
36
51
|
* @param {FrameGraph} graph
|
|
@@ -42,6 +42,12 @@ export class ReSTIRDI {
|
|
|
42
42
|
* @type {number}
|
|
43
43
|
*/
|
|
44
44
|
denoise_iterations: number;
|
|
45
|
+
/**
|
|
46
|
+
* Offer the pipelines {@link execute} dispatches as this is set now — see {@link PipelineEnquiry}.
|
|
47
|
+
*
|
|
48
|
+
* @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
|
|
49
|
+
*/
|
|
50
|
+
enquirePipelines(enquiry: import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry): void;
|
|
45
51
|
/**
|
|
46
52
|
* Add the ReSTIR DI pass to the frame graph and return its HDR radiance texture handle.
|
|
47
53
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReSTIRDI.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/restir/di/ReSTIRDI.js"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH;;;;;;;;;;GAUG;AACH;IAkDI;;OAEG;IACH,sBAFW,eAAe,EAIzB;IArDD;;;OAGG;IACH,WAFU,MAAM,CAEF;IAEd;;;;OAIG;IACH,yBAFU,OAAO,CAEc;IAE/B;;;;OAIG;IACH,iBAFU,OAAO,CAEM;IAEvB;;;;OAIG;IACH,oBAFU,MAAM,CAEO;
|
|
1
|
+
{"version":3,"file":"ReSTIRDI.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/restir/di/ReSTIRDI.js"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH;;;;;;;;;;GAUG;AACH;IAkDI;;OAEG;IACH,sBAFW,eAAe,EAIzB;IArDD;;;OAGG;IACH,WAFU,MAAM,CAEF;IAEd;;;;OAIG;IACH,yBAFU,OAAO,CAEc;IAE/B;;;;OAIG;IACH,iBAFU,OAAO,CAEM;IAEvB;;;;OAIG;IACH,oBAFU,MAAM,CAEO;IA8BvB;;;;OAIG;IACH,0BAFW,OAAO,6CAA6C,EAAE,eAAe,QAI/E;IAgCD;;;;;;;;;;;;;;;;;;OAkBG;IACH;QAf8B,KAAK,EAAxB,UAAU;QACa,IAAI,EAA3B,cAAc;QACC,KAAK,EAApB,MAAM;QACS,GAAG,EAAlB,MAAM;QACS,MAAM,EAArB,MAAM;QACS,MAAM,EAArB,MAAM;QACS,QAAQ,EAAvB,MAAM;QACS,QAAQ,EAAvB,MAAM;QACS,cAAc,EAA7B,MAAM;QACS,GAAG,EAAlB,MAAM;QACS,kBAAkB,EAAjC,MAAM;QACS,cAAc,EAA7B,MAAM;QACS,YAAY,EAA3B,MAAM;QACJ,MAAM,CA4ClB;IAED,gBAOC;;CACJ;yBAvLY,OAAO,8DAA8D,EAAE,UAAU;8BACjF,OAAO,0BAA0B,EAAE,eAAe;6BAClD,OAAO,8BAA8B,EAAE,cAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RTXDI_PackedReservoir } from "../reservoir/RTXDI_PackedReservoir.js";
|
|
2
|
-
import { graph_restir_di } from "./graph_restir_di.js";
|
|
2
|
+
import { enquire_restir_di_pipelines, graph_restir_di } from "./graph_restir_di.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @typedef {import("../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph} FrameGraph
|
|
@@ -75,6 +75,15 @@ export class ReSTIRDI {
|
|
|
75
75
|
this.#graphics = graphics;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Offer the pipelines {@link execute} dispatches as this is set now — see {@link PipelineEnquiry}.
|
|
80
|
+
*
|
|
81
|
+
* @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
|
|
82
|
+
*/
|
|
83
|
+
enquirePipelines(enquiry) {
|
|
84
|
+
enquire_restir_di_pipelines(enquiry, this.denoise_enabled, this.denoise_iterations);
|
|
85
|
+
}
|
|
86
|
+
|
|
78
87
|
/**
|
|
79
88
|
* Ensure the reservoir buffers exist and match the given pixel count.
|
|
80
89
|
* @param {number} width
|