diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-21 08:42:13 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-21 08:42:13 +0100 |
| commit | 25dc87528915fb0fd89181333324b215d77ad014 (patch) | |
| tree | 5994db01a9d68a8d4166fa9ee5058c2b793b9795 /doc | |
| parent | fc40d39ac302fae6f5fe726c6bc077f53580c052 (diff) | |
refactor(wgsl): Factorize getScreenCoord helper
Factorizes the screen coordinate calculation from scene1.wgsl into a reusable getScreenCoord function in common/shaders/math/common_utils.wgsl.
This improves code reuse and simplifies fragment shaders.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/COMPLETED.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/COMPLETED.md b/doc/COMPLETED.md index 72e389d..0dba307 100644 --- a/doc/COMPLETED.md +++ b/doc/COMPLETED.md @@ -29,6 +29,16 @@ Detailed historical documents have been moved to `doc/archive/` for reference: Use `read @doc/archive/FILENAME.md` to access archived documents. +## Recently Completed (February 21, 2026) + +- [x] **WGSL Refactor: getScreenCoord Helper** + - **Goal**: Factorize boilerplate screen coordinate calculation into a reusable helper function. + - **Implementation**: + - Created `getScreenCoord(p, resolution)` function in `common/shaders/math/common_utils.wgsl`. It takes a fragment position and resolution, and returns aspect-corrected normalized device coordinates. + - Updated `workspaces/main/shaders/scene1.wgsl` to `#include "math/common_utils.wgsl"` and replaced the manual coordinate calculation with a call to the new helper. + - **Impact**: Reduces code duplication and simplifies fragment shaders. + - **Files**: `common/shaders/math/common_utils.wgsl`, `workspaces/main/shaders/scene1.wgsl`. + ## Recently Completed (February 20, 2026) - [x] **Port Scene1Effect + Fix seq_compiler Timing Bug** |
