@woosh/meep-engine 3.75.0 → 3.77.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/editor/particles/effect/ParticleReferenceSimulation.d.ts +11 -0
- package/editor/particles/effect/ParticleReferenceSimulation.d.ts.map +1 -1
- package/editor/particles/effect/ParticleReferenceSimulation.js +14 -0
- package/editor/view/particles/effect/ParticleGraphEditorView.js +1 -1
- package/package.json +1 -1
- package/src/engine/asset/GameAssetType.d.ts +1 -0
- package/src/engine/asset/GameAssetType.js +5 -1
- package/src/engine/asset/loaders/GroomAssetLoader.d.ts +33 -0
- package/src/engine/asset/loaders/GroomAssetLoader.d.ts.map +1 -0
- package/src/engine/asset/loaders/GroomAssetLoader.js +113 -0
- package/src/engine/graphics/ecs/hair/Hair.d.ts +54 -0
- package/src/engine/graphics/ecs/hair/Hair.d.ts.map +1 -0
- package/src/engine/graphics/ecs/hair/Hair.js +70 -0
- package/src/engine/graphics/ecs/hair/HairDynamics.d.ts +63 -0
- package/src/engine/graphics/ecs/hair/HairDynamics.d.ts.map +1 -0
- package/src/engine/graphics/ecs/hair/HairDynamics.js +82 -0
- package/src/engine/graphics/hair/Groom.d.ts +175 -0
- package/src/engine/graphics/hair/Groom.d.ts.map +1 -0
- package/src/engine/graphics/hair/Groom.js +249 -0
- package/src/engine/graphics/hair/GroomSerializationAdapter.d.ts +50 -0
- package/src/engine/graphics/hair/GroomSerializationAdapter.d.ts.map +1 -0
- package/src/engine/graphics/hair/GroomSerializationAdapter.js +150 -0
- package/src/engine/graphics/hair/GroomSerializationUpgrader_0_1.d.ts +8 -0
- package/src/engine/graphics/hair/GroomSerializationUpgrader_0_1.d.ts.map +1 -0
- package/src/engine/graphics/hair/GroomSerializationUpgrader_0_1.js +31 -0
- package/src/engine/graphics/hair/groom_bind_to_mesh.d.ts +85 -0
- package/src/engine/graphics/hair/groom_bind_to_mesh.d.ts.map +1 -0
- package/src/engine/graphics/hair/groom_bind_to_mesh.js +216 -0
- package/src/engine/graphics/hair/groom_build_group.d.ts +90 -0
- package/src/engine/graphics/hair/groom_build_group.d.ts.map +1 -0
- package/src/engine/graphics/hair/groom_build_group.js +496 -0
- package/src/engine/graphics/hair/groom_build_guides.d.ts +43 -0
- package/src/engine/graphics/hair/groom_build_guides.d.ts.map +1 -0
- package/src/engine/graphics/hair/groom_build_guides.js +267 -0
- package/src/engine/graphics/hair/groom_generate_scalp.d.ts +29 -0
- package/src/engine/graphics/hair/groom_generate_scalp.d.ts.map +1 -0
- package/src/engine/graphics/hair/groom_generate_scalp.js +184 -0
- package/src/engine/graphics/hair/groom_rank_order.d.ts +15 -0
- package/src/engine/graphics/hair/groom_rank_order.d.ts.map +1 -0
- package/src/engine/graphics/hair/groom_rank_order.js +53 -0
- package/src/engine/graphics/hair/groom_root_spacing.d.ts +14 -0
- package/src/engine/graphics/hair/groom_root_spacing.d.ts.map +1 -0
- package/src/engine/graphics/hair/groom_root_spacing.js +253 -0
- package/src/engine/graphics3/HairColliderSystem.d.ts +59 -0
- package/src/engine/graphics3/HairColliderSystem.d.ts.map +1 -0
- package/src/engine/graphics3/HairColliderSystem.js +270 -0
- package/src/engine/graphics3/HairSystem.d.ts +119 -0
- package/src/engine/graphics3/HairSystem.d.ts.map +1 -0
- package/src/engine/graphics3/HairSystem.js +722 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/shade/assets/textures/hair_scattering.bin +0 -0
- package/src/shade/device/pipeline/PipelineEnquiry.d.ts +11 -0
- package/src/shade/device/pipeline/PipelineEnquiry.d.ts.map +1 -1
- package/src/shade/device/pipeline/PipelineEnquiry.js +13 -0
- package/src/shade/playground/hair/index.html +50 -0
- package/src/shade/playground/hair/main.d.ts +2 -0
- package/src/shade/playground/hair/main.d.ts.map +1 -0
- package/src/shade/playground/hair/main.js +297 -0
- package/src/shade/playground/hair_skinned/index.html +192 -0
- package/src/shade/playground/hair_skinned/main.d.ts +7 -0
- package/src/shade/playground/hair_skinned/main.d.ts.map +1 -0
- package/src/shade/playground/hair_skinned/main.js +481 -0
- package/src/shade/playground/hair_skinned/skinned_hair.d.ts +49 -0
- package/src/shade/playground/hair_skinned/skinned_hair.d.ts.map +1 -0
- package/src/shade/playground/hair_skinned/skinned_hair.js +362 -0
- package/src/shade/playground/screen_probes/README.md +54 -0
- package/src/shade/playground/screen_probes/index.html +271 -0
- package/src/shade/playground/screen_probes/main.d.ts +8 -0
- package/src/shade/playground/screen_probes/main.d.ts.map +1 -0
- package/src/shade/playground/screen_probes/main.js +527 -0
- package/src/shade/playground/sparks/README.md +36 -0
- package/src/shade/playground/sparks/index.html +145 -0
- package/src/shade/playground/sparks/main.d.ts +7 -0
- package/src/shade/playground/sparks/main.d.ts.map +1 -0
- package/src/shade/playground/sparks/main.js +312 -0
- package/src/shade/playground/sparks/sparks_effect.d.ts +72 -0
- package/src/shade/playground/sparks/sparks_effect.d.ts.map +1 -0
- package/src/shade/playground/sparks/sparks_effect.js +180 -0
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +72 -11
- package/src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSETS.d.ts +6 -0
- package/src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSETS.d.ts.map +1 -1
- package/src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSETS.js +10 -0
- package/src/shade/renderer/acoustics/GPUAcousticLattice.d.ts +1 -1
- package/src/shade/renderer/acoustics/GPUAcousticProbes.d.ts +1 -1
- package/src/shade/renderer/acoustics/GPUAcoustics.d.ts +1 -1
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts +3 -2
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
- package/src/shade/renderer/animation/GPUAnimationManager.js +74 -3
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +13 -3
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +16 -5
- package/src/shade/renderer/animation/skinning/shader_meshlet_apply_skinning.js +8 -8
- package/src/shade/renderer/deferred/chunk_read_gBuffer_material.d.ts.map +1 -1
- package/src/shade/renderer/deferred/chunk_read_gBuffer_material.js +3 -1
- package/src/shade/renderer/deferred/chunk_shade_direct_lights.d.ts +23 -0
- package/src/shade/renderer/deferred/chunk_shade_direct_lights.d.ts.map +1 -0
- package/src/shade/renderer/deferred/chunk_shade_direct_lights.js +111 -0
- package/src/shade/renderer/deferred/chunk_shade_directional_lights.d.ts +19 -6
- package/src/shade/renderer/deferred/chunk_shade_directional_lights.d.ts.map +1 -1
- package/src/shade/renderer/deferred/chunk_shade_directional_lights.js +30 -21
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.d.ts +12 -22
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.d.ts.map +1 -1
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.js +20 -100
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.d.ts.map +1 -1
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.js +6 -4
- package/src/shade/renderer/deferred/chunk_standard_material_direct_light_lobe.d.ts +15 -0
- package/src/shade/renderer/deferred/chunk_standard_material_direct_light_lobe.d.ts.map +1 -0
- package/src/shade/renderer/deferred/chunk_standard_material_direct_light_lobe.js +47 -0
- package/src/shade/renderer/extension/ShadowAtlas.d.ts +75 -0
- package/src/shade/renderer/extension/ShadowAtlas.d.ts.map +1 -0
- package/src/shade/renderer/extension/ShadowAtlas.js +133 -0
- package/src/shade/renderer/extension/ViewLighting.d.ts +101 -0
- package/src/shade/renderer/extension/ViewLighting.d.ts.map +1 -0
- package/src/shade/renderer/extension/ViewLighting.js +168 -0
- 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 +7 -7
- 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/brick4/gpu/draw/shader_brick4_indirect_lighting.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.js +3 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts +37 -7
- 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 +132 -8
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +3 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +6 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js +3 -1
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +15 -7
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +40 -9
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts +23 -0
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.js +26 -0
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeDebugView.d.ts +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeDebugView.js +6 -0
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +13 -1
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +23 -1
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.js +2 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts +29 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.js +102 -0
- package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.d.ts +8 -1
- package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.js +27 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts +4 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.js +4 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.d.ts +11 -5
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.js +28 -10
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts +36 -2
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.js +149 -4
- package/src/shade/renderer/global_illumination/shader_resolve_indirect_lighting.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/shader_resolve_indirect_lighting.js +3 -1
- package/src/shade/renderer/global_illumination/sharc/sharc_constants.d.ts +0 -18
- package/src/shade/renderer/global_illumination/sharc/sharc_constants.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/sharc/sharc_constants.js +1 -21
- package/src/shade/renderer/hair/GPUHairSystem.d.ts +278 -0
- package/src/shade/renderer/hair/GPUHairSystem.d.ts.map +1 -0
- package/src/shade/renderer/hair/GPUHairSystem.js +2263 -0
- package/src/shade/renderer/hair/HAIR.d.ts +121 -0
- package/src/shade/renderer/hair/HAIR.d.ts.map +1 -0
- package/src/shade/renderer/hair/HAIR.js +136 -0
- package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.d.ts +17 -0
- package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.d.ts.map +1 -0
- package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.js +104 -0
- package/src/shade/renderer/hair/HAIR_FRAME_STRUCTS.d.ts +15 -0
- package/src/shade/renderer/hair/HAIR_FRAME_STRUCTS.d.ts.map +1 -0
- package/src/shade/renderer/hair/HAIR_FRAME_STRUCTS.js +70 -0
- package/src/shade/renderer/hair/HAIR_SIMULATION.d.ts +139 -0
- package/src/shade/renderer/hair/HAIR_SIMULATION.d.ts.map +1 -0
- package/src/shade/renderer/hair/HAIR_SIMULATION.js +160 -0
- package/src/shade/renderer/hair/HairFrame.d.ts +41 -0
- package/src/shade/renderer/hair/HairFrame.d.ts.map +1 -0
- package/src/shade/renderer/hair/HairFrame.js +76 -0
- package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts +42 -0
- package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts.map +1 -0
- package/src/shade/renderer/hair/chunk_hair_bsdf.js +170 -0
- package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts +37 -0
- package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts.map +1 -0
- package/src/shade/renderer/hair/chunk_hair_dual_scattering.js +158 -0
- package/src/shade/renderer/hair/chunk_hair_guide.d.ts +59 -0
- package/src/shade/renderer/hair/chunk_hair_guide.d.ts.map +1 -0
- package/src/shade/renderer/hair/chunk_hair_guide.js +179 -0
- package/src/shade/renderer/hair/chunk_hair_pixel.d.ts +32 -0
- package/src/shade/renderer/hair/chunk_hair_pixel.d.ts.map +1 -0
- package/src/shade/renderer/hair/chunk_hair_pixel.js +116 -0
- package/src/shade/renderer/hair/chunk_hair_strand.d.ts +40 -0
- package/src/shade/renderer/hair/chunk_hair_strand.d.ts.map +1 -0
- package/src/shade/renderer/hair/chunk_hair_strand.js +85 -0
- package/src/shade/renderer/hair/chunk_hair_volume.d.ts +32 -0
- package/src/shade/renderer/hair/chunk_hair_volume.d.ts.map +1 -0
- package/src/shade/renderer/hair/chunk_hair_volume.js +115 -0
- package/src/shade/renderer/hair/hair_id_draw.d.ts +24 -0
- package/src/shade/renderer/hair/hair_id_draw.d.ts.map +1 -0
- package/src/shade/renderer/hair/hair_id_draw.js +135 -0
- package/src/shade/renderer/hair/hair_lighting.d.ts +53 -0
- package/src/shade/renderer/hair/hair_lighting.d.ts.map +1 -0
- package/src/shade/renderer/hair/hair_lighting.js +279 -0
- package/src/shade/renderer/hair/hair_scattering_lut.d.ts +75 -0
- package/src/shade/renderer/hair/hair_scattering_lut.d.ts.map +1 -0
- package/src/shade/renderer/hair/hair_scattering_lut.js +271 -0
- package/src/shade/renderer/hair/hair_shadow_draw.d.ts +32 -0
- package/src/shade/renderer/hair/hair_shadow_draw.d.ts.map +1 -0
- package/src/shade/renderer/hair/hair_shadow_draw.js +123 -0
- package/src/shade/renderer/hair/hair_stamp.d.ts +33 -0
- package/src/shade/renderer/hair/hair_stamp.d.ts.map +1 -0
- package/src/shade/renderer/hair/hair_stamp.js +175 -0
- package/src/shade/renderer/hair/shader_hair_classes.d.ts +22 -0
- package/src/shade/renderer/hair/shader_hair_classes.d.ts.map +1 -0
- package/src/shade/renderer/hair/shader_hair_classes.js +90 -0
- package/src/shade/renderer/hair/shader_hair_cull.d.ts +37 -0
- package/src/shade/renderer/hair/shader_hair_cull.d.ts.map +1 -0
- package/src/shade/renderer/hair/shader_hair_cull.js +251 -0
- package/src/shade/renderer/hair/shader_hair_lod.d.ts +39 -0
- package/src/shade/renderer/hair/shader_hair_lod.d.ts.map +1 -0
- package/src/shade/renderer/hair/shader_hair_lod.js +362 -0
- package/src/shade/renderer/hair/shader_hair_roots.d.ts +36 -0
- package/src/shade/renderer/hair/shader_hair_roots.d.ts.map +1 -0
- package/src/shade/renderer/hair/shader_hair_roots.js +261 -0
- package/src/shade/renderer/hair/shader_hair_shadow_list.d.ts +44 -0
- package/src/shade/renderer/hair/shader_hair_shadow_list.d.ts.map +1 -0
- package/src/shade/renderer/hair/shader_hair_shadow_list.js +240 -0
- package/src/shade/renderer/hair/shader_hair_simulate.d.ts +55 -0
- package/src/shade/renderer/hair/shader_hair_simulate.d.ts.map +1 -0
- package/src/shade/renderer/hair/shader_hair_simulate.js +563 -0
- package/src/shade/renderer/hair/shader_hair_volume.d.ts +28 -0
- package/src/shade/renderer/hair/shader_hair_volume.d.ts.map +1 -0
- package/src/shade/renderer/hair/shader_hair_volume.js +154 -0
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/loader/usd/usd_build_scene.d.ts +31 -0
- package/src/shade/renderer/loader/usd/usd_build_scene.d.ts.map +1 -1
- package/src/shade/renderer/loader/usd/usd_build_scene.js +36 -21
- package/src/shade/renderer/loader/usd/usd_groom_extension.d.ts +65 -0
- package/src/shade/renderer/loader/usd/usd_groom_extension.d.ts.map +1 -0
- package/src/shade/renderer/loader/usd/usd_groom_extension.js +470 -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 +28 -0
- package/src/shade/renderer/particles/graph/ParticleNodeRegistry.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/ParticleNodeRegistry.js +22 -0
- package/src/shade/renderer/particles/graph/groups/particle_builtin_groups.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/groups/particle_builtin_groups.js +4 -0
- package/src/shade/renderer/particles/graph/groups/particle_groups_scene.d.ts +32 -0
- package/src/shade/renderer/particles/graph/groups/particle_groups_scene.d.ts.map +1 -0
- package/src/shade/renderer/particles/graph/groups/particle_groups_scene.js +80 -0
- package/src/shade/renderer/particles/graph/particle_node_parameters.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/particle_node_parameters.js +1 -0
- package/src/shade/renderer/particles/graph/particle_node_presentation.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/particle_node_presentation.js +12 -0
- package/src/shade/renderer/particles/graph_particles.d.ts +5 -1
- package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles.js +18 -3
- package/src/shade/renderer/particles/isa/InstructionStream.d.ts +25 -0
- package/src/shade/renderer/particles/isa/InstructionStream.d.ts.map +1 -1
- package/src/shade/renderer/particles/isa/InstructionStream.js +25 -0
- package/src/shade/renderer/particles/isa/ParticleVMISA.d.ts +9 -0
- package/src/shade/renderer/particles/isa/ParticleVMISA.d.ts.map +1 -1
- package/src/shade/renderer/particles/isa/ParticleVMISA.js +20 -0
- package/src/shade/renderer/particles/isa/particle_program_reads_scene_sdf.d.ts +9 -0
- package/src/shade/renderer/particles/isa/particle_program_reads_scene_sdf.d.ts.map +1 -0
- package/src/shade/renderer/particles/isa/particle_program_reads_scene_sdf.js +29 -0
- package/src/shade/renderer/particles/optimizer/particle_program_equivalence.d.ts +2 -1
- package/src/shade/renderer/particles/optimizer/particle_program_equivalence.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/particle_program_equivalence.js +27 -5
- package/src/shade/renderer/particles/optimizer/particle_program_fuzz.js +1 -1
- package/src/shade/renderer/particles/optimizer/particle_vm_semantics.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/particle_vm_semantics.js +5 -0
- package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts +7 -0
- package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/EmitterRegistry.js +10 -0
- package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts +5 -0
- package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/ParticleEmitter.js +5 -0
- package/src/shade/renderer/particles/runtime/ProgramHeap.d.ts +8 -0
- package/src/shade/renderer/particles/runtime/ProgramHeap.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/ProgramHeap.js +25 -0
- package/src/shade/renderer/particles/shaders/shader_particle_emit.d.ts +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_emit.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_emit.js +9 -3
- package/src/shade/renderer/particles/shaders/shader_particle_emit_wide.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_emit_wide.js +4 -2
- package/src/shade/renderer/particles/shaders/shader_particle_simulate.d.ts +2 -2
- package/src/shade/renderer/particles/shaders/shader_particle_simulate.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_simulate.js +10 -4
- package/src/shade/renderer/particles/shaders/shader_particle_simulate_wide.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_simulate_wide.js +4 -2
- package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts +14 -1
- package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts.map +1 -1
- package/src/shade/renderer/particles/vm/ParticleVMReference.js +34 -1
- package/src/shade/renderer/particles/vm/chunk_particle_vm.d.ts.map +1 -1
- package/src/shade/renderer/particles/vm/chunk_particle_vm.js +10 -0
- package/src/shade/renderer/particles/vm/chunk_particle_vm_scene_sdf.d.ts +39 -0
- package/src/shade/renderer/particles/vm/chunk_particle_vm_scene_sdf.d.ts.map +1 -0
- package/src/shade/renderer/particles/vm/chunk_particle_vm_scene_sdf.js +90 -0
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts +4 -1
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts.map +1 -1
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.js +14 -2
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance.d.ts +1 -1
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance.d.ts.map +1 -1
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance.js +9 -3
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance_wide.d.ts.map +1 -1
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance_wide.js +4 -2
- package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.js +4 -1
- package/src/shade/renderer/path_tracer/shader/chunk_shading_closure_from_material_data.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/shader/chunk_shading_closure_from_material_data.js +3 -1
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts +4 -1
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/SSR.js +9 -0
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts +16 -1
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.js +47 -3
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.js +5 -3
- package/src/shade/renderer/postprocess/ssr/ssr_combine_shader.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/ssr_combine_shader.js +6 -5
- package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts +7 -4
- package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.js +26 -16
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment.js +5 -2
- 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 -0
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_splat.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_splat.js +4 -1
- package/src/shade/renderer/rasterize/native/oit/oit_resolve_fragment_body.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/oit/oit_resolve_fragment_body.js +5 -1
- package/src/shade/renderer/rasterize/native/oit/shader_oit_generate_moments.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/oit/shader_oit_generate_moments.js +7 -4
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +7 -0
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +18 -0
- package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts +13 -8
- package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.js +18 -14
- package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.d.ts +3 -2
- package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.js +12 -4
- package/src/shade/renderer/shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.js +1 -0
- package/src/shade/renderer/shader/chunk/material/chunk_compute_indirect_specular.js +1 -1
- package/src/shade/renderer/shader/chunk/material/chunk_metalness_to_specular_F90.d.ts +16 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metalness_to_specular_F90.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metalness_to_specular_F90.js +25 -0
- package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.js +2 -2
- package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_signed_distance_gradient.d.ts +20 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_signed_distance_gradient.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_signed_distance_gradient.js +134 -0
- package/src/shade/renderer/shader/compiler/ShaderSwitch.d.ts +1 -1
- package/src/shade/renderer/shader/compiler/ShaderSwitchSet.d.ts +1 -1
- package/src/shade/renderer/shader/resource/ShaderResourceDescriptor.d.ts +1 -1
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts +15 -0
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +69 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_directional_atlas_casters.d.ts +10 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_directional_atlas_casters.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_directional_atlas_casters.js +22 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_point2.d.ts +2 -2
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_point2.js +2 -2
- package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
- package/src/shade/renderer/wind/GPUSceneWind.d.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_standard_material_direct_light_lobe.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/deferred/chunk_standard_material_direct_light_lobe.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;GAWG;AACH,wDAFU,SAAS,CAyBjB;0BAtCwB,iCAAiC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { INCIDENT_LIGHT_STRUCT } from "../shader/chunk/light/INCIDENT_LIGHT_STRUCT.js";
|
|
2
|
+
import { REFLECTED_LIGHT_STRUCT } from "../shader/chunk/light/REFLECTED_LIGHT_STRUCT.js";
|
|
3
|
+
import { chunk_re_direct_physical } from "../shader/chunk/material/chunk_re_direct_physical.js";
|
|
4
|
+
import { GEOMETRIC_SHADING_INFO_STRUCT } from "../shader/chunk/material/GEOMETRIC_SHADING_INFO_STRUCT.js";
|
|
5
|
+
import { MATERIAL_SHADING_INFO_STRUCT } from "../shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.js";
|
|
6
|
+
import { CodeChunk } from "../shader/compiler/CodeChunk.js";
|
|
7
|
+
import { UNRESTRICTED_POINTER_PARAMETERS_EXTENSION } from "../shader/resource/BUFFER_VIEW.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The standard material's lobe for the direct-light loops ({@link chunk_shade_direct_lights},
|
|
11
|
+
* `chunk_shade_directional_lights`): its context carries the material and the geometry at the shaded point and
|
|
12
|
+
* accumulates the reflected light, and each light goes through `re_direct_physical`. Shadows are taken along the
|
|
13
|
+
* shading normal.
|
|
14
|
+
*
|
|
15
|
+
* ```wgsl
|
|
16
|
+
* struct DirectLightContext { material: MaterialShadingInfo, geometry: GeometricShadingInfo, reflected: ReflectedLight }
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @type {CodeChunk}
|
|
20
|
+
*/
|
|
21
|
+
export const chunk_standard_material_direct_light_lobe = CodeChunk.from(
|
|
22
|
+
//language=WGSL
|
|
23
|
+
`
|
|
24
|
+
struct DirectLightContext {
|
|
25
|
+
material: ${MATERIAL_SHADING_INFO_STRUCT.wgsl_ref},
|
|
26
|
+
geometry: ${GEOMETRIC_SHADING_INFO_STRUCT.wgsl_ref},
|
|
27
|
+
reflected: ${REFLECTED_LIGHT_STRUCT.wgsl_ref},
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
fn direct_light_lobe(context: ptr<function, DirectLightContext>, light: ${INCIDENT_LIGHT_STRUCT.wgsl_ref}, atlas_casters: bool) {
|
|
31
|
+
re_direct_physical(light, (*context).geometry, (*context).material, &(*context).reflected);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
fn direct_light_visibility_normal(context: ptr<function, DirectLightContext>, light: ${INCIDENT_LIGHT_STRUCT.wgsl_ref}) -> vec3<f32> {
|
|
35
|
+
return (*context).geometry.shading_normal;
|
|
36
|
+
}
|
|
37
|
+
`, [
|
|
38
|
+
INCIDENT_LIGHT_STRUCT.declaration_chunk,
|
|
39
|
+
REFLECTED_LIGHT_STRUCT.declaration_chunk,
|
|
40
|
+
GEOMETRIC_SHADING_INFO_STRUCT.declaration_chunk,
|
|
41
|
+
MATERIAL_SHADING_INFO_STRUCT.declaration_chunk,
|
|
42
|
+
chunk_re_direct_physical,
|
|
43
|
+
]
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
// the reflected light accumulates through a pointer to a member of the context
|
|
47
|
+
chunk_standard_material_direct_light_lobe.addLanguageExtension(UNRESTRICTED_POINTER_PARAMETERS_EXTENSION);
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shadow atlas as the frame's shadow maps left it, and the views drawn into it this frame, for an extension whose
|
|
3
|
+
* surfaces cast shadows the scene's rasterizer does not draw.
|
|
4
|
+
*
|
|
5
|
+
* Such an extension draws its casters' depth into each view's rectangle, through the view's camera, as the scene's
|
|
6
|
+
* casters were drawn (`DEPTH_STENCIL_STATE_SHADOW`: reversed depth, `greater`), and publishes the atlas it wrote.
|
|
7
|
+
* Everything that samples the shadow maps after this phase — shading, the volumetrics, the extensions that light —
|
|
8
|
+
* then sees those casters.
|
|
9
|
+
*
|
|
10
|
+
* Only the views drawn this frame are listed: a map not redrawn keeps the depth it had, which an extension must not
|
|
11
|
+
* draw over again. A virtual shadow map and a point light's are not listed; their depth is not drawn straight into
|
|
12
|
+
* a rectangle of the atlas. The views are listed when first read, so a frame no extension draws casters into costs
|
|
13
|
+
* no listing.
|
|
14
|
+
*
|
|
15
|
+
* **In/out at {@link FramePhase.AfterGBuffer}, and carried only there.**
|
|
16
|
+
*/
|
|
17
|
+
export class ShadowAtlas extends FrameRecord {
|
|
18
|
+
static is_present_at(phase: any): boolean;
|
|
19
|
+
set atlas(handle: number);
|
|
20
|
+
/**
|
|
21
|
+
* The atlas, depth.
|
|
22
|
+
*
|
|
23
|
+
* @returns {number}
|
|
24
|
+
*/
|
|
25
|
+
get atlas(): number;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the frame's lights are shadow-mapped at all. A frame may be mapped and draw no view: a map not redrawn
|
|
28
|
+
* keeps the casters it was drawn with.
|
|
29
|
+
*
|
|
30
|
+
* @returns {boolean}
|
|
31
|
+
*/
|
|
32
|
+
get mapped(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The views drawn this frame; the first {@link view_count} are this frame's.
|
|
35
|
+
*
|
|
36
|
+
* @returns {ShadowAtlasView[]}
|
|
37
|
+
*/
|
|
38
|
+
get views(): ShadowAtlasView[];
|
|
39
|
+
/**
|
|
40
|
+
* @returns {number}
|
|
41
|
+
*/
|
|
42
|
+
get view_count(): number;
|
|
43
|
+
/**
|
|
44
|
+
* The renderer stating what lists the views drawn this frame; none where no shadow maps were drawn.
|
|
45
|
+
*
|
|
46
|
+
* @param {ShadowAtlasViewSource|null} source
|
|
47
|
+
*/
|
|
48
|
+
state_views(source: ShadowAtlasViewSource | null): void;
|
|
49
|
+
#private;
|
|
50
|
+
}
|
|
51
|
+
export type ShadowAtlasView = {
|
|
52
|
+
/**
|
|
53
|
+
* the view's camera as its casters were drawn: its matrices
|
|
54
|
+
* and its world frustum (`Camera#frustum`)
|
|
55
|
+
*/
|
|
56
|
+
camera: import("../camera/Camera.js").Camera;
|
|
57
|
+
/**
|
|
58
|
+
* the same camera's uniforms (`CAMERA_UNIFORM_STRUCT`)
|
|
59
|
+
*/
|
|
60
|
+
camera_buffer: GPUBuffer;
|
|
61
|
+
/**
|
|
62
|
+
* the view's rectangle in the atlas, `[x, y, width, height]` texels
|
|
63
|
+
*/
|
|
64
|
+
viewport: number[];
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* What states the views drawn into the atlas this frame: the first `drawn_view_count` entries of what
|
|
68
|
+
* `drawn_views()` returns, asked only when an extension reads them.
|
|
69
|
+
*/
|
|
70
|
+
export type ShadowAtlasViewSource = {
|
|
71
|
+
drawn_views: () => ShadowAtlasView[];
|
|
72
|
+
drawn_view_count: number;
|
|
73
|
+
};
|
|
74
|
+
import { FrameRecord } from "./FrameRecord.js";
|
|
75
|
+
//# sourceMappingURL=ShadowAtlas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShadowAtlas.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/extension/ShadowAtlas.js"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;GAeG;AACH;IAiBI,0CAEC;IAWD,0BAEC;IAXD;;;;OAIG;IACH,oBAEC;IAMD;;;;;OAKG;IACH,sBAEC;IAED;;;;OAIG;IACH,+BAIC;IAED;;OAEG;IACH,yBAIC;IAED;;;;OAIG;IACH,oBAFW,qBAAqB,GAAC,IAAI,QAKpC;;CAmBJ;;;;;;YA/Ha,OAAO,qBAAqB,EAAE,MAAM;;;;;;;;cAGpC,MAAM,EAAE;;;;;;;uBAQI,eAAe,EAAE;sBAC7B,MAAM;;4BAhBQ,kBAAkB"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { FramePhase } from "./FramePhase.js";
|
|
2
|
+
import { FrameRecord } from "./FrameRecord.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {Object} ShadowAtlasView
|
|
6
|
+
* @property {import("../camera/Camera.js").Camera} camera the view's camera as its casters were drawn: its matrices
|
|
7
|
+
* and its world frustum (`Camera#frustum`)
|
|
8
|
+
* @property {GPUBuffer} camera_buffer the same camera's uniforms (`CAMERA_UNIFORM_STRUCT`)
|
|
9
|
+
* @property {number[]} viewport the view's rectangle in the atlas, `[x, y, width, height]` texels
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* What states the views drawn into the atlas this frame: the first `drawn_view_count` entries of what
|
|
14
|
+
* `drawn_views()` returns, asked only when an extension reads them.
|
|
15
|
+
*
|
|
16
|
+
* @typedef {Object} ShadowAtlasViewSource
|
|
17
|
+
* @property {function(): ShadowAtlasView[]} drawn_views
|
|
18
|
+
* @property {number} drawn_view_count
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @type {ShadowAtlasView[]}
|
|
23
|
+
*/
|
|
24
|
+
const NO_VIEWS = Object.freeze([]);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The shadow atlas as the frame's shadow maps left it, and the views drawn into it this frame, for an extension whose
|
|
28
|
+
* surfaces cast shadows the scene's rasterizer does not draw.
|
|
29
|
+
*
|
|
30
|
+
* Such an extension draws its casters' depth into each view's rectangle, through the view's camera, as the scene's
|
|
31
|
+
* casters were drawn (`DEPTH_STENCIL_STATE_SHADOW`: reversed depth, `greater`), and publishes the atlas it wrote.
|
|
32
|
+
* Everything that samples the shadow maps after this phase — shading, the volumetrics, the extensions that light —
|
|
33
|
+
* then sees those casters.
|
|
34
|
+
*
|
|
35
|
+
* Only the views drawn this frame are listed: a map not redrawn keeps the depth it had, which an extension must not
|
|
36
|
+
* draw over again. A virtual shadow map and a point light's are not listed; their depth is not drawn straight into
|
|
37
|
+
* a rectangle of the atlas. The views are listed when first read, so a frame no extension draws casters into costs
|
|
38
|
+
* no listing.
|
|
39
|
+
*
|
|
40
|
+
* **In/out at {@link FramePhase.AfterGBuffer}, and carried only there.**
|
|
41
|
+
*/
|
|
42
|
+
export class ShadowAtlas extends FrameRecord {
|
|
43
|
+
#atlas = -1;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @type {ShadowAtlasViewSource|null}
|
|
47
|
+
*/
|
|
48
|
+
#source = null;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @type {ShadowAtlasView[]}
|
|
52
|
+
*/
|
|
53
|
+
#views = NO_VIEWS;
|
|
54
|
+
|
|
55
|
+
#view_count = 0;
|
|
56
|
+
|
|
57
|
+
#listed = false;
|
|
58
|
+
|
|
59
|
+
static is_present_at(phase) {
|
|
60
|
+
return phase === FramePhase.AfterGBuffer;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The atlas, depth.
|
|
65
|
+
*
|
|
66
|
+
* @returns {number}
|
|
67
|
+
*/
|
|
68
|
+
get atlas() {
|
|
69
|
+
return this.read(this.#atlas);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
set atlas(handle) {
|
|
73
|
+
this.#atlas = this.publish(handle);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Whether the frame's lights are shadow-mapped at all. A frame may be mapped and draw no view: a map not redrawn
|
|
78
|
+
* keeps the casters it was drawn with.
|
|
79
|
+
*
|
|
80
|
+
* @returns {boolean}
|
|
81
|
+
*/
|
|
82
|
+
get mapped() {
|
|
83
|
+
return this.#source !== null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The views drawn this frame; the first {@link view_count} are this frame's.
|
|
88
|
+
*
|
|
89
|
+
* @returns {ShadowAtlasView[]}
|
|
90
|
+
*/
|
|
91
|
+
get views() {
|
|
92
|
+
this.#list();
|
|
93
|
+
|
|
94
|
+
return this.#views;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @returns {number}
|
|
99
|
+
*/
|
|
100
|
+
get view_count() {
|
|
101
|
+
this.#list();
|
|
102
|
+
|
|
103
|
+
return this.#view_count;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The renderer stating what lists the views drawn this frame; none where no shadow maps were drawn.
|
|
108
|
+
*
|
|
109
|
+
* @param {ShadowAtlasViewSource|null} source
|
|
110
|
+
*/
|
|
111
|
+
state_views(source) {
|
|
112
|
+
this.#source = source;
|
|
113
|
+
this.#listed = false;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
#list() {
|
|
117
|
+
if (this.#listed) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
this.#listed = true;
|
|
122
|
+
|
|
123
|
+
const source = this.#source;
|
|
124
|
+
|
|
125
|
+
if (source === null) {
|
|
126
|
+
this.#views = NO_VIEWS;
|
|
127
|
+
this.#view_count = 0;
|
|
128
|
+
} else {
|
|
129
|
+
this.#views = source.drawn_views();
|
|
130
|
+
this.#view_count = source.drawn_view_count;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import("../shader/compiler/ShaderSwitchSet.js").ShaderSwitchSet} ShaderSwitchSet
|
|
3
|
+
* @typedef {import("../global_illumination/probe_clipmap/GPUProbeClipmapGI.js").GPUProbeClipmapGI} GPUProbeClipmapGI
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* What the frame lights a surface with, for an extension that shades samples of its own: this frame's light
|
|
7
|
+
* clusters, the shadow atlas, the volumetrics' look-up table and its metadata (the fog a surface is seen through),
|
|
8
|
+
* the renderer's shader switches (the shadow technique and the indirect lighting mode among them) and the probe
|
|
9
|
+
* clipmap GI, whose probes a pass that can read indirect light binds in every mode. The transparent surfaces are lit
|
|
10
|
+
* by exactly these.
|
|
11
|
+
*
|
|
12
|
+
* The light records, the environment and the shadow tables are the scene's and are reached through the view
|
|
13
|
+
* (`frame.view.scene.lights`, `frame.view.scene.shadow_context`); this record carries what only the frame has.
|
|
14
|
+
*
|
|
15
|
+
* Carried at {@link FramePhase.AfterLighting} and {@link FramePhase.AfterTransparency}, and **frozen at both**: the
|
|
16
|
+
* renderer states it once, and nothing an extension publishes into it would reach a pass that lights anything.
|
|
17
|
+
*/
|
|
18
|
+
export class ViewLighting extends FrameRecord {
|
|
19
|
+
static is_present_at(phase: any): boolean;
|
|
20
|
+
static is_writable_at(phase: any): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The light clusters' depth curve: a graph handle of a uniform buffer, `LIGHT_CLUSTER_PARAMETERS_RESOURCE`.
|
|
23
|
+
*
|
|
24
|
+
* @returns {number}
|
|
25
|
+
*/
|
|
26
|
+
get light_cluster_parameters(): number;
|
|
27
|
+
/**
|
|
28
|
+
* The light clusters' per-cell counts and offsets: a graph handle of a storage buffer,
|
|
29
|
+
* `LIGHT_CLUSTER_LOOKUP_RESOURCE`.
|
|
30
|
+
*
|
|
31
|
+
* @returns {number}
|
|
32
|
+
*/
|
|
33
|
+
get light_cluster_lookup(): number;
|
|
34
|
+
/**
|
|
35
|
+
* The light clusters' light indices: a graph handle of a storage buffer, `LIGHT_CLUSTER_DATA_RESOURCE`.
|
|
36
|
+
*
|
|
37
|
+
* @returns {number}
|
|
38
|
+
*/
|
|
39
|
+
get light_cluster_data(): number;
|
|
40
|
+
/**
|
|
41
|
+
* The shadow atlas every shadow-casting light samples: a graph handle of a depth texture.
|
|
42
|
+
*
|
|
43
|
+
* @returns {number}
|
|
44
|
+
*/
|
|
45
|
+
get shadowmap_atlas(): number;
|
|
46
|
+
/**
|
|
47
|
+
* The volumetrics' resolved look-up table, the in-scatter and transmittance a point is seen through:
|
|
48
|
+
* a graph handle of a 3D texture. Reads as no fog when the scene has none.
|
|
49
|
+
*
|
|
50
|
+
* @returns {number}
|
|
51
|
+
*/
|
|
52
|
+
get volumetrics_lut(): number;
|
|
53
|
+
/**
|
|
54
|
+
* How {@link volumetrics_lut} is addressed: a graph handle of a uniform buffer, `VOLUMETRICS_METADATA_STRUCT`.
|
|
55
|
+
*
|
|
56
|
+
* @returns {number}
|
|
57
|
+
*/
|
|
58
|
+
get volumetrics_metadata(): number;
|
|
59
|
+
/**
|
|
60
|
+
* The renderer's shader switches, which pick the shadow technique and the indirect lighting a lit pass links.
|
|
61
|
+
*
|
|
62
|
+
* @returns {ShaderSwitchSet}
|
|
63
|
+
*/
|
|
64
|
+
get shader_switches(): import("../shader/compiler/ShaderSwitchSet.js").ShaderSwitchSet;
|
|
65
|
+
/**
|
|
66
|
+
* The renderer's probe clipmap GI. A pass that can read indirect light binds its probes in every mode
|
|
67
|
+
* (`GPUProbeClipmapGI#write_sampling_bindings`); while it has no probes it is a clipmap of no cascade.
|
|
68
|
+
*
|
|
69
|
+
* @returns {GPUProbeClipmapGI}
|
|
70
|
+
*/
|
|
71
|
+
get probes(): import("../global_illumination/probe_clipmap/GPUProbeClipmapGI.js").GPUProbeClipmapGI;
|
|
72
|
+
/**
|
|
73
|
+
* State what the frame lights with. The renderer's, once, as the record is created; not an extension's.
|
|
74
|
+
*
|
|
75
|
+
* @param {{
|
|
76
|
+
* light_cluster_parameters: number,
|
|
77
|
+
* light_cluster_lookup: number,
|
|
78
|
+
* light_cluster_data: number,
|
|
79
|
+
* shadowmap_atlas: number,
|
|
80
|
+
* volumetrics_lut: number,
|
|
81
|
+
* volumetrics_metadata: number,
|
|
82
|
+
* shader_switches: ShaderSwitchSet,
|
|
83
|
+
* probes: GPUProbeClipmapGI,
|
|
84
|
+
* }} lighting
|
|
85
|
+
*/
|
|
86
|
+
state(lighting: {
|
|
87
|
+
light_cluster_parameters: number;
|
|
88
|
+
light_cluster_lookup: number;
|
|
89
|
+
light_cluster_data: number;
|
|
90
|
+
shadowmap_atlas: number;
|
|
91
|
+
volumetrics_lut: number;
|
|
92
|
+
volumetrics_metadata: number;
|
|
93
|
+
shader_switches: ShaderSwitchSet;
|
|
94
|
+
probes: GPUProbeClipmapGI;
|
|
95
|
+
}): void;
|
|
96
|
+
#private;
|
|
97
|
+
}
|
|
98
|
+
export type ShaderSwitchSet = import("../shader/compiler/ShaderSwitchSet.js").ShaderSwitchSet;
|
|
99
|
+
export type GPUProbeClipmapGI = import("../global_illumination/probe_clipmap/GPUProbeClipmapGI.js").GPUProbeClipmapGI;
|
|
100
|
+
import { FrameRecord } from "./FrameRecord.js";
|
|
101
|
+
//# sourceMappingURL=ViewLighting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewLighting.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/extension/ViewLighting.js"],"names":[],"mappings":"AAIA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AACH;IAkBI,0CAGC;IAED,2CAEC;IAED;;;;OAIG;IACH,uCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;OAIG;IACH,iCAEC;IAED;;;;OAIG;IACH,8BAEC;IAED;;;;;OAKG;IACH,8BAEC;IAED;;;;OAIG;IACH,mCAEC;IAED;;;;OAIG;IACH,uFAEC;IAED;;;;;OAKG;IACH,oGAEC;IAED;;;;;;;;;;;;;OAaG;IACH,gBAXW;QACV,wBAA8B,EAAE,MAAM,CAAC;QACvC,oBAA0B,EAAE,MAAM,CAAC;QACnC,kBAAwB,EAAE,MAAM,CAAC;QACjC,eAAqB,EAAE,MAAM,CAAC;QAC9B,eAAqB,EAAE,MAAM,CAAC;QAC9B,oBAA0B,EAAE,MAAM,CAAC;QACnC,eAAqB,EAAE,eAAe,CAAC;QACvC,MAAY,EAAE,iBAAiB,CAAC;KAC7B,QAcH;;CAiBJ;8BAlKY,OAAO,uCAAuC,EAAE,eAAe;gCAC/D,OAAO,2DAA2D,EAAE,iBAAiB;4BAJtE,kBAAkB"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { assert } from "../../../core/assert.js";
|
|
2
|
+
import { FramePhase } from "./FramePhase.js";
|
|
3
|
+
import { FrameRecord } from "./FrameRecord.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {import("../shader/compiler/ShaderSwitchSet.js").ShaderSwitchSet} ShaderSwitchSet
|
|
7
|
+
* @typedef {import("../global_illumination/probe_clipmap/GPUProbeClipmapGI.js").GPUProbeClipmapGI} GPUProbeClipmapGI
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* What the frame lights a surface with, for an extension that shades samples of its own: this frame's light
|
|
12
|
+
* clusters, the shadow atlas, the volumetrics' look-up table and its metadata (the fog a surface is seen through),
|
|
13
|
+
* the renderer's shader switches (the shadow technique and the indirect lighting mode among them) and the probe
|
|
14
|
+
* clipmap GI, whose probes a pass that can read indirect light binds in every mode. The transparent surfaces are lit
|
|
15
|
+
* by exactly these.
|
|
16
|
+
*
|
|
17
|
+
* The light records, the environment and the shadow tables are the scene's and are reached through the view
|
|
18
|
+
* (`frame.view.scene.lights`, `frame.view.scene.shadow_context`); this record carries what only the frame has.
|
|
19
|
+
*
|
|
20
|
+
* Carried at {@link FramePhase.AfterLighting} and {@link FramePhase.AfterTransparency}, and **frozen at both**: the
|
|
21
|
+
* renderer states it once, and nothing an extension publishes into it would reach a pass that lights anything.
|
|
22
|
+
*/
|
|
23
|
+
export class ViewLighting extends FrameRecord {
|
|
24
|
+
#light_cluster_parameters = -1;
|
|
25
|
+
#light_cluster_lookup = -1;
|
|
26
|
+
#light_cluster_data = -1;
|
|
27
|
+
#shadowmap_atlas = -1;
|
|
28
|
+
#volumetrics_lut = -1;
|
|
29
|
+
#volumetrics_metadata = -1;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @type {ShaderSwitchSet|null}
|
|
33
|
+
*/
|
|
34
|
+
#shader_switches = null;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @type {GPUProbeClipmapGI|null}
|
|
38
|
+
*/
|
|
39
|
+
#probes = null;
|
|
40
|
+
|
|
41
|
+
static is_present_at(phase) {
|
|
42
|
+
return phase === FramePhase.AfterLighting
|
|
43
|
+
|| phase === FramePhase.AfterTransparency;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static is_writable_at(phase) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The light clusters' depth curve: a graph handle of a uniform buffer, `LIGHT_CLUSTER_PARAMETERS_RESOURCE`.
|
|
52
|
+
*
|
|
53
|
+
* @returns {number}
|
|
54
|
+
*/
|
|
55
|
+
get light_cluster_parameters() {
|
|
56
|
+
return this.read(this.#light_cluster_parameters);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The light clusters' per-cell counts and offsets: a graph handle of a storage buffer,
|
|
61
|
+
* `LIGHT_CLUSTER_LOOKUP_RESOURCE`.
|
|
62
|
+
*
|
|
63
|
+
* @returns {number}
|
|
64
|
+
*/
|
|
65
|
+
get light_cluster_lookup() {
|
|
66
|
+
return this.read(this.#light_cluster_lookup);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The light clusters' light indices: a graph handle of a storage buffer, `LIGHT_CLUSTER_DATA_RESOURCE`.
|
|
71
|
+
*
|
|
72
|
+
* @returns {number}
|
|
73
|
+
*/
|
|
74
|
+
get light_cluster_data() {
|
|
75
|
+
return this.read(this.#light_cluster_data);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The shadow atlas every shadow-casting light samples: a graph handle of a depth texture.
|
|
80
|
+
*
|
|
81
|
+
* @returns {number}
|
|
82
|
+
*/
|
|
83
|
+
get shadowmap_atlas() {
|
|
84
|
+
return this.read(this.#shadowmap_atlas);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The volumetrics' resolved look-up table, the in-scatter and transmittance a point is seen through:
|
|
89
|
+
* a graph handle of a 3D texture. Reads as no fog when the scene has none.
|
|
90
|
+
*
|
|
91
|
+
* @returns {number}
|
|
92
|
+
*/
|
|
93
|
+
get volumetrics_lut() {
|
|
94
|
+
return this.read(this.#volumetrics_lut);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* How {@link volumetrics_lut} is addressed: a graph handle of a uniform buffer, `VOLUMETRICS_METADATA_STRUCT`.
|
|
99
|
+
*
|
|
100
|
+
* @returns {number}
|
|
101
|
+
*/
|
|
102
|
+
get volumetrics_metadata() {
|
|
103
|
+
return this.read(this.#volumetrics_metadata);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The renderer's shader switches, which pick the shadow technique and the indirect lighting a lit pass links.
|
|
108
|
+
*
|
|
109
|
+
* @returns {ShaderSwitchSet}
|
|
110
|
+
*/
|
|
111
|
+
get shader_switches() {
|
|
112
|
+
return this.#read_object(this.#shader_switches, 'shader_switches');
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The renderer's probe clipmap GI. A pass that can read indirect light binds its probes in every mode
|
|
117
|
+
* (`GPUProbeClipmapGI#write_sampling_bindings`); while it has no probes it is a clipmap of no cascade.
|
|
118
|
+
*
|
|
119
|
+
* @returns {GPUProbeClipmapGI}
|
|
120
|
+
*/
|
|
121
|
+
get probes() {
|
|
122
|
+
return this.#read_object(this.#probes, 'probes');
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* State what the frame lights with. The renderer's, once, as the record is created; not an extension's.
|
|
127
|
+
*
|
|
128
|
+
* @param {{
|
|
129
|
+
* light_cluster_parameters: number,
|
|
130
|
+
* light_cluster_lookup: number,
|
|
131
|
+
* light_cluster_data: number,
|
|
132
|
+
* shadowmap_atlas: number,
|
|
133
|
+
* volumetrics_lut: number,
|
|
134
|
+
* volumetrics_metadata: number,
|
|
135
|
+
* shader_switches: ShaderSwitchSet,
|
|
136
|
+
* probes: GPUProbeClipmapGI,
|
|
137
|
+
* }} lighting
|
|
138
|
+
*/
|
|
139
|
+
state(lighting) {
|
|
140
|
+
assert.defined(lighting.shader_switches, 'shader_switches');
|
|
141
|
+
assert.defined(lighting.probes, 'probes');
|
|
142
|
+
|
|
143
|
+
this.#light_cluster_parameters = this.republish(lighting.light_cluster_parameters);
|
|
144
|
+
this.#light_cluster_lookup = this.republish(lighting.light_cluster_lookup);
|
|
145
|
+
this.#light_cluster_data = this.republish(lighting.light_cluster_data);
|
|
146
|
+
this.#shadowmap_atlas = this.republish(lighting.shadowmap_atlas);
|
|
147
|
+
this.#volumetrics_lut = this.republish(lighting.volumetrics_lut);
|
|
148
|
+
this.#volumetrics_metadata = this.republish(lighting.volumetrics_metadata);
|
|
149
|
+
this.#shader_switches = lighting.shader_switches;
|
|
150
|
+
this.#probes = lighting.probes;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @template T
|
|
155
|
+
* @param {T|null} value
|
|
156
|
+
* @param {string} name
|
|
157
|
+
* @returns {T}
|
|
158
|
+
*/
|
|
159
|
+
#read_object(value, name) {
|
|
160
|
+
const frame = this.frame;
|
|
161
|
+
|
|
162
|
+
assert.notNull(frame, `ViewLighting was read without belonging to a frame`);
|
|
163
|
+
assert.equal(frame.is_open, true, `ViewLighting belongs to a frame that has finished`);
|
|
164
|
+
assert.notNull(value, `ViewLighting.${name} read before the renderer stated it`);
|
|
165
|
+
|
|
166
|
+
return value;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -145,7 +145,7 @@ export class GPUFluidCascade {
|
|
|
145
145
|
* @param {*} _resources
|
|
146
146
|
* @param {{encoder: ShadeGPUCommandContext}} context
|
|
147
147
|
*/
|
|
148
|
-
static "__#
|
|
148
|
+
static "__#297@#execute_restrict"(record: object, _resources: any, context: {
|
|
149
149
|
encoder: ShadeGPUCommandContext;
|
|
150
150
|
}): void;
|
|
151
151
|
/**
|
|
@@ -153,7 +153,7 @@ export class GPUFluidCascade {
|
|
|
153
153
|
* @param {*} _resources
|
|
154
154
|
* @param {{encoder: ShadeGPUCommandContext}} context
|
|
155
155
|
*/
|
|
156
|
-
static "__#
|
|
156
|
+
static "__#297@#execute_fill"(record: object, _resources: any, context: {
|
|
157
157
|
encoder: ShadeGPUCommandContext;
|
|
158
158
|
}): void;
|
|
159
159
|
/**
|
|
@@ -161,7 +161,7 @@ export class GPUFluidCascade {
|
|
|
161
161
|
* @param {import("../../../engine/graphics/render/frame_graph/FramePassResources.js").FramePassResources} resources
|
|
162
162
|
* @param {{encoder: ShadeGPUCommandContext}} context
|
|
163
163
|
*/
|
|
164
|
-
static "__#
|
|
164
|
+
static "__#297@#execute"(record: object, resources: import("../../../engine/graphics/render/frame_graph/FramePassResources.js").FramePassResources, context: {
|
|
165
165
|
encoder: ShadeGPUCommandContext;
|
|
166
166
|
}): void;
|
|
167
167
|
/**
|
|
@@ -65,7 +65,7 @@ export class GPUFluidCascadeStack {
|
|
|
65
65
|
* @param {*} _resources
|
|
66
66
|
* @param {{encoder: import("../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext}} context
|
|
67
67
|
*/
|
|
68
|
-
static "__#
|
|
68
|
+
static "__#299@#execute_publish"(pass: object, _resources: any, context: {
|
|
69
69
|
encoder: import("../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext;
|
|
70
70
|
}): void;
|
|
71
71
|
/**
|
|
@@ -86,7 +86,7 @@ export class GPUFluidForcing {
|
|
|
86
86
|
* @param {FluidObstacleRecord} record
|
|
87
87
|
* @returns {number} metres
|
|
88
88
|
*/
|
|
89
|
-
static "__#
|
|
89
|
+
static "__#300@#resolved_extent"(record: FluidObstacleRecord): number;
|
|
90
90
|
/**
|
|
91
91
|
* The descriptor of a transient of `role`, `size` bytes, from `kept` (by role): the one kept for
|
|
92
92
|
* the role while its size holds, a new one when it moves. A role's usage and clear range never
|
|
@@ -99,19 +99,19 @@ export class GPUFluidForcing {
|
|
|
99
99
|
* @param {number} clear_size bytes cleared from 0 when the pool reuses the buffer
|
|
100
100
|
* @returns {BufferResourceDescriptor}
|
|
101
101
|
*/
|
|
102
|
-
static "__#
|
|
102
|
+
static "__#300@#descriptor"(kept: BufferResourceDescriptor[], role: number, size: number, usage: number, clear_size: number): BufferResourceDescriptor;
|
|
103
103
|
/**
|
|
104
104
|
* @param {object} record
|
|
105
105
|
* @param {FramePassResources} resources
|
|
106
106
|
* @param {{encoder: ShadeGPUCommandContext}} context
|
|
107
107
|
*/
|
|
108
|
-
static "__#
|
|
108
|
+
static "__#300@#execute_extract"(record: object, resources: FramePassResources, context: {
|
|
109
109
|
encoder: ShadeGPUCommandContext;
|
|
110
110
|
}): void;
|
|
111
|
-
static "__#
|
|
112
|
-
static "__#
|
|
113
|
-
static "__#
|
|
114
|
-
static "__#
|
|
111
|
+
static "__#300@#execute_clear"(record: any, _resources: any, context: any): void;
|
|
112
|
+
static "__#300@#execute_query"(record: any, resources: any, context: any): void;
|
|
113
|
+
static "__#300@#execute_command"(record: any, resources: any, context: any): void;
|
|
114
|
+
static "__#300@#execute_apply"(record: any, resources: any, context: any): void;
|
|
115
115
|
/**
|
|
116
116
|
* @param {object} options
|
|
117
117
|
* @param {GPUDevice} options.device
|
|
@@ -41,7 +41,7 @@ export class GPUFluidPressureSolve {
|
|
|
41
41
|
* @param {*} _resources
|
|
42
42
|
* @param {{encoder: ShadeGPUCommandContext}} context
|
|
43
43
|
*/
|
|
44
|
-
static "__#
|
|
44
|
+
static "__#296@#execute"(data: {
|
|
45
45
|
solve: GPUFluidPressureSolve;
|
|
46
46
|
arm: number;
|
|
47
47
|
count: number;
|
|
@@ -49,7 +49,7 @@ export class GPUFluidQueries {
|
|
|
49
49
|
* @param {import("../../../../engine/graphics/render/frame_graph/FramePassResources.js").FramePassResources} resources
|
|
50
50
|
* @param {{encoder: import("../../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext}} context
|
|
51
51
|
*/
|
|
52
|
-
static "__#
|
|
52
|
+
static "__#301@#execute"(pass: object, resources: import("../../../../engine/graphics/render/frame_graph/FramePassResources.js").FramePassResources, context: {
|
|
53
53
|
encoder: import("../../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext;
|
|
54
54
|
}): void;
|
|
55
55
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_brick4_indirect_lighting.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_brick4_indirect_lighting.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.js"],"names":[],"mappings":"AA4MA,0DAwBE;4BA5M0B,mCAAmC"}
|
package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.js
CHANGED
|
@@ -13,6 +13,7 @@ import { chunk_compute_indirect_specular } from "../../../../shader/chunk/materi
|
|
|
13
13
|
import { chunk_decode_g_buffer_metalness } from "../../../../shader/chunk/material/chunk_decode_g_buffer_metalness.js";
|
|
14
14
|
import { chunk_decode_g_buffer_roughness } from "../../../../shader/chunk/material/chunk_decode_g_buffer_roughness.js";
|
|
15
15
|
import { chunk_metalness_to_specular_color } from "../../../../shader/chunk/material/chunk_metalness_to_specular_color.js";
|
|
16
|
+
import { chunk_metalness_to_specular_F90 } from "../../../../shader/chunk/material/chunk_metalness_to_specular_F90.js";
|
|
16
17
|
import {
|
|
17
18
|
chunk_sh3_color_estimate_for_cone
|
|
18
19
|
} from "../../../../shader/chunk/spherical_harmonics/chunk_sh3_color_estimate_for_cone.js";
|
|
@@ -81,7 +82,7 @@ fn main(
|
|
|
81
82
|
let alpha = roughness * roughness;
|
|
82
83
|
|
|
83
84
|
let material_specularF0 = metalness_to_specular_color(f_metalness, albedo);
|
|
84
|
-
let material_specularF90 =
|
|
85
|
+
let material_specularF90 = metalness_to_specular_F90(f_metalness, albedo);
|
|
85
86
|
|
|
86
87
|
let shading_normal = decode_g_buffer_normal(g_buffer_sample_normal.x);
|
|
87
88
|
let bent_normal = decode_g_buffer_normal(g_buffer_bent_normal.x);
|
|
@@ -184,6 +185,7 @@ fn main(
|
|
|
184
185
|
chunk_decode_g_buffer_metalness,
|
|
185
186
|
chunk_decode_g_buffer_roughness,
|
|
186
187
|
chunk_metalness_to_specular_color,
|
|
188
|
+
chunk_metalness_to_specular_F90,
|
|
187
189
|
chunk_MIN_DIELECTRICS_F0,
|
|
188
190
|
chunk_brick4_node_by_position,
|
|
189
191
|
chunk_brick4_node_sample_probes_meta,
|