From 8bdc4754647c9c6691130fa91d51fee93c5fc88f Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 1 Feb 2026 10:51:15 +0100 Subject: feat: Implement 3D system and procedural texture manager - Extended mini_math.h with mat4 multiplication and affine transforms. - Implemented TextureManager for runtime procedural texture generation and GPU upload. - Added 3D system components: Camera, Object, Scene, and Renderer3D. - Created test_3d_render mini-demo for interactive 3D verification. - Fixed WebGPU validation errors regarding depthSlice and unimplemented WaitAny. --- src/procedural/generator.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/procedural/generator.h (limited to 'src/procedural/generator.h') diff --git a/src/procedural/generator.h b/src/procedural/generator.h new file mode 100644 index 0000000..a5ced68 --- /dev/null +++ b/src/procedural/generator.h @@ -0,0 +1,27 @@ +// This file is part of the 64k demo project. +// It defines the interface for procedural texture generation. +// Used to generate texture data at runtime. + +#pragma once + +#include +#include + +// Procedural generation function signature +// buffer: Pointer to RGBA8 buffer (size w * h * 4) +// w, h: Dimensions +// params: Arbitrary float parameters for the generator +typedef void (*ProcGenFunc)(uint8_t* buffer, int w, int h, const float* params, + int num_params); + +namespace procedural { + +// Example: Simple noise generator +void gen_noise(uint8_t* buffer, int w, int h, const float* params, + int num_params); + +// Example: Grid pattern +void gen_grid(uint8_t* buffer, int w, int h, const float* params, + int num_params); + +} // namespace procedural -- cgit v1.2.3