> ## Documentation Index
> Fetch the complete documentation index at: https://docs.summerengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Noise 3D fbm (VFX smoke skill)

> noise-3d-fbm.gdshaderinc from the VFX smoke skill in the Summer Engine skill library. Smoke effect: a rising column or puff of soft particles with a noise and density falloff shader.

<Note>Part of the [`vfx-smoke` skill](/skills/vfx-smoke). The skill links here when your agent needs the detail.</Note>

```glsl noise-3d-fbm.gdshaderinc theme={null}
// 3D Fractal Brownian Motion noise — used by fire, dissolve, smoke, magic-glow.
// Include with: #include "res://addons/vfx/_building-blocks/noise-3d-fbm.gdshaderinc"

float hash3(vec3 p) {
    p = fract(p * vec3(443.8975, 397.2973, 491.1871));
    p += dot(p, p.yxz + 19.19);
    return fract((p.x + p.y) * p.z);
}

float noise3(vec3 p) {
    vec3 i = floor(p);
    vec3 f = fract(p);
    f = f * f * (3.0 - 2.0 * f);

    float n000 = hash3(i + vec3(0.0, 0.0, 0.0));
    float n100 = hash3(i + vec3(1.0, 0.0, 0.0));
    float n010 = hash3(i + vec3(0.0, 1.0, 0.0));
    float n110 = hash3(i + vec3(1.0, 1.0, 0.0));
    float n001 = hash3(i + vec3(0.0, 0.0, 1.0));
    float n101 = hash3(i + vec3(1.0, 0.0, 1.0));
    float n011 = hash3(i + vec3(0.0, 1.0, 1.0));
    float n111 = hash3(i + vec3(1.0, 1.0, 1.0));

    float x00 = mix(n000, n100, f.x);
    float x10 = mix(n010, n110, f.x);
    float x01 = mix(n001, n101, f.x);
    float x11 = mix(n011, n111, f.x);

    float y0 = mix(x00, x10, f.y);
    float y1 = mix(x01, x11, f.y);

    return mix(y0, y1, f.z);
}

float fbm3(vec3 p) {
    float v = 0.0;
    float amp = 0.5;
    float freq = 1.0;
    for (int i = 0; i < 4; i++) {
        v += amp * noise3(p * freq);
        freq *= 2.0;
        amp *= 0.5;
    }
    return v;
}
```

***

Source: [`library/skills/vfx-smoke/_building-blocks/noise-3d-fbm.gdshaderinc`](https://github.com/SummerEngine/summer/blob/main/library/skills/vfx-smoke/_building-blocks/noise-3d-fbm.gdshaderinc), rendered from `summer-engine@4.3.0` on npm.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.