-
Notifications
You must be signed in to change notification settings - Fork 53
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
background passthrough #2264
base: main
Are you sure you want to change the base?
background passthrough #2264
Conversation
2c29e09
to
d4f393d
Compare
d4f393d
to
ce1a4e6
Compare
8021d76
to
c37f6f6
Compare
I can't yet put my finger on exactly why, but this seems unnecessarily complicated. It may be due to the fact that there is something inelegant about |
c37f6f6
to
ff2086b
Compare
I think it's related to the fact that terrains and entities are styled with "opaque" attributes, for which the separation into background and foreground colors is only known until after scenario parse time. |
Also I'd say that some of the complication is due to #2265. |
ff2086b
to
2035ea1
Compare
@byorgey have you come up with anything? Would like to avoid incurring more rebase cost for this PR. |
I think the fundamental thing for me is that we shouldn't need to store extra information outside of What if we change Edit: more thoughts about a redesign for |
I feel like the problem is less with |
Yes, I think you're right. Though when you talk about "abandoning" the |
That's a possibility, but with the current abstraction, it would rely on respecting a convention for which attributes are allowed to specify background/foreground/both. Ideally we would enforce by construction which layer an attribute pertains to. |
Closes #1662.
This is an attempt at an alternate approach from #1672.
Comparison
Overview
This approach required threading an attribute map (
aMap
) through a lot of places. Fundamentally, it is because we need to arbitrate between an potentially entity-provided background color and a terrain-provided background color late in the rendering pipeline. We need to preserve whether that background originated from an Entity or a Terrain, so that we can prioritize the Entity.However, we also want to let the
Terrain
win if we find that, after looking up the color of theEntity
in the attribute map, theEntity
has no provided background color.Asciinema recordings
Before
After