-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add MaskExtension #6554
Add MaskExtension #6554
Conversation
@Pessimistress I followed the code in the other extension as well as the shadow module to implement this. One thing I would appreciate you commenting on the the maths around the offset projection. I think what I have is close, but not quite right, and I see precision errors when zoomed in close. Relevant code: https://github.com/visgl/deck.gl/pull/6554/files#diff-e7aa5378c14ee05c714d147abc0b53e860e4f422f9fc85cae7d44bb4f3e9971aR56-R93 |
fd0c04f
to
090faf0
Compare
8d17a1c
to
48d1468
Compare
48d1468
to
5c35bda
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An extension is the wrong place to hold a FBO because it is run per layer. Mask(s) are global and shared and should be implemented in an Effect, which can be executed before and after any render and inject resources into all draw calls. Since we are adding a core operation
prop it is not inappropriate to always load a MaskEffect
by default. See how shadow FBOs are handled in https://github.com/visgl/deck.gl/blob/master/modules/core/src/effects/lighting/lighting-effect.js#L62
dbee569
to
bc31e2c
Compare
For #6552
Change List
Tests & documentation in future PR, publishing this minimal WIP to gather feedback on API and to allow downstream implementation in CARTO for React