@woosh/meep-engine 3.61.0 → 3.61.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +4 -0
- package/src/engine/graphics/ecs/decal/v2/Decal.d.ts +46 -2
- package/src/engine/graphics/ecs/decal/v2/Decal.d.ts.map +1 -1
- package/src/engine/graphics/ecs/decal/v2/Decal.js +74 -5
- package/src/engine/graphics/ecs/decal/v2/DecalSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/decal/v2/DecalSerializationAdapter.js +13 -1
- package/src/engine/graphics/ecs/decal/v2/DecalSerializationUpgrader_1_2.d.ts +9 -0
- package/src/engine/graphics/ecs/decal/v2/DecalSerializationUpgrader_1_2.d.ts.map +1 -0
- package/src/engine/graphics/ecs/decal/v2/DecalSerializationUpgrader_1_2.js +37 -0
- package/src/engine/graphics3/DecalSystem.d.ts.map +1 -1
- package/src/engine/graphics3/DecalSystem.js +462 -447
- package/src/engine/graphics3/decal/DECAL_GPU_RECORD.d.ts +14 -0
- package/src/engine/graphics3/decal/DECAL_GPU_RECORD.d.ts.map +1 -1
- package/src/engine/graphics3/decal/DECAL_GPU_RECORD.js +53 -13
- package/src/engine/graphics3/decal/chunk_decal_record.d.ts +6 -1
- package/src/engine/graphics3/decal/chunk_decal_record.d.ts.map +1 -1
- package/src/engine/graphics3/decal/chunk_decal_record.js +28 -9
- package/src/engine/graphics3/decal/decal_gpu_records.d.ts +2 -1
- package/src/engine/graphics3/decal/decal_gpu_records.d.ts.map +1 -1
- package/src/engine/graphics3/decal/decal_gpu_records.js +26 -5
- package/src/engine/graphics3/decal/decal_material_samplers.d.ts +6 -0
- package/src/engine/graphics3/decal/decal_material_samplers.d.ts.map +1 -1
- package/src/engine/graphics3/decal/decal_material_samplers.js +13 -0
- package/src/engine/graphics3/decal/shader_cluster_assign_decals.js +1 -1
- package/src/engine/graphics3/decal/shader_cull_decals_frustum.js +1 -1
- package/src/engine/graphics3/decal/shader_decal_composite.d.ts +5 -0
- package/src/engine/graphics3/decal/shader_decal_composite.d.ts.map +1 -1
- package/src/engine/graphics3/decal/shader_decal_composite.js +69 -28
- package/src/generation/foliage/skeleton/ShootWoodHash.d.ts +3 -2
- package/src/generation/foliage/skeleton/ShootWoodHash.d.ts.map +1 -1
- package/src/generation/foliage/skeleton/ShootWoodHash.js +25 -2
- package/src/shade/renderer/buffer/graph_read_buffer.d.ts +3 -1
- package/src/shade/renderer/buffer/graph_read_buffer.d.ts.map +1 -1
- package/src/shade/renderer/buffer/graph_read_buffer.js +9 -6
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
- package/src/shade/renderer/particles/GPUParticleSystem.js +1 -7
- package/src/shade/renderer/restir/di/chunk_restir_resolve.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/chunk_restir_resolve.js +91 -94
- package/src/shade/renderer/restir/reservoir/chunk_rtxdi_stream_sample.js +1 -1
- package/src/shade/renderer/shader/chunk/color/rgbe9995/chunk_rgbe9995_decode.d.ts +14 -0
- package/src/shade/renderer/shader/chunk/color/rgbe9995/chunk_rgbe9995_decode.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/rgbe9995/chunk_rgbe9995_decode.js +36 -21
- package/src/shade/renderer/shader/chunk/color/rgbe9995/chunk_rgbe9995_sample_gather.d.ts +22 -0
- package/src/shade/renderer/shader/chunk/color/rgbe9995/chunk_rgbe9995_sample_gather.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/rgbe9995/chunk_rgbe9995_sample_gather.js +64 -0
- package/src/shade/renderer/shader/chunk/geometry/normal/chunk_decode_vertex_normal.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/normal/chunk_decode_vertex_normal.js +13 -18
- package/src/shade/renderer/shader/chunk/geometry/normal/chunk_encode_vertex_normal.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/normal/chunk_encode_vertex_normal.js +28 -30
- package/src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_u32_to_vec2.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_u32_to_vec2.js +15 -16
- package/src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_vec2_to_u32.d.ts +0 -1
- package/src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_vec2_to_u32.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_vec2_to_u32.js +15 -18
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +8 -1
- package/src/shade/wgsl/emulator/WGSLLanguageCore.js +3 -3
- package/src/shade/renderer/global_illumination/brick4/cpu/brick4_sh3_color_encode.d.ts +0 -2
- package/src/shade/renderer/global_illumination/brick4/cpu/brick4_sh3_color_encode.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/brick4/cpu/brick4_sh3_color_encode.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_unit_u32_to_vec2.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_u32_to_vec2.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,qCAFU,SAAS,
|
|
1
|
+
{"version":3,"file":"chunk_unit_u32_to_vec2.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_u32_to_vec2.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,qCAFU,SAAS,CASlB;0BAdyB,gCAAgC"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { CodeChunk } from "../../../compiler/CodeChunk.js";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Quantized vec2 decoding, vector values must be in [0..1] range
|
|
5
|
-
* @see https://github.com/zhangjiangen11/godot/blob/b64ac6341347906dacdda712dc78b574334ff4af/servers/rendering/renderer_rd/shaders/skeleton.glsl#L66
|
|
6
|
-
* @type {CodeChunk}
|
|
7
|
-
*/
|
|
8
|
-
export const chunk_unit_u32_to_vec2 = CodeChunk.from(
|
|
9
|
-
//language=WGSL
|
|
10
|
-
`
|
|
11
|
-
fn unit_u32_to_vec2(base: u32) -> vec2<f32>{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
)
|
|
1
|
+
import { CodeChunk } from "../../../compiler/CodeChunk.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Quantized vec2 decoding, vector values must be in [0..1] range
|
|
5
|
+
* @see https://github.com/zhangjiangen11/godot/blob/b64ac6341347906dacdda712dc78b574334ff4af/servers/rendering/renderer_rd/shaders/skeleton.glsl#L66
|
|
6
|
+
* @type {CodeChunk}
|
|
7
|
+
*/
|
|
8
|
+
export const chunk_unit_u32_to_vec2 = CodeChunk.from(
|
|
9
|
+
//language=WGSL
|
|
10
|
+
`
|
|
11
|
+
fn unit_u32_to_vec2(base: u32) -> vec2<f32>{
|
|
12
|
+
return unpack2x16unorm(base) * 2.0 - 1.0;
|
|
13
|
+
}
|
|
14
|
+
`
|
|
15
|
+
)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TODO consider pack2x16unorm instead
|
|
3
2
|
* Quantized vec2 encoding, values must be in [0..1] range
|
|
4
3
|
* @see https://github.com/zhangjiangen11/godot/blob/b64ac6341347906dacdda712dc78b574334ff4af/servers/rendering/renderer_rd/shaders/skeleton.glsl#L93
|
|
5
4
|
* @type {CodeChunk}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_unit_vec2_to_u32.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_vec2_to_u32.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"chunk_unit_vec2_to_u32.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_vec2_to_u32.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,qCAFU,SAAS,CASjB;0BAdwB,gCAAgC"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { CodeChunk } from "../../../compiler/CodeChunk.js";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
`
|
|
17
|
-
);
|
|
18
|
-
|
|
1
|
+
import { CodeChunk } from "../../../compiler/CodeChunk.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Quantized vec2 encoding, values must be in [0..1] range
|
|
5
|
+
* @see https://github.com/zhangjiangen11/godot/blob/b64ac6341347906dacdda712dc78b574334ff4af/servers/rendering/renderer_rd/shaders/skeleton.glsl#L93
|
|
6
|
+
* @type {CodeChunk}
|
|
7
|
+
*/
|
|
8
|
+
export const chunk_unit_vec2_to_u32 = CodeChunk.from(
|
|
9
|
+
//language=WGSL
|
|
10
|
+
`
|
|
11
|
+
fn unit_vec2_to_u32(base:vec2<f32>) -> u32{
|
|
12
|
+
return pack2x16unorm(base);
|
|
13
|
+
}
|
|
14
|
+
`
|
|
15
|
+
);
|
|
@@ -3232,7 +3232,14 @@ function inferBuiltinReturnType(name, args) {
|
|
|
3232
3232
|
// Both gathers return the four texels of a 2x2 footprint. Saying so here matters more than
|
|
3233
3233
|
// for most builtins: the shadow chunks immediately swizzle the result (`samples.wzxy`), and
|
|
3234
3234
|
// an unknown type degrades swizzle codegen downstream.
|
|
3235
|
-
if (name === 'textureGather'
|
|
3235
|
+
if (name === 'textureGather') {
|
|
3236
|
+
const first = args[0] !== undefined ? args[0].type : null;
|
|
3237
|
+
const texture = first !== null && first.kind === 'texture' ? first : (args[1] !== undefined ? args[1].type : null);
|
|
3238
|
+
const scalar = texture !== null && texture.kind === 'texture' ? texture.scalar : 'f32';
|
|
3239
|
+
return { kind: 'vec', size: 4, scalar: scalar === 'u32' || /uint$/.test(scalar) ? 'u32'
|
|
3240
|
+
: scalar === 'i32' || /sint$/.test(scalar) ? 'i32' : 'f32' };
|
|
3241
|
+
}
|
|
3242
|
+
if (name === 'textureGatherCompare') {
|
|
3236
3243
|
return { kind: 'vec', size: 4, scalar: 'f32' };
|
|
3237
3244
|
}
|
|
3238
3245
|
if (name === 'textureDimensions') {
|
|
@@ -1347,7 +1347,7 @@ export const WGSLLanguageCore = {
|
|
|
1347
1347
|
const tz = w * t.size[2] + oz;
|
|
1348
1348
|
texel_coord = dim === 1 ? [tx] : (dim === 2 ? [tx, ty] : [tx, ty, tz]);
|
|
1349
1349
|
}
|
|
1350
|
-
const result = new Float32Array(4);
|
|
1350
|
+
const result = t.data instanceof Uint32Array || t.data instanceof Int32Array ? new t.data.constructor(4) : new Float32Array(4);
|
|
1351
1351
|
cpu_texture_sample(result, sampler ?? FALLBACK_LINEAR_CLAMP_SAMPLER, t, texel_coord);
|
|
1352
1352
|
return result;
|
|
1353
1353
|
},
|
|
@@ -1504,7 +1504,7 @@ export const WGSLLanguageCore = {
|
|
|
1504
1504
|
|
|
1505
1505
|
if (extra_b !== undefined) { offset_x = extra_b[0]; offset_y = extra_b[1]; }
|
|
1506
1506
|
|
|
1507
|
-
const result = new Float32Array(4);
|
|
1507
|
+
const result = t.data instanceof Uint32Array || t.data instanceof Int32Array ? new t.data.constructor(4) : new Float32Array(4);
|
|
1508
1508
|
|
|
1509
1509
|
cpu_texture_gather(
|
|
1510
1510
|
result,
|
|
@@ -1582,7 +1582,7 @@ export const WGSLLanguageCore = {
|
|
|
1582
1582
|
throw new Error("textureGatherCompare: the bound sampler has no 'compare' function — WGSL requires a sampler_comparison here. Bind a SamplerDescriptor with `compare` set (the engine's shadow path uses SHADOWMAP_COMPARE_SAMPLER_DESCRIPTOR, `compare: \"greater\"` for reverse-Z).");
|
|
1583
1583
|
}
|
|
1584
1584
|
|
|
1585
|
-
const result = new Float32Array(4);
|
|
1585
|
+
const result = t.data instanceof Uint32Array || t.data instanceof Int32Array ? new t.data.constructor(4) : new Float32Array(4);
|
|
1586
1586
|
|
|
1587
1587
|
cpu_texture_gather(
|
|
1588
1588
|
result,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brick4_sh3_color_encode.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/brick4/cpu/brick4_sh3_color_encode.js"],"names":[],"mappings":"AAAA,8GAKC"}
|