| Age | Commit message (Collapse) | Author |
|
- Updated VisualDebug to accept mat4 transforms, enabling wireframes to follow rotating objects.
- Restored SDF bump mapping and floor grid texture in the fragment shader.
- Added vec4::xyz() helper to mini_math.h.
- Fixed Renderer3D to pass the full model matrix for debug visualization.
|
|
- Updated ObjectData to include inv_model for reliable world-to-local mapping.
- Enabled SDF raymarching path for all objects in test_3d_render (floor is now a large SDF BOX).
- Implemented robust normal calculation using SDF gradient for all objects.
- Standardized lighting (light_dir = 1,1,1) and diffuse+ambient model.
- Refined calc_shadow with instance-based skip_idx and robust bias.
- Fixed non-uniform scale handling in shader by extracting min scale from model matrix.
|
|
- 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.
|
|
- Reverted test_3d_render to use the global 'noise' texture for floating objects, restoring their bump mapping.
- Implemented a procedural grid directly in the fragment shader for rasterized objects (floor).
- Inverted the grid color scheme (black lines on a lighter background) as requested.
- This ensures accurate object bump mapping and clear shadow visibility on the floor without requiring multiple texture bindings.
|
|
- 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.
|
|
- Removed duplicate 'light_dir' declaration in the shader.
- Fixed a syntax error (duplicate closing raw string delimiter) that caused shader compilation failure.
- Verified all targets build and run correctly with 'check_all.sh'.
|
|
- Fixed 'redefinition of light_dir' shader validation error by centralizing the light definition at the top of fs_main.
- Further brightened the floor in 'test_3d_render' for better shadow contrast.
- Reduced shadow bias and made the light more vertical to ensure shadows are clearly visible on all surfaces.
|
|
- 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.
|
|
- Implemented full support for non-uniform scaling by calculating and passing the 'model_inverse_transpose' matrix to the shader for correct normal transformation.
- Added 'transpose()' and 'inverse()' methods to the 'mat4' class in 'mini_math.h'.
- Refactored the shader to use the new matrix for lighting rasterized objects.
- Updated the test scene to use a rasterized floor (CUBE) instead of an SDF one, ensuring it receives correct lighting and shadows even with non-uniform scale.
|
|
- Refactored the fragment shader to calculate raymarched shadows for all fragments, not just SDF objects.
- This enables rasterized objects (like the floor) to receive shadows from SDF objects, fixing the missing shadows in the test scene.
- This serves as a proof-of-concept for a unified lighting pipeline.
|
|
- 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.
|
|
- Updated Renderer3D shader to include 'map_scene' and 'calc_shadow' functions.
- Shader now iterates over all objects (up to kMaxObjects) to evaluate the scene SDF globally.
- Implemented hard/soft shadows from a fixed directional light.
- Updated GlobalUniforms struct with proper packing/padding for WebGPU compatibility.
- Captured 'GPU BVH & Shadows' task in PROJECT_CONTEXT.md for future optimization.
|
|
- 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.
|
|
- Increased the scale of orbiting 3D objects by 40% for more visual impact.
- Replaced the smooth, predictable camera animation with a non-linear, eased motion.
- Applied different easing frequencies to camera radius, height, and orbit to create an erratic, dramatic effect with sudden acceleration and braking.
|
|
- 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.
|
|
|
|
- Added depth buffer support to MainSequence.
- Implemented Hybrid3DEffect for the main timeline.
- Fixed effect initialization order in MainSequence.
- Ensured depth-stencil compatibility for all scene effects.
- Updated demo sequence with 3D elements and post-processing.
|
|
- Updated asset_packer to correctly parse PROC(...) syntax using regex, handling nested commas.
- Implemented runtime dispatch in AssetManager for procedural generation with dynamic memory management.
- Added procedural generator functions (noise, grid, periodic).
- Added comprehensive tests for procedural asset lifecycle (generation, caching, invalidation).
- Fixed C++ string literal escaping in asset_packer.
|
|
- Updated asset_packer to parse PROC(...) syntax with robust regex.
- Implemented runtime dispatch in AssetManager for procedural generation.
- Added procedural generator functions (noise, grid, periodic).
- Added comprehensive tests for procedural asset lifecycle.
|
|
- 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.
|
|
Split src/gpu/demo_effects.cc into individual .cc files for each effect
and created separate files for post-processing helpers and WGSL shaders.
Updated src/gpu/demo_effects.h to be a central header for all effect-related
declarations and adjusted CMakeLists.txt accordingly.
|
|
|
|
|
|
- Corrected signature in for macOS native builds to match the 5-parameter definition.
- Conditionally compiled assignments in for native builds and removed the definition for Windows from , resolving 'no member named ' errors in Windows cross-compilation.
- Verified all macOS native build configurations (Debug, Size-Optimized, Final/Strip, Developer/All Options, Tests Only, Tools Only) and the Windows cross-compilation build are now compiling successfully.
|
|
- 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.
|
|
Corrects CMakeLists.txt to properly link test_sequence against GLFW and WGPU_LIBRARY. Ensures correct include paths for wgpu headers. Updates demo_effects.cc stub implementations. Finalizes test suite for sequence/effect system.
|
|
|
|
Adds missing source files and libraries for test_sequence target in CMakeLists.txt. Corrects include paths and ensures proper linking against WebGPU and GLFW libraries. All test suites now compile and pass.
|
|
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.
|
|
Adds a copy-pasteable example line to the seq_compiler usage message when run without arguments.
|
|
Fixes seq_compiler build for Windows cross-compilation. Moves common WebGPU compatibility shims to gpu.h. Applies project-wide coding style via clang-format. Verified on both macOS (native) and Windows (cross-compile).
|