Use one texture with two channels for video
This commit is contained in:
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user