-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Reverse-Z state problem #29578
Comments
Also we have state problem with Reverse Z upgrade depth inside renderer: three.js/src/renderers/WebGLRenderer.js Line 597 in 0c7cf78
BUT Three has state for that: three.js/src/renderers/webgl/WebGLState.js Line 190 in 0c7cf78
ReversedZ will broke state upgrade, because clear value will always 0 or 1. |
How could this happen? Do they have a different WebGL implementation than the browser or are still using WebGL 1?
I can agree with this and your changes in #29579. I would much prefer if |
Simple case: https://github.com/potree/potree/blob/develop/src/materials/shaders/edl.fs#L38 But in general a reverseZ must have for BIMs ( cad system ), because BIMs have billions of near placed polygons on non-normalized space( about 10000x10000 metres with step in 10sm ). Without reverseZ we to tired use hacks that reducing z-fights. |
/fyi @m-schuetz |
Description
Reverse Z PR not fully correctly implement reverse-Z.
Problem in state:
three.js/src/renderers/webgl/WebGLCapabilities.js
Line 100 in 0c7cf78
This flag applied in
capabilities
that persistent after initialisation, that is wrong due to context sharing.ThreeJS state can be flushed for some specific cases like a 1 contex for N-renderers or libs.
For ex: Three + PIXI, Three + WebXR emulator, Three+potree.
WebGLState has reset for that:
three.js/src/renderers/webgl/WebGLState.js
Line 1152 in 0c7cf78
Because clipControl is context-related three also should reset this state and change it when needed back
@CodyJasonBennett can you apply some changes and move call of clipControl into
WebGLLState
instead ofWebGLCapabilities
?@Mugen87 what you think about that?
Reproduction steps
Code
Live example
Screenshots
No response
Version
r169
Device
No response
Browser
No response
OS
No response
The text was updated successfully, but these errors were encountered: