You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is also just a minor problem. I have an unsignedIntType THREE.RedIntegerFormat dataTexture and i assign it to a wgslFn. I chose <u32> as the format and also tested <i32>. I got the information from the webgpu shading language manual.
Unfortunately this doesn't work and warnings appear in the console. I created a codePen and attached a code snippet here. It just seems to be an internal type mismatch, but I'm just guessing.
Reproduction steps
create an UnsignedIntType data texture
assign the data texture to a wgslFn
try to include the texture in the wgslFn with texture_2d<u32> or texture_2d<i32>
I guess something like this is necessary here in case RedFormat:
case UnsignedIntType:
formatGPU = GPUTextureFormat.R32Uint;
break;
R32Uint is already defined in WebGPUConstants.js
What is not yet clear to me is where I would have to add texture_2d<u32>. I'm guessing in WebGPUTexturePassUtils.js, because I see texture_2d<f32> there.
@sunag I'm glad if it helps. I'm trying to understand three.js better.
If it's a more extensive matter like you write, no stress. Until then, I'll provisionally use a rgba floattype data texture in which I only use the r channel. It's not as elegant and robust as a redInteger texture but it works.
Description
I think this is also just a minor problem. I have an unsignedIntType THREE.RedIntegerFormat dataTexture and i assign it to a wgslFn. I chose
<u32>
as the format and also tested<i32>
. I got the information from the webgpu shading language manual.Unfortunately this doesn't work and warnings appear in the console. I created a codePen and attached a code snippet here. It just seems to be an internal type mismatch, but I'm just guessing.
Reproduction steps
texture_2d<u32>
ortexture_2d<i32>
Code
Live example
https://codepen.io/Spiri0/pen/XWQmoLV?editors=0010
Screenshots
No response
Version
161
Device
No response
Browser
No response
OS
No response
The text was updated successfully, but these errors were encountered: