babylon.quarks 0.17.1 → 0.17.2
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
CHANGED
package/src/QuarksLoader.ts
CHANGED
|
@@ -487,7 +487,11 @@ export class QuarksLoader {
|
|
|
487
487
|
const subEmitter = system.behaviors[i] as EmitSubParticleSystem;
|
|
488
488
|
const targetUUID = subEmitter.subParticleSystem as any;
|
|
489
489
|
if (typeof targetUUID === 'string' && nodesMap[targetUUID]) {
|
|
490
|
-
|
|
490
|
+
const resolved = nodesMap[targetUUID];
|
|
491
|
+
(subEmitter as any).subParticleSystem = resolved;
|
|
492
|
+
if (resolved instanceof ParticleEmitter) {
|
|
493
|
+
(resolved.system as ParticleSystem).onlyUsedByOther = true;
|
|
494
|
+
}
|
|
491
495
|
}
|
|
492
496
|
}
|
|
493
497
|
}
|
|
@@ -22,6 +22,11 @@ varying vec4 vColor;
|
|
|
22
22
|
varying vec3 vNormal;
|
|
23
23
|
varying vec3 vWorldPos;
|
|
24
24
|
|
|
25
|
+
#ifdef TILE_BLEND
|
|
26
|
+
varying vec2 vUV2;
|
|
27
|
+
varying float vTileBlend;
|
|
28
|
+
#endif
|
|
29
|
+
|
|
25
30
|
#ifdef SOFT_PARTICLES
|
|
26
31
|
varying vec4 projPosition;
|
|
27
32
|
varying float linearDepth;
|
|
@@ -54,9 +59,17 @@ void main() {
|
|
|
54
59
|
|
|
55
60
|
#ifdef UV_TILE
|
|
56
61
|
vec2 tc = vec2(tileCountX, tileCountY);
|
|
57
|
-
float
|
|
58
|
-
float
|
|
62
|
+
float baseTile = floor(uvTile);
|
|
63
|
+
float tileU = mod(baseTile, tc.x) / tc.x;
|
|
64
|
+
float tileV = 1.0 - floor(baseTile / tc.x) / tc.y - 1.0 / tc.y;
|
|
59
65
|
vUV = uv / tc + vec2(tileU, tileV);
|
|
66
|
+
#ifdef TILE_BLEND
|
|
67
|
+
float nextTile = ceil(uvTile);
|
|
68
|
+
float nextU = mod(nextTile, tc.x) / tc.x;
|
|
69
|
+
float nextV = 1.0 - floor(nextTile / tc.x) / tc.y - 1.0 / tc.y;
|
|
70
|
+
vUV2 = uv / tc + vec2(nextU, nextV);
|
|
71
|
+
vTileBlend = fract(uvTile);
|
|
72
|
+
#endif
|
|
60
73
|
#else
|
|
61
74
|
vUV = uv;
|
|
62
75
|
#endif
|