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

请问remapGLPositionZ的作用什么 #72

Closed
InJoins opened this issue Oct 19, 2019 · 2 comments
Closed

请问remapGLPositionZ的作用什么 #72

InJoins opened this issue Oct 19, 2019 · 2 comments

Comments

@InJoins
Copy link

InJoins commented Oct 19, 2019

是因为什么硬件不兼容吗?
能否说说加入这个函数的意义和为什么加入了这个函数的细节原因吗?

PS:用TS改写,然后用开源方式和引擎用户交互,谢谢你们的贡献!

@GuoLei1990
Copy link
Contributor

这个函数是为了兼容 webgl的Z深度标准 DX的标准是0到1 opengl/webgl 是-1到1 我们的投影矩阵采用0到1的标准 所以需要准换再输出到webgl 这个函数就是这个目的。 LayaAir未来的设计是兼容多种图形API (例如webgpu),会隐藏该函数和任何图形Api差异造成的内部转换,目前这部分的设计尚未完善 ,需要开发者手动调用转化Z深度

@InJoins
Copy link
Author

InJoins commented Oct 19, 2019 via email

@InJoins InJoins closed this as completed Oct 19, 2019
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

No branches or pull requests

2 participants