Closed satelllte closed 2 days ago
Because all tsl elements come from three.webgpu.js if you use three.webgpu.js.
As far as I know, you could use THREE.
instead of import tsl. For example, THREE.MeshBasicNodeMaterial()
. The advantage of import tsl from three.webgpu.js is that you don't need the prefix THREE.
So tsl is an integral part of three.webgpu.js and nothing that exists alongside it.
Merging this into #29644.
We are currently trying to figure out the imports which work for both WebGPURenderer
and WebGLRenderer
. This might take a few iterations until we find the best solution.
Personally, it doesn't bother me whether it's tsl or three.webgpu.js, but the latter has the charm that it makes it clear that the nodes all come from three.webgpu.js
In my opinion, it would be useful to have all TSL nodes exported under /tsl
making sure it's backend-agnostic, while the stuff related to WebGPU can live under /webgpu
.
Description
I'm wondered why it turned out that these are the same?
https://github.com/mrdoob/three.js/blob/d35544a5c9fcb48c5020dac683c4e5ddb7f8aaf7/package.json#L18-L19
To my understanding of how WebGPU works in Three.js, I typically want to import only WebGPU-related things from
three/webgpu
(e.g.,WebGPURenderer
) while TSL-related things - fromthree/tsl
, like so:because TSL feels to me not a unique thing for WebGPU only, since TSL documentation states:
Solution
Wouldn't we want to leave only TSL things in
three/tsl
and WebGPU things inthree/webgpu
?Alternatives
N/A
Additional context
No response