-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatch_cloud.diff
More file actions
31 lines (26 loc) · 1.4 KB
/
Copy pathpatch_cloud.diff
File metadata and controls
31 lines (26 loc) · 1.4 KB
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
<<<<<<< SEARCH
// ⚡ OPTIMIZATION: TSL Floating Animation (Replaces CPU update)
// Use world X/Z as phase seed for coherent bobbing
const floatSpeed = float(0.5);
const floatAmp = float(0.5);
const worldPhase = positionWorld.x.mul(0.05).add(positionWorld.z.mul(0.05));
// 4. Surface Detail (Triplanar Noise for "Cotton" Texture)
// Adds high-frequency noise to Roughness and slightly to Color
=======
// ⚡ OPTIMIZATION: TSL Floating Animation (Replaces CPU update)
// Use world X/Z as phase seed for coherent bobbing
const floatSpeed = float(0.5);
const floatAmp = float(0.5);
const worldPhase = positionWorld.x.mul(0.05).add(positionWorld.z.mul(0.05));
const floatDisp = sin(uTime.mul(floatSpeed).add(worldPhase)).mul(floatAmp);
const floatOffset = vec3(0.0, floatDisp, 0.0);
// === SPRING BOUNCE (player land/jump response) ===
// High-frequency sine gives that satisfying candy "boing" overshoot
const bounceRinging = sin(uTime.mul(15.0)).mul(playerStrength).mul(0.15);
const bounceDisp = vec3(0.0, bounceRinging, 0.0);
const animatedPos = squishedPos.add(fluffOffset).add(floatOffset).add(bounceDisp);
// Apply player interaction
material.positionNode = applyPlayerInteraction(animatedPos);
// 4. Surface Detail (Triplanar Noise for "Cotton" Texture)
// Adds high-frequency noise to Roughness and slightly to Color
>>>>>>> REPLACE