-
-
Notifications
You must be signed in to change notification settings - Fork 35.9k
WebGLRenderer: Move ReversedCoordinateSystem
to camera.reversedDepth
#31391
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
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
Good. I support this change. The depth range or depth mapping is reversed, not the coordinate system. My question is, why is it not sufficient to simply set |
The renderer could even set the property internally and update the |
@sunag We have a nomenclature inconsistency...
For consistency, I'd select |
This is misinformed. Read the above; it does more than reverse the depth range. Further, the behavior is similar to I would suggest reverting my PR or removing the WebGL implementation entirely if I keep finding this feature broken because people are confused or APIs are simply incompatible. It was my hope that |
I never thought that the term coordinate systems should only cover the clipping range as I referred to in the PR about paths #26140, its use is more comprehensive and involves the framebuffer coordinates, the threejs coordinate system enumeration is more related to gpuweb/gpuweb#416, this is seen in the code relationship with other components including TSL. |
More simply, I really don't like the API options here or the invalid configurations that are now allowed. I think my fixes should be reverted (meaning #31370 and, of course, #31391), and we lean on TSL to hide the tension in the future. I have explained everything topically in excruciating detail, hoping that it would provide some reference. Please read it if this is to be continued. |
I agree that However, I also understand the confusion that the property But isn't that something that we could clarify in the documentation? Meaning using a reverse depth buffer only makes sense in the We could also argue as follows: If Besides, it seems at least on the Chrome side having WebGPU compatibility mode seems more preferable than supporting both WebGPU and WebGL in the long term. When the WebGL fallback in |
Can you explain to me how you came to the conclusion that this is any different from WebGL or WebGPU coordinate systems from the camera or renderer? Is it literally just viewport Y? That is not strictly a coordinate system, but why don't we flip that also for completeness sake? Is that worth having a divergent and quite fragile API to entertain a useless, if not outright wrong, attempt at pedantics at the cost of sweeping breaking changes? Had anyone read any of the literature myself and others have created on this topic? I just can't continue this alone anymore. We need people who actually use three.js and have empathy for users and the foresight to anticipate the tension it is putting on critical core API. This has been the epitome of actively harmful bike shedding, and I have a moral obligation to reduce that where I can. I can't be the only one alarmed by the growing divergence three is creating here, to where I am motivated to remove this feature completely from three until 'optionally' is no longer there. I ask that this is stripped down to where it was before as a renderer parameter, and for anything more complex, rely on TSL to bridge the gap. Otherwise, remove it. I will not be supporting this feature with the resistance I've seen all around. It's not worth the time or effort. |
For posterity, my changes were merged prematurely as a WIP. That should be reverted immediately and continued for correctness. I left reviewer notes and comments, and this was one of the outstanding issues. Variance depth being more problematic for the visualizer, perhaps fixed by proper clearing. I don't think a single word of mine has been read, just seeing the regressions and complete lack of regard in all threads. I leave this for someone else to champion and will invest time elsewhere should I continue with three. |
Uh oh! Was your PR marked as Draft PR? We use that as signal from the developer. Edit: @CodyJasonBennett I've used Gemini to format (add paragraphs) to your posts. They're really hard to read for me otherwise. |
I feel like this should just be a property of the renderer. And... Instead of modifying Can an already created |
I guess #31410 goes in those lines already. |
@CodyJasonBennett Is this perhaps what you were going for...?
Edit: I just saw #31370 (comment) (which I hard to format too...) |
@CodyJasonBennett Trying to read all the threads on this issue... Any chance you can summarize here what you think should be changed in the current code in |
Related issue: #31370
Description
camera.coordinateSystem
andrenderer.coordinateSystem
are properties that are intended to guide other components of three.js like addons and TSL to work on different backends, which is preferable in order to reduce the number of possible checks.