Skip to content
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

支持 polygonOffset #189

Closed
xiaoiver opened this issue May 21, 2024 · 2 comments
Closed

支持 polygonOffset #189

xiaoiver opened this issue May 21, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@xiaoiver
Copy link
Contributor

xiaoiver commented May 21, 2024

目前 polygonOffset 为 boolean,开启后设置固定值:

gl.polygonOffset(1, 1);
截屏2024-05-21 上午10 50 31

需要支持 factor units 可配置:

void gl.polygonOffset(factor, units);

https://developer.mozilla.org/zh-CN/docs/Web/API/WebGLRenderingContext/polygonOffset
https://www.w3.org/TR/webgpu/#dom-gpudepthstencilstate-depthbias

@xiaoiver xiaoiver self-assigned this May 21, 2024
@xiaoiver xiaoiver added the enhancement New feature or request label May 21, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: Support polygonOffset

Currently polygonOffset is boolean. Set a fixed value after it is turned on:

gl.polygonOffset(1, 1);

Need to support factor units configurable:

void gl.polygonOffset(factor, units);

https://developer.mozilla.org/zh-CN/docs/Web/API/WebGLRenderingContext/polygonOffset

@xiaoiver
Copy link
Contributor Author

这样可以为 z-fighting 问题提供一种解决方案:
antvis/G#1688

xiaoiver added a commit that referenced this issue May 21, 2024
* fix: support polygonOffsetFactor and units #189

* chore: commit changeset

* chore: add polygon offset example
xiaoiver added a commit that referenced this issue May 21, 2024
* Support polygonOffset factor and units (#190)

* fix: support polygonOffsetFactor and units #189

* chore: commit changeset

* chore: add polygon offset example

* chore(release): bump version (#191)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants