diff options
Diffstat (limited to 'GEMINI.md')
| -rw-r--r-- | GEMINI.md | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -40,7 +40,7 @@ # Load these only for historical context or debugging: # # Completion History: -# @doc/COMPLETED.md - Detailed milestone history +# Use: "read @doc/COMPLETED.md" for detailed history # # Technical Investigations: # @doc/GPU_EFFECTS_TEST_ANALYSIS.md @@ -85,12 +85,12 @@ IMPORTANT: <active_constraints> - **Skybox Pipeline**: Requires `depthWriteEnabled = WGPUOptionalBool_False` and `depthCompare = WGPUCompareFunction_Always` for Pass 1. - - **Asset Safety**: All assets must use `alignas(16)` and a null-terminator for safe C-string/float casting. + - **Asset Safety**: All assets must use `alignas(16)` and a null-terminator for safe C-string/float casting.\ - **BVH Alignment**: `BVHNode` must be 32-byte aligned for GPU efficiency. - **WGSL Traversal**: BVH traversal in shaders must be stack-based (no recursion allowed). - **SDF Scale Safety**: `map_scene` must use conservative minimum scale (`min(scale_x, min(scale_y, scale_z))`) to prevent distance field overstepping. - **WGPU String Safety**: On macOS/Darwin, dynamically composed shader strings MUST use the `str_view()` helper to ensure `WGPUStringView` compatibility (passing pointer AND length) to prevent validation errors. - - **Shader Modularization**: Use `#include "snippet_name"` in WGSL. Snippet names must match keys registered in `InitShaderComposer` (case-sensitive, usually folder/name without extension). + - **Shader Modularization**: Use `#include \"snippet_name\"` in WGSL. Snippet names must match keys registered in `InitShaderComposer` (case-sensitive, usually folder/name without extension). - **Platform Defines**: `CMakeLists.txt` MUST include platform-specific defines (e.g., `-DGLFW_EXPOSE_NATIVE_COCOA`) for `glfw3webgpu` to function. - **Render Pass Config**: `WGPUSurfaceConfiguration` must have `usage = WGPUTextureUsage_RenderAttachment` to avoid validation errors. - **Render Pass Init**: `WGPURenderPassColorAttachment` structs must have unused fields (like `resolveTarget`) explicitly set to `nullptr` to avoid validation errors. @@ -100,7 +100,7 @@ IMPORTANT: - **ShaderComposer**: Singleton using `std::map<std::string, std::string>` for snippets; `Compose` supports recursive resolution and cycle detection via `std::set`. - **BVH Construction**: Rebuilt every frame on CPU via recursive midpoint split along the axis of largest variance; linearized into a `std::vector<BVHNode>`. - **Mac-Specific WGPU**: `WGPUShaderSourceWGSL` in the current header version expects a `WGPUStringView` struct for the `code` field, not a raw pointer. - - **Physics Strategy**: "Proxy Point Probing" uses object corners/center as probes tested against neighbor analytical SDFs for narrow-phase resolution and normal calculation. + - **Physics Strategy**: \"Proxy Point Probing\" uses object corners/center as probes tested against neighbor analytical SDFs for narrow-phase resolution and normal calculation. </key_knowledge> <artifact_trail> @@ -111,7 +111,7 @@ IMPORTANT: - `src/gpu/effects/shaders.cc`: Updated `InitShaderComposer` to register the new granular snippet library. - `src/3d/renderer.cc`: Refactored `create_pipeline` and `create_skybox_pipeline` to use internal `#include` instead of C++ side dependency injection. - `src/gpu/gpu.cc`: Fixed `g_surface` assertion and render pass validation errors by correcting initialization. - - `CMakeLists.txt`: Added platform-specific defines for `glfw3webgpu`. + - `CMakeLists.txt`: Added platform-specific defines for `glfw3webgpu`.\ </artifact_trail> <recent_actions> @@ -129,3 +129,8 @@ IMPORTANT: 5. [TODO] Task #39: Visual Debugging System (BVH and Physics visualization). </task_state> </state_snapshot> +--- End of Context from: GEMINI.md --- +Rules: +- Concise answers only +- No explanations unless asked +- Max 100 tokens per reply
\ No newline at end of file |
