-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render a simple triangle #4
Comments
AlexandruIca
added a commit
that referenced
this issue
Dec 18, 2021
A simple function that fits a point to a grid of `WIDTH * HEIGHT * NUM_CHANNELS`, with `pixel_size * pixel_size` subpixels
AlexandruIca
added a commit
that referenced
this issue
Dec 18, 2021
AlexandruIca
added a commit
that referenced
this issue
Dec 18, 2021
AlexandruIca
added a commit
that referenced
this issue
Dec 18, 2021
For easier access to the buffer's colors.
AlexandruIca
added a commit
that referenced
this issue
Dec 18, 2021
AlexandruIca
added a commit
that referenced
this issue
Dec 18, 2021
AlexandruIca
added a commit
that referenced
this issue
Dec 18, 2021
Failed, but will come back after working on other issues first.
AlexandruIca
added a commit
that referenced
this issue
Feb 11, 2022
AlexandruIca
added a commit
that referenced
this issue
Feb 11, 2022
The code is now much more modular/reusable, more to come!
AlexandruIca
added a commit
that referenced
this issue
Feb 13, 2022
AlexandruIca
added a commit
that referenced
this issue
Feb 13, 2022
AlexandruIca
added a commit
that referenced
this issue
Feb 13, 2022
So that it's much easier to see if rendering is done correctly or not.
AlexandruIca
added a commit
that referenced
this issue
Mar 10, 2022
AlexandruIca
added a commit
that referenced
this issue
Mar 10, 2022
AlexandruIca
added a commit
that referenced
this issue
Mar 10, 2022
AlexandruIca
added a commit
that referenced
this issue
Mar 10, 2022
AlexandruIca
added a commit
that referenced
this issue
Mar 10, 2022
AlexandruIca
added a commit
that referenced
this issue
Apr 3, 2022
This function clamps each color's RGB channel to the range [0.0, 1.0]
AlexandruIca
added a commit
that referenced
this issue
Apr 3, 2022
`geometry.rs` (#4) We'll have to see what we do with this file, currently we don't need it, but it would be nice to transfer some stuff from `canvas.rs` into here.
AlexandruIca
added a commit
that referenced
this issue
Apr 3, 2022
Unfortunately we have a bug where we can't specify the limits to be `WIDTH` and `HEIGHT` because we get an out-of-bounds error.
AlexandruIca
added a commit
that referenced
this issue
Apr 3, 2022
AlexandruIca
added a commit
that referenced
this issue
Apr 3, 2022
The old algorithm was a bit too complex to implement correctly. I was stuck with the coverage computation, I just couldn't find a way to compute the trapezoidal area correctly and robustly. Being tired, I decided to follow `font-rs`'s choice of line rendering algorithm with Levien-style anti-aliasing. It gives excellent results and (at least at first) seems kind of easy to understand. I'll have to see how I can implement the even-odd fill rule with this one. Right now I'm thinking about checking when the coverage changes its sign, but I don't know if that's the correct way, we'll see.
AlexandruIca
added a commit
that referenced
this issue
Apr 3, 2022
AlexandruIca
added a commit
that referenced
this issue
Apr 3, 2022
This tests the non-zero fill rule with rects inside rects.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Follow the algorithm presented here and render a simple triangle for the start. Maybe add a post-processing ability to take into account color spaces. Ideally we should also take into account alpha compositing but it's ok if it's not fully correct for now.
CanvasConfig
shouldn't be taking the number of channels as a parameter #7The text was updated successfully, but these errors were encountered: