feat: replace shaders with TSL equivalent#2764
Draft
HoloTheDrunk wants to merge 3 commits into
Draft
Conversation
deb83d9 to
42f3f0b
Compare
Contributor
|
@HoloTheDrunk #2612 simplifies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
Early draft, missing a lot of implementation. This is exploratory work largely meant for discussion rather than direct inclusion into iTowns.
Description
Attempts to replace the different shaders used within iTowns with equivalent TSL variants to smoothen the addition of WebGPU support.
Motivation and Context
Maintaining two different versions of every shader in GLSL and WGSL would increase maintenance work to keep them coherent, not to mention the different features supported by WebGL and WebGPU. Having a single source of truth will help avoid this issue.
We also benefit from taking a good look at the shaders and what's really necessary, hopefully allowing us to make the shader code much simpler.
Note
It's important to keep in mind that TSL is still a nascent evolution of Three.js that will likely undergo significant changes over time, so its current shortcomings (like documentation and error reporting) will have been improved upon by the time we can fully transition to WebGPU being a primary target (if that day ever comes).