-
Notifications
You must be signed in to change notification settings - Fork 2.2k
For discussion: remove withParametersWebGL #8731
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
base: master
Are you sure you want to change the base?
Conversation
17c9844 to
a9eaaca
Compare
| viewport: Viewport | ||
| ): LayerParameters { | ||
| return layer.props.parameters; | ||
| const {getPolygonOffset} = layer.props; |
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.
I wonder if we should have deprecated getPolygonOffset in v9. It is strange that it is called and accessor in the docs, but is in fact a roundabout way of setting GPU parameters.
Is there any reason to keep the function? I think it would be clearer to pass depthBias(SlopeScale) in props.parameters. In addition if depthBias is passed in props.parameters it will be overwritten even if getPolygonOffset isn't specified.
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.
I certainly agree that it should not be called an "accessor" if that is really the case, as accessors operate on data rows and this function operates on a layer.
We can still deprecate a function at any time. But I believe the functionality of being able to adjust depth bias based on layer index is needed to address Z fighting so we can't just drop it, we need to have a replacement for this function.
| layerParam.layerParameters = { | ||
| ...DEFAULT_PARAMETERS, | ||
| ...layer.context.deck?.props.parameters, | ||
| ...layer.props.parameters, |
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.
Just an idea: would it be useful if props.parameters could also accept a function to allow the application to control the final parameters? By passing in the Pass the Layer could have more control:
new Layer({
...,
parameters: (pass: Pass, parameters: Parameters): Parameters {...}
})0a083b6 to
eb85da3
Compare
Needs
Change List
withParametersWebGLandsetParametersWebGLfrom coreprops.parametersandPass.getLayerParameters