Rework aliased rasterization and path lowering to allow full hinting - #411
Merged
Conversation
Replace threshold-based aliased coverage with exact center-sampled rasterization in both the CPU and WebGPU backends, including profile-driven thin-feature recovery for fills and updated hard-clip behavior. Rename the WebGPU flatten stage to path lowering, add the new profile/tile scene data plumbing, and update related scheduling, docs, and shader bindings. The change also removes antialias-threshold plumbing, adds shared linear-geometry profile storage, refreshes text and aliasing tests/reference images, and bumps SixLabors.Fonts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
Fix #134
Replace threshold-based aliased coverage with exact center-sampled rasterization in both the CPU and WebGPU backends, including profile-driven thin-feature recovery for fills and updated hard-clip behavior. Rename the WebGPU flatten stage to path lowering, add the new profile/tile scene data plumbing, and update related scheduling, docs, and shader bindings. The change also removes antialias-threshold plumbing, adds shared linear-geometry profile storage, refreshes text and aliasing tests/reference images, and bumps SixLabors.Fonts.
Pipeline terminology and documentation updates:
src/ImageSharp.Drawing.WebGPU/Shaders/FlattenComputeShader.cs→PathLoweringComputeShader.cs, [1] [2] [3] [4]; [5] [6] [7]; [8]; [9] [10] [11]; [12] [13]; [14]; [15]Shader and pipeline binding expansions:
FineAreaComputeShader.cs, [1] [2];PathRowAllocComputeShader.cs, [3]Shader structure and field updates:
PathBboxWGSL struct and related documentation to usecoverage_datainstead ofcoverage_threshold, reflecting a more general approach to coverage adjustment. [1] [2]Configuration and shared resources:
ConfigWGSL struct to include offsets for segment-profile tag and record tables, supporting new features in the rendering pipeline.Project and solution file maintenance:
ImageSharp.Drawing.WebGPU.csprojand cleaned up the solution file. [1] [2]