| Age | Commit message (Collapse) | Author |
|
- Added ObjectType::SKYBOX for dedicated skybox rendering.
- Created assets/final/shaders/skybox.wgsl for background rendering.
- Implemented a two-pass rendering strategy in Renderer3D::render:
- First pass renders the skybox without depth writes.
- Second pass renders scene objects with depth testing.
- Corrected GlobalUniforms struct in common_uniforms.wgsl and src/3d/renderer.h to include and explicit padding for 112-byte alignment.
- Updated Renderer3D::update_uniforms to set the new and zero-initialize padding.
- Reverted sky sampling logic in renderer_3d.wgsl to for SDF misses, preventing background bleed-through.
- Updated test_3d_render.cc to include a SKYBOX object with Perlin noise.
handoff(Gemini): The skybox is now correctly rendered with Perlin noise as a dedicated background pass. Objects render correctly without transparency to the sky. All necessary C++ and WGSL shader changes are implemented and verified.
|
|
- Updated ProcGenFunc signature to return bool for error reporting.
- Implemented gen_perlin (Fractional Brownian Motion) in procedural/generator.cc.
- Added support for sky texture in Renderer3D and its shader.
- Integrated Perlin noise sky texture in test_3d_render.cc.
- Caught and handled memory/generation errors in AssetManager and TextureManager.
- Assigned reference numbers to all remaining tasks in documentation.
handoff(Gemini): Side-quest complete. ProcGenFunc now returns bool. Perlin noise added and used for sky in 3D test. Windows build remains stable. All tasks numbered.
|
|
- Consolidated all WebGPU shims and platform-specific logic into src/platform.h.
- Refactored platform_init to return PlatformState by value and platform_poll to automatically refresh time and aspect_ratio.
- Removed STL dependencies (std::map, std::vector, std::string) from AssetManager and Procedural subsystems.
- Fixed Windows cross-compilation by adjusting include paths and linker flags in CMakeLists.txt and updating build_win.sh.
- Removed redundant direct inclusions of GLFW/glfw3.h and WebGPU headers across the project.
- Applied clang-format and updated documentation.
handoff(Gemini): Completed Task #20 and 20.1. Platform abstraction is now unified, and core paths are STL-free. Windows build is stable.
|
|
Implemented comprehensive unit tests for ShaderComposer and a validation test for production WGSL shader assets. This ensures the shader asset pipeline is robust and that all shaders contain required entry points and snippets. Also improved InitShaderComposer to be more robust during testing.
|
|
Fixes crashes in demo64k and test_3d_render caused by uninitialized ShaderComposer. Moves InitShaderComposer() call before effect initialization in gpu.cc and adds explicit call in test_3d_render.cc. Also fixes include paths for generated assets.h in multiple files.
|
|
|
|
|
|
- Implemented test_shader_composer.cc to verify WGSL snippet assembly.
- Expanded test_maths.cc with rigorous matrix inversion and transposition checks.
- Verified that A * inv(A) equals Identity for various TRS combinations.
- Updated CMakeLists.txt to include the new test targets.
|
|
- Reverted floor to BOX (SDF) for robust shadow receipt.
- Updated shader to apply grid pattern ONLY to instance 0 (floor) or PLANE objects.
- Restored noise-based texturing for floating cubes and other SDF primitives.
- Verified that shadows and textures are now correctly applied across all scene elements.
|
|
- Switched floor back to PLANE type in test_3d_render.
- Updated fragment shader to apply grid pattern ONLY to PLANE objects.
- Restored noise-based bump mapping and texturing for BOX and other SDF primitives.
- Verified correct visual appearance of floating cubes (no fixed grid).
|
|
- Increased number of random objects to 30.
- Enlarged base scale of all objects.
- Restricted object distribution radius to encourage inter-object shadows.
- Scaled up center torus and moving sphere.
|
|
- Adjusted Torus proxy hull in vs_main to 1.5x0.5x1.5 for better SDF fit.
- Updated VisualDebug::add_box to use per-object local extents.
- Standardized floor grid mapping in fs_main using planar p.xz projection.
- Verified non-uniform scale and rotation robustness in test_3d_render.
|
|
|
|
- Converted floor in test_3d_render to a large SDF BOX for consistent shading.
- Standardized lighting (light_dir = 1,1,1) and normal calculation for all objects.
- Fixed calc_shadow bias and skip_idx to reliably prevent self-shadowing.
- Improved raymarching robustness in fs_main to find exact SDF hit points.
|
|
- Elevated objects in test_3d_render to avoid shadow occlusion.
- Slanted light direction for more visible, elongated shadows.
- Sharpened shadows by increasing k constant to 32.
- Cleaned up debug printfs from previous turns.
- Maintained skip_idx logic for robust self-shadowing prevention.
|
|
- Reverted floor to CUBE (rasterized) at index 0.
- Restored vertical lighting and original soft shadow loop (k=8, t+=h).
- Maintained instance-based skip_idx for generic self-shadowing prevention.
- Confirmed map_scene correctly skips the floor, allowing other objects to cast shadows on it.
|
|
- Switched floor from rasterized CUBE to SDF PLANE for consistent shadow mapping.
- Implemented skip_idx in map_scene to properly prevent self-shadowing.
- Standardized soft shadow logic with improved bias and step size.
- Increased object elevation and adjusted light direction for more visible shadows.
- Enabled debug boxes in test_3d_render.
|
|
|
|
- Implemented dynamic resolution support in all shaders and effects.
- Added explicit viewport setting for all render passes to ensure correct scaling.
- Fixed 3D shadow mapping by adding PLANE support and standardizing soft shadow logic.
- Propagated resize events through the Effect hierarchy.
- Applied project-wide code formatting.
|
|
- Replaced invalid 'i++' with 'i = i + 1' in the shader's calc_shadow function loop.
- This resolves the shader parsing error and allows the 3D renderer test to run successfully on all platforms.
|
|
- Modified 'test_3d_render' to generate and use a procedural 'grid' texture for the floor.
- Updated fragment shader to sample the texture for rasterized objects, adding a grid pattern to the floor.
- This provides visual detail and contrast, making raymarched shadows much easier to observe and verify.
|
|
- Part 1: Unified shadow calculation in fragment shader for both SDF and rasterized objects.
- Part 2: Added 'model_inverse_transpose' to ObjectData to correctly transform normals for non-uniformly scaled objects.
- Part 3: Brightened the floor in 'test_3d_render' to make shadows visible.
- Verified correct lighting and shadows on the non-uniformly scaled floor.
|
|
- Changed the floor object in 'test_3d_render' from SDF BOX to rasterized CUBE.
- This prevents the non-uniform scale of the floor from breaking the scene-wide SDF query used for shadow calculations.
- The lighting and shadows now render correctly in the more complex test scene.
|
|
- Updated 'src/tests/test_3d_render.cc' to populate the scene with a large floor and 30 randomly placed objects (spheres, boxes, tori).
- This provides a more complex environment to verify the new shadow mapping implementation.
|
|
- Added 'src/3d/visual_debug.h/cc' to implement wireframe rendering.
- Integrated VisualDebug into Renderer3D with a static global toggle.
- Added '--debug' command-line option to 'demo64k' and 'test_3d_render' to enable wireframes.
- Updated 'src/gpu/effects/hybrid_3d_effect.h' to expose the debug setter (reverted later as static method used).
- Ensured full cross-platform compatibility (native and Windows) for the new debug module.
- All code guarded by STRIP_ALL for final release.
|
|
- Added preprocessor definitions for 'WGPUOptionalBool_True' and 'WGPUOptionalBool_False' to ensure successful cross-compilation against the older wgpu-native headers used for the Windows build.
- This resolves the build failures in the Windows CI/check script.
|
|
- Task A: Centralized all generated code (assets, timeline) into a single directory to create a single source of truth.
- Task A: Isolated test asset generation into a temporary build directory, preventing pollution of the main source tree.
- Task B: Vertically compacted all C/C++ source files by removing superfluous newlines.
- Task C: Created a top-level README.md with project overview and file descriptions.
- Task D: Moved non-essential documentation into a directory to reduce root-level clutter.
|
|
- Replaced all global static variables in the platform layer with a single PlatformState struct.
- Updated all platform function signatures to accept a pointer to this struct, making the implementation stateless and more modular.
- Refactored main.cc, tests, and tools to instantiate and pass the PlatformState struct.
- This improves code organization and removes scattered global state.
|
|
- Fixed a 'squished' viewport bug on high-DPI (Retina) displays by querying the framebuffer size in pixels instead of using the window size in points.
- Centralized window dimension management within the platform layer.
- Added a '--resolution WxH' command-line option to allow specifying a custom window size at startup. This option is stripped in STRIP_ALL builds.
- Updated all test and tool executables to use the new platform API.
|
|
- Fixed test_sequence by restoring MainSequence::init_test for mocking.
- Corrected CMakeLists.txt dependencies and source groupings to prevent duplicate symbols.
- standardizing Effect constructor signature for seq_compiler compatibility.
- Implemented Hybrid3DEffect using bumpy Renderer3D and procedural NOISE_TEX.
- Updated MainSequence to support depth buffer for 3D elements.
- Formatted all source files with clang-format.
|
|
|
|
- Updated asset_packer to parse PROC(...) syntax.
- Implemented runtime dispatch in AssetManager for procedural generation.
- Added procedural generator functions (noise, grid, periodic).
- Added comprehensive tests for procedural asset lifecycle.
|
|
- Refactored asset manager to use a static array for caching, improving performance and memory efficiency.
- Updated asset_packer to correctly generate ASSET_LAST_ID for array sizing.
- Modified asset_manager.h to use a forward declaration for AssetId.
- Updated asset_manager.cc to use the conditional include for generated asset headers.
- Added a test case in test_assets to verify the array-based cache and ASSET_LAST_ID logic.
|
|
- 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).
|
|
- Added SDF logic for Sphere, Box, and Torus in WGSL.
- Implemented hybrid normal calculation (analytical for sphere, numerical fallback).
- Updated Renderer3D to dispatch object types to shader.
- Updated test_3d_render to display mixed SDF shapes (Sphere, Torus, Box).
- Added BOX to ObjectType enum.
|
|
- 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.
|
|
|
|
Moved WGPUDevice, WGPUQueue, and GpuBuffer uniforms_ into the base Effect
and PostProcessEffect classes. Updated all derived effect classes to use
these inherited members and refactored their constructors. Also fixed
associated compilation errors in test files and adjusted a printf statement.
|
|
|
|
- Enabled AllowShortFunctionsOnASingleLine: All
- Enabled AllowShortBlocksOnASingleLine: Always
- Enabled AllowShortIfStatementsOnASingleLine: Always
- Enabled AllowShortLoopsOnASingleLine: true
- Set MaxEmptyLinesToKeep: 1
- Applied formatting to all source files.
|
|
- Updated CMakeLists.txt to generate assets.h and assets_data.cc in src/generated/.
- Updated scripts/gen_assets.sh to reflect the new output location.
- Modified asset_packer.cc to generate correct include paths in assets_data.cc.
- Updated source files (main.cc, asset_manager.cc, test_assets.cc) to include headers from the 'generated/' subdirectory.
- Ensured all targets have correct include paths to find generated headers.
- Removed stale generated files from src/.
|
|
- Fixed 'Invalid sample count 0' and 'Invalid anisotropic clamp: 0' by ensuring explicit pipeline and sampler states.
- Resolved WGSL parsing errors by replacing swizzle assignments in compute shaders.
- Fixed 'Texture destroyed' error in render_frame by reordering command submission and resource presentation/release.
- Added WGPU_DEPTH_SLICE_UNDEFINED for Windows compatibility and ensured consistent resolveTarget initialization.
- Cleaned up PassthroughEffect bind group layout mismatch and redundant string helper definitions.
- Verified all tests pass and applied consistent formatting.
|
|
Refines tests for the sequence and effect system to focus on logic (init, start, end calls) rather than GPU output, as full GPU mocking is complex. Updates HOWTO.md to reflect this.
|
|
|
|
|
|
|
|
Renamed demo assets to 'demo_assets.txt' and created 'test_assets_list.txt' for AssetManagerTest to prevent interference.
- Updated CMakeLists.txt to generate separate headers for demo and test.
- Updated test_assets.cc to conditionally include the test-specific header.
- Incorporated gen_assets.sh into the 'final' target.
|
|
This commit applies a new project-wide rule that every source file must begin with a concise 3-line comment header describing its purpose.
- Updated CONTRIBUTING.md with the new rule.
- Applied headers to all .cc and .h files in src/ and tools/.
- Fixed various minor compilation errors and missing includes discovered during the header update process.
|
|
This commit makes the asset packer fully functional and adds an end-to-end test suite.
- Updated asset_packer.cc to read file contents and embed them as hex arrays.
- Added actual asset files (null.bin, test_asset.txt) for testing.
- Implemented src/tests/test_assets.cc to verify data integrity at runtime.
- Refactored CMakeLists.txt to handle generated file dependencies correctly.
|
|
This commit introduces new tools for spectrogram manipulation and visualization, establishes a consistent coding style, and updates project documentation.
Key changes include:
- **Spectrogram Tools:
- : A command-line utility for analyzing WAV/MP3 files into custom spectrogram format and playing back these spectrograms via the synth engine.
- : A command-line tool for visualizing spectrogram files as ASCII art in the console.
- **Coding Style Enforcement:
- Added a configuration file enforcing LLVM-based style with 2-space indentation, no tabs, and an 80-column line limit.
- Renamed all C++ source files from to for project consistency.
- Applied automatic formatting using
exit across the entire codebase.
- **Documentation & Workflow:
- Created to define a commit policy requiring tests to pass before committing.
- Updated with instructions for building and using and , and referenced .
- Updated and to reflect the new tools, audio architecture decisions (real-time additive synthesis, double-buffering for dynamic updates, WAV/MP3 support), coding style, and development workflow.
- **Build System:
- Modified to:
- Include new targets for and under the option.
- Update source file extensions to .
- Add a new end-to-end test for to the suite.
|