software-mansion / software-mansion/TypeGPU

bug: A way of allowing textureLoad() in vertex shader without manual binding

Open
#2,288 2 comments 1 reaction 1 assignee View on GitHub

@reczkok is already working on this.

Since Apr 28, 2026.

bug
Dominant language
TypeScript
Stars
3.2k
Forks
122
Avg merge
3d 5h
Merged PRs (30d)
34

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.