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

Implement support for WEBGL_depth_texture extension #2856

Closed
mvaligursky opened this issue Feb 11, 2021 · 4 comments
Closed

Implement support for WEBGL_depth_texture extension #2856

mvaligursky opened this issue Feb 11, 2021 · 4 comments
Assignees
Labels
area: graphics Graphics related issue performance Relating to load times or frame rate

Comments

@mvaligursky
Copy link
Contributor

At the moment on WebGl1 platforms, we re-render World layer to a Depth texture to give post-processing and similar give access to scene's depth.

WebGl1 implements mentioned WEBGL_depth_texture extension: https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/

and based on this, we can pretty much take it for granted on all devices:
https://webgl2fundamentals.org/webgl/lessons/webgl1-to-webgl2.html

This could be a considerable performance gain in some cases.

Note - it's not supported by IE11 .. we can keep the old path for this, or we can perhaps disable any post-effects that require depth.

@mvaligursky mvaligursky added performance Relating to load times or frame rate area: graphics Graphics related issue labels Feb 11, 2021
@Maksims
Copy link
Collaborator

Maksims commented Feb 11, 2021

or we can perhaps disable any post-effects that require depth.

This would make development and debugging for users a difficulty. Not all users have access to IE11, also in engine, pretty much all features have a fallback, so this very likely shouldn't be an exception. If fallback has a slow path - that is different story, but at least it works as expected.

@mvaligursky
Copy link
Contributor Author

I just checked on iOS 14.5, and WEBGL_depth_texture is supported there - we should definitely use it there.

@mvaligursky
Copy link
Contributor Author

This is less relevant with the release of iOS 15, which supports WebGl2 and hence the extension is no longer required.

@willeastcott
Copy link
Contributor

Let's close then...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue performance Relating to load times or frame rate
Projects
None yet
Development

No branches or pull requests

3 participants