Use one texture with two channels for video

This commit is contained in:
2024-11-03 13:26:01 -05:00
parent 8fdff927eb
commit b025f72604
5 changed files with 25 additions and 42 deletions
+2 -2
View File
@@ -37,13 +37,13 @@ fn vs_main(
// Fragment shader
@group(0) @binding(0)
var u_textures: binding_array<texture_2d<f32>>;
var u_texture: texture_2d<f32>;
@group(0) @binding(1)
var u_sampler: sampler;
@fragment
fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
return textureSample(u_textures[0], u_sampler, in.tex_coords);
return textureSample(u_texture, u_sampler, in.tex_coords);
// return vec4<f32>(0.3, 0.2, 0.1, 1.0);
}