While i can do the following to be able to do a textureLoad in the vertex shader:
const heightTexture = root["~unstable"].createTexture({
size: [GRID_W, GRID_H],
format: "r32float"
}).$usage("sampled");
heightTexture.write(heights);
const heightLayout = tgpu.bindGroupLayout({
heights: {
texture: d.texture2d(d.f32),
sampleType: 'unfilterable-float'
}
});
const heightGroup = root.createBindGroup(heightLayout, { heights: heightTexture });
...trying to do the same with automatic binding using heightTexture.createView() fails like this:
None of the supported sample types (UnfilterableFloat) of [Texture "heightTexture"] match the expected sample types (Float).
- While validating entries[0] against { binding: 0, visibility: ShaderStage::(Vertex|Fragment|Compute), texture: {sampleType: TextureSampleType::Float, viewDimension: TextureViewDimension::e2D, multisampled: 0} }.
- While validating [BindGroupDescriptor ""pipeline - Automatic Bind Group & Layout""] against [BindGroupLayout "pipeline - Automatic Bind Group & Layout"]
- While calling [Device].CreateBindGroup([BindGroupDescriptor ""pipeline - Automatic Bind Group & Layout""]).
TypeGPU version: 0.10.2
While i can do the following to be able to do a
textureLoadin the vertex shader:...trying to do the same with automatic binding using
heightTexture.createView()fails like this:TypeGPU version: 0.10.2