Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[WIP] Precise transformed primitive edge extrusion for AA #2263
Conversation
|
I like the idea, I think it's worth having. I don't really want to bring back the |
|
@glennw my main concern about dynamic branching would be that there is quite a bit of arithmetic-heavy code in the branch, so it will consume register space and penalize occupation of our vertex shaders. |
|
That's a fair concern - can we profile to try and get some numbers on what effect it has? |
|
|
|
@kvark Do we want to keep this one open for now? |
|
I'll need to revive it... |
|
Should we close this until you have time to revive it? |
kvark commentedJan 5, 2018
•
edited by larsbergstrom
What
Includes #2254
Implemented a new code path for transformed vertex shaders:
FIXED_EDGE_EXTRUSION. Defining it as(2.0)makes the behavior unchanged to what we have now. Undefining it makes the vertex shaders to compute edge extrusion dynamically, which handles non-trivial transformation cases of scaling/perspective. A reftest is added to demonstrate it.Also includes a change (that was meant to go as a separate PR, and can still be moved out) that only applies extrusion to edges that are meant to have AA enabled. Unfortunately, this also requires a few fixes in both Rust and GLSL code to make sure we pass those flags correctly, since the semantics is changed a bit (or, rather, by 4 bits).
TODO
WR_FEATURE_TRANSFORMback to affect brushes? (currently, the brush vertex shaders are unconditionally transform-enabled.Example
Left - new path. Right - old path. Notice the lack of vertical light-red edge.

This change is