diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-01 11:31:00 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-01 11:31:00 +0100 |
| commit | f80e37bd61e447f1d66fbb5eb4c1ab7a8a77cf0f (patch) | |
| tree | d6c06e4c9e6d2570458d88d35acba9e64231cbc0 /src/procedural/generator.h | |
| parent | f307cde4ac1126e38c5595ce61a26d50cdd7ad4a (diff) | |
feat: Add seamless bump mapping with procedural noise
- Replaced white noise with smooth value-like noise.
- Implemented periodic texture generation (seam blending).
- Integrated bump mapping into Renderer3D using finite difference of displaced SDF.
- Updated test_3d_render with noise texture and multiple SDF shapes (Box, Sphere, Torus).
Diffstat (limited to 'src/procedural/generator.h')
| -rw-r--r-- | src/procedural/generator.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/procedural/generator.h b/src/procedural/generator.h index a5ced68..8a9e757 100644 --- a/src/procedural/generator.h +++ b/src/procedural/generator.h @@ -24,4 +24,9 @@ void gen_noise(uint8_t* buffer, int w, int h, const float* params, void gen_grid(uint8_t* buffer, int w, int h, const float* params, int num_params); +// Post-process: Make texture periodic by blending edges +// Params[0]: Border size ratio (0.0 - 0.5), default 0.1 +void make_periodic(uint8_t* buffer, int w, int h, const float* params, + int num_params); + } // namespace procedural |
