Skip to content

feat(core): ViewProps.parameters#10262

Merged
ibgreen merged 3 commits intomasterfrom
ib/view-parameters
May 2, 2026
Merged

feat(core): ViewProps.parameters#10262
ibgreen merged 3 commits intomasterfrom
ib/view-parameters

Conversation

@ibgreen
Copy link
Copy Markdown
Collaborator

@ibgreen ibgreen commented Apr 28, 2026

Summary

Adds a parameters prop to deck.gl View classes so GPU draw parameters can be configured per view.

  • Adds parameters?: Parameters to CommonViewProps
  • Merges view parameters during layer rendering with precedence: Deck.parameters < View.parameters < layer/pass parameters
  • Sets GlobeView default parameters: {cullMode: 'back'} while allowing per-instance overrides
  • Documents the new View API, Deck precedence behavior, GlobeView default culling, and adds a v9.4 whats-new note

Testing

  • git diff --check
  • yarn test test/modules/core/views/view.spec.ts test/modules/core/passes/layers-pass.spec.ts
  • yarn lint
  • yarn build

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 28, 2026

Coverage Status

coverage: 83.746% (-0.002%) from 83.748% — ib/view-parameters into master

blendAlphaOperation: 'add'
}
: {};
if (getProjection(map) === 'globe') {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrisgervang @felixpalmer @charlieforward9 this would presumably no longer be needed


#### `parameters` (object, optional) {#parameters}

`GlobeView` enables back-face culling by default with `parameters: {cullMode: 'back'}`. To override this behavior, supply the desired GPU parameters to the constructor:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we should be doing this, it is a workaround. At least in the long-term we should aspire to remove this as the correct fix is to correct the shader math: #9592 (comment)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is a workaround. At least in the long-term we should aspire to remove this as the correct fix is to correct the shader math

I would agree that another solution for GlobeView specifically would be preferable, however the feature in this PR is quite orthogonal: Deck parameters < View parameters < Layer parameters, so no harm in landing it now.

@ibgreen ibgreen mentioned this pull request May 2, 2026
44 tasks
@ibgreen ibgreen merged commit 2698434 into master May 2, 2026
5 checks passed
@ibgreen ibgreen deleted the ib/view-parameters branch May 2, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants