@null3d/splats 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-APACHE +176 -0
- package/LICENSE-MIT +21 -0
- package/README.md +55 -2
- package/THIRD-PARTY-NOTICES.txt +63 -0
- package/dist/splats.wasm +0 -0
- package/lib/chunks.d.ts +74 -0
- package/lib/chunks.js +170 -0
- package/lib/coverage.d.ts +18 -0
- package/lib/coverage.js +208 -0
- package/lib/feature.d.ts +10 -0
- package/lib/feature.js +39 -0
- package/lib/format.d.ts +35 -0
- package/lib/format.js +53 -0
- package/lib/gltf.d.ts +9 -0
- package/lib/gltf.js +174 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.js +10 -0
- package/lib/pack.d.ts +34 -0
- package/lib/pack.js +60 -0
- package/lib/select-reference.d.ts +12 -0
- package/lib/select-reference.js +103 -0
- package/lib/select-task.d.ts +65 -0
- package/lib/select-task.js +200 -0
- package/lib/select.d.ts +41 -0
- package/lib/select.js +145 -0
- package/lib/splats-mesh.wgsl-material-glsl-0-01097b38ab28a3d5.js +24 -0
- package/lib/splats-mesh.wgsl-material-glsl-1-3f27ff0f14b7cdd2.js +24 -0
- package/lib/splats-mesh.wgsl-material-glsl-2-d471bfaf3a580318.js +24 -0
- package/lib/splats-mesh.wgsl-material-glsl-3-e048b0d077060953.js +24 -0
- package/lib/splats-mesh.wgsl-material-wgsl-0-c529a49353714424.js +24 -0
- package/lib/splats-mesh.wgsl-material-wgsl-2-ec594872c7d3fbf6.js +24 -0
- package/lib/splats-mesh.wgsl.d.ts +6 -0
- package/lib/splats-mesh.wgsl.js +36 -0
- package/lib/splats.wgsl-material-glsl-0-32dc5311875620e4.js +24 -0
- package/lib/splats.wgsl-material-glsl-1-da80dc94627cf770.js +24 -0
- package/lib/splats.wgsl-material-glsl-2-fb7895ef8b78d665.js +24 -0
- package/lib/splats.wgsl-material-glsl-3-b8800106bf9b5770.js +24 -0
- package/lib/splats.wgsl-material-glsl-64-9f7d0841d0ac147d.js +24 -0
- package/lib/splats.wgsl-material-glsl-65-fbc638499588c846.js +24 -0
- package/lib/splats.wgsl-material-glsl-66-3c49fd84ca72bada.js +24 -0
- package/lib/splats.wgsl-material-glsl-67-5aabadfe22c2f13c.js +24 -0
- package/lib/splats.wgsl-material-wgsl-0-eef591a67552ad7e.js +24 -0
- package/lib/splats.wgsl-material-wgsl-2-15569422a33203f4.js +24 -0
- package/lib/splats.wgsl-material-wgsl-64-769cd6ac619835c2.js +24 -0
- package/lib/splats.wgsl-material-wgsl-66-f1515cd808e3a573.js +24 -0
- package/lib/splats.wgsl.d.ts +14 -0
- package/lib/splats.wgsl.js +42 -0
- package/lib/spz-write.d.ts +9 -0
- package/lib/spz-write.js +133 -0
- package/lib/spz.d.ts +9 -0
- package/lib/spz.js +240 -0
- package/lib/stream.d.ts +126 -0
- package/lib/stream.js +304 -0
- package/lib/system.d.ts +110 -0
- package/lib/system.js +498 -0
- package/lib/version.d.ts +1 -0
- package/lib/version.js +3 -0
- package/package.json +56 -5
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default __null3dShader("[{\"webgpu_pick_skin_pick\":{\"permutation\":32832,\"wgsl\":{\"source\":0,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_alpha_mask_receive_shadows_skin_prepass\":{\"permutation\":4210,\"wgsl\":{\"source\":1,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_alpha_mask_receive_shadows_skin_prepass_alpha_coverage\":{\"permutation\":2101362,\"wgsl\":{\"source\":2,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_alpha_mask_receive_shadows_skin_prepass_alpha_hash\":{\"permutation\":4198514,\"wgsl\":{\"source\":3,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_alpha_mask_receive_shadows_skin_prepass_sample_mask_alpha_coverage\":{\"permutation\":3149938,\"wgsl\":{\"source\":4,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_alpha_mask_skin_prepass\":{\"permutation\":4178,\"wgsl\":{\"source\":5,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_alpha_mask_skin_prepass_alpha_coverage\":{\"permutation\":2101330,\"wgsl\":{\"source\":6,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_alpha_mask_skin_prepass_alpha_hash\":{\"permutation\":4198482,\"wgsl\":{\"source\":7,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_alpha_mask_skin_prepass_sample_mask_alpha_coverage\":{\"permutation\":3149906,\"wgsl\":{\"source\":8,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_vertex_color_alpha_mask_receive_shadows_skin_prepass\":{\"permutation\":4214,\"wgsl\":{\"source\":9,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_vertex_color_alpha_mask_receive_shadows_skin_prepass_alpha_coverage\":{\"permutation\":2101366,\"wgsl\":{\"source\":10,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_vertex_color_alpha_mask_receive_shadows_skin_prepass_alpha_hash\":{\"permutation\":4198518,\"wgsl\":{\"source\":11,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_vertex_color_alpha_mask_receive_shadows_skin_prepass_sample_mask_alpha_coverage\":{\"permutation\":3149942,\"wgsl\":{\"source\":12,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_vertex_color_alpha_mask_skin_prepass\":{\"permutation\":4182,\"wgsl\":{\"source\":13,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_vertex_color_alpha_mask_skin_prepass_alpha_coverage\":{\"permutation\":2101334,\"wgsl\":{\"source\":14,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_vertex_color_alpha_mask_skin_prepass_alpha_hash\":{\"permutation\":4198486,\"wgsl\":{\"source\":15,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_prepass_tone_map_vertex_color_alpha_mask_skin_prepass_sample_mask_alpha_coverage\":{\"permutation\":3149910,\"wgsl\":{\"source\":16,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_shadow_alpha_mask_skin_alpha_hash_caster\":{\"permutation\":37748816,\"wgsl\":{\"source\":17,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_shadow_alpha_mask_skin_caster\":{\"permutation\":33554512,\"wgsl\":{\"source\":18,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_shadow_alpha_mask_skin_caster_offset_alpha_hash_caster\":{\"permutation\":37765200,\"wgsl\":{\"source\":19,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_shadow_alpha_mask_skin_caster_offset_caster\":{\"permutation\":33570896,\"wgsl\":{\"source\":20,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_shadow_skin_caster\":{\"permutation\":33554496,\"wgsl\":{\"source\":21,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_shadow_skin_caster_offset_caster\":{\"permutation\":33570880,\"wgsl\":{\"source\":22,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_shadow_vertex_color_alpha_mask_skin_alpha_hash_caster\":{\"permutation\":37748820,\"wgsl\":{\"source\":23,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_shadow_vertex_color_alpha_mask_skin_caster\":{\"permutation\":33554516,\"wgsl\":{\"source\":24,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_shadow_vertex_color_alpha_mask_skin_caster_offset_alpha_hash_caster\":{\"permutation\":37765204,\"wgsl\":{\"source\":25,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_shadow_vertex_color_alpha_mask_skin_caster_offset_caster\":{\"permutation\":33570900,\"wgsl\":{\"source\":26,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_shadow_vertex_color_skin_caster\":{\"permutation\":33554500,\"wgsl\":{\"source\":27,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_shadow_vertex_color_skin_caster_offset_caster\":{\"permutation\":33570884,\"wgsl\":{\"source\":28,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_alpha_mask_receive_shadows_skin\":{\"permutation\":114,\"wgsl\":{\"source\":29,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_alpha_mask_receive_shadows_skin_alpha_coverage\":{\"permutation\":2097266,\"wgsl\":{\"source\":30,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_alpha_mask_receive_shadows_skin_alpha_hash\":{\"permutation\":4194418,\"wgsl\":{\"source\":31,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_alpha_mask_receive_shadows_skin_sample_mask_alpha_coverage\":{\"permutation\":3145842,\"wgsl\":{\"source\":32,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_alpha_mask_skin\":{\"permutation\":82,\"wgsl\":{\"source\":33,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_alpha_mask_skin_alpha_coverage\":{\"permutation\":2097234,\"wgsl\":{\"source\":34,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_alpha_mask_skin_alpha_hash\":{\"permutation\":4194386,\"wgsl\":{\"source\":35,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_alpha_mask_skin_sample_mask_alpha_coverage\":{\"permutation\":3145810,\"wgsl\":{\"source\":36,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_receive_shadows_skin\":{\"permutation\":98,\"wgsl\":{\"source\":37,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_skin\":{\"permutation\":66,\"wgsl\":{\"source\":38,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_vertex_color_alpha_mask_receive_shadows_skin\":{\"permutation\":118,\"wgsl\":{\"source\":39,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_vertex_color_alpha_mask_receive_shadows_skin_alpha_coverage\":{\"permutation\":2097270,\"wgsl\":{\"source\":40,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_vertex_color_alpha_mask_receive_shadows_skin_alpha_hash\":{\"permutation\":4194422,\"wgsl\":{\"source\":41,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_vertex_color_alpha_mask_receive_shadows_skin_sample_mask_alpha_coverage\":{\"permutation\":3145846,\"wgsl\":{\"source\":42,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_vertex_color_alpha_mask_skin\":{\"permutation\":86,\"wgsl\":{\"source\":43,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_vertex_color_alpha_mask_skin_alpha_coverage\":{\"permutation\":2097238,\"wgsl\":{\"source\":44,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_vertex_color_alpha_mask_skin_alpha_hash\":{\"permutation\":4194390,\"wgsl\":{\"source\":45,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_vertex_color_alpha_mask_skin_sample_mask_alpha_coverage\":{\"permutation\":3145814,\"wgsl\":{\"source\":46,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_vertex_color_receive_shadows_skin\":{\"permutation\":102,\"wgsl\":{\"source\":47,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null},\"webgpu_tone_map_vertex_color_skin\":{\"permutation\":70,\"wgsl\":{\"source\":48,\"pipelines\":{\"main\":{\"vertex\":\"vs\",\"fragment\":\"fs\"}}},\"glsl\":null}}]");
|
|
2
|
+
|
|
3
|
+
function __null3dShader(text, hot, load, index, kind) {
|
|
4
|
+
const paths = __null3dShader.paths || (__null3dShader.paths = ["{\"blocks\":[\"struct Output {\\n exposure: f32,\\n tone_mapping: u32,\\n flags: u32,\\n render_size: u32,\\n}\\n\",\"\\nstruct Fog {\\n color: vec4<f32>,\\n shape: vec4<f32>,\\n sun_glow: f32,\\n sun_exponent: f32,\\n background: f32,\\n curve: u32,\\n}\\n\",\"\\nstruct Aerial {\\n rayleigh: vec4<f32>,\\n shape: vec4<f32>,\\n sun: vec4<f32>,\\n sun_light: vec4<f32>,\\n moon: vec4<f32>,\\n moon_light: vec4<f32>,\\n}\\n\",\"\\nstruct EnvironmentLight {\\n sh_a: vec4<f32>,\\n sh_b: vec4<f32>,\\n sh_c: vec4<f32>,\\n sh_d: vec4<f32>,\\n sh_e: vec4<f32>,\\n sh_f: vec4<f32>,\\n sh_g: vec4<f32>,\\n sh_h: vec4<f32>,\\n sh_i: vec4<f32>,\\n rotation_x: vec4<f32>,\\n rotation_y: vec4<f32>,\\n rotation_z: vec4<f32>,\\n params: vec4<f32>,\\n}\\n\",\"\\nstruct ProbeGrid {\\n origin: vec4<f32>,\\n inverse_spacing: vec4<f32>,\\n counts: vec4<f32>,\\n params: vec4<f32>,\\n}\\n\",\"\\nstruct Frame {\\n view_proj: mat4x4<f32>,\\n camera_position: vec4<f32>,\\n sun_direction: vec4<f32>,\\n sun_color: vec4<f32>,\\n fill_dir: array<vec4<f32>, 3>,\\n fill_col: array<vec4<f32>, 3>,\\n ambient: vec4<f32>,\\n output: Output,\\n fog: Fog,\\n cluster_depth: vec4<f32>,\\n cluster_grid: vec4<f32>,\\n cluster_fit: vec4<f32>,\\n clock: vec4<f32>,\\n camera_world: vec4<f32>,\\n target_size: vec4<f32>,\\n camera_range: vec4<f32>,\\n occlusion: vec4<f32>,\\n environment: EnvironmentLight,\\n probe_grid: ProbeGrid,\\n hemisphere_x: vec4<f32>,\\n hemisphere_y: vec4<f32>,\\n hemisphere_z: vec4<f32>,\\n shadow_origin: vec4<f32>,\\n view: mat4x4<f32>,\\n projection: mat4x4<f32>,\\n reflection_reprojection: mat4x4<f32>,\\n reflection: vec4<f32>,\\n reflection_corner: vec4<f32>,\\n jitter: vec4<f32>,\\n aerial: Aerial,\\n vignette: vec4<f32>,\\n camera_view_proj: mat4x4<f32>,\\n camera_target: vec4<f32>,\\n camera_eye: vec4<f32>,\\n bounce: vec4<f32>,\\n}\\n\",\"\\nstruct Transform {\\n x: vec4<f32>,\\n y: vec4<f32>,\\n z: vec4<f32>,\\n}\\n\",\"\\nstruct InstanceIn {\\n @location(9) row_x: vec4<f32>,\\n @location(10) row_y: vec4<f32>,\\n @location(11) row_z: vec4<f32>,\\n @location(12) ids: vec4<u32>,\\n}\\n\",\"\\nstruct Instance {\\n row_x: vec4<f32>,\\n row_y: vec4<f32>,\\n row_z: vec4<f32>,\\n material: u32,\\n first_joint: u32,\\n morph_weights: u32,\\n drawn: bool,\\n source: u32,\\n streamed: bool,\\n}\\n\",\"\\nstruct ObjectRanges {\\n items: array<vec4<u32>, 1024>,\\n}\\n\",\"\\nstruct Skin {\\n row_x: vec4<f32>,\\n row_y: vec4<f32>,\\n row_z: vec4<f32>,\\n}\\n\",\"\\nstruct FrameValues {\\n time: f32,\\n deltaTime: f32,\\n index: u32,\\n lastFrame: bool,\\n resolution: vec2<f32>,\\n}\\n\",\"\\nstruct CameraValues {\\n position: vec3<f32>,\\n viewProjection: mat4x4<f32>,\\n view: mat4x4<f32>,\\n projection: mat4x4<f32>,\\n near: f32,\\n far: f32,\\n}\\n\",\"\\nstruct ObjectValues {\\n position: vec3<f32>,\\n values: vec4<f32>,\\n worldMatrix: mat4x4<f32>,\\n normalMatrix: mat3x3<f32>,\\n id: u32,\\n}\\n\",\"\\nstruct Uniforms {\\n extent: f32,\\n blur: f32,\\n softness: f32,\\n cutoff: f32,\\n}\\n\",\"\\nstruct VertexIn {\\n @location(0) position: vec3<f32>,\\n @location(1) normal: vec3<f32>,\\n @location(2) uv0_: vec2<f32>,\\n @location(6) joints: vec4<u32>,\\n @location(7) weights: vec4<f32>,\\n}\\n\",\"\\nstruct VertexOut {\\n @builtin(position) @invariant clip: vec4<f32>,\\n @location(0) relative: vec3<f32>,\\n @location(1) normal: vec3<f32>,\\n @location(2) @interpolate(flat, either) material: u32,\\n @location(4) uv: vec2<f32>,\\n @location(8) @interpolate(flat, either) origin: vec3<f32>,\\n @location(5) @interpolate(flat, either) world_x: vec4<f32>,\\n @location(6) @interpolate(flat, either) world_y: vec4<f32>,\\n @location(7) @interpolate(flat, either) world_z: vec4<f32>,\\n @location(12) @interpolate(flat, either) ids: vec2<u32>,\\n @location(13) @interpolate(flat, either) key: u32,\\n}\\n\",\"\\nstruct VertexInput {\\n position: vec3<f32>,\\n normal: vec3<f32>,\\n uv: vec2<f32>,\\n instance: u32,\\n}\\n\",\"\\nstruct SplatScreen {\\n axisX: vec2<f32>,\\n axisY: vec2<f32>,\\n worldPerPixel: f32,\\n drawn: bool,\\n}\\n\",\"\\nconst ACES_INPUT: mat3x3<f32> = mat3x3<f32>(vec3<f32>(0.59719f, 0.076f, 0.0284f), vec3<f32>(0.35458f, 0.90834f, 0.13383f), vec3<f32>(0.04823f, 0.01566f, 0.83777f));\",\"\\nconst ACES_OUTPUT: mat3x3<f32> = mat3x3<f32>(vec3<f32>(1.60475f, -0.10208f, -0.00327f), vec3<f32>(-0.53108f, 1.10813f, -0.07276f), vec3<f32>(-0.07367f, -0.00605f, 1.07602f));\",\"\\nconst LINEAR_SRGB_TO_LINEAR_REC2020_: mat3x3<f32> = mat3x3<f32>(vec3<f32>(0.6274f, 0.0691f, 0.0164f), vec3<f32>(0.3293f, 0.9195f, 0.088f), vec3<f32>(0.0433f, 0.0113f, 0.8956f));\",\"\\nconst AGX_INSET: mat3x3<f32> = mat3x3<f32>(vec3<f32>(0.85662717f, 0.13731897f, 0.11189821f), vec3<f32>(0.09512124f, 0.761242f, 0.076799415f), vec3<f32>(0.048251607f, 0.10143904f, 0.81130236f));\",\"\\nconst AGX_OUTSET: mat3x3<f32> = mat3x3<f32>(vec3<f32>(1.1271006f, -0.14132977f, -0.14132977f), vec3<f32>(-0.11060664f, 1.1578237f, -0.11060664f), vec3<f32>(-0.016493939f, -0.016493939f, 1.2519364f));\",\"\\nconst LINEAR_REC2020_TO_LINEAR_SRGB: mat3x3<f32> = mat3x3<f32>(vec3<f32>(1.6605f, -0.1246f, -0.0182f), vec3<f32>(-0.5876f, 1.1329f, -0.1006f), vec3<f32>(-0.0728f, -0.0083f, 1.1187f));\",\"\\nconst AGX_PUNCHY_SATURATION: f32 = 1.4f;\",\"\\nconst OFF: u32 = 0u;\",\"\\nconst EXP2_: u32 = 2u;\",\"\\nconst LINEAR: u32 = 1u;\",\"\\nconst OUTSIDE_CLIP: vec4<f32> = vec4<f32>(2f, 2f, 2f, 1f);\",\"\\nconst PI_null3d_math: f32 = 3.1415927f;\",\"\\nconst INV_PI: f32 = 0.31830987f;\",\"\\nconst EPSILON: f32 = 1e-6f;\",\"\\nconst HALF_VECTOR_CANCEL: f32 = 1e-20f;\",\"\\nconst DFG_SIZE: u32 = 16u;\",\"\\nconst BLEND_FLAG: u32 = 2u;\",\"\\nconst STREAMED_KEY: u32 = 2147483648u;\",\"\\nconst OBJECT_RANGE_STEPS: u32 = 11u;\",\"\\nconst NO_OBJECT: u32 = 4294967295u;\",\"\\nconst NO_FOG: u32 = 4u;\",\"\\nconst JOINTS_PER_ROW: u32 = 512u;\",\"\\nconst FILL_LIGHT_SLOTS: u32 = 3u;\",\"\\nconst SPECULAR_AA_VARIANCE: f32 = 0.15f;\",\"\\nconst SPECULAR_AA_LIMIT: f32 = 0.01f;\",\"\\nconst ROUGHNESS_FLOOR: f32 = 0.045f;\",\"\\nconst THREE_ROUGHNESS_1_: vec4<f32> = vec4<f32>(0.19f, 0.23f, 0.255f, 0.3f);\",\"\\nconst THREE_ROUGHNESS_0_: vec4<f32> = vec4<f32>(0f, 0f, 0.07f, 0.12f);\",\"\\nconst THREE_ROUGHNESS_2_: vec4<f32> = vec4<f32>(0.345f, 0.375f, 0.41f, 0.45f);\",\"\\nconst THREE_ROUGHNESS_3_: vec4<f32> = vec4<f32>(0.5f, 0.54f, 0.61f, 0.695f);\",\"\\nconst THREE_ROUGHNESS_4_: vec4<f32> = vec4<f32>(0.775f, 0.825f, 0.875f, 0.93f);\",\"\\nconst THREE_ROUGHNESS_5_: vec4<f32> = vec4<f32>(0.98f, 1f, 1f, 1f);\",\"\\nconst PI_null3d_probes: f32 = 3.1415927f;\",\"\\nconst IMAGE_LAYER_BITS: u32 = 6u;\",\"\\nconst IMAGE_SIZE: f32 = 128f;\",\"\\nconst HEADER_WORDS: u32 = 8u;\",\"\\nconst START_BITS: u32 = 23u;\",\"\\nconst KIND_RECT: u32 = 6u;\",\"\\nconst KIND_TUBE: u32 = 7u;\",\"\\nconst NO_SCREEN_VALUES: vec4<f32> = vec4<f32>(1f, 0f, 0f, 1f);\",\"\\nconst DEPTH_TOLERANCE: f32 = 0.03f;\",\"\\nconst NEAREST_SPEAKS: bool = true;\",\"\\nconst CONE: f32 = 0.6f;\",\"\\nconst FLAT_SHADING: u32 = 1u;\",\"\\nconst SHADOW_CATCHER_FLAG: u32 = 128u;\",\"\\nconst NO_CONTACT_SHADOWS_FLAG: u32 = 1048576u;\",\"\\nconst LIGHT_MAP_RGBM: u32 = 16777216u;\",\"\\nconst BASE_BLUR: f32 = 0.09f;\\n\",\"\\n@id(1000) override position_scale: f32 = 1f;\",\"\\n@id(1002) override uv_scale: f32 = 1f;\\n\",\"\\n@group(0) @binding(2)\",\"\\nvar custom_values: texture_2d<f32>;\",\"\\n@group(0) @binding(0)\",\"\\nvar<uniform> frame_null3d_mesh: Frame;\",\"\\n@group(0) @binding(17)\",\"\\nvar<uniform> object_ranges: ObjectRanges;\",\"\\n@group(1) @binding(0)\",\"\\nvar joint_matrices: texture_2d<f32>;\",\"\\nvar<private> frame_null3d_builtins: FrameValues;\",\"\\nvar<private> camera: CameraValues;\",\"\\nvar<private> object: ObjectValues;\",\"\\nvar<private> material: Uniforms;\\n\",\"\\nfn clip_with_jitter(view_proj: mat4x4<f32>, jitter: vec2<f32>, relative_position: vec3<f32>) -> vec4<f32> {\\n let clip = (view_proj * vec4<f32>(relative_position, 1f));\\n return (clip + vec4<f32>((jitter * clip.w), 0f, 0f));\\n}\\n\",\"\\nfn transform_point(t: Transform, p: vec3<f32>) -> vec3<f32> {\\n let q = vec4<f32>(p, 1f);\\n return vec3<f32>(dot(t.x, q), dot(t.y, q), dot(t.z, q));\\n}\\n\",\"\\nfn transform_normal(t_1: Transform, n: vec3<f32>) -> vec3<f32> {\\n let a = t_1.x.xyz;\\n let b = t_1.y.xyz;\\n let c = t_1.z.xyz;\\n let bc = cross(b, c);\\n let ca = cross(c, a);\\n let ab = cross(a, b);\\n let facing = select(-1f, 1f, (dot(a, bc) >= 0f));\\n return normalize((vec3<f32>(dot(bc, n), dot(ca, n), dot(ab, n)) * facing));\\n}\\n\",\"\\nfn object_range(k: u32) -> vec2<u32> {\\n let pair = object_ranges.items[(1u + (k / 2u))];\\n return select(pair.xy, pair.zw, ((k & 1u) != 0u));\\n}\\n\",\"\\nfn object_ids(found: Instance) -> vec2<u32> {\\n var low: u32 = 0u;\\n var high: u32;\\n var step_: u32 = 0u;\\n var local: bool;\\n var local_1: bool;\\n\\n let key_1 = (found.source | select(0u, STREAMED_KEY, found.streamed));\\n let head = object_ranges.items[0];\\n if (key_1 < head.x) {\\n return vec2<u32>(0u, key_1);\\n }\\n high = head.y;\\n loop {\\n let _e19 = step_;\\n if (_e19 < OBJECT_RANGE_STEPS) {\\n } else {\\n break;\\n }\\n {\\n let _e23 = high;\\n let _e24 = low;\\n if ((_e23 - _e24) <= 1u) {\\n break;\\n }\\n let _e28 = low;\\n let _e29 = high;\\n let middle = ((_e28 + _e29) / 2u);\\n let _e33 = object_range(middle);\\n if (_e33.x <= key_1) {\\n low = middle;\\n } else {\\n high = middle;\\n }\\n }\\n continuing {\\n let _e37 = step_;\\n step_ = (_e37 + 1u);\\n }\\n }\\n let _e39 = low;\\n let _e40 = object_range(_e39);\\n let _e41 = high;\\n if !((_e41 == 0u)) {\\n local = (_e40.x > key_1);\\n } else {\\n local = true;\\n }\\n let _e50 = local;\\n if !(_e50) {\\n local_1 = (_e40.y == NO_OBJECT);\\n } else {\\n local_1 = true;\\n }\\n let _e58 = local_1;\\n if _e58 {\\n return vec2(0u);\\n }\\n return vec2<u32>((key_1 - _e40.x), _e40.y);\\n}\\n\",\"\\nfn custom_value(id: u32, k_1: u32) -> vec4<f32> {\\n let _e5 = textureLoad(custom_values, vec2<u32>(k_1, id), 0i);\\n return _e5;\\n}\\n\",\"\\nfn find_instance(i_1: InstanceIn) -> Instance {\\n return Instance(i_1.row_x, i_1.row_y, i_1.row_z, i_1.ids.x, i_1.ids.y, 0u, true, i_1.ids.z, false);\\n}\\n\",\"\\nfn clip_of(found_1: Instance, relative: vec3<f32>) -> vec4<f32> {\\n if !(found_1.drawn) {\\n return OUTSIDE_CLIP;\\n }\\n let _e6 = frame_null3d_mesh.view_proj;\\n let _e9 = frame_null3d_mesh.jitter;\\n let _e12 = clip_with_jitter(_e6, _e9.xy, relative);\\n return _e12;\\n}\\n\",\"\\nfn transform_of(found_2: Instance) -> Transform {\\n return Transform(found_2.row_x, found_2.row_y, found_2.row_z);\\n}\\n\",\"\\nfn relative_position_1(found_3: Instance, position: vec3<f32>) -> vec3<f32> {\\n let _e1 = transform_of(found_3);\\n let _e3 = transform_point(_e1, position);\\n return _e3;\\n}\\n\",\"\\nfn world_normal(found_4: Instance, normal: vec3<f32>) -> vec3<f32> {\\n let _e1 = transform_of(found_4);\\n let _e3 = transform_normal(_e1, normal);\\n return _e3;\\n}\\n\",\"\\nfn joint_row(joint: u32, row: u32) -> vec4<f32> {\\n let x_2 = (((joint % JOINTS_PER_ROW) * 3u) + row);\\n let _e12 = textureLoad(joint_matrices, vec2<u32>(x_2, (joint / JOINTS_PER_ROW)), 0i);\\n return _e12;\\n}\\n\",\"\\nfn skin_of(found_5: Instance, joints: vec4<u32>, weights: vec4<f32>) -> Skin {\\n var s: Skin = Skin(vec4(0f), vec4(0f), vec4(0f));\\n var k_2: u32 = 0u;\\n\\n loop {\\n let _e5 = k_2;\\n if (_e5 < 4u) {\\n } else {\\n break;\\n }\\n {\\n let _e9 = k_2;\\n let w = weights[_e9];\\n if (w == 0f) {\\n continue;\\n }\\n let _e16 = k_2;\\n let joint_1 = (found_5.first_joint + joints[_e16]);\\n let _e21 = s.row_x;\\n let _e23 = joint_row(joint_1, 0u);\\n s.row_x = (_e21 + (w * _e23));\\n let _e27 = s.row_y;\\n let _e29 = joint_row(joint_1, 1u);\\n s.row_y = (_e27 + (w * _e29));\\n let _e33 = s.row_z;\\n let _e35 = joint_row(joint_1, 2u);\\n s.row_z = (_e33 + (w * _e35));\\n }\\n continuing {\\n let _e39 = k_2;\\n k_2 = (_e39 + 1u);\\n }\\n }\\n let _e41 = s;\\n return _e41;\\n}\\n\",\"\\nfn skinned_point(s_1: Skin, p_1: vec3<f32>) -> vec3<f32> {\\n let h = vec4<f32>(p_1, 1f);\\n return vec3<f32>(dot(s_1.row_x, h), dot(s_1.row_y, h), dot(s_1.row_z, h));\\n}\\n\",\"\\nfn skinned_direction(s_2: Skin, d: vec3<f32>) -> vec3<f32> {\\n return vec3<f32>(dot(s_2.row_x.xyz, d), dot(s_2.row_y.xyz, d), dot(s_2.row_z.xyz, d));\\n}\\n\",\"\\nfn fill_builtins(origin: vec3<f32>) {\\n let clock = frame_null3d_mesh.clock;\\n let _e5 = frame_null3d_mesh.camera_world;\\n let world = _e5.xyz;\\n let _e14 = frame_null3d_mesh.camera_target;\\n frame_null3d_builtins = FrameValues(clock.x, clock.y, bitcast<u32>(clock.z), false, _e14.xy);\\n let range = frame_null3d_mesh.camera_range;\\n let _e23 = frame_null3d_mesh.camera_view_proj;\\n let _e26 = frame_null3d_mesh.view;\\n let _e29 = frame_null3d_mesh.projection;\\n camera = CameraValues(world, _e23, _e26, _e29, range.x, range.y);\\n object = ObjectValues((world + origin), vec4(0f), mat4x4<f32>(), mat3x3<f32>(), 0u);\\n return;\\n}\\n\",\"\\nfn mesh_position(p_2: vec3<f32>) -> vec3<f32> {\\n return (p_2 * position_scale);\\n}\\n\",\"\\nfn mesh_uv(uv: vec2<f32>) -> vec2<f32> {\\n return (uv * uv_scale);\\n}\\n\",\"\\nfn affine_matrix(x: vec4<f32>, y: vec4<f32>, z: vec4<f32>) -> mat4x4<f32> {\\n return transpose(mat4x4<f32>(x, y, z, vec4<f32>(0f, 0f, 0f, 1f)));\\n}\\n\",\"\\nfn affine_normal_matrix(x_1: vec4<f32>, y_1: vec4<f32>, z_1: vec4<f32>) -> mat3x3<f32> {\\n let a_1 = x_1.xyz;\\n let b_1 = y_1.xyz;\\n let c_1 = z_1.xyz;\\n let bc_1 = cross(b_1, c_1);\\n let det = dot(a_1, bc_1);\\n let scale = select(0f, (1f / det), (det != 0f));\\n return (transpose(mat3x3<f32>(bc_1, cross(c_1, a_1), cross(a_1, b_1))) * scale);\\n}\\n\",\"\\nfn pick_key(found_6: Instance) -> u32 {\\n return found_6.source;\\n}\\n\",\"\\nfn pick_color(key: u32) -> vec4<f32> {\\n let bytes = vec4<u32>((key & 255u), ((key >> 8u) & 255u), ((key >> 16u) & 255u), ((key >> 24u) & 255u));\\n return (vec4<f32>(bytes) / vec4(255f));\\n}\\n\",\"\\nfn fill_object(found_7: Instance) -> vec2<u32> {\\n var ids: vec2<u32> = vec2(0u);\\n\\n let _e3 = object_ids(found_7);\\n ids = _e3;\\n let _e8 = ids.y;\\n object.id = _e8;\\n let _e14 = affine_matrix(found_7.row_x, found_7.row_y, found_7.row_z);\\n object.worldMatrix = _e14;\\n let _e20 = affine_normal_matrix(found_7.row_x, found_7.row_y, found_7.row_z);\\n object.normalMatrix = _e20;\\n let _e21 = ids;\\n return _e21;\\n}\\n\",\"\\nfn vertex_input(v_1: VertexIn, position_1: vec3<f32>, normal_1: vec3<f32>, ids_1: vec2<u32>) -> VertexInput {\\n var input: VertexInput;\\n\\n input.position = position_1;\\n input.normal = normal_1;\\n let _e8 = mesh_uv(v_1.uv0_);\\n input.uv = _e8;\\n input.instance = ids_1.x;\\n let _e12 = input;\\n return _e12;\\n}\\n\",\"\\nfn load_material_uniforms(id_1: u32) -> Uniforms {\\n var u: Uniforms;\\n\\n let _e2 = custom_value(id_1, 0u);\\n u.extent = _e2.x;\\n u.blur = _e2.y;\\n u.softness = _e2.z;\\n u.cutoff = _e2.w;\\n let _e12 = u;\\n return _e12;\\n}\\n\",\"\\nfn splat_screen(matrix: mat4x4<f32>) -> SplatScreen {\\n var out_1: SplatScreen;\\n var direction: vec2<f32>;\\n\\n out_1.axisX = vec2(0f);\\n out_1.axisY = vec2(0f);\\n out_1.worldPerPixel = 0f;\\n out_1.drawn = false;\\n let view = camera.view;\\n let center_view = (view * vec4<f32>(matrix[3].xyz, 1f)).xyz;\\n let depth = -(center_view.z);\\n let _e25 = camera.near;\\n if (depth <= _e25) {\\n let _e27 = out_1;\\n return _e27;\\n }\\n let res = frame_null3d_builtins.resolution;\\n let _e35 = camera.projection[0][0];\\n let fx = (((_e35 * res.x) * 0.5f) / depth);\\n let _e45 = camera.projection[1][1];\\n let fy = (((_e45 * res.y) * 0.5f) / depth);\\n let jx = vec3<f32>(fx, 0f, ((-(fx) * center_view.x) / depth));\\n let jy = vec3<f32>(0f, -(fy), ((fy * center_view.y) / depth));\\n let va = (view * vec4<f32>(matrix[0].xyz, 0f)).xyz;\\n let vb = (view * vec4<f32>(matrix[1].xyz, 0f)).xyz;\\n let vc = (view * vec4<f32>(matrix[2].xyz, 0f)).xyz;\\n let ca_1 = vec2<f32>(dot(jx, va), dot(jy, va));\\n let cb = vec2<f32>(dot(jx, vb), dot(jy, vb));\\n let cc = vec2<f32>(dot(jx, vc), dot(jy, vc));\\n let _e92 = material.blur;\\n let blur = (_e92 + BASE_BLUR);\\n let sxx = ((((ca_1.x * ca_1.x) + (cb.x * cb.x)) + (cc.x * cc.x)) + blur);\\n let sxy = (((ca_1.x * ca_1.y) + (cb.x * cb.y)) + (cc.x * cc.y));\\n let syy = ((((ca_1.y * ca_1.y) + (cb.y * cb.y)) + (cc.y * cc.y)) + blur);\\n if (((sxx * syy) - (sxy * sxy)) <= 1e-12f) {\\n let _e135 = out_1;\\n return _e135;\\n }\\n let mid = (0.5f * (sxx + syy));\\n let spread = sqrt(max((((0.25f * (sxx - syy)) * (sxx - syy)) + (sxy * sxy)), 0f));\\n let major = (mid + spread);\\n let minor = max((mid - spread), 0f);\\n let fromX = vec2<f32>((major - syy), sxy);\\n let fromY = vec2<f32>(sxy, (major - sxx));\\n direction = select(fromY, fromX, (dot(fromX, fromX) >= dot(fromY, fromY)));\\n let _e162 = direction;\\n let _e163 = direction;\\n let length2_ = dot(_e162, _e163);\\n let _e168 = direction;\\n direction = select(vec2<f32>(1f, 0f), (_e168 * inverseSqrt(length2_)), (length2_ > 1e-20f));\\n let _e175 = direction;\\n out_1.axisX = (_e175 * sqrt(major));\\n let _e180 = direction.y;\\n let _e183 = direction.x;\\n out_1.axisY = (vec2<f32>(-(_e180), _e183) * sqrt(minor));\\n let _e194 = camera.projection[1][1];\\n out_1.worldPerPixel = ((2f * depth) / (_e194 * res.y));\\n out_1.drawn = true;\\n let _e200 = out_1;\\n return _e200;\\n}\\n\",\"\\nfn to_mesh(m: mat3x3<f32>, v_2: vec3<f32>) -> vec3<f32> {\\n let a_2 = m[0];\\n let b_2 = m[1];\\n let c_2 = m[2];\\n let det_1 = dot(a_2, cross(b_2, c_2));\\n if (abs(det_1) < 1e-12f) {\\n return v_2;\\n }\\n return (vec3<f32>(dot(cross(b_2, c_2), v_2), dot(cross(c_2, a_2), v_2), dot(cross(a_2, b_2), v_2)) / vec3(det_1));\\n}\\n\",\"\\nfn vertexOffset(input_1: VertexInput) -> vec3<f32> {\\n let matrix_1 = object.worldMatrix;\\n let axes = mat3x3<f32>(matrix_1[0].xyz, matrix_1[1].xyz, matrix_1[2].xyz);\\n let _e10 = splat_screen(matrix_1);\\n if !(_e10.drawn) {\\n return -(input_1.position);\\n }\\n let corner = ((input_1.uv * 2f) - vec2(1f));\\n let _e24 = material.extent;\\n let offset = (_e24 * ((corner.x * _e10.axisX) + (corner.y * _e10.axisY)));\\n let _e37 = camera.view[0][0];\\n let _e42 = camera.view[1][0];\\n let _e47 = camera.view[2][0];\\n let right = vec3<f32>(_e37, _e42, _e47);\\n let _e53 = camera.view[0][1];\\n let _e58 = camera.view[1][1];\\n let _e63 = camera.view[2][1];\\n let up = vec3<f32>(_e53, _e58, _e63);\\n let world_1 = (((right * offset.x) - (up * offset.y)) * _e10.worldPerPixel);\\n let _e72 = to_mesh(axes, world_1);\\n return (_e72 - input_1.position);\\n}\\n\",\"\\n@vertex\",\"\\nfn vs(v: VertexIn, i: InstanceIn) -> VertexOut {\\n var out: VertexOut;\\n\\n let _e1 = find_instance(i);\\n let _e4 = relative_position_1(_e1, vec3(0f));\\n fill_builtins(_e4);\\n let _e5 = fill_object(_e1);\\n let _e7 = load_material_uniforms(_e1.material);\\n material = _e7;\\n let rest_tangent = vec3(0f);\\n let _e13 = mesh_position(v.position);\\n let rest_normal = v.normal;\\n let _e17 = skin_of(_e1, v.joints, v.weights);\\n let _e18 = skinned_point(_e17, _e13);\\n let _e19 = skinned_direction(_e17, rest_normal);\\n let _e20 = vertex_input(v, _e18, _e19, _e5);\\n let _e21 = vertexOffset(_e20);\\n let _e25 = relative_position_1(_e1, (_e18 + _e21));\\n out.relative = _e25;\\n let _e28 = out.relative;\\n let _e29 = clip_of(_e1, _e28);\\n out.clip = _e29;\\n let _e31 = world_normal(_e1, _e19);\\n out.normal = _e31;\\n out.material = _e1.material;\\n let _e36 = mesh_uv(v.uv0_);\\n out.uv = _e36;\\n out.origin = _e4;\\n out.world_x = _e1.row_x;\\n out.world_y = _e1.row_y;\\n out.world_z = _e1.row_z;\\n out.ids = _e5;\\n let _e46 = pick_key(_e1);\\n out.key = _e46;\\n let _e47 = out;\\n return _e47;\\n}\\n\",\"\\n@fragment\",\"\\nfn fs(in: VertexOut, @builtin(front_facing) front: bool) -> @location(0) vec4<f32> {\\n let _e2 = pick_color(in.key);\\n return _e2;\\n}\\n\",\"\\nstruct Material {\\n color: vec4<f32>,\\n emissive: vec4<f32>,\\n surface: vec4<f32>,\\n strengths: vec4<f32>,\\n uv_u: vec4<f32>,\\n uv_v: vec4<f32>,\\n maps: vec4<f32>,\\n more_maps: vec4<f32>,\\n specular: vec4<f32>,\\n}\\n\",\"\\nstruct MaterialRow {\\n color: vec4<f32>,\\n emissive: vec4<f32>,\\n surface: vec4<f32>,\\n strengths: vec4<f32>,\\n uv_u: vec4<f32>,\\n uv_v: vec4<f32>,\\n maps: vec4<f32>,\\n more_maps: vec4<f32>,\\n specular: vec4<f32>,\\n transmission: vec4<f32>,\\n attenuation: vec4<f32>,\\n coat: vec4<f32>,\\n sheen: vec4<f32>,\\n translucency: vec4<f32>,\\n subsurface: vec4<f32>,\\n iridescence: vec4<f32>,\\n anisotropy: vec4<f32>,\\n light_map_uv: vec4<f32>,\\n volume: vec4<f32>,\\n map_uv: array<vec4<f32>, 18>,\\n}\\n\",\"\\nstruct VertexOut {\\n @builtin(position) @invariant clip: vec4<f32>,\\n @location(0) relative: vec3<f32>,\\n @location(1) normal: vec3<f32>,\\n @location(2) @interpolate(flat, either) material: u32,\\n @location(4) uv: vec2<f32>,\\n @location(8) @interpolate(flat, either) origin: vec3<f32>,\\n @location(5) @interpolate(flat, either) world_x: vec4<f32>,\\n @location(6) @interpolate(flat, either) world_y: vec4<f32>,\\n @location(7) @interpolate(flat, either) world_z: vec4<f32>,\\n}\\n\",\"\\nstruct VertexInput {\\n position: vec3<f32>,\\n normal: vec3<f32>,\\n uv: vec2<f32>,\\n}\\n\",\"\\nstruct SurfaceInput {\\n relativePosition: vec3<f32>,\\n worldPosition: vec3<f32>,\\n normal: vec3<f32>,\\n viewDirection: vec3<f32>,\\n vertexColor: vec4<f32>,\\n uv: vec2<f32>,\\n frontFacing: bool,\\n fragCoord: vec3<f32>,\\n}\\n\",\"\\nstruct Surface {\\n baseColor: vec3<f32>,\\n alpha: f32,\\n metalness: f32,\\n roughness: f32,\\n normal: vec3<f32>,\\n emissive: vec3<f32>,\\n occlusion: f32,\\n irradiance: vec3<f32>,\\n reflection: vec4<f32>,\\n lobe: vec4<f32>,\\n shadowOffset: vec3<f32>,\\n diffuseNormal: vec3<f32>,\\n transmission: f32,\\n thickness: f32,\\n diffuseTransmission: f32,\\n diffuseTransmissionColor: vec3<f32>,\\n clearcoat: f32,\\n clearcoatRoughness: f32,\\n clearcoatNormal: vec3<f32>,\\n sheenColor: vec3<f32>,\\n sheenRoughness: f32,\\n iridescence: f32,\\n iridescenceIor: f32,\\n iridescenceThickness: f32,\\n}\\n\",\"\\nconst AGX: u32 = 1u;\",\"\\nconst AGX_PUNCHY: u32 = 4u;\",\"\\nconst NEUTRAL: u32 = 2u;\",\"\\nconst NONE: u32 = 3u;\",\"\\nconst NO_TONE_MAP: u32 = 2097152u;\",\"\\nconst MAX_CASCADES: u32 = 4u;\",\"\\nconst MAX_SLOPE: f32 = 2f;\",\"\\nconst DEPTH_STEPS_FLOOR: f32 = 1.5f;\",\"\\nconst MAX_PLANE_SLOPE: f32 = 10f;\",\"\\nconst PLANE_MARGIN: f32 = 0.01f;\",\"\\nconst NEAREST_SPEAKS: bool = false;\",\"\\n@group(0) @binding(1)\",\"\\nvar<storage> materials: array<MaterialRow>;\",\"\\nvar<private> material_row: Material;\",\"\\nfn material_of(id: u32) -> Material {\\n let _e4 = materials[id].color;\\n let _e8 = materials[id].emissive;\\n let _e12 = materials[id].surface;\\n let _e16 = materials[id].strengths;\\n let _e20 = materials[id].uv_u;\\n let _e24 = materials[id].uv_v;\\n let _e28 = materials[id].maps;\\n let _e32 = materials[id].more_maps;\\n let _e36 = materials[id].specular;\\n return Material(_e4, _e8, _e12, _e16, _e20, _e24, _e28, _e32, _e36);\\n}\\n\",\"\\nfn custom_value(id_1: u32, k: u32) -> vec4<f32> {\\n let _e5 = textureLoad(custom_values, vec2<u32>(k, id_1), 0i);\\n return _e5;\\n}\\n\",\"\\nfn clip_of(found: Instance, relative: vec3<f32>) -> vec4<f32> {\\n if !(found.drawn) {\\n return OUTSIDE_CLIP;\\n }\\n let _e6 = frame_null3d_mesh.view_proj;\\n let _e9 = frame_null3d_mesh.jitter;\\n let _e12 = clip_with_jitter(_e6, _e9.xy, relative);\\n return _e12;\\n}\\n\",\"\\nfn transform_of(found_1: Instance) -> Transform {\\n return Transform(found_1.row_x, found_1.row_y, found_1.row_z);\\n}\\n\",\"\\nfn relative_position_1(found_2: Instance, position: vec3<f32>) -> vec3<f32> {\\n let _e1 = transform_of(found_2);\\n let _e3 = transform_point(_e1, position);\\n return _e3;\\n}\\n\",\"\\nfn world_normal(found_3: Instance, normal: vec3<f32>) -> vec3<f32> {\\n let _e1 = transform_of(found_3);\\n let _e3 = transform_normal(_e1, normal);\\n return _e3;\\n}\\n\",\"\\nfn skin_of(found_4: Instance, joints: vec4<u32>, weights: vec4<f32>) -> Skin {\\n var s_1: Skin = Skin(vec4(0f), vec4(0f), vec4(0f));\\n var k_1: u32 = 0u;\\n\\n loop {\\n let _e5 = k_1;\\n if (_e5 < 4u) {\\n } else {\\n break;\\n }\\n {\\n let _e9 = k_1;\\n let w = weights[_e9];\\n if (w == 0f) {\\n continue;\\n }\\n let _e16 = k_1;\\n let joint_1 = (found_4.first_joint + joints[_e16]);\\n let _e21 = s_1.row_x;\\n let _e23 = joint_row(joint_1, 0u);\\n s_1.row_x = (_e21 + (w * _e23));\\n let _e27 = s_1.row_y;\\n let _e29 = joint_row(joint_1, 1u);\\n s_1.row_y = (_e27 + (w * _e29));\\n let _e33 = s_1.row_z;\\n let _e35 = joint_row(joint_1, 2u);\\n s_1.row_z = (_e33 + (w * _e35));\\n }\\n continuing {\\n let _e39 = k_1;\\n k_1 = (_e39 + 1u);\\n }\\n }\\n let _e41 = s_1;\\n return _e41;\\n}\\n\",\"\\nfn skinned_point(s_2: Skin, p_1: vec3<f32>) -> vec3<f32> {\\n let h = vec4<f32>(p_1, 1f);\\n return vec3<f32>(dot(s_2.row_x, h), dot(s_2.row_y, h), dot(s_2.row_z, h));\\n}\\n\",\"\\nfn skinned_direction(s_3: Skin, d: vec3<f32>) -> vec3<f32> {\\n return vec3<f32>(dot(s_3.row_x.xyz, d), dot(s_3.row_y.xyz, d), dot(s_3.row_z.xyz, d));\\n}\\n\",\"\\nfn sceneDistance(uv_1: vec2<f32>) -> f32 {\\n let _e3 = frame_null3d_mesh.camera_range.y;\\n return _e3;\\n}\\n\",\"\\nfn defaultSurface(input: SurfaceInput) -> Surface {\\n var s_4: Surface;\\n\\n let m_1 = material_row;\\n s_4.baseColor = (m_1.color.xyz * input.vertexColor.xyz);\\n s_4.alpha = (m_1.color.w * input.vertexColor.w);\\n s_4.metalness = m_1.surface.x;\\n s_4.roughness = m_1.surface.y;\\n s_4.normal = input.normal;\\n s_4.emissive = (m_1.emissive.xyz * m_1.strengths.w);\\n s_4.occlusion = 1f;\\n s_4.irradiance = vec3(0f);\\n s_4.reflection = vec4(0f);\\n s_4.lobe = vec4(0f);\\n s_4.shadowOffset = vec3(0f);\\n s_4.diffuseNormal = input.normal;\\n s_4.transmission = 0f;\\n s_4.thickness = 0f;\\n s_4.diffuseTransmission = 0f;\\n s_4.diffuseTransmissionColor = vec3(1f);\\n s_4.clearcoat = 0f;\\n s_4.clearcoatRoughness = 0f;\\n s_4.clearcoatNormal = input.normal;\\n s_4.sheenColor = vec3(0f);\\n s_4.sheenRoughness = 1f;\\n s_4.iridescence = 0f;\\n s_4.iridescenceIor = 1f;\\n s_4.iridescenceThickness = 0f;\\n let _e72 = s_4;\\n return _e72;\\n}\\n\",\"\\nfn fill_object(found_5: Instance) -> vec2<u32> {\\n var ids: vec2<u32> = vec2(0u);\\n\\n let _e8 = affine_matrix(found_5.row_x, found_5.row_y, found_5.row_z);\\n object.worldMatrix = _e8;\\n let _e14 = affine_normal_matrix(found_5.row_x, found_5.row_y, found_5.row_z);\\n object.normalMatrix = _e14;\\n let _e16 = ids;\\n return _e16;\\n}\\n\",\"\\nfn vertex_input(v_1: VertexIn, position_1: vec3<f32>, normal_1: vec3<f32>, ids_1: vec2<u32>) -> VertexInput {\\n var input_1: VertexInput;\\n\\n input_1.position = position_1;\\n input_1.normal = normal_1;\\n let _e8 = mesh_uv(v_1.uv0_);\\n input_1.uv = _e8;\\n let _e9 = input_1;\\n return _e9;\\n}\\n\",\"\\nfn load_material_uniforms(id_2: u32) -> Uniforms {\\n var u: Uniforms;\\n\\n let _e2 = custom_value(id_2, 0u);\\n u.extent = _e2.x;\\n u.blur = _e2.y;\\n u.softness = _e2.z;\\n u.cutoff = _e2.w;\\n let _e12 = u;\\n return _e12;\\n}\\n\",\"\\nfn vertexOffset(input_2: VertexInput) -> vec3<f32> {\\n let matrix_1 = object.worldMatrix;\\n let axes = mat3x3<f32>(matrix_1[0].xyz, matrix_1[1].xyz, matrix_1[2].xyz);\\n let _e10 = splat_screen(matrix_1);\\n if !(_e10.drawn) {\\n return -(input_2.position);\\n }\\n let corner = ((input_2.uv * 2f) - vec2(1f));\\n let _e24 = material.extent;\\n let offset = (_e24 * ((corner.x * _e10.axisX) + (corner.y * _e10.axisY)));\\n let _e37 = camera.view[0][0];\\n let _e42 = camera.view[1][0];\\n let _e47 = camera.view[2][0];\\n let right = vec3<f32>(_e37, _e42, _e47);\\n let _e53 = camera.view[0][1];\\n let _e58 = camera.view[1][1];\\n let _e63 = camera.view[2][1];\\n let up = vec3<f32>(_e53, _e58, _e63);\\n let world_1 = (((right * offset.x) - (up * offset.y)) * _e10.worldPerPixel);\\n let _e72 = to_mesh(axes, world_1);\\n return (_e72 - input_2.position);\\n}\\n\",\"\\nfn surface_input(in_1: VertexOut, front_1: bool) -> SurfaceInput {\\n var input_3: SurfaceInput;\\n var coord: vec3<f32>;\\n\\n input_3.relativePosition = in_1.relative;\\n let eye = frame_null3d_mesh.camera_position;\\n input_3.viewDirection = normalize((eye.xyz - (in_1.relative * eye.w)));\\n let _e15 = dpdx(in_1.relative);\\n let _e17 = dpdy(in_1.relative);\\n let face = normalize(cross(_e15, _e17));\\n let _e22 = input_3.viewDirection;\\n let face_normal = select(-(face), face, (dot(face, _e22) >= 0f));\\n let smooth_normal = (normalize(in_1.normal) * select(-1f, 1f, front_1));\\n let _e37 = material_row.strengths.z;\\n let flat_shading = ((u32(_e37) & FLAT_SHADING) != 0u);\\n input_3.normal = select(smooth_normal, face_normal, flat_shading);\\n input_3.vertexColor = vec4(1f);\\n let _e52 = frame_null3d_mesh.camera_world;\\n input_3.worldPosition = (in_1.relative + _e52.xyz);\\n input_3.uv = in_1.uv;\\n input_3.frontFacing = front_1;\\n coord = in_1.clip.xyz;\\n let _e62 = coord;\\n input_3.fragCoord = _e62;\\n let _e63 = input_3;\\n return _e63;\\n}\\n\",\"\\nfn unlit(input_4: SurfaceInput) -> vec4<f32> {\\n var alpha: f32;\\n\\n let corner_1 = ((input_4.uv * 2f) - vec2(1f));\\n let _e9 = material.extent;\\n let _e12 = material.extent;\\n let deviations = ((_e9 * _e12) * dot(corner_1, corner_1));\\n alpha = (input_4.vertexColor.w * exp((-0.5f * deviations)));\\n let _e25 = material.softness;\\n if (_e25 > 0f) {\\n let _e32 = frame_null3d_builtins.resolution;\\n let uv_2 = (input_4.fragCoord.xy / _e32);\\n let _e36 = camera.view;\\n let depth_1 = -((_e36 * vec4<f32>(input_4.relativePosition, 0f)).z);\\n let _e43 = alpha;\\n let _e46 = material.softness;\\n let _e47 = sceneDistance(uv_2);\\n alpha = (_e43 * smoothstep(0f, _e46, (_e47 - depth_1)));\\n }\\n let _e52 = alpha;\\n let _e55 = material.cutoff;\\n if (_e52 < _e55) {\\n discard;\\n }\\n let _e59 = alpha;\\n return vec4<f32>(input_4.vertexColor.xyz, min(_e59, 1f));\\n}\\n\",\"\\nfn vs(v: VertexIn, i: InstanceIn) -> VertexOut {\\n var out: VertexOut;\\n\\n let _e1 = find_instance(i);\\n let _e4 = relative_position_1(_e1, vec3(0f));\\n fill_builtins(_e4);\\n let _e5 = fill_object(_e1);\\n let _e7 = load_material_uniforms(_e1.material);\\n material = _e7;\\n let rest_tangent = vec3(0f);\\n let _e13 = mesh_position(v.position);\\n let rest_normal = v.normal;\\n let _e17 = skin_of(_e1, v.joints, v.weights);\\n let _e18 = skinned_point(_e17, _e13);\\n let _e19 = skinned_direction(_e17, rest_normal);\\n let _e20 = vertex_input(v, _e18, _e19, _e5);\\n let _e21 = vertexOffset(_e20);\\n let _e25 = relative_position_1(_e1, (_e18 + _e21));\\n out.relative = _e25;\\n let _e28 = out.relative;\\n let _e29 = clip_of(_e1, _e28);\\n out.clip = _e29;\\n let _e31 = world_normal(_e1, _e19);\\n out.normal = _e31;\\n out.material = _e1.material;\\n let _e36 = mesh_uv(v.uv0_);\\n out.uv = _e36;\\n out.origin = _e4;\\n out.world_x = _e1.row_x;\\n out.world_y = _e1.row_y;\\n out.world_z = _e1.row_z;\\n let _e44 = out;\\n return _e44;\\n}\\n\",\"\\nfn fs(in: VertexOut, @builtin(front_facing) front: bool) -> @location(0) vec4<f32> {\\n var s: Surface;\\n\\n let _e2 = material_of(in.material);\\n material_row = _e2;\\n fill_builtins(in.origin);\\n let _e10 = affine_matrix(in.world_x, in.world_y, in.world_z);\\n object.worldMatrix = _e10;\\n let _e16 = affine_normal_matrix(in.world_x, in.world_y, in.world_z);\\n object.normalMatrix = _e16;\\n let _e18 = load_material_uniforms(in.material);\\n material = _e18;\\n let _e21 = surface_input(in, front);\\n let _e22 = unlit(_e21);\\n let _e23 = defaultSurface(_e21);\\n s = _e23;\\n s.emissive = _e22.xyz;\\n s.alpha = _e22.w;\\n let alpha_1 = s.alpha;\\n let _e34 = material_row.emissive.w;\\n if (alpha_1 < _e34) {\\n discard;\\n }\\n return vec4<f32>(0f, 0f, 0f, 1f);\\n}\\n\",\"\\nconst MIN_FADE: f32 = 1e-4f;\",\"\\nfn alpha_coverage(alpha: f32, fade: f32, cutoff: f32) -> f32 {\\n return smoothstep(cutoff, (cutoff + max(fade, MIN_FADE)), alpha);\\n}\\n\",\"\\nfn unlit(input_4: SurfaceInput) -> vec4<f32> {\\n var alpha_1: f32;\\n\\n let corner_1 = ((input_4.uv * 2f) - vec2(1f));\\n let _e9 = material.extent;\\n let _e12 = material.extent;\\n let deviations = ((_e9 * _e12) * dot(corner_1, corner_1));\\n alpha_1 = (input_4.vertexColor.w * exp((-0.5f * deviations)));\\n let _e25 = material.softness;\\n if (_e25 > 0f) {\\n let _e32 = frame_null3d_builtins.resolution;\\n let uv_2 = (input_4.fragCoord.xy / _e32);\\n let _e36 = camera.view;\\n let depth_1 = -((_e36 * vec4<f32>(input_4.relativePosition, 0f)).z);\\n let _e43 = alpha_1;\\n let _e46 = material.softness;\\n let _e47 = sceneDistance(uv_2);\\n alpha_1 = (_e43 * smoothstep(0f, _e46, (_e47 - depth_1)));\\n }\\n let _e52 = alpha_1;\\n let _e55 = material.cutoff;\\n if (_e52 < _e55) {\\n discard;\\n }\\n let _e59 = alpha_1;\\n return vec4<f32>(input_4.vertexColor.xyz, min(_e59, 1f));\\n}\\n\",\"\\nfn fs(in: VertexOut, @builtin(front_facing) front: bool) -> @location(0) vec4<f32> {\\n var s: Surface;\\n\\n let _e2 = material_of(in.material);\\n material_row = _e2;\\n fill_builtins(in.origin);\\n let _e10 = affine_matrix(in.world_x, in.world_y, in.world_z);\\n object.worldMatrix = _e10;\\n let _e16 = affine_normal_matrix(in.world_x, in.world_y, in.world_z);\\n object.normalMatrix = _e16;\\n let _e18 = load_material_uniforms(in.material);\\n material = _e18;\\n let _e21 = surface_input(in, front);\\n let _e22 = unlit(_e21);\\n let _e23 = defaultSurface(_e21);\\n s = _e23;\\n s.emissive = _e22.xyz;\\n s.alpha = _e22.w;\\n let alpha_2 = s.alpha;\\n let _e31 = fwidth(alpha_2);\\n let _e35 = material_row.emissive.w;\\n let _e36 = alpha_coverage(alpha_2, _e31, _e35);\\n if (_e36 < 1f) {\\n discard;\\n }\\n return vec4<f32>(0f, 0f, 0f, 1f);\\n}\\n\",\"\\nstruct VertexOut {\\n @builtin(position) @invariant clip: vec4<f32>,\\n @location(0) relative: vec3<f32>,\\n @location(1) normal: vec3<f32>,\\n @location(2) @interpolate(flat, either) material: u32,\\n @location(4) uv: vec2<f32>,\\n @location(13) mesh_place: vec3<f32>,\\n @location(8) @interpolate(flat, either) origin: vec3<f32>,\\n @location(5) @interpolate(flat, either) world_x: vec4<f32>,\\n @location(6) @interpolate(flat, either) world_y: vec4<f32>,\\n @location(7) @interpolate(flat, either) world_z: vec4<f32>,\\n}\\n\",\"\\nconst ALPHA_HASH_SCALE: f32 = 0.05f;\",\"\\nvar<private> hash_place: vec3<f32>;\",\"\\nfn transform_normal(t_1: Transform, n: vec3<f32>) -> vec3<f32> {\\n let a = t_1.x.xyz;\\n let b = t_1.y.xyz;\\n let c_1 = t_1.z.xyz;\\n let bc = cross(b, c_1);\\n let ca = cross(c_1, a);\\n let ab = cross(a, b);\\n let facing = select(-1f, 1f, (dot(a, bc) >= 0f));\\n return normalize((vec3<f32>(dot(bc, n), dot(ca, n), dot(ab, n)) * facing));\\n}\\n\",\"\\nfn skinned_point(s_2: Skin, p_1: vec3<f32>) -> vec3<f32> {\\n let h_1 = vec4<f32>(p_1, 1f);\\n return vec3<f32>(dot(s_2.row_x, h_1), dot(s_2.row_y, h_1), dot(s_2.row_z, h_1));\\n}\\n\",\"\\nfn affine_normal_matrix(x_1: vec4<f32>, y_1: vec4<f32>, z_1: vec4<f32>) -> mat3x3<f32> {\\n let a_1 = x_1.xyz;\\n let b_1 = y_1.xyz;\\n let c_2 = z_1.xyz;\\n let bc_1 = cross(b_1, c_2);\\n let det = dot(a_1, bc_1);\\n let scale = select(0f, (1f / det), (det != 0f));\\n return (transpose(mat3x3<f32>(bc_1, cross(c_2, a_1), cross(a_1, b_1))) * scale);\\n}\\n\",\"\\nfn to_unit(h: u32) -> f32 {\\n return (f32((h >> 8u)) / 16777216f);\\n}\\n\",\"\\nfn pcg3d(v_1: vec3<u32>) -> vec3<u32> {\\n var p_3: vec3<u32>;\\n\\n p_3 = ((v_1 * 1664525u) + vec3(1013904223u));\\n let _e8 = p_3.x;\\n let _e10 = p_3.y;\\n let _e12 = p_3.z;\\n p_3.x = (_e8 + (_e10 * _e12));\\n let _e16 = p_3.y;\\n let _e18 = p_3.z;\\n let _e20 = p_3.x;\\n p_3.y = (_e16 + (_e18 * _e20));\\n let _e24 = p_3.z;\\n let _e26 = p_3.x;\\n let _e28 = p_3.y;\\n p_3.z = (_e24 + (_e26 * _e28));\\n let _e31 = p_3;\\n let _e32 = p_3;\\n p_3 = (_e31 ^ (_e32 >> vec3(16u)));\\n let _e38 = p_3.x;\\n let _e40 = p_3.y;\\n let _e42 = p_3.z;\\n p_3.x = (_e38 + (_e40 * _e42));\\n let _e46 = p_3.y;\\n let _e48 = p_3.z;\\n let _e50 = p_3.x;\\n p_3.y = (_e46 + (_e48 * _e50));\\n let _e54 = p_3.z;\\n let _e56 = p_3.x;\\n let _e58 = p_3.y;\\n p_3.z = (_e54 + (_e56 * _e58));\\n let _e61 = p_3;\\n return _e61;\\n}\\n\",\"\\nfn lattice(c: vec3<i32>) -> vec3<u32> {\\n let _e2 = pcg3d(bitcast<vec3<u32>>(c));\\n return _e2;\\n}\\n\",\"\\nfn hash_cell(cell: vec3<f32>) -> f32 {\\n let _e2 = lattice(vec3<i32>(cell));\\n let _e4 = to_unit(_e2.x);\\n return _e4;\\n}\\n\",\"\\nfn alpha_hash_threshold(position_1: vec3<f32>) -> f32 {\\n let _e1 = dpdx(position_1);\\n let _e3 = dpdy(position_1);\\n let change = max(length(_e1), length(_e3));\\n let pixel_scale = (1f / (ALPHA_HASH_SCALE * change));\\n let scale_log = log2(pixel_scale);\\n let scales = vec2<f32>(exp2(floor(scale_log)), exp2(ceil(scale_log)));\\n let _e19 = hash_cell(floor((scales.x * position_1)));\\n let _e23 = hash_cell(floor((scales.y * position_1)));\\n let hashes = vec2<f32>(_e19, _e23);\\n let blend = fract(scale_log);\\n let x_3 = (((1f - blend) * hashes.x) + (blend * hashes.y));\\n let a_2 = min(blend, (1f - blend));\\n let low = ((x_3 * x_3) / ((2f * a_2) * (1f - a_2)));\\n let middle = ((x_3 - (0.5f * a_2)) / (1f - a_2));\\n let high = (1f - (((1f - x_3) * (1f - x_3)) / ((2f * a_2) * (1f - a_2))));\\n let threshold = select(high, select(middle, low, (x_3 < a_2)), (x_3 < (1f - a_2)));\\n return clamp(threshold, 1e-6f, 1f);\\n}\\n\",\"\\nfn vertex_input(v_2: VertexIn, position_2: vec3<f32>, normal_1: vec3<f32>, ids_1: vec2<u32>) -> VertexInput {\\n var input_1: VertexInput;\\n\\n input_1.position = position_2;\\n input_1.normal = normal_1;\\n let _e8 = mesh_uv(v_2.uv0_);\\n input_1.uv = _e8;\\n let _e9 = input_1;\\n return _e9;\\n}\\n\",\"\\nfn to_mesh(m: mat3x3<f32>, v_3: vec3<f32>) -> vec3<f32> {\\n let a_3 = m[0];\\n let b_2 = m[1];\\n let c_3 = m[2];\\n let det_1 = dot(a_3, cross(b_2, c_3));\\n if (abs(det_1) < 1e-12f) {\\n return v_3;\\n }\\n return (vec3<f32>(dot(cross(b_2, c_3), v_3), dot(cross(c_3, a_3), v_3), dot(cross(a_3, b_2), v_3)) / vec3(det_1));\\n}\\n\",\"\\nfn vs(v: VertexIn, i: InstanceIn) -> VertexOut {\\n var out: VertexOut;\\n\\n let _e1 = find_instance(i);\\n let _e4 = relative_position_1(_e1, vec3(0f));\\n fill_builtins(_e4);\\n let _e5 = fill_object(_e1);\\n let _e7 = load_material_uniforms(_e1.material);\\n material = _e7;\\n let rest_tangent = vec3(0f);\\n let _e13 = mesh_position(v.position);\\n let rest_normal = v.normal;\\n let _e17 = skin_of(_e1, v.joints, v.weights);\\n let _e18 = skinned_point(_e17, _e13);\\n let _e19 = skinned_direction(_e17, rest_normal);\\n let _e20 = vertex_input(v, _e18, _e19, _e5);\\n let _e21 = vertexOffset(_e20);\\n let _e25 = relative_position_1(_e1, (_e18 + _e21));\\n out.relative = _e25;\\n let _e28 = out.relative;\\n let _e29 = clip_of(_e1, _e28);\\n out.clip = _e29;\\n let _e31 = world_normal(_e1, _e19);\\n out.normal = _e31;\\n out.material = _e1.material;\\n let _e36 = mesh_uv(v.uv0_);\\n out.uv = _e36;\\n let _e39 = mesh_position(v.position);\\n out.mesh_place = _e39;\\n out.origin = _e4;\\n out.world_x = _e1.row_x;\\n out.world_y = _e1.row_y;\\n out.world_z = _e1.row_z;\\n let _e47 = out;\\n return _e47;\\n}\\n\",\"\\nfn fs(in: VertexOut, @builtin(front_facing) front: bool) -> @location(0) vec4<f32> {\\n var s: Surface;\\n\\n let _e2 = material_of(in.material);\\n material_row = _e2;\\n hash_place = in.mesh_place;\\n fill_builtins(in.origin);\\n let _e12 = affine_matrix(in.world_x, in.world_y, in.world_z);\\n object.worldMatrix = _e12;\\n let _e18 = affine_normal_matrix(in.world_x, in.world_y, in.world_z);\\n object.normalMatrix = _e18;\\n let _e20 = load_material_uniforms(in.material);\\n material = _e20;\\n let _e23 = surface_input(in, front);\\n let _e24 = unlit(_e23);\\n let _e25 = defaultSurface(_e23);\\n s = _e25;\\n s.emissive = _e24.xyz;\\n s.alpha = _e24.w;\\n let alpha_1 = s.alpha;\\n let _e34 = hash_place;\\n let _e35 = alpha_hash_threshold(_e34);\\n if (alpha_1 < _e35) {\\n discard;\\n }\\n return vec4<f32>(0f, 0f, 0f, 1f);\\n}\\n\",\"\\nstruct MaskedFragment {\\n @location(0) color: vec4<f32>,\\n @builtin(sample_mask) mask: u32,\\n}\\n\",\"\\nfn fs(in: VertexOut, @builtin(front_facing) front: bool) -> MaskedFragment {\\n var s: Surface;\\n\\n let _e2 = material_of(in.material);\\n material_row = _e2;\\n fill_builtins(in.origin);\\n let _e10 = affine_matrix(in.world_x, in.world_y, in.world_z);\\n object.worldMatrix = _e10;\\n let _e16 = affine_normal_matrix(in.world_x, in.world_y, in.world_z);\\n object.normalMatrix = _e16;\\n let _e18 = load_material_uniforms(in.material);\\n material = _e18;\\n let _e21 = surface_input(in, front);\\n let _e22 = unlit(_e21);\\n let _e23 = defaultSurface(_e21);\\n s = _e23;\\n s.emissive = _e22.xyz;\\n s.alpha = _e22.w;\\n let alpha_2 = s.alpha;\\n let _e31 = fwidth(alpha_2);\\n let _e35 = material_row.emissive.w;\\n let _e36 = alpha_coverage(alpha_2, _e31, _e35);\\n if (_e36 < 1f) {\\n discard;\\n }\\n return MaskedFragment(vec4<f32>(0f, 0f, 0f, 1f), 15u);\\n}\\n\",\"\\nstruct VertexIn {\\n @location(0) position: vec3<f32>,\\n @location(1) normal: vec3<f32>,\\n @location(2) uv0_: vec2<f32>,\\n @location(5) vertex_color: vec4<f32>,\\n @location(6) joints: vec4<u32>,\\n @location(7) weights: vec4<f32>,\\n}\\n\",\"\\nstruct VertexOut {\\n @builtin(position) @invariant clip: vec4<f32>,\\n @location(0) relative: vec3<f32>,\\n @location(1) normal: vec3<f32>,\\n @location(2) @interpolate(flat, either) material: u32,\\n @location(3) vertex_color: vec4<f32>,\\n @location(4) uv: vec2<f32>,\\n @location(8) @interpolate(flat, either) origin: vec3<f32>,\\n @location(5) @interpolate(flat, either) world_x: vec4<f32>,\\n @location(6) @interpolate(flat, either) world_y: vec4<f32>,\\n @location(7) @interpolate(flat, either) world_z: vec4<f32>,\\n}\\n\",\"\\nfn surface_input(in_1: VertexOut, front_1: bool) -> SurfaceInput {\\n var input_3: SurfaceInput;\\n var coord: vec3<f32>;\\n\\n input_3.relativePosition = in_1.relative;\\n let eye = frame_null3d_mesh.camera_position;\\n input_3.viewDirection = normalize((eye.xyz - (in_1.relative * eye.w)));\\n let _e15 = dpdx(in_1.relative);\\n let _e17 = dpdy(in_1.relative);\\n let face = normalize(cross(_e15, _e17));\\n let _e22 = input_3.viewDirection;\\n let face_normal = select(-(face), face, (dot(face, _e22) >= 0f));\\n let smooth_normal = (normalize(in_1.normal) * select(-1f, 1f, front_1));\\n let _e37 = material_row.strengths.z;\\n let flat_shading = ((u32(_e37) & FLAT_SHADING) != 0u);\\n input_3.normal = select(smooth_normal, face_normal, flat_shading);\\n input_3.vertexColor = vec4(1f);\\n input_3.vertexColor = in_1.vertex_color;\\n let _e54 = frame_null3d_mesh.camera_world;\\n input_3.worldPosition = (in_1.relative + _e54.xyz);\\n input_3.uv = in_1.uv;\\n input_3.frontFacing = front_1;\\n coord = in_1.clip.xyz;\\n let _e64 = coord;\\n input_3.fragCoord = _e64;\\n let _e65 = input_3;\\n return _e65;\\n}\\n\",\"\\nfn vs(v: VertexIn, i: InstanceIn) -> VertexOut {\\n var out: VertexOut;\\n\\n let _e1 = find_instance(i);\\n let _e4 = relative_position_1(_e1, vec3(0f));\\n fill_builtins(_e4);\\n let _e5 = fill_object(_e1);\\n let _e7 = load_material_uniforms(_e1.material);\\n material = _e7;\\n let rest_tangent = vec3(0f);\\n let _e13 = mesh_position(v.position);\\n let rest_normal = v.normal;\\n let _e17 = skin_of(_e1, v.joints, v.weights);\\n let _e18 = skinned_point(_e17, _e13);\\n let _e19 = skinned_direction(_e17, rest_normal);\\n let _e20 = vertex_input(v, _e18, _e19, _e5);\\n let _e21 = vertexOffset(_e20);\\n let _e25 = relative_position_1(_e1, (_e18 + _e21));\\n out.relative = _e25;\\n let _e28 = out.relative;\\n let _e29 = clip_of(_e1, _e28);\\n out.clip = _e29;\\n let _e31 = world_normal(_e1, _e19);\\n out.normal = _e31;\\n out.material = _e1.material;\\n out.vertex_color = v.vertex_color;\\n let _e38 = mesh_uv(v.uv0_);\\n out.uv = _e38;\\n out.origin = _e4;\\n out.world_x = _e1.row_x;\\n out.world_y = _e1.row_y;\\n out.world_z = _e1.row_z;\\n let _e46 = out;\\n return _e46;\\n}\\n\",\"\\nstruct VertexOut {\\n @builtin(position) @invariant clip: vec4<f32>,\\n @location(0) relative: vec3<f32>,\\n @location(1) normal: vec3<f32>,\\n @location(2) @interpolate(flat, either) material: u32,\\n @location(3) vertex_color: vec4<f32>,\\n @location(4) uv: vec2<f32>,\\n @location(13) mesh_place: vec3<f32>,\\n @location(8) @interpolate(flat, either) origin: vec3<f32>,\\n @location(5) @interpolate(flat, either) world_x: vec4<f32>,\\n @location(6) @interpolate(flat, either) world_y: vec4<f32>,\\n @location(7) @interpolate(flat, either) world_z: vec4<f32>,\\n}\\n\",\"\\nfn vs(v: VertexIn, i: InstanceIn) -> VertexOut {\\n var out: VertexOut;\\n\\n let _e1 = find_instance(i);\\n let _e4 = relative_position_1(_e1, vec3(0f));\\n fill_builtins(_e4);\\n let _e5 = fill_object(_e1);\\n let _e7 = load_material_uniforms(_e1.material);\\n material = _e7;\\n let rest_tangent = vec3(0f);\\n let _e13 = mesh_position(v.position);\\n let rest_normal = v.normal;\\n let _e17 = skin_of(_e1, v.joints, v.weights);\\n let _e18 = skinned_point(_e17, _e13);\\n let _e19 = skinned_direction(_e17, rest_normal);\\n let _e20 = vertex_input(v, _e18, _e19, _e5);\\n let _e21 = vertexOffset(_e20);\\n let _e25 = relative_position_1(_e1, (_e18 + _e21));\\n out.relative = _e25;\\n let _e28 = out.relative;\\n let _e29 = clip_of(_e1, _e28);\\n out.clip = _e29;\\n let _e31 = world_normal(_e1, _e19);\\n out.normal = _e31;\\n out.material = _e1.material;\\n out.vertex_color = v.vertex_color;\\n let _e38 = mesh_uv(v.uv0_);\\n out.uv = _e38;\\n let _e41 = mesh_position(v.position);\\n out.mesh_place = _e41;\\n out.origin = _e4;\\n out.world_x = _e1.row_x;\\n out.world_y = _e1.row_y;\\n out.world_z = _e1.row_z;\\n let _e49 = out;\\n return _e49;\\n}\\n\",\"\\nfn clip_with_jitter(view_proj: mat4x4<f32>, jitter: vec2<f32>, relative_position: vec3<f32>) -> vec4<f32> {\\n let clip_2 = (view_proj * vec4<f32>(relative_position, 1f));\\n return (clip_2 + vec4<f32>((jitter * clip_2.w), 0f, 0f));\\n}\\n\",\"\\nfn transform_of(found: Instance) -> Transform {\\n return Transform(found.row_x, found.row_y, found.row_z);\\n}\\n\",\"\\nfn relative_position_1(found_1: Instance, position: vec3<f32>) -> vec3<f32> {\\n let _e1 = transform_of(found_1);\\n let _e3 = transform_point(_e1, position);\\n return _e3;\\n}\\n\",\"\\nfn world_normal(found_2: Instance, normal: vec3<f32>) -> vec3<f32> {\\n let _e1 = transform_of(found_2);\\n let _e3 = transform_normal(_e1, normal);\\n return _e3;\\n}\\n\",\"\\nfn clip_of(found_3: Instance, relative: vec3<f32>) -> vec4<f32> {\\n if !(found_3.drawn) {\\n return OUTSIDE_CLIP;\\n }\\n let _e6 = frame_null3d_mesh.view_proj;\\n let _e9 = frame_null3d_mesh.jitter;\\n let _e12 = clip_with_jitter(_e6, _e9.xy, relative);\\n return _e12;\\n}\\n\",\"\\nfn caster_clip(found_4: Instance, relative_1: vec3<f32>, normal_1: vec3<f32>) -> vec4<f32> {\\n var clip_1: vec4<f32>;\\n\\n let _e2 = clip_of(found_4, relative_1);\\n clip_1 = _e2;\\n let _e4 = clip_1;\\n return _e4;\\n}\\n\",\"\\nfn skin_of(found_5: Instance, joints: vec4<u32>, weights: vec4<f32>) -> Skin {\\n var s: Skin = Skin(vec4(0f), vec4(0f), vec4(0f));\\n var k_1: u32 = 0u;\\n\\n loop {\\n let _e5 = k_1;\\n if (_e5 < 4u) {\\n } else {\\n break;\\n }\\n {\\n let _e9 = k_1;\\n let w = weights[_e9];\\n if (w == 0f) {\\n continue;\\n }\\n let _e16 = k_1;\\n let joint_1 = (found_5.first_joint + joints[_e16]);\\n let _e21 = s.row_x;\\n let _e23 = joint_row(joint_1, 0u);\\n s.row_x = (_e21 + (w * _e23));\\n let _e27 = s.row_y;\\n let _e29 = joint_row(joint_1, 1u);\\n s.row_y = (_e27 + (w * _e29));\\n let _e33 = s.row_z;\\n let _e35 = joint_row(joint_1, 2u);\\n s.row_z = (_e33 + (w * _e35));\\n }\\n continuing {\\n let _e39 = k_1;\\n k_1 = (_e39 + 1u);\\n }\\n }\\n let _e41 = s;\\n return _e41;\\n}\\n\",\"\\nfn skinned_point(s_1: Skin, p_1: vec3<f32>) -> vec3<f32> {\\n let h_1 = vec4<f32>(p_1, 1f);\\n return vec3<f32>(dot(s_1.row_x, h_1), dot(s_1.row_y, h_1), dot(s_1.row_z, h_1));\\n}\\n\",\"\\nfn surface_place(relative_2: vec3<f32>, normal_2: vec3<f32>, front_1: bool) -> SurfaceInput {\\n var input_1: SurfaceInput;\\n\\n input_1.relativePosition = relative_2;\\n let eye = frame_null3d_mesh.camera_eye;\\n input_1.viewDirection = normalize((eye.xyz - (relative_2 * eye.w)));\\n let _e12 = dpdx(relative_2);\\n let _e13 = dpdy(relative_2);\\n let face = normalize(cross(_e12, _e13));\\n let _e18 = input_1.viewDirection;\\n let face_normal = select(-(face), face, (dot(face, _e18) >= 0f));\\n let smooth_normal = (normalize(normal_2) * select(-1f, 1f, front_1));\\n let _e33 = material_row.strengths.z;\\n let flat_shading = ((u32(_e33) & FLAT_SHADING) != 0u);\\n input_1.normal = select(smooth_normal, face_normal, flat_shading);\\n input_1.vertexColor = vec4(1f);\\n input_1.frontFacing = front_1;\\n let _e45 = input_1;\\n return _e45;\\n}\\n\",\"\\nfn fill_object(found_6: Instance) -> vec2<u32> {\\n var ids: vec2<u32> = vec2(0u);\\n\\n let _e8 = affine_matrix(found_6.row_x, found_6.row_y, found_6.row_z);\\n object.worldMatrix = _e8;\\n let _e14 = affine_normal_matrix(found_6.row_x, found_6.row_y, found_6.row_z);\\n object.normalMatrix = _e14;\\n let _e16 = ids;\\n return _e16;\\n}\\n\",\"\\nfn vertex_input(v_2: VertexIn, position_2: vec3<f32>, normal_3: vec3<f32>, ids_1: vec2<u32>) -> VertexInput {\\n var input_2: VertexInput;\\n\\n input_2.position = position_2;\\n input_2.normal = normal_3;\\n let _e8 = mesh_uv(v_2.uv0_);\\n input_2.uv = _e8;\\n let _e9 = input_2;\\n return _e9;\\n}\\n\",\"\\nfn vertexOffset(input_3: VertexInput) -> vec3<f32> {\\n let matrix_1 = object.worldMatrix;\\n let axes = mat3x3<f32>(matrix_1[0].xyz, matrix_1[1].xyz, matrix_1[2].xyz);\\n let _e10 = splat_screen(matrix_1);\\n if !(_e10.drawn) {\\n return -(input_3.position);\\n }\\n let corner = ((input_3.uv * 2f) - vec2(1f));\\n let _e24 = material.extent;\\n let offset = (_e24 * ((corner.x * _e10.axisX) + (corner.y * _e10.axisY)));\\n let _e37 = camera.view[0][0];\\n let _e42 = camera.view[1][0];\\n let _e47 = camera.view[2][0];\\n let right = vec3<f32>(_e37, _e42, _e47);\\n let _e53 = camera.view[0][1];\\n let _e58 = camera.view[1][1];\\n let _e63 = camera.view[2][1];\\n let up = vec3<f32>(_e53, _e58, _e63);\\n let world_1 = (((right * offset.x) - (up * offset.y)) * _e10.worldPerPixel);\\n let _e72 = to_mesh(axes, world_1);\\n return (_e72 - input_3.position);\\n}\\n\",\"\\nfn vs(v: VertexIn, i: InstanceIn) -> VertexOut {\\n var out: VertexOut;\\n var clip: vec4<f32>;\\n\\n let _e1 = find_instance(i);\\n let _e4 = relative_position_1(_e1, vec3(0f));\\n fill_builtins(_e4);\\n let _e5 = fill_object(_e1);\\n let _e7 = load_material_uniforms(_e1.material);\\n material = _e7;\\n let rest_tangent = vec3(0f);\\n let _e13 = mesh_position(v.position);\\n let rest_normal = v.normal;\\n let _e17 = skin_of(_e1, v.joints, v.weights);\\n let _e18 = skinned_point(_e17, _e13);\\n let _e19 = skinned_direction(_e17, rest_normal);\\n let _e20 = vertex_input(v, _e18, _e19, _e5);\\n let _e21 = vertexOffset(_e20);\\n let _e25 = relative_position_1(_e1, (_e18 + _e21));\\n out.relative = _e25;\\n let _e27 = out.relative;\\n let _e28 = caster_clip(_e1, _e27, _e19);\\n clip = _e28;\\n let _e32 = clip.z;\\n let _e34 = clip.w;\\n clip.z = min(_e32, _e34);\\n let _e37 = clip;\\n out.clip = _e37;\\n let _e39 = world_normal(_e1, _e19);\\n out.normal = _e39;\\n out.material = _e1.material;\\n let _e44 = mesh_uv(v.uv0_);\\n out.uv = _e44;\\n let _e47 = mesh_position(v.position);\\n out.mesh_place = _e47;\\n out.origin = _e4;\\n out.world_x = _e1.row_x;\\n out.world_y = _e1.row_y;\\n out.world_z = _e1.row_z;\\n let _e55 = out;\\n return _e55;\\n}\\n\",\"\\nfn fs(in: VertexOut, @builtin(front_facing) front: bool) {\\n var input: SurfaceInput;\\n var alpha: f32;\\n\\n let _e2 = material_of(in.material);\\n material_row = _e2;\\n fill_builtins(in.origin);\\n let _e10 = affine_matrix(in.world_x, in.world_y, in.world_z);\\n object.worldMatrix = _e10;\\n let _e16 = affine_normal_matrix(in.world_x, in.world_y, in.world_z);\\n object.normalMatrix = _e16;\\n let _e18 = load_material_uniforms(in.material);\\n material = _e18;\\n hash_place = in.mesh_place;\\n let _e25 = surface_place(in.relative, in.normal, front);\\n input = _e25;\\n let _e31 = frame_null3d_mesh.camera_world;\\n input.worldPosition = (in.relative + _e31.xyz);\\n input.uv = in.uv;\\n let _e38 = frame_null3d_mesh.camera_view_proj;\\n let camera_clip = (_e38 * vec4<f32>(in.relative, 1f));\\n let camera_ndc = (camera_clip.xyz / vec3(camera_clip.w));\\n let _e58 = frame_null3d_mesh.camera_target;\\n input.fragCoord = vec3<f32>((((camera_ndc.xy * vec2<f32>(0.5f, -0.5f)) + vec2(0.5f)) * _e58.xy), camera_ndc.z);\\n let _e63 = input;\\n let _e64 = unlit(_e63);\\n alpha = _e64.w;\\n let _e67 = alpha;\\n let _e69 = alpha_hash_threshold(in.mesh_place);\\n if (_e67 < _e69) {\\n discard;\\n } else {\\n return;\\n }\\n}\\n\",\"\\nfn vertex_input(v_1: VertexIn, position_1: vec3<f32>, normal_3: vec3<f32>, ids_1: vec2<u32>) -> VertexInput {\\n var input_2: VertexInput;\\n\\n input_2.position = position_1;\\n input_2.normal = normal_3;\\n let _e8 = mesh_uv(v_1.uv0_);\\n input_2.uv = _e8;\\n let _e9 = input_2;\\n return _e9;\\n}\\n\",\"\\nfn vs(v: VertexIn, i: InstanceIn) -> VertexOut {\\n var out: VertexOut;\\n var clip: vec4<f32>;\\n\\n let _e1 = find_instance(i);\\n let _e4 = relative_position_1(_e1, vec3(0f));\\n fill_builtins(_e4);\\n let _e5 = fill_object(_e1);\\n let _e7 = load_material_uniforms(_e1.material);\\n material = _e7;\\n let rest_tangent = vec3(0f);\\n let _e13 = mesh_position(v.position);\\n let rest_normal = v.normal;\\n let _e17 = skin_of(_e1, v.joints, v.weights);\\n let _e18 = skinned_point(_e17, _e13);\\n let _e19 = skinned_direction(_e17, rest_normal);\\n let _e20 = vertex_input(v, _e18, _e19, _e5);\\n let _e21 = vertexOffset(_e20);\\n let _e25 = relative_position_1(_e1, (_e18 + _e21));\\n out.relative = _e25;\\n let _e27 = out.relative;\\n let _e28 = caster_clip(_e1, _e27, _e19);\\n clip = _e28;\\n let _e32 = clip.z;\\n let _e34 = clip.w;\\n clip.z = min(_e32, _e34);\\n let _e37 = clip;\\n out.clip = _e37;\\n let _e39 = world_normal(_e1, _e19);\\n out.normal = _e39;\\n out.material = _e1.material;\\n let _e44 = mesh_uv(v.uv0_);\\n out.uv = _e44;\\n out.origin = _e4;\\n out.world_x = _e1.row_x;\\n out.world_y = _e1.row_y;\\n out.world_z = _e1.row_z;\\n let _e52 = out;\\n return _e52;\\n}\\n\",\"\\nfn fs(in: VertexOut, @builtin(front_facing) front: bool) {\\n var input: SurfaceInput;\\n var alpha: f32;\\n\\n let _e2 = material_of(in.material);\\n material_row = _e2;\\n fill_builtins(in.origin);\\n let _e10 = affine_matrix(in.world_x, in.world_y, in.world_z);\\n object.worldMatrix = _e10;\\n let _e16 = affine_normal_matrix(in.world_x, in.world_y, in.world_z);\\n object.normalMatrix = _e16;\\n let _e18 = load_material_uniforms(in.material);\\n material = _e18;\\n let _e23 = surface_place(in.relative, in.normal, front);\\n input = _e23;\\n let _e29 = frame_null3d_mesh.camera_world;\\n input.worldPosition = (in.relative + _e29.xyz);\\n input.uv = in.uv;\\n let _e36 = frame_null3d_mesh.camera_view_proj;\\n let camera_clip = (_e36 * vec4<f32>(in.relative, 1f));\\n let camera_ndc = (camera_clip.xyz / vec3(camera_clip.w));\\n let _e56 = frame_null3d_mesh.camera_target;\\n input.fragCoord = vec3<f32>((((camera_ndc.xy * vec2<f32>(0.5f, -0.5f)) + vec2(0.5f)) * _e56.xy), camera_ndc.z);\\n let _e61 = input;\\n let _e62 = unlit(_e61);\\n alpha = _e62.w;\\n let _e65 = alpha;\\n let _e69 = material_row.emissive.w;\\n if (_e65 < _e69) {\\n discard;\\n } else {\\n return;\\n }\\n}\\n\",\"\\nconst CASTER_OFFSET_TEXELS: f32 = 1f;\",\"\\nconst CASTER_OFFSET_MAX: f32 = 0.05f;\",\"\\nfn caster_clip(found_4: Instance, relative_1: vec3<f32>, normal_1: vec3<f32>) -> vec4<f32> {\\n var clip_1: vec4<f32>;\\n\\n let _e2 = clip_of(found_4, relative_1);\\n clip_1 = _e2;\\n let m_1 = frame_null3d_mesh.view_proj;\\n let _e8 = clip_1.w;\\n let _e14 = frame_null3d_mesh.target_size.z;\\n let texel = (((2f * _e8) * _e14) / length(vec3<f32>(m_1[0].x, m_1[1].x, m_1[2].x)));\\n let light = frame_null3d_mesh.camera_position;\\n let toward = normalize((light.xyz - (relative_1 * light.w)));\\n let _e34 = world_normal(found_4, normal_1);\\n let away = clamp(-(dot(_e34, toward)), 0f, 1f);\\n let offset = min((((CASTER_OFFSET_TEXELS * away) * away) * texel), CASTER_OFFSET_MAX);\\n let _e48 = clip_of(found_4, (relative_1 + (toward * offset)));\\n clip_1 = _e48;\\n let _e49 = clip_1;\\n return _e49;\\n}\\n\",\"\\nfn vertexOffset(input_3: VertexInput) -> vec3<f32> {\\n let matrix_1 = object.worldMatrix;\\n let axes = mat3x3<f32>(matrix_1[0].xyz, matrix_1[1].xyz, matrix_1[2].xyz);\\n let _e10 = splat_screen(matrix_1);\\n if !(_e10.drawn) {\\n return -(input_3.position);\\n }\\n let corner = ((input_3.uv * 2f) - vec2(1f));\\n let _e24 = material.extent;\\n let offset_1 = (_e24 * ((corner.x * _e10.axisX) + (corner.y * _e10.axisY)));\\n let _e37 = camera.view[0][0];\\n let _e42 = camera.view[1][0];\\n let _e47 = camera.view[2][0];\\n let right = vec3<f32>(_e37, _e42, _e47);\\n let _e53 = camera.view[0][1];\\n let _e58 = camera.view[1][1];\\n let _e63 = camera.view[2][1];\\n let up = vec3<f32>(_e53, _e58, _e63);\\n let world_1 = (((right * offset_1.x) - (up * offset_1.y)) * _e10.worldPerPixel);\\n let _e72 = to_mesh(axes, world_1);\\n return (_e72 - input_3.position);\\n}\\n\",\"\\nfn custom_value(id: u32, k: u32) -> vec4<f32> {\\n let _e5 = textureLoad(custom_values, vec2<u32>(k, id), 0i);\\n return _e5;\\n}\\n\",\"\\nfn vertex_input(v_1: VertexIn, position_1: vec3<f32>, normal_2: vec3<f32>, ids_1: vec2<u32>) -> VertexInput {\\n var input: VertexInput;\\n\\n input.position = position_1;\\n input.normal = normal_2;\\n let _e8 = mesh_uv(v_1.uv0_);\\n input.uv = _e8;\\n let _e9 = input;\\n return _e9;\\n}\\n\",\"\\nfn fs(in: VertexOut, @builtin(front_facing) front: bool) {\\n return;\\n}\\n\",\"\\nfn vertexOffset(input_1: VertexInput) -> vec3<f32> {\\n let matrix_1 = object.worldMatrix;\\n let axes = mat3x3<f32>(matrix_1[0].xyz, matrix_1[1].xyz, matrix_1[2].xyz);\\n let _e10 = splat_screen(matrix_1);\\n if !(_e10.drawn) {\\n return -(input_1.position);\\n }\\n let corner = ((input_1.uv * 2f) - vec2(1f));\\n let _e24 = material.extent;\\n let offset_1 = (_e24 * ((corner.x * _e10.axisX) + (corner.y * _e10.axisY)));\\n let _e37 = camera.view[0][0];\\n let _e42 = camera.view[1][0];\\n let _e47 = camera.view[2][0];\\n let right = vec3<f32>(_e37, _e42, _e47);\\n let _e53 = camera.view[0][1];\\n let _e58 = camera.view[1][1];\\n let _e63 = camera.view[2][1];\\n let up = vec3<f32>(_e53, _e58, _e63);\\n let world_1 = (((right * offset_1.x) - (up * offset_1.y)) * _e10.worldPerPixel);\\n let _e72 = to_mesh(axes, world_1);\\n return (_e72 - input_1.position);\\n}\\n\",\"\\nfn vs(v: VertexIn, i: InstanceIn) -> VertexOut {\\n var out: VertexOut;\\n var clip: vec4<f32>;\\n\\n let _e1 = find_instance(i);\\n let _e4 = relative_position_1(_e1, vec3(0f));\\n fill_builtins(_e4);\\n let _e5 = fill_object(_e1);\\n let _e7 = load_material_uniforms(_e1.material);\\n material = _e7;\\n let rest_tangent = vec3(0f);\\n let _e13 = mesh_position(v.position);\\n let rest_normal = v.normal;\\n let _e17 = skin_of(_e1, v.joints, v.weights);\\n let _e18 = skinned_point(_e17, _e13);\\n let _e19 = skinned_direction(_e17, rest_normal);\\n let _e20 = vertex_input(v, _e18, _e19, _e5);\\n let _e21 = vertexOffset(_e20);\\n let _e25 = relative_position_1(_e1, (_e18 + _e21));\\n out.relative = _e25;\\n let _e27 = out.relative;\\n let _e28 = caster_clip(_e1, _e27, _e19);\\n clip = _e28;\\n let _e32 = clip.z;\\n let _e34 = clip.w;\\n clip.z = min(_e32, _e34);\\n let _e37 = clip;\\n out.clip = _e37;\\n let _e39 = world_normal(_e1, _e19);\\n out.normal = _e39;\\n out.material = _e1.material;\\n out.vertex_color = v.vertex_color;\\n let _e46 = mesh_uv(v.uv0_);\\n out.uv = _e46;\\n let _e49 = mesh_position(v.position);\\n out.mesh_place = _e49;\\n out.origin = _e4;\\n out.world_x = _e1.row_x;\\n out.world_y = _e1.row_y;\\n out.world_z = _e1.row_z;\\n let _e57 = out;\\n return _e57;\\n}\\n\",\"\\nfn fs(in: VertexOut, @builtin(front_facing) front: bool) {\\n var input: SurfaceInput;\\n var alpha: f32;\\n\\n let _e2 = material_of(in.material);\\n material_row = _e2;\\n fill_builtins(in.origin);\\n let _e10 = affine_matrix(in.world_x, in.world_y, in.world_z);\\n object.worldMatrix = _e10;\\n let _e16 = affine_normal_matrix(in.world_x, in.world_y, in.world_z);\\n object.normalMatrix = _e16;\\n let _e18 = load_material_uniforms(in.material);\\n material = _e18;\\n hash_place = in.mesh_place;\\n let _e25 = surface_place(in.relative, in.normal, front);\\n input = _e25;\\n input.vertexColor = in.vertex_color;\\n let _e33 = frame_null3d_mesh.camera_world;\\n input.worldPosition = (in.relative + _e33.xyz);\\n input.uv = in.uv;\\n let _e40 = frame_null3d_mesh.camera_view_proj;\\n let camera_clip = (_e40 * vec4<f32>(in.relative, 1f));\\n let camera_ndc = (camera_clip.xyz / vec3(camera_clip.w));\\n let _e60 = frame_null3d_mesh.camera_target;\\n input.fragCoord = vec3<f32>((((camera_ndc.xy * vec2<f32>(0.5f, -0.5f)) + vec2(0.5f)) * _e60.xy), camera_ndc.z);\\n let _e65 = input;\\n let _e66 = unlit(_e65);\\n alpha = _e66.w;\\n let _e69 = alpha;\\n let _e71 = alpha_hash_threshold(in.mesh_place);\\n if (_e69 < _e71) {\\n discard;\\n } else {\\n return;\\n }\\n}\\n\",\"\\nfn vs(v: VertexIn, i: InstanceIn) -> VertexOut {\\n var out: VertexOut;\\n var clip: vec4<f32>;\\n\\n let _e1 = find_instance(i);\\n let _e4 = relative_position_1(_e1, vec3(0f));\\n fill_builtins(_e4);\\n let _e5 = fill_object(_e1);\\n let _e7 = load_material_uniforms(_e1.material);\\n material = _e7;\\n let rest_tangent = vec3(0f);\\n let _e13 = mesh_position(v.position);\\n let rest_normal = v.normal;\\n let _e17 = skin_of(_e1, v.joints, v.weights);\\n let _e18 = skinned_point(_e17, _e13);\\n let _e19 = skinned_direction(_e17, rest_normal);\\n let _e20 = vertex_input(v, _e18, _e19, _e5);\\n let _e21 = vertexOffset(_e20);\\n let _e25 = relative_position_1(_e1, (_e18 + _e21));\\n out.relative = _e25;\\n let _e27 = out.relative;\\n let _e28 = caster_clip(_e1, _e27, _e19);\\n clip = _e28;\\n let _e32 = clip.z;\\n let _e34 = clip.w;\\n clip.z = min(_e32, _e34);\\n let _e37 = clip;\\n out.clip = _e37;\\n let _e39 = world_normal(_e1, _e19);\\n out.normal = _e39;\\n out.material = _e1.material;\\n out.vertex_color = v.vertex_color;\\n let _e46 = mesh_uv(v.uv0_);\\n out.uv = _e46;\\n out.origin = _e4;\\n out.world_x = _e1.row_x;\\n out.world_y = _e1.row_y;\\n out.world_z = _e1.row_z;\\n let _e54 = out;\\n return _e54;\\n}\\n\",\"\\nfn fs(in: VertexOut, @builtin(front_facing) front: bool) {\\n var input: SurfaceInput;\\n var alpha: f32;\\n\\n let _e2 = material_of(in.material);\\n material_row = _e2;\\n fill_builtins(in.origin);\\n let _e10 = affine_matrix(in.world_x, in.world_y, in.world_z);\\n object.worldMatrix = _e10;\\n let _e16 = affine_normal_matrix(in.world_x, in.world_y, in.world_z);\\n object.normalMatrix = _e16;\\n let _e18 = load_material_uniforms(in.material);\\n material = _e18;\\n let _e23 = surface_place(in.relative, in.normal, front);\\n input = _e23;\\n input.vertexColor = in.vertex_color;\\n let _e31 = frame_null3d_mesh.camera_world;\\n input.worldPosition = (in.relative + _e31.xyz);\\n input.uv = in.uv;\\n let _e38 = frame_null3d_mesh.camera_view_proj;\\n let camera_clip = (_e38 * vec4<f32>(in.relative, 1f));\\n let camera_ndc = (camera_clip.xyz / vec3(camera_clip.w));\\n let _e58 = frame_null3d_mesh.camera_target;\\n input.fragCoord = vec3<f32>((((camera_ndc.xy * vec2<f32>(0.5f, -0.5f)) + vec2(0.5f)) * _e58.xy), camera_ndc.z);\\n let _e63 = input;\\n let _e64 = unlit(_e63);\\n alpha = _e64.w;\\n let _e67 = alpha;\\n let _e71 = material_row.emissive.w;\\n if (_e67 < _e71) {\\n discard;\\n } else {\\n return;\\n }\\n}\\n\",\"\\n@group(2) @binding(0)\",\"\\nvar<private> material: Uniforms;\",\"\\nvar scene_depth_copy: texture_2d<f32>;\\n\",\"\\nfn linear_to_srgb(c: vec3<f32>) -> vec3<f32> {\\n let low = (c * 12.92f);\\n let high = ((1.055f * pow(c, vec3(0.41666666f))) - vec3(0.055f));\\n return select(high, low, (c <= vec3(0.0031308f)));\\n}\\n\",\"\\nfn limit_hdr(c_1: vec3<f32>) -> vec3<f32> {\\n let nan = ((bitcast<vec3<u32>>(c_1) & vec3(2147483647u)) > vec3(2139095040u));\\n return select(min(c_1, vec3(65472f)), vec3(0f), nan);\\n}\\n\",\"\\nfn rrt_and_odt_fit(v_1: vec3<f32>) -> vec3<f32> {\\n let a = ((v_1 * (v_1 + vec3(0.0245786f))) - vec3(9.0537e-5f));\\n let b = ((v_1 * ((0.983729f * v_1) + vec3(0.432951f))) + vec3(0.238081f));\\n return (a / b);\\n}\\n\",\"\\nfn tone_map_aces(c_2: vec3<f32>) -> vec3<f32> {\\n let _e6 = rrt_and_odt_fit((ACES_INPUT * (c_2 / vec3(0.6f))));\\n return saturate((ACES_OUTPUT * _e6));\\n}\\n\",\"\\nfn agx_contrast(x: vec3<f32>) -> vec3<f32> {\\n let x2_ = (x * x);\\n let x4_ = (x2_ * x2_);\\n return ((((((((15.5f * x4_) * x2_) - ((40.14f * x4_) * x)) + (31.96f * x4_)) - ((6.868f * x2_) * x)) + (0.4298f * x2_)) + (0.1191f * x)) - vec3(0.00232f));\\n}\\n\",\"\\nfn tone_map_agx(c_3: vec3<f32>) -> vec3<f32> {\\n let inset = (AGX_INSET * (LINEAR_SRGB_TO_LINEAR_REC2020_ * c_3));\\n let logged = ((log2(max(inset, vec3(1e-10f))) - vec3(-12.47393f)) / vec3(16.5f));\\n let _e16 = agx_contrast(saturate(logged));\\n let curved = (AGX_OUTSET * _e16);\\n let rec2020_ = pow(max(curved, vec3(0f)), vec3(2.2f));\\n return saturate((LINEAR_REC2020_TO_LINEAR_SRGB * rec2020_));\\n}\\n\",\"\\nfn luminance(c_4: vec3<f32>) -> f32 {\\n return dot(c_4, vec3<f32>(0.2126f, 0.7152f, 0.0722f));\\n}\\n\",\"\\nfn tone_map_agx_punchy(c_5: vec3<f32>) -> vec3<f32> {\\n let inset_1 = (AGX_INSET * (LINEAR_SRGB_TO_LINEAR_REC2020_ * c_5));\\n let logged_1 = ((log2(max(inset_1, vec3(1e-10f))) - vec3(-12.47393f)) / vec3(16.5f));\\n let _e16 = agx_contrast(saturate(logged_1));\\n let looked = pow(max(_e16, vec3(0f)), vec3(1.35f));\\n let _e23 = luminance(looked);\\n let curved_1 = (AGX_OUTSET * (vec3(_e23) + (AGX_PUNCHY_SATURATION * (looked - vec3(_e23)))));\\n let rec2020_1 = pow(max(curved_1, vec3(0f)), vec3(2.2f));\\n return saturate((LINEAR_REC2020_TO_LINEAR_SRGB * rec2020_1));\\n}\\n\",\"\\nfn tone_map_neutral(c_6: vec3<f32>) -> vec3<f32> {\\n let x_3 = min(c_6.x, min(c_6.y, c_6.z));\\n let toe = select(0.04f, (x_3 - ((6.25f * x_3) * x_3)), (x_3 < 0.08f));\\n let shifted = (c_6 - vec3(toe));\\n let peak = max(shifted.x, max(shifted.y, shifted.z));\\n if (peak < 0.76f) {\\n return shifted;\\n }\\n let d_2 = (1f - 0.76f);\\n let new_peak = (1f - ((d_2 * d_2) / ((peak + d_2) - 0.76f)));\\n let g_1 = (1f - (1f / ((0.15f * (peak - new_peak)) + 1f)));\\n return mix((shifted * (new_peak / peak)), vec3(new_peak), g_1);\\n}\\n\",\"\\nfn pcg(v_2: u32) -> u32 {\\n let state = ((v_2 * 747796405u) + 2891336453u);\\n let word = (((state >> ((state >> 28u) + 4u)) ^ state) * 277803737u);\\n return ((word >> 22u) ^ word);\\n}\\n\",\"\\nfn fog_height_ratio(climb: f32) -> f32 {\\n let exact = ((1f - exp(min(-(climb), 40f))) / climb);\\n return select(exact, (1f + (climb * ((climb / 6f) - 0.5f))), (abs(climb) < 0.01f));\\n}\\n\",\"\\nfn rayleigh_phase(cos_theta: f32) -> f32 {\\n return (0.059683103f * (1f + (cos_theta * cos_theta)));\\n}\\n\",\"\\nfn mie_phase(cos_theta_1: f32, g: f32) -> f32 {\\n let g2_ = (g * g);\\n let base = max(((1f + g2_) - ((2f * g) * cos_theta_1)), 1e-4f);\\n return (((0.119366206f * (1f - g2_)) * (1f + (cos_theta_1 * cos_theta_1))) / (((2f + g2_) * base) * sqrt(base)));\\n}\\n\",\"\\nfn aerial_perspective(air: Aerial, c_7: vec3<f32>, relative: vec3<f32>) -> vec3<f32> {\\n if (air.moon_light.w == 0f) {\\n return c_7;\\n }\\n let distance_ = length(relative);\\n let _e14 = fog_height_ratio((air.shape.y * relative.y));\\n let rayleigh = (air.rayleigh.xyz * (distance_ * _e14));\\n let _e21 = fog_height_ratio((air.shape.z * relative.y));\\n let mie_path = (distance_ * _e21);\\n let mie_scattering = (air.rayleigh.w * mie_path);\\n let depth_3 = (rayleigh + vec3((air.shape.x * mie_path)));\\n let through = exp(-(depth_3));\\n let view = (relative / vec3(max(distance_, 1e-6f)));\\n let g_2 = air.shape.w;\\n let cos_sun = dot(view, air.sun.xyz);\\n let cos_moon = dot(view, air.moon.xyz);\\n let again = vec3<f32>(air.sun.w, air.sun_light.w, air.moon.w);\\n let _e54 = rayleigh_phase(cos_sun);\\n let _e58 = rayleigh_phase(cos_moon);\\n let rayleigh_light = (((air.sun_light.xyz * _e54) + (air.moon_light.xyz * _e58)) + again);\\n let _e64 = mie_phase(cos_sun, g_2);\\n let _e68 = mie_phase(cos_moon, g_2);\\n let mie_light = (((air.sun_light.xyz * _e64) + (air.moon_light.xyz * _e68)) + again);\\n let scattered = (((rayleigh * rayleigh_light) + (mie_scattering * mie_light)) * ((vec3(1f) - through) / max(depth_3, vec3(1e-6f))));\\n return ((c_7 * through) + scattered);\\n}\\n\",\"\\nfn fog_factor(fog: Fog, relative_position_1: vec3<f32>) -> f32 {\\n var path: f32;\\n\\n if (fog.curve == OFF) {\\n return 0f;\\n }\\n path = length(relative_position_1);\\n if (fog.shape.z != 0f) {\\n let _e12 = path;\\n let _e19 = fog_height_ratio((fog.shape.z * relative_position_1.y));\\n path = (_e12 * (fog.shape.w * _e19));\\n }\\n let _e24 = path;\\n let k_2 = (fog.color.w * _e24);\\n let exponential = (1f - exp(-(select(k_2, (k_2 * k_2), (fog.curve == EXP2_)))));\\n let _e39 = path;\\n return select(exponential, smoothstep(fog.shape.x, fog.shape.y, _e39), (fog.curve == LINEAR));\\n}\\n\",\"\\nfn fog_color(fog_1: Fog, relative_position_2: vec3<f32>, light_direction: vec3<f32>, light_color: vec3<f32>) -> vec3<f32> {\\n let toward_sun = max(dot(normalize(relative_position_2), -(light_direction)), 0f);\\n let glow = select(fog_1.sun_glow, (fog_1.sun_glow * pow(toward_sun, fog_1.sun_exponent)), (fog_1.sun_exponent > 0f));\\n return (fog_1.color.xyz + (light_color * glow));\\n}\\n\",\"\\nfn transform_normal(t_1: Transform, n: vec3<f32>) -> vec3<f32> {\\n let a_1 = t_1.x.xyz;\\n let b_1 = t_1.y.xyz;\\n let c_14 = t_1.z.xyz;\\n let bc = cross(b_1, c_14);\\n let ca = cross(c_14, a_1);\\n let ab = cross(a_1, b_1);\\n let facing = select(-1f, 1f, (dot(a_1, bc) >= 0f));\\n return normalize((vec3<f32>(dot(bc, n), dot(ca, n), dot(ab, n)) * facing));\\n}\\n\",\"\\nfn vignette_place(pixel: vec2<f32>, target_height: f32) -> vec2<f32> {\\n return pixel;\\n}\\n\",\"\\nfn vignette(pixel_1: vec2<f32>, size: vec2<f32>, shape: vec4<f32>) -> f32 {\\n var d: vec2<f32>;\\n\\n if (shape.x <= 0f) {\\n return 1f;\\n }\\n d = (((pixel_1 / size) - vec2(0.5f)) * shape.y);\\n let _e15 = d.x;\\n d.x = (_e15 * mix(1f, (size.x / size.y), shape.w));\\n let _e23 = d;\\n let _e24 = d;\\n let light = pow(max((1f - dot(_e23, _e24)), 1e-6f), shape.z);\\n return max(mix((1f - shape.x), 1f, light), 0f);\\n}\\n\",\"\\nfn tone_map(exposed: vec3<f32>, settings: Output) -> vec3<f32> {\\n if (settings.tone_mapping == AGX) {\\n let _e5 = tone_map_agx(exposed);\\n return _e5;\\n }\\n if (settings.tone_mapping == AGX_PUNCHY) {\\n let _e9 = tone_map_agx_punchy(exposed);\\n return _e9;\\n }\\n if (settings.tone_mapping == NEUTRAL) {\\n let _e13 = tone_map_neutral(exposed);\\n return _e13;\\n }\\n if (settings.tone_mapping == NONE) {\\n return saturate(exposed);\\n }\\n let _e18 = tone_map_aces(exposed);\\n return _e18;\\n}\\n\",\"\\nfn pixel_noise(pixel_2: vec2<f32>) -> f32 {\\n let _e5 = pcg(u32(pixel_2.y));\\n let _e7 = pcg((u32(pixel_2.x) + _e5));\\n return ((f32(((_e7 & 65535u) + (_e7 >> 16u))) / 65535f) - 1f);\\n}\\n\",\"\\nfn dither(pixel_3: vec2<f32>) -> f32 {\\n let _e1 = pixel_noise(pixel_3);\\n return (_e1 / 255f);\\n}\\n\",\"\\nfn encode(c_8: vec3<f32>, pixel_4: vec2<f32>) -> vec3<f32> {\\n let _e1 = linear_to_srgb(c_8);\\n let _e3 = dither(pixel_4);\\n return (_e1 + vec3(_e3));\\n}\\n\",\"\\nfn finish(c_9: vec3<f32>, pixel_5: vec2<f32>, target_height_1: f32, settings_1: Output, size_1: vec2<f32>, shape_1: vec4<f32>) -> vec4<f32> {\\n let _e1 = limit_hdr(c_9);\\n let _e4 = vignette_place(pixel_5, target_height_1);\\n let _e7 = vignette(_e4, size_1, shape_1);\\n let shaded = (_e1 * _e7);\\n let _e10 = tone_map(shaded, settings_1);\\n let _e11 = encode(_e10, pixel_5);\\n return vec4<f32>(_e11, 1f);\\n}\\n\",\"\\nfn finish_unmapped(c_10: vec3<f32>, pixel_6: vec2<f32>, target_height_2: f32, size_2: vec2<f32>, shape_2: vec4<f32>) -> vec4<f32> {\\n let _e1 = limit_hdr(c_10);\\n let _e4 = vignette_place(pixel_6, target_height_2);\\n let _e7 = vignette(_e4, size_2, shape_2);\\n let shaded_1 = (_e1 * _e7);\\n let _e9 = encode(shaded_1, pixel_6);\\n return vec4<f32>(_e9, 1f);\\n}\\n\",\"\\nfn fogged(c_11: vec3<f32>, relative_1: vec3<f32>, m: Material) -> vec3<f32> {\\n if ((u32(m.strengths.z) & NO_FOG) != 0u) {\\n return c_11;\\n }\\n let _e11 = frame_null3d_mesh.aerial;\\n let _e13 = aerial_perspective(_e11, c_11, relative_1);\\n let _e16 = frame_null3d_mesh.fog;\\n let _e17 = fog_factor(_e16, relative_1);\\n if (_e17 == 0f) {\\n return _e13;\\n }\\n let _e22 = frame_null3d_mesh.fog;\\n let _e25 = frame_null3d_mesh.sun_direction;\\n let _e29 = frame_null3d_mesh.sun_color;\\n let _e31 = fog_color(_e22, relative_1, _e25.xyz, _e29.xyz);\\n return mix(_e13, _e31, _e17);\\n}\\n\",\"\\nfn fragment_color(m_1: Material, color: vec3<f32>, alpha: f32) -> vec4<f32> {\\n let blended = ((u32(m_1.strengths.z) & BLEND_FLAG) != 0u);\\n return select(vec4<f32>(color, 1f), vec4<f32>((color * alpha), alpha), blended);\\n}\\n\",\"\\nfn clip_of(found: Instance, relative_2: vec3<f32>) -> vec4<f32> {\\n if !(found.drawn) {\\n return OUTSIDE_CLIP;\\n }\\n let _e6 = frame_null3d_mesh.view_proj;\\n let _e9 = frame_null3d_mesh.jitter;\\n let _e12 = clip_with_jitter(_e6, _e9.xy, relative_2);\\n return _e12;\\n}\\n\",\"\\nfn relative_position_3(found_2: Instance, position: vec3<f32>) -> vec3<f32> {\\n let _e1 = transform_of(found_2);\\n let _e3 = transform_point(_e1, position);\\n return _e3;\\n}\\n\",\"\\nfn keeps_display_color(m_2: Material) -> bool {\\n return ((u32(m_2.strengths.z) & NO_TONE_MAP) != 0u);\\n}\\n\",\"\\nfn finish_exposed(c_12: vec3<f32>, pixel_7: vec2<f32>) -> vec4<f32> {\\n let _e3 = frame_null3d_mesh.occlusion.y;\\n let _e6 = frame_null3d_mesh.output;\\n let _e9 = frame_null3d_mesh.target_size;\\n let _e13 = frame_null3d_mesh.vignette;\\n let _e16 = finish(c_12, pixel_7, _e3, _e6, _e9.xy, _e13);\\n return _e16;\\n}\\n\",\"\\nfn finish_exposed_material(m_3: Material, c_13: vec3<f32>, pixel_8: vec2<f32>) -> vec4<f32> {\\n let _e1 = keeps_display_color(m_3);\\n if _e1 {\\n let _e5 = frame_null3d_mesh.occlusion.y;\\n let _e8 = frame_null3d_mesh.target_size;\\n let _e12 = frame_null3d_mesh.vignette;\\n let _e15 = finish_unmapped(c_13, pixel_8, _e5, _e8.xy, _e12);\\n return _e15;\\n }\\n let _e16 = finish_exposed(c_13, pixel_8);\\n return _e16;\\n}\\n\",\"\\nfn joint_row(joint: u32, row: u32) -> vec4<f32> {\\n let x_4 = (((joint % JOINTS_PER_ROW) * 3u) + row);\\n let _e12 = textureLoad(joint_matrices, vec2<u32>(x_4, (joint / JOINTS_PER_ROW)), 0i);\\n return _e12;\\n}\\n\",\"\\nfn skinned_direction(s_3: Skin, d_1: vec3<f32>) -> vec3<f32> {\\n return vec3<f32>(dot(s_3.row_x.xyz, d_1), dot(s_3.row_y.xyz, d_1), dot(s_3.row_z.xyz, d_1));\\n}\\n\",\"\\nfn orthographic_depth_to_view_z(depth: f32, near: f32, far: f32) -> f32 {\\n return ((depth * (far - near)) - far);\\n}\\n\",\"\\nfn perspective_depth_to_view_z(depth_1: f32, near_1: f32, far_1: f32) -> f32 {\\n return ((-(near_1) * far_1) / (near_1 + (depth_1 * (far_1 - near_1))));\\n}\\n\",\"\\nfn linear_depth(depth_2: f32, near_2: f32, far_2: f32) -> f32 {\\n let _e3 = perspective_depth_to_view_z(depth_2, near_2, far_2);\\n return -(_e3);\\n}\\n\",\"\\nfn affine_matrix(x_1: vec4<f32>, y: vec4<f32>, z: vec4<f32>) -> mat4x4<f32> {\\n return transpose(mat4x4<f32>(x_1, y, z, vec4<f32>(0f, 0f, 0f, 1f)));\\n}\\n\",\"\\nfn affine_normal_matrix(x_2: vec4<f32>, y_1: vec4<f32>, z_1: vec4<f32>) -> mat3x3<f32> {\\n let a_2 = x_2.xyz;\\n let b_2 = y_1.xyz;\\n let c_15 = z_1.xyz;\\n let bc_1 = cross(b_2, c_15);\\n let det = dot(a_2, bc_1);\\n let scale = select(0f, (1f / det), (det != 0f));\\n return (transpose(mat3x3<f32>(bc_1, cross(c_15, a_2), cross(a_2, b_2))) * scale);\\n}\\n\",\"\\nfn scene_depth_texel(place: vec2<f32>, image_size: vec2<u32>) -> vec2<u32> {\\n let _e1 = textureDimensions(scene_depth_copy);\\n let copy = vec2<u32>(_e1);\\n let held = min(image_size, copy);\\n let pixel_10 = vec2<u32>(clamp((place * vec2<f32>(held)), vec2(0f), (vec2<f32>(held) - vec2(1f))));\\n return pixel_10;\\n}\\n\",\"\\nfn sceneDepth(uv_1: vec2<f32>) -> f32 {\\n let _e2 = frame_null3d_mesh.target_size;\\n let _e6 = scene_depth_texel(uv_1, vec2<u32>(_e2.xy));\\n let _e9 = textureLoad(scene_depth_copy, _e6, 0i);\\n return _e9.x;\\n}\\n\",\"\\nfn sceneDistance(uv_2: vec2<f32>) -> f32 {\\n let _e1 = sceneDepth(uv_2);\\n let near_3 = frame_null3d_mesh.camera_range.x;\\n let far_3 = frame_null3d_mesh.camera_range.y;\\n let _e13 = frame_null3d_mesh.camera_position.w;\\n if (_e13 > 0.5f) {\\n let _e16 = linear_depth(_e1, near_3, far_3);\\n return _e16;\\n }\\n let _e17 = orthographic_depth_to_view_z(_e1, near_3, far_3);\\n return -(_e17);\\n}\\n\",\"\\nfn defaultSurface(input: SurfaceInput) -> Surface {\\n var s_4: Surface;\\n\\n let m_5 = material_row;\\n s_4.baseColor = (m_5.color.xyz * input.vertexColor.xyz);\\n s_4.alpha = (m_5.color.w * input.vertexColor.w);\\n s_4.metalness = m_5.surface.x;\\n s_4.roughness = m_5.surface.y;\\n s_4.normal = input.normal;\\n s_4.emissive = (m_5.emissive.xyz * m_5.strengths.w);\\n s_4.occlusion = 1f;\\n s_4.irradiance = vec3(0f);\\n s_4.reflection = vec4(0f);\\n s_4.lobe = vec4(0f);\\n s_4.shadowOffset = vec3(0f);\\n s_4.diffuseNormal = input.normal;\\n s_4.transmission = 0f;\\n s_4.thickness = 0f;\\n s_4.diffuseTransmission = 0f;\\n s_4.diffuseTransmissionColor = vec3(1f);\\n s_4.clearcoat = 0f;\\n s_4.clearcoatRoughness = 0f;\\n s_4.clearcoatNormal = input.normal;\\n s_4.sheenColor = vec3(0f);\\n s_4.sheenRoughness = 1f;\\n s_4.iridescence = 0f;\\n s_4.iridescenceIor = 1f;\\n s_4.iridescenceThickness = 0f;\\n let _e72 = s_4;\\n return _e72;\\n}\\n\",\"\\nfn vertex_input(v_3: VertexIn, position_1: vec3<f32>, normal_1: vec3<f32>, ids_1: vec2<u32>) -> VertexInput {\\n var input_1: VertexInput;\\n\\n input_1.position = position_1;\\n input_1.normal = normal_1;\\n let _e8 = mesh_uv(v_3.uv0_);\\n input_1.uv = _e8;\\n let _e9 = input_1;\\n return _e9;\\n}\\n\",\"\\nfn splat_screen(matrix: mat4x4<f32>) -> SplatScreen {\\n var out_1: SplatScreen;\\n var direction: vec2<f32>;\\n\\n out_1.axisX = vec2(0f);\\n out_1.axisY = vec2(0f);\\n out_1.worldPerPixel = 0f;\\n out_1.drawn = false;\\n let view_1 = camera.view;\\n let center_view = (view_1 * vec4<f32>(matrix[3].xyz, 1f)).xyz;\\n let depth_4 = -(center_view.z);\\n let _e25 = camera.near;\\n if (depth_4 <= _e25) {\\n let _e27 = out_1;\\n return _e27;\\n }\\n let res = frame_null3d_builtins.resolution;\\n let _e35 = camera.projection[0][0];\\n let fx = (((_e35 * res.x) * 0.5f) / depth_4);\\n let _e45 = camera.projection[1][1];\\n let fy = (((_e45 * res.y) * 0.5f) / depth_4);\\n let jx = vec3<f32>(fx, 0f, ((-(fx) * center_view.x) / depth_4));\\n let jy = vec3<f32>(0f, -(fy), ((fy * center_view.y) / depth_4));\\n let va = (view_1 * vec4<f32>(matrix[0].xyz, 0f)).xyz;\\n let vb = (view_1 * vec4<f32>(matrix[1].xyz, 0f)).xyz;\\n let vc = (view_1 * vec4<f32>(matrix[2].xyz, 0f)).xyz;\\n let ca_1 = vec2<f32>(dot(jx, va), dot(jy, va));\\n let cb = vec2<f32>(dot(jx, vb), dot(jy, vb));\\n let cc = vec2<f32>(dot(jx, vc), dot(jy, vc));\\n let _e92 = material.blur;\\n let blur = (_e92 + BASE_BLUR);\\n let sxx = ((((ca_1.x * ca_1.x) + (cb.x * cb.x)) + (cc.x * cc.x)) + blur);\\n let sxy = (((ca_1.x * ca_1.y) + (cb.x * cb.y)) + (cc.x * cc.y));\\n let syy = ((((ca_1.y * ca_1.y) + (cb.y * cb.y)) + (cc.y * cc.y)) + blur);\\n if (((sxx * syy) - (sxy * sxy)) <= 1e-12f) {\\n let _e135 = out_1;\\n return _e135;\\n }\\n let mid = (0.5f * (sxx + syy));\\n let spread = sqrt(max((((0.25f * (sxx - syy)) * (sxx - syy)) + (sxy * sxy)), 0f));\\n let major = (mid + spread);\\n let minor = max((mid - spread), 0f);\\n let fromX = vec2<f32>((major - syy), sxy);\\n let fromY = vec2<f32>(sxy, (major - sxx));\\n direction = select(fromY, fromX, (dot(fromX, fromX) >= dot(fromY, fromY)));\\n let _e162 = direction;\\n let _e163 = direction;\\n let length2_ = dot(_e162, _e163);\\n let _e168 = direction;\\n direction = select(vec2<f32>(1f, 0f), (_e168 * inverseSqrt(length2_)), (length2_ > 1e-20f));\\n let _e175 = direction;\\n out_1.axisX = (_e175 * sqrt(major));\\n let _e180 = direction.y;\\n let _e183 = direction.x;\\n out_1.axisY = (vec2<f32>(-(_e180), _e183) * sqrt(minor));\\n let _e194 = camera.projection[1][1];\\n out_1.worldPerPixel = ((2f * depth_4) / (_e194 * res.y));\\n out_1.drawn = true;\\n let _e200 = out_1;\\n return _e200;\\n}\\n\",\"\\nfn to_mesh(m_4: mat3x3<f32>, v_4: vec3<f32>) -> vec3<f32> {\\n let a_3 = m_4[0];\\n let b_3 = m_4[1];\\n let c_16 = m_4[2];\\n let det_1 = dot(a_3, cross(b_3, c_16));\\n if (abs(det_1) < 1e-12f) {\\n return v_4;\\n }\\n return (vec3<f32>(dot(cross(b_3, c_16), v_4), dot(cross(c_16, a_3), v_4), dot(cross(a_3, b_3), v_4)) / vec3(det_1));\\n}\\n\",\"\\nfn shade_unlit(s_5: Surface, input_3: SurfaceInput, pixel_9: vec4<f32>) -> vec4<f32> {\\n let _e5 = material_row.emissive.w;\\n if (s_5.alpha < _e5) {\\n discard;\\n }\\n let _e8 = material_row;\\n let _e14 = frame_null3d_mesh.output.exposure;\\n let _e18 = material_row;\\n let _e19 = fogged((s_5.emissive * _e14), input_3.relativePosition, _e18);\\n let _e22 = finish_exposed_material(_e8, _e19, pixel_9.xy);\\n let _e24 = material_row;\\n let _e27 = fragment_color(_e24, _e22.xyz, s_5.alpha);\\n return _e27;\\n}\\n\",\"\\nfn surface_input(in_1: VertexOut, front_1: bool) -> SurfaceInput {\\n var input_4: SurfaceInput;\\n var coord: vec3<f32>;\\n\\n input_4.relativePosition = in_1.relative;\\n let eye = frame_null3d_mesh.camera_position;\\n input_4.viewDirection = normalize((eye.xyz - (in_1.relative * eye.w)));\\n let _e15 = dpdx(in_1.relative);\\n let _e17 = dpdy(in_1.relative);\\n let face = normalize(cross(_e15, _e17));\\n let _e22 = input_4.viewDirection;\\n let face_normal = select(-(face), face, (dot(face, _e22) >= 0f));\\n let smooth_normal = (normalize(in_1.normal) * select(-1f, 1f, front_1));\\n let _e37 = material_row.strengths.z;\\n let flat_shading = ((u32(_e37) & FLAT_SHADING) != 0u);\\n input_4.normal = select(smooth_normal, face_normal, flat_shading);\\n input_4.vertexColor = vec4(1f);\\n let _e52 = frame_null3d_mesh.camera_world;\\n input_4.worldPosition = (in_1.relative + _e52.xyz);\\n input_4.uv = in_1.uv;\\n input_4.frontFacing = front_1;\\n coord = in_1.clip.xyz;\\n let _e62 = coord;\\n input_4.fragCoord = _e62;\\n let _e63 = input_4;\\n return _e63;\\n}\\n\",\"\\nfn unlit(input_5: SurfaceInput) -> vec4<f32> {\\n var alpha_1: f32;\\n\\n let corner_1 = ((input_5.uv * 2f) - vec2(1f));\\n let _e9 = material.extent;\\n let _e12 = material.extent;\\n let deviations = ((_e9 * _e12) * dot(corner_1, corner_1));\\n alpha_1 = (input_5.vertexColor.w * exp((-0.5f * deviations)));\\n let _e25 = material.softness;\\n if (_e25 > 0f) {\\n let _e32 = frame_null3d_builtins.resolution;\\n let uv_3 = (input_5.fragCoord.xy / _e32);\\n let _e36 = camera.view;\\n let depth_5 = -((_e36 * vec4<f32>(input_5.relativePosition, 0f)).z);\\n let _e43 = alpha_1;\\n let _e46 = material.softness;\\n let _e47 = sceneDistance(uv_3);\\n alpha_1 = (_e43 * smoothstep(0f, _e46, (_e47 - depth_5)));\\n }\\n let _e52 = alpha_1;\\n let _e55 = material.cutoff;\\n if (_e52 < _e55) {\\n discard;\\n }\\n let _e59 = alpha_1;\\n return vec4<f32>(input_5.vertexColor.xyz, min(_e59, 1f));\\n}\\n\",\"\\nfn vs(v: VertexIn, i: InstanceIn) -> VertexOut {\\n var out: VertexOut;\\n\\n let _e1 = find_instance(i);\\n let _e4 = relative_position_3(_e1, vec3(0f));\\n fill_builtins(_e4);\\n let _e5 = fill_object(_e1);\\n let _e7 = load_material_uniforms(_e1.material);\\n material = _e7;\\n let rest_tangent = vec3(0f);\\n let _e13 = mesh_position(v.position);\\n let rest_normal = v.normal;\\n let _e17 = skin_of(_e1, v.joints, v.weights);\\n let _e18 = skinned_point(_e17, _e13);\\n let _e19 = skinned_direction(_e17, rest_normal);\\n let _e20 = vertex_input(v, _e18, _e19, _e5);\\n let _e21 = vertexOffset(_e20);\\n let _e25 = relative_position_3(_e1, (_e18 + _e21));\\n out.relative = _e25;\\n let _e28 = out.relative;\\n let _e29 = clip_of(_e1, _e28);\\n out.clip = _e29;\\n let _e31 = world_normal(_e1, _e19);\\n out.normal = _e31;\\n out.material = _e1.material;\\n let _e36 = mesh_uv(v.uv0_);\\n out.uv = _e36;\\n out.origin = _e4;\\n out.world_x = _e1.row_x;\\n out.world_y = _e1.row_y;\\n out.world_z = _e1.row_z;\\n let _e44 = out;\\n return _e44;\\n}\\n\",\"\\nfn fs(in: VertexOut, @builtin(front_facing) front: bool) -> @location(0) vec4<f32> {\\n var s: Surface;\\n\\n let _e2 = material_of(in.material);\\n material_row = _e2;\\n fill_builtins(in.origin);\\n let _e10 = affine_matrix(in.world_x, in.world_y, in.world_z);\\n object.worldMatrix = _e10;\\n let _e16 = affine_normal_matrix(in.world_x, in.world_y, in.world_z);\\n object.normalMatrix = _e16;\\n let _e18 = load_material_uniforms(in.material);\\n material = _e18;\\n let _e21 = surface_input(in, front);\\n let _e22 = unlit(_e21);\\n let _e23 = defaultSurface(_e21);\\n s = _e23;\\n s.emissive = _e22.xyz;\\n s.alpha = _e22.w;\\n let _e29 = s;\\n let _e31 = shade_unlit(_e29, _e21, in.clip);\\n return _e31;\\n}\\n\",\"\\nfn keeps_display_color(m_1: Material) -> bool {\\n return ((u32(m_1.strengths.z) & NO_TONE_MAP) != 0u);\\n}\\n\",\"\\nfn finish_exposed_material(m_2: Material, c_13: vec3<f32>, pixel_8: vec2<f32>) -> vec4<f32> {\\n let _e1 = keeps_display_color(m_2);\\n if _e1 {\\n let _e5 = frame_null3d_mesh.occlusion.y;\\n let _e8 = frame_null3d_mesh.target_size;\\n let _e12 = frame_null3d_mesh.vignette;\\n let _e15 = finish_unmapped(c_13, pixel_8, _e5, _e8.xy, _e12);\\n return _e15;\\n }\\n let _e16 = finish_exposed(c_13, pixel_8);\\n return _e16;\\n}\\n\",\"\\nfn defaultSurface(input: SurfaceInput) -> Surface {\\n var s_4: Surface;\\n\\n let m_4 = material_row;\\n s_4.baseColor = (m_4.color.xyz * input.vertexColor.xyz);\\n s_4.alpha = (m_4.color.w * input.vertexColor.w);\\n s_4.metalness = m_4.surface.x;\\n s_4.roughness = m_4.surface.y;\\n s_4.normal = input.normal;\\n s_4.emissive = (m_4.emissive.xyz * m_4.strengths.w);\\n s_4.occlusion = 1f;\\n s_4.irradiance = vec3(0f);\\n s_4.reflection = vec4(0f);\\n s_4.lobe = vec4(0f);\\n s_4.shadowOffset = vec3(0f);\\n s_4.diffuseNormal = input.normal;\\n s_4.transmission = 0f;\\n s_4.thickness = 0f;\\n s_4.diffuseTransmission = 0f;\\n s_4.diffuseTransmissionColor = vec3(1f);\\n s_4.clearcoat = 0f;\\n s_4.clearcoatRoughness = 0f;\\n s_4.clearcoatNormal = input.normal;\\n s_4.sheenColor = vec3(0f);\\n s_4.sheenRoughness = 1f;\\n s_4.iridescence = 0f;\\n s_4.iridescenceIor = 1f;\\n s_4.iridescenceThickness = 0f;\\n let _e72 = s_4;\\n return _e72;\\n}\\n\",\"\\nfn to_mesh(m_3: mat3x3<f32>, v_4: vec3<f32>) -> vec3<f32> {\\n let a_3 = m_3[0];\\n let b_3 = m_3[1];\\n let c_16 = m_3[2];\\n let det_1 = dot(a_3, cross(b_3, c_16));\\n if (abs(det_1) < 1e-12f) {\\n return v_4;\\n }\\n return (vec3<f32>(dot(cross(b_3, c_16), v_4), dot(cross(c_16, a_3), v_4), dot(cross(a_3, b_3), v_4)) / vec3(det_1));\\n}\\n\",\"\\nfn shade_unlit(s_5: Surface, input_3: SurfaceInput, pixel_9: vec4<f32>) -> vec4<f32> {\\n let _e3 = fwidth(s_5.alpha);\\n let _e7 = material_row.emissive.w;\\n let _e8 = alpha_coverage(s_5.alpha, _e3, _e7);\\n if (_e8 <= 0f) {\\n discard;\\n }\\n let _e12 = material_row;\\n let _e18 = frame_null3d_mesh.output.exposure;\\n let _e22 = material_row;\\n let _e23 = fogged((s_5.emissive * _e18), input_3.relativePosition, _e22);\\n let _e26 = finish_exposed_material(_e12, _e23, pixel_9.xy);\\n return vec4<f32>(_e26.xyz, _e8);\\n}\\n\",\"\\nfn transform_normal(t_1: Transform, n: vec3<f32>) -> vec3<f32> {\\n let a_1 = t_1.x.xyz;\\n let b_1 = t_1.y.xyz;\\n let c_15 = t_1.z.xyz;\\n let bc = cross(b_1, c_15);\\n let ca = cross(c_15, a_1);\\n let ab = cross(a_1, b_1);\\n let facing = select(-1f, 1f, (dot(a_1, bc) >= 0f));\\n return normalize((vec3<f32>(dot(bc, n), dot(ca, n), dot(ab, n)) * facing));\\n}\\n\",\"\\nfn affine_normal_matrix(x_2: vec4<f32>, y_1: vec4<f32>, z_1: vec4<f32>) -> mat3x3<f32> {\\n let a_2 = x_2.xyz;\\n let b_2 = y_1.xyz;\\n let c_16 = z_1.xyz;\\n let bc_1 = cross(b_2, c_16);\\n let det = dot(a_2, bc_1);\\n let scale = select(0f, (1f / det), (det != 0f));\\n return (transpose(mat3x3<f32>(bc_1, cross(c_16, a_2), cross(a_2, b_2))) * scale);\\n}\\n\",\"\\nfn pcg3d(v_3: vec3<u32>) -> vec3<u32> {\\n var p_3: vec3<u32>;\\n\\n p_3 = ((v_3 * 1664525u) + vec3(1013904223u));\\n let _e8 = p_3.x;\\n let _e10 = p_3.y;\\n let _e12 = p_3.z;\\n p_3.x = (_e8 + (_e10 * _e12));\\n let _e16 = p_3.y;\\n let _e18 = p_3.z;\\n let _e20 = p_3.x;\\n p_3.y = (_e16 + (_e18 * _e20));\\n let _e24 = p_3.z;\\n let _e26 = p_3.x;\\n let _e28 = p_3.y;\\n p_3.z = (_e24 + (_e26 * _e28));\\n let _e31 = p_3;\\n let _e32 = p_3;\\n p_3 = (_e31 ^ (_e32 >> vec3(16u)));\\n let _e38 = p_3.x;\\n let _e40 = p_3.y;\\n let _e42 = p_3.z;\\n p_3.x = (_e38 + (_e40 * _e42));\\n let _e46 = p_3.y;\\n let _e48 = p_3.z;\\n let _e50 = p_3.x;\\n p_3.y = (_e46 + (_e48 * _e50));\\n let _e54 = p_3.z;\\n let _e56 = p_3.x;\\n let _e58 = p_3.y;\\n p_3.z = (_e54 + (_e56 * _e58));\\n let _e61 = p_3;\\n return _e61;\\n}\\n\",\"\\nfn lattice(c_14: vec3<i32>) -> vec3<u32> {\\n let _e2 = pcg3d(bitcast<vec3<u32>>(c_14));\\n return _e2;\\n}\\n\",\"\\nfn alpha_hash_threshold(position_1: vec3<f32>) -> f32 {\\n let _e1 = dpdx(position_1);\\n let _e3 = dpdy(position_1);\\n let change = max(length(_e1), length(_e3));\\n let pixel_scale = (1f / (ALPHA_HASH_SCALE * change));\\n let scale_log = log2(pixel_scale);\\n let scales = vec2<f32>(exp2(floor(scale_log)), exp2(ceil(scale_log)));\\n let _e19 = hash_cell(floor((scales.x * position_1)));\\n let _e23 = hash_cell(floor((scales.y * position_1)));\\n let hashes = vec2<f32>(_e19, _e23);\\n let blend = fract(scale_log);\\n let x_5 = (((1f - blend) * hashes.x) + (blend * hashes.y));\\n let a_3 = min(blend, (1f - blend));\\n let low_1 = ((x_5 * x_5) / ((2f * a_3) * (1f - a_3)));\\n let middle = ((x_5 - (0.5f * a_3)) / (1f - a_3));\\n let high_1 = (1f - (((1f - x_5) * (1f - x_5)) / ((2f * a_3) * (1f - a_3))));\\n let threshold = select(high_1, select(middle, low_1, (x_5 < a_3)), (x_5 < (1f - a_3)));\\n return clamp(threshold, 1e-6f, 1f);\\n}\\n\",\"\\nfn vertex_input(v_4: VertexIn, position_2: vec3<f32>, normal_1: vec3<f32>, ids_1: vec2<u32>) -> VertexInput {\\n var input_1: VertexInput;\\n\\n input_1.position = position_2;\\n input_1.normal = normal_1;\\n let _e8 = mesh_uv(v_4.uv0_);\\n input_1.uv = _e8;\\n let _e9 = input_1;\\n return _e9;\\n}\\n\",\"\\nfn to_mesh(m_4: mat3x3<f32>, v_5: vec3<f32>) -> vec3<f32> {\\n let a_4 = m_4[0];\\n let b_3 = m_4[1];\\n let c_17 = m_4[2];\\n let det_1 = dot(a_4, cross(b_3, c_17));\\n if (abs(det_1) < 1e-12f) {\\n return v_5;\\n }\\n return (vec3<f32>(dot(cross(b_3, c_17), v_5), dot(cross(c_17, a_4), v_5), dot(cross(a_4, b_3), v_5)) / vec3(det_1));\\n}\\n\",\"\\nfn shade_unlit(s_5: Surface, input_3: SurfaceInput, pixel_9: vec4<f32>) -> vec4<f32> {\\n let _e3 = hash_place;\\n let _e4 = alpha_hash_threshold(_e3);\\n if (s_5.alpha < _e4) {\\n discard;\\n }\\n let _e7 = material_row;\\n let _e13 = frame_null3d_mesh.output.exposure;\\n let _e17 = material_row;\\n let _e18 = fogged((s_5.emissive * _e13), input_3.relativePosition, _e17);\\n let _e21 = finish_exposed_material(_e7, _e18, pixel_9.xy);\\n let _e23 = material_row;\\n let _e26 = fragment_color(_e23, _e21.xyz, s_5.alpha);\\n return _e26;\\n}\\n\",\"\\nfn vs(v: VertexIn, i: InstanceIn) -> VertexOut {\\n var out: VertexOut;\\n\\n let _e1 = find_instance(i);\\n let _e4 = relative_position_3(_e1, vec3(0f));\\n fill_builtins(_e4);\\n let _e5 = fill_object(_e1);\\n let _e7 = load_material_uniforms(_e1.material);\\n material = _e7;\\n let rest_tangent = vec3(0f);\\n let _e13 = mesh_position(v.position);\\n let rest_normal = v.normal;\\n let _e17 = skin_of(_e1, v.joints, v.weights);\\n let _e18 = skinned_point(_e17, _e13);\\n let _e19 = skinned_direction(_e17, rest_normal);\\n let _e20 = vertex_input(v, _e18, _e19, _e5);\\n let _e21 = vertexOffset(_e20);\\n let _e25 = relative_position_3(_e1, (_e18 + _e21));\\n out.relative = _e25;\\n let _e28 = out.relative;\\n let _e29 = clip_of(_e1, _e28);\\n out.clip = _e29;\\n let _e31 = world_normal(_e1, _e19);\\n out.normal = _e31;\\n out.material = _e1.material;\\n let _e36 = mesh_uv(v.uv0_);\\n out.uv = _e36;\\n let _e39 = mesh_position(v.position);\\n out.mesh_place = _e39;\\n out.origin = _e4;\\n out.world_x = _e1.row_x;\\n out.world_y = _e1.row_y;\\n out.world_z = _e1.row_z;\\n let _e47 = out;\\n return _e47;\\n}\\n\",\"\\nfn fs(in: VertexOut, @builtin(front_facing) front: bool) -> @location(0) vec4<f32> {\\n var s: Surface;\\n\\n let _e2 = material_of(in.material);\\n material_row = _e2;\\n hash_place = in.mesh_place;\\n fill_builtins(in.origin);\\n let _e12 = affine_matrix(in.world_x, in.world_y, in.world_z);\\n object.worldMatrix = _e12;\\n let _e18 = affine_normal_matrix(in.world_x, in.world_y, in.world_z);\\n object.normalMatrix = _e18;\\n let _e20 = load_material_uniforms(in.material);\\n material = _e20;\\n let _e23 = surface_input(in, front);\\n let _e24 = unlit(_e23);\\n let _e25 = defaultSurface(_e23);\\n s = _e25;\\n s.emissive = _e24.xyz;\\n s.alpha = _e24.w;\\n let _e31 = s;\\n let _e33 = shade_unlit(_e31, _e23, in.clip);\\n return _e33;\\n}\\n\",\"\\nfn coverage_mask(coverage: f32) -> u32 {\\n let masks = vec4<u32>(1u, 9u, 11u, 15u);\\n let taken = u32(round((clamp(coverage, 0f, 1f) * 4f)));\\n return select(0u, masks[(max(taken, 1u) - 1u)], (taken > 0u));\\n}\\n\",\"\\nfn masked_fragment(color: vec4<f32>) -> MaskedFragment {\\n let _e5 = coverage_mask(color.w);\\n return MaskedFragment(vec4<f32>(color.xyz, 1f), _e5);\\n}\\n\",\"\\nfn fs(in: VertexOut, @builtin(front_facing) front: bool) -> MaskedFragment {\\n var s: Surface;\\n\\n let _e2 = material_of(in.material);\\n material_row = _e2;\\n fill_builtins(in.origin);\\n let _e10 = affine_matrix(in.world_x, in.world_y, in.world_z);\\n object.worldMatrix = _e10;\\n let _e16 = affine_normal_matrix(in.world_x, in.world_y, in.world_z);\\n object.normalMatrix = _e16;\\n let _e18 = load_material_uniforms(in.material);\\n material = _e18;\\n let _e21 = surface_input(in, front);\\n let _e22 = unlit(_e21);\\n let _e23 = defaultSurface(_e21);\\n s = _e23;\\n s.emissive = _e22.xyz;\\n s.alpha = _e22.w;\\n let _e29 = s;\\n let _e31 = shade_unlit(_e29, _e21, in.clip);\\n let _e32 = masked_fragment(_e31);\\n return _e32;\\n}\\n\",\"\\nfn shade_unlit(s_5: Surface, input_3: SurfaceInput, pixel_9: vec4<f32>) -> vec4<f32> {\\n let _e2 = material_row;\\n let _e8 = frame_null3d_mesh.output.exposure;\\n let _e12 = material_row;\\n let _e13 = fogged((s_5.emissive * _e8), input_3.relativePosition, _e12);\\n let _e16 = finish_exposed_material(_e2, _e13, pixel_9.xy);\\n let _e18 = material_row;\\n let _e21 = fragment_color(_e18, _e16.xyz, s_5.alpha);\\n return _e21;\\n}\\n\",\"\\nfn surface_input(in_1: VertexOut, front_1: bool) -> SurfaceInput {\\n var input_4: SurfaceInput;\\n var coord: vec3<f32>;\\n\\n input_4.relativePosition = in_1.relative;\\n let eye = frame_null3d_mesh.camera_position;\\n input_4.viewDirection = normalize((eye.xyz - (in_1.relative * eye.w)));\\n let _e15 = dpdx(in_1.relative);\\n let _e17 = dpdy(in_1.relative);\\n let face = normalize(cross(_e15, _e17));\\n let _e22 = input_4.viewDirection;\\n let face_normal = select(-(face), face, (dot(face, _e22) >= 0f));\\n let smooth_normal = (normalize(in_1.normal) * select(-1f, 1f, front_1));\\n let _e37 = material_row.strengths.z;\\n let flat_shading = ((u32(_e37) & FLAT_SHADING) != 0u);\\n input_4.normal = select(smooth_normal, face_normal, flat_shading);\\n input_4.vertexColor = vec4(1f);\\n input_4.vertexColor = in_1.vertex_color;\\n let _e54 = frame_null3d_mesh.camera_world;\\n input_4.worldPosition = (in_1.relative + _e54.xyz);\\n input_4.uv = in_1.uv;\\n input_4.frontFacing = front_1;\\n coord = in_1.clip.xyz;\\n let _e64 = coord;\\n input_4.fragCoord = _e64;\\n let _e65 = input_4;\\n return _e65;\\n}\\n\",\"\\nfn vs(v: VertexIn, i: InstanceIn) -> VertexOut {\\n var out: VertexOut;\\n\\n let _e1 = find_instance(i);\\n let _e4 = relative_position_3(_e1, vec3(0f));\\n fill_builtins(_e4);\\n let _e5 = fill_object(_e1);\\n let _e7 = load_material_uniforms(_e1.material);\\n material = _e7;\\n let rest_tangent = vec3(0f);\\n let _e13 = mesh_position(v.position);\\n let rest_normal = v.normal;\\n let _e17 = skin_of(_e1, v.joints, v.weights);\\n let _e18 = skinned_point(_e17, _e13);\\n let _e19 = skinned_direction(_e17, rest_normal);\\n let _e20 = vertex_input(v, _e18, _e19, _e5);\\n let _e21 = vertexOffset(_e20);\\n let _e25 = relative_position_3(_e1, (_e18 + _e21));\\n out.relative = _e25;\\n let _e28 = out.relative;\\n let _e29 = clip_of(_e1, _e28);\\n out.clip = _e29;\\n let _e31 = world_normal(_e1, _e19);\\n out.normal = _e31;\\n out.material = _e1.material;\\n out.vertex_color = v.vertex_color;\\n let _e38 = mesh_uv(v.uv0_);\\n out.uv = _e38;\\n out.origin = _e4;\\n out.world_x = _e1.row_x;\\n out.world_y = _e1.row_y;\\n out.world_z = _e1.row_z;\\n let _e46 = out;\\n return _e46;\\n}\\n\",\"\\nfn vs(v: VertexIn, i: InstanceIn) -> VertexOut {\\n var out: VertexOut;\\n\\n let _e1 = find_instance(i);\\n let _e4 = relative_position_3(_e1, vec3(0f));\\n fill_builtins(_e4);\\n let _e5 = fill_object(_e1);\\n let _e7 = load_material_uniforms(_e1.material);\\n material = _e7;\\n let rest_tangent = vec3(0f);\\n let _e13 = mesh_position(v.position);\\n let rest_normal = v.normal;\\n let _e17 = skin_of(_e1, v.joints, v.weights);\\n let _e18 = skinned_point(_e17, _e13);\\n let _e19 = skinned_direction(_e17, rest_normal);\\n let _e20 = vertex_input(v, _e18, _e19, _e5);\\n let _e21 = vertexOffset(_e20);\\n let _e25 = relative_position_3(_e1, (_e18 + _e21));\\n out.relative = _e25;\\n let _e28 = out.relative;\\n let _e29 = clip_of(_e1, _e28);\\n out.clip = _e29;\\n let _e31 = world_normal(_e1, _e19);\\n out.normal = _e31;\\n out.material = _e1.material;\\n out.vertex_color = v.vertex_color;\\n let _e38 = mesh_uv(v.uv0_);\\n out.uv = _e38;\\n let _e41 = mesh_position(v.position);\\n out.mesh_place = _e41;\\n out.origin = _e4;\\n out.world_x = _e1.row_x;\\n out.world_y = _e1.row_y;\\n out.world_z = _e1.row_z;\\n let _e49 = out;\\n return _e49;\\n}\\n\"],\"lists\":[[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,81,82,83,133,134,87,135,136,137,138,92,139,140,141,96,97,98,99,100,142,143,144,145,146,106,107,147,148,149,109,150,111,151],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,81,82,83,133,134,87,135,136,137,138,92,139,140,141,96,97,98,99,100,153,142,143,144,145,146,106,107,147,148,154,109,150,111,155],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,156,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,157,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,158,80,81,82,159,133,134,87,135,136,137,138,92,139,160,141,96,97,98,99,161,162,163,164,165,166,142,143,144,167,146,106,168,147,148,149,109,169,111,170],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,171,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,81,82,83,133,134,87,135,136,137,138,92,139,140,141,96,97,98,99,100,153,142,143,144,145,146,106,107,147,148,154,109,150,111,172],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,81,82,83,133,134,87,135,136,137,138,92,139,140,141,96,97,98,99,100,142,143,144,145,146,106,107,147,148,149,109,150,111,151],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,81,82,83,133,134,87,135,136,137,138,92,139,140,141,96,97,98,99,100,153,142,143,144,145,146,106,107,147,148,154,109,150,111,155],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,156,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,157,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,158,80,81,82,159,133,134,87,135,136,137,138,92,139,160,141,96,97,98,99,161,162,163,164,165,166,142,143,144,167,146,106,168,147,148,149,109,169,111,170],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,171,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,81,82,83,133,134,87,135,136,137,138,92,139,140,141,96,97,98,99,100,153,142,143,144,145,146,106,107,147,148,154,109,150,111,172],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,81,82,83,133,134,87,135,136,137,138,92,139,140,141,96,97,98,99,100,142,143,144,145,146,106,107,147,175,149,109,176,111,151],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,81,82,83,133,134,87,135,136,137,138,92,139,140,141,96,97,98,99,100,153,142,143,144,145,146,106,107,147,175,154,109,176,111,155],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,177,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,157,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,158,80,81,82,159,133,134,87,135,136,137,138,92,139,160,141,96,97,98,99,161,162,163,164,165,166,142,143,144,167,146,106,168,147,175,149,109,178,111,170],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,171,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,81,82,83,133,134,87,135,136,137,138,92,139,140,141,96,97,98,99,100,153,142,143,144,145,146,106,107,147,175,154,109,176,111,172],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,81,82,83,133,134,87,135,136,137,138,92,139,140,141,96,97,98,99,100,142,143,144,145,146,106,107,147,175,149,109,176,111,151],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,81,82,83,133,134,87,135,136,137,138,92,139,140,141,96,97,98,99,100,153,142,143,144,145,146,106,107,147,175,154,109,176,111,155],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,177,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,157,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,158,80,81,82,159,133,134,87,135,136,137,138,92,139,160,141,96,97,98,99,161,162,163,164,165,166,142,143,144,167,146,106,168,147,175,149,109,178,111,170],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,171,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,81,82,83,133,134,87,135,136,137,138,92,139,140,141,96,97,98,99,100,153,142,143,144,145,146,106,107,147,175,154,109,176,111,172],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,156,116,117,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,35,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,157,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,158,80,179,82,159,133,134,87,180,181,182,183,184,92,185,186,95,96,97,98,99,161,162,163,164,165,166,142,187,188,189,146,106,168,190,154,109,191,111,192],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,115,116,117,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,35,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,179,82,83,133,134,87,180,181,182,183,184,92,185,94,95,96,97,98,99,100,142,187,188,193,146,106,107,190,154,109,194,111,195],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,156,116,117,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,35,39,196,197,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,157,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,158,80,179,82,159,133,134,87,180,181,182,183,198,92,185,186,95,96,97,98,99,161,162,163,164,165,166,142,187,188,189,146,106,168,199,154,109,191,111,192],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,115,116,117,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,35,39,196,197,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,179,82,83,133,134,87,180,181,182,183,198,92,185,94,95,96,97,98,99,100,142,187,188,193,146,106,107,199,154,109,194,111,195],[0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,115,116,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,35,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,75,76,77,78,79,80,179,82,83,200,87,180,181,182,183,184,92,185,94,95,96,97,98,99,100,188,201,105,106,107,108,109,194,111,202],[0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,115,116,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,35,39,196,197,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,75,76,77,78,79,80,179,82,83,200,87,180,181,182,183,198,92,185,94,95,96,97,98,99,100,188,201,105,106,107,203,109,194,111,202],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,177,116,117,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,35,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,157,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,158,80,179,82,159,133,134,87,180,181,182,183,184,92,185,186,95,96,97,98,99,161,162,163,164,165,166,142,187,188,189,146,106,168,190,154,109,204,111,205],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,174,116,117,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,35,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,179,82,83,133,134,87,180,181,182,183,184,92,185,94,95,96,97,98,99,100,142,187,188,193,146,106,107,190,154,109,206,111,207],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,177,116,117,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,35,39,196,197,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,157,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,158,80,179,82,159,133,134,87,180,181,182,183,198,92,185,186,95,96,97,98,99,161,162,163,164,165,166,142,187,188,189,146,106,168,199,154,109,204,111,205],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,174,116,117,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,35,39,196,197,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,75,76,77,78,79,132,80,179,82,83,133,134,87,180,181,182,183,198,92,185,94,95,96,97,98,99,100,142,187,188,193,146,106,107,199,154,109,206,111,207],[0,1,2,3,4,5,6,7,8,10,11,12,13,14,173,174,116,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,35,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,75,76,77,78,79,80,179,82,83,200,87,180,181,182,183,184,92,185,94,95,96,97,98,99,100,188,201,105,106,107,108,109,206,111,202],[0,1,2,3,4,5,6,7,8,10,11,12,13,14,173,174,116,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,35,39,196,197,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,75,76,77,78,79,80,179,82,83,200,87,180,181,182,183,198,92,185,94,95,96,97,98,99,100,188,201,105,106,107,203,109,206,111,202],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,237,87,238,136,239,138,240,241,242,243,139,140,244,245,246,247,96,97,98,248,249,250,251,252,253,144,254,146,255,256,147,257,258,259,109,260,111,261],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,87,238,136,239,138,262,241,263,243,139,140,244,245,246,247,96,97,98,248,249,153,250,251,252,264,144,254,146,255,265,147,266,258,259,109,260,111,261],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,156,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,157,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,158,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,267,228,229,230,231,232,233,234,235,133,134,236,237,87,238,136,239,138,240,241,242,243,139,160,244,245,246,247,96,97,98,248,268,162,269,270,165,271,250,251,252,253,144,272,146,255,273,147,274,258,259,109,275,111,276],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,171,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,87,238,136,239,138,262,241,263,243,139,140,244,245,246,247,96,97,98,248,249,153,277,278,250,251,252,264,144,254,146,255,265,147,266,258,259,109,260,111,279],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,237,87,238,136,239,138,240,241,242,243,139,140,244,245,246,247,96,97,98,248,249,250,251,252,253,144,254,146,255,256,147,257,258,259,109,260,111,261],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,87,238,136,239,138,262,241,263,243,139,140,244,245,246,247,96,97,98,248,249,153,250,251,252,264,144,254,146,255,265,147,266,258,259,109,260,111,261],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,156,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,157,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,158,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,267,228,229,230,231,232,233,234,235,133,134,236,237,87,238,136,239,138,240,241,242,243,139,160,244,245,246,247,96,97,98,248,268,162,269,270,165,271,250,251,252,253,144,272,146,255,273,147,274,258,259,109,275,111,276],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,171,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,87,238,136,239,138,262,241,263,243,139,140,244,245,246,247,96,97,98,248,249,153,277,278,250,251,252,264,144,254,146,255,265,147,266,258,259,109,260,111,279],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,237,87,238,136,239,138,240,241,242,243,139,140,244,245,246,247,96,97,98,248,249,250,251,252,253,144,254,146,255,256,147,280,258,259,109,260,111,261],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,15,115,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,237,87,238,136,239,138,240,241,242,243,139,140,244,245,246,247,96,97,98,248,249,250,251,252,253,144,254,146,255,256,147,280,258,259,109,260,111,261],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,237,87,238,136,239,138,240,241,242,243,139,140,244,245,246,247,96,97,98,248,249,250,251,252,253,144,254,146,255,256,147,257,281,259,109,282,111,261],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,87,238,136,239,138,262,241,263,243,139,140,244,245,246,247,96,97,98,248,249,153,250,251,252,264,144,254,146,255,265,147,266,281,259,109,282,111,261],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,177,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,157,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,158,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,267,228,229,230,231,232,233,234,235,133,134,236,237,87,238,136,239,138,240,241,242,243,139,160,244,245,246,247,96,97,98,248,268,162,269,270,165,271,250,251,252,253,144,272,146,255,273,147,274,281,259,109,283,111,276],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,171,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,87,238,136,239,138,262,241,263,243,139,140,244,245,246,247,96,97,98,248,249,153,277,278,250,251,252,264,144,254,146,255,265,147,266,281,259,109,282,111,279],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,237,87,238,136,239,138,240,241,242,243,139,140,244,245,246,247,96,97,98,248,249,250,251,252,253,144,254,146,255,256,147,257,281,259,109,282,111,261],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,87,238,136,239,138,262,241,263,243,139,140,244,245,246,247,96,97,98,248,249,153,250,251,252,264,144,254,146,255,265,147,266,281,259,109,282,111,261],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,177,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,157,58,59,129,61,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,158,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,267,228,229,230,231,232,233,234,235,133,134,236,237,87,238,136,239,138,240,241,242,243,139,160,244,245,246,247,96,97,98,248,268,162,269,270,165,271,250,251,252,253,144,272,146,255,273,147,274,281,259,109,283,111,276],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,171,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,129,61,152,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,87,238,136,239,138,262,241,263,243,139,140,244,245,246,247,96,97,98,248,249,153,277,278,250,251,252,264,144,254,146,255,265,147,266,281,259,109,282,111,279],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,124,125,126,127,128,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,237,87,238,136,239,138,240,241,242,243,139,140,244,245,246,247,96,97,98,248,249,250,251,252,253,144,254,146,255,256,147,280,281,259,109,282,111,261],[0,1,2,113,3,4,5,114,6,7,8,10,11,12,13,14,173,174,116,117,118,18,19,20,21,22,23,24,25,41,26,27,28,29,30,31,32,33,34,119,120,121,122,35,39,123,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,130,131,208,76,77,78,79,132,209,75,210,211,212,213,214,215,216,217,218,219,220,221,81,222,223,224,225,226,82,227,228,229,230,231,232,233,234,235,133,134,236,237,87,238,136,239,138,240,241,242,243,139,140,244,245,246,247,96,97,98,248,249,250,251,252,253,144,254,146,255,256,147,280,281,259,109,282,111,261]]}", "{\"blocks\":[],\"lists\":[]}"].map((json) => ({ json })));
|
|
5
|
+
const sourceOf = (n) => {
|
|
6
|
+
const path = paths[n < 0 ? 1 : 0];
|
|
7
|
+
const tables = path.tables || (path.tables = JSON.parse(path.json));
|
|
8
|
+
return tables.lists[n < 0 ? -1 - n : n].map((block) => tables.blocks[block]).join('');
|
|
9
|
+
};
|
|
10
|
+
const walk = (item) => {
|
|
11
|
+
for (const key in item) {
|
|
12
|
+
const field = item[key];
|
|
13
|
+
if (key === "source" && typeof field === 'number')
|
|
14
|
+
Object.defineProperty(item, key, { get: () => sourceOf(field), enumerable: true });
|
|
15
|
+
else if (field !== null && typeof field === 'object') walk(field);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const shader = JSON.parse(text);
|
|
19
|
+
walk(shader);
|
|
20
|
+
if (hot !== undefined) shader.hot = hot;
|
|
21
|
+
if (load !== undefined)
|
|
22
|
+
shader.builds = (target, set) => load(kind, target, set).then((module) => module.default[index] || {});
|
|
23
|
+
return shader;
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// The types of splats.wgsl, which the null3D Vite plugin writes when it compiles the file.
|
|
2
|
+
// Edit the WGSL, not this file.
|
|
3
|
+
import type { CompiledMaterial } from '@null3d/vite-plugin';
|
|
4
|
+
|
|
5
|
+
declare const shader: CompiledMaterial<
|
|
6
|
+
{
|
|
7
|
+
readonly extent: 'f32';
|
|
8
|
+
readonly blur: 'f32';
|
|
9
|
+
readonly softness: 'f32';
|
|
10
|
+
readonly cutoff: 'f32';
|
|
11
|
+
},
|
|
12
|
+
never
|
|
13
|
+
>;
|
|
14
|
+
export default shader;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export default __null3dShader("{\"kind\":\"material\",\"functions\":[\"vertexOffset\",\"unlit\"],\"uniforms\":[{\"name\":\"extent\",\"type\":\"f32\",\"offset\":0},{\"name\":\"blur\",\"type\":\"f32\",\"offset\":1},{\"name\":\"softness\",\"type\":\"f32\",\"offset\":2},{\"name\":\"cutoff\",\"type\":\"f32\",\"offset\":3}],\"textures\":[],\"variants\":{},\"locations\":[0,1,2],\"attributes\":1,\"baseColor\":true,\"objectIds\":false,\"sceneDepth\":true,\"alpha\":true,\"permutations\":595120247}", undefined, __null3dBuilds, 0, "material");
|
|
2
|
+
|
|
3
|
+
function __null3dShader(text, hot, load, index, kind) {
|
|
4
|
+
const paths = __null3dShader.paths || (__null3dShader.paths = ["{\"blocks\":[],\"lists\":[]}", "{\"blocks\":[],\"lists\":[]}"].map((json) => ({ json })));
|
|
5
|
+
const sourceOf = (n) => {
|
|
6
|
+
const path = paths[n < 0 ? 1 : 0];
|
|
7
|
+
const tables = path.tables || (path.tables = JSON.parse(path.json));
|
|
8
|
+
return tables.lists[n < 0 ? -1 - n : n].map((block) => tables.blocks[block]).join('');
|
|
9
|
+
};
|
|
10
|
+
const walk = (item) => {
|
|
11
|
+
for (const key in item) {
|
|
12
|
+
const field = item[key];
|
|
13
|
+
if (key === "source" && typeof field === 'number')
|
|
14
|
+
Object.defineProperty(item, key, { get: () => sourceOf(field), enumerable: true });
|
|
15
|
+
else if (field !== null && typeof field === 'object') walk(field);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const shader = JSON.parse(text);
|
|
19
|
+
walk(shader);
|
|
20
|
+
if (hot !== undefined) shader.hot = hot;
|
|
21
|
+
if (load !== undefined)
|
|
22
|
+
shader.builds = (target, set) => load(kind, target, set).then((module) => module.default[index] || {});
|
|
23
|
+
return shader;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function __null3dBuilds(kind, target, set) {
|
|
27
|
+
const load = {
|
|
28
|
+
"material wgsl 0": () => import("./splats.wgsl-material-wgsl-0-eef591a67552ad7e.js"),
|
|
29
|
+
"material wgsl 2": () => import("./splats.wgsl-material-wgsl-2-15569422a33203f4.js"),
|
|
30
|
+
"material wgsl 64": () => import("./splats.wgsl-material-wgsl-64-769cd6ac619835c2.js"),
|
|
31
|
+
"material wgsl 66": () => import("./splats.wgsl-material-wgsl-66-f1515cd808e3a573.js"),
|
|
32
|
+
"material glsl 0": () => import("./splats.wgsl-material-glsl-0-32dc5311875620e4.js"),
|
|
33
|
+
"material glsl 1": () => import("./splats.wgsl-material-glsl-1-da80dc94627cf770.js"),
|
|
34
|
+
"material glsl 2": () => import("./splats.wgsl-material-glsl-2-fb7895ef8b78d665.js"),
|
|
35
|
+
"material glsl 3": () => import("./splats.wgsl-material-glsl-3-b8800106bf9b5770.js"),
|
|
36
|
+
"material glsl 64": () => import("./splats.wgsl-material-glsl-64-9f7d0841d0ac147d.js"),
|
|
37
|
+
"material glsl 65": () => import("./splats.wgsl-material-glsl-65-fbc638499588c846.js"),
|
|
38
|
+
"material glsl 66": () => import("./splats.wgsl-material-glsl-66-3c49fd84ca72bada.js"),
|
|
39
|
+
"material glsl 67": () => import("./splats.wgsl-material-glsl-67-5aabadfe22c2f13c.js"),
|
|
40
|
+
}[kind + ' ' + target + ' ' + set];
|
|
41
|
+
return load ? load() : Promise.resolve({ default: [] });
|
|
42
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type SplatData } from './format.js';
|
|
2
|
+
/**
|
|
3
|
+
* Writes a cloud as a version 3 SPZ file, gzipped as the readers of the format expect. A stream
|
|
4
|
+
* writer cuts a cloud with `chunkSplats` and writes each chunk with this call, then names the files
|
|
5
|
+
* in a stream index. Throws E2101 for a cloud whose arrays do not fit its count.
|
|
6
|
+
*
|
|
7
|
+
* @category api/splats
|
|
8
|
+
*/
|
|
9
|
+
export declare function encodeSpz(data: SplatData): Promise<Uint8Array>;
|
package/lib/spz-write.js
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// Writes a cloud as the compressed SPZ file that this add-on reads: a gzip stream around a version 3
|
|
2
|
+
// header and the packed attribute arrays. A stream writer cuts a large cloud with `chunkSplats` and
|
|
3
|
+
// writes each chunk with `encodeSpz`, so a page can load the chunks that its view asks for.
|
|
4
|
+
import { splatsError } from './format.js';
|
|
5
|
+
/** The magic value of every SPZ container, which reads "NGSP" in little-endian bytes. */
|
|
6
|
+
const MAGIC = 0x5053474e;
|
|
7
|
+
/** The version that this writer makes: the compressed containers start at version 4. */
|
|
8
|
+
const VERSION = 3;
|
|
9
|
+
/** The constant that turns the first spherical-harmonic band into a color. */
|
|
10
|
+
const SH_C0 = 0.2820947917738781;
|
|
11
|
+
/** The scale that turns a first-band coefficient into a byte. */
|
|
12
|
+
const COLOR_SCALE = 0.15;
|
|
13
|
+
/** The largest magnitude that a 24-bit signed fixed-point value holds. */
|
|
14
|
+
const FIXED_MAX = 8_388_607;
|
|
15
|
+
/** The most fractional bits that a center may keep, which keeps meters precise to about 0.1 mm. */
|
|
16
|
+
const MOST_FRACTIONAL_BITS = 14;
|
|
17
|
+
/**
|
|
18
|
+
* Writes a cloud as a version 3 SPZ file, gzipped as the readers of the format expect. A stream
|
|
19
|
+
* writer cuts a cloud with `chunkSplats` and writes each chunk with this call, then names the files
|
|
20
|
+
* in a stream index. Throws E2101 for a cloud whose arrays do not fit its count.
|
|
21
|
+
*
|
|
22
|
+
* @category api/splats
|
|
23
|
+
*/
|
|
24
|
+
export async function encodeSpz(data) {
|
|
25
|
+
const { count, positions, scales, rotations, colors } = data;
|
|
26
|
+
if (!Number.isInteger(count) ||
|
|
27
|
+
count < 0 ||
|
|
28
|
+
positions.length !== count * 3 ||
|
|
29
|
+
scales.length !== count * 3 ||
|
|
30
|
+
rotations.length !== count * 4 ||
|
|
31
|
+
colors.length !== count * 4)
|
|
32
|
+
throw splatsError(2101, 'this cloud does not give every one of its splats an entry in each array.');
|
|
33
|
+
const fractionalBits = bitsFor(positions, count);
|
|
34
|
+
const bytes = new Uint8Array(16 + count * (3 * 3 + 1 + 3 + 3 + 4));
|
|
35
|
+
const view = new DataView(bytes.buffer);
|
|
36
|
+
view.setUint32(0, MAGIC, true);
|
|
37
|
+
view.setUint32(4, VERSION, true);
|
|
38
|
+
view.setUint32(8, count, true);
|
|
39
|
+
bytes[12] = 0;
|
|
40
|
+
bytes[13] = fractionalBits;
|
|
41
|
+
let at = 16;
|
|
42
|
+
const fixed = (value) => {
|
|
43
|
+
const raw = Math.max(-FIXED_MAX - 1, Math.min(FIXED_MAX, Math.round(value * 2 ** fractionalBits)));
|
|
44
|
+
bytes[at] = raw & 0xff;
|
|
45
|
+
bytes[at + 1] = (raw >> 8) & 0xff;
|
|
46
|
+
bytes[at + 2] = (raw >> 16) & 0xff;
|
|
47
|
+
at += 3;
|
|
48
|
+
};
|
|
49
|
+
for (let i = 0; i < count; i++)
|
|
50
|
+
for (let k = 0; k < 3; k++)
|
|
51
|
+
fixed(positions[i * 3 + k]);
|
|
52
|
+
for (let i = 0; i < count; i++)
|
|
53
|
+
bytes[at++] = toByte(colors[i * 4 + 3] * 255);
|
|
54
|
+
for (let i = 0; i < count; i++) {
|
|
55
|
+
// The file stores a color as its first band: the inverse of the reader's own step.
|
|
56
|
+
const dc = channelOfSh(colors, i * 4);
|
|
57
|
+
for (let k = 0; k < 3; k++)
|
|
58
|
+
bytes[at++] = toByte(dc[k] * COLOR_SCALE * 255 + 127.5);
|
|
59
|
+
}
|
|
60
|
+
for (let i = 0; i < count; i++)
|
|
61
|
+
for (let k = 0; k < 3; k++) {
|
|
62
|
+
const scale = Math.max(scales[i * 3 + k], 1e-30);
|
|
63
|
+
bytes[at++] = toByte((Math.log(scale) + 10) * 16);
|
|
64
|
+
}
|
|
65
|
+
for (let i = 0; i < count; i++) {
|
|
66
|
+
view.setUint32(at, quaternionWord(rotations, i * 4), true);
|
|
67
|
+
at += 4;
|
|
68
|
+
}
|
|
69
|
+
return gzip(bytes);
|
|
70
|
+
}
|
|
71
|
+
/** The fractional bits that keep the cloud's largest center in the fixed-point range. */
|
|
72
|
+
function bitsFor(positions, count) {
|
|
73
|
+
let largest = 0;
|
|
74
|
+
for (let i = 0; i < count * 3; i++) {
|
|
75
|
+
const value = Math.abs(positions[i]);
|
|
76
|
+
if (value > largest)
|
|
77
|
+
largest = value;
|
|
78
|
+
}
|
|
79
|
+
let bits = MOST_FRACTIONAL_BITS;
|
|
80
|
+
while (bits > 0 && largest * 2 ** bits > FIXED_MAX)
|
|
81
|
+
bits--;
|
|
82
|
+
if (largest * 2 ** bits > FIXED_MAX)
|
|
83
|
+
throw splatsError(2101, `this cloud reaches ${largest} meters from its origin, which is too far to write. Move the cloud's origin nearer to it.`);
|
|
84
|
+
return bits;
|
|
85
|
+
}
|
|
86
|
+
/** The three first-band coefficients of a linear color, which the reader turns back into the color. */
|
|
87
|
+
function channelOfSh(colors, at) {
|
|
88
|
+
return [0, 1, 2].map((k) => {
|
|
89
|
+
const linear = Math.min(Math.max(colors[at + k], 0), 1);
|
|
90
|
+
const display = linear <= 0.0031308 ? linear * 12.92 : 1.055 * linear ** (1 / 2.4) - 0.055;
|
|
91
|
+
return (display - 0.5) / SH_C0;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/** A rounded byte, held inside the byte range. */
|
|
95
|
+
function toByte(value) {
|
|
96
|
+
return Math.max(0, Math.min(255, Math.round(value)));
|
|
97
|
+
}
|
|
98
|
+
/** A quaternion in the smallest-three form: two bits name the largest part, and the others follow. */
|
|
99
|
+
function quaternionWord(rotations, at) {
|
|
100
|
+
const values = [
|
|
101
|
+
rotations[at],
|
|
102
|
+
rotations[at + 1],
|
|
103
|
+
rotations[at + 2],
|
|
104
|
+
rotations[at + 3],
|
|
105
|
+
];
|
|
106
|
+
if (values[3] < 0)
|
|
107
|
+
for (let k = 0; k < 4; k++)
|
|
108
|
+
values[k] = -values[k];
|
|
109
|
+
let largest = 0;
|
|
110
|
+
for (let k = 1; k < 4; k++)
|
|
111
|
+
if (Math.abs(values[k]) > Math.abs(values[largest]))
|
|
112
|
+
largest = k;
|
|
113
|
+
const sign = values[largest] < 0 ? -1 : 1;
|
|
114
|
+
let word = largest << 30;
|
|
115
|
+
let shift = 0;
|
|
116
|
+
for (let k = 3; k >= 0; k--) {
|
|
117
|
+
if (k === largest)
|
|
118
|
+
continue;
|
|
119
|
+
const value = values[k] * sign;
|
|
120
|
+
const magnitude = Math.min(511, Math.round((Math.abs(value) / Math.SQRT1_2) * 511));
|
|
121
|
+
word |= (((value < 0 ? 1 : 0) << 9) | magnitude) << shift;
|
|
122
|
+
shift += 10;
|
|
123
|
+
}
|
|
124
|
+
return word >>> 0;
|
|
125
|
+
}
|
|
126
|
+
/** Wraps the file in the gzip stream that the readers of the format expect. */
|
|
127
|
+
async function gzip(bytes) {
|
|
128
|
+
// A typed array is a part of a blob at run time; the type keeps the buffer it views.
|
|
129
|
+
const stream = new Blob([bytes])
|
|
130
|
+
.stream()
|
|
131
|
+
.pipeThrough(new CompressionStream('gzip'));
|
|
132
|
+
return new Uint8Array(await new Response(stream).arrayBuffer());
|
|
133
|
+
}
|
package/lib/spz.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type SplatData } from './format.js';
|
|
2
|
+
/**
|
|
3
|
+
* Reads an SPZ file into a cloud of splats. `file` holds the file's bytes as the browser delivers
|
|
4
|
+
* them. Throws when the file is not an SPZ file this reader knows, when its sizes do not fit, and
|
|
5
|
+
* when a zstd stream needs a browser without the zstd decompressor.
|
|
6
|
+
*
|
|
7
|
+
* @category api/splats
|
|
8
|
+
*/
|
|
9
|
+
export declare function decodeSpz(file: Uint8Array | ArrayBuffer): Promise<SplatData>;
|