fix(iced-video): Write the conversion matrix buffer so the video actually shows up
This commit is contained in:
@@ -19,16 +19,12 @@ fn vs_main(
|
||||
@group(0) @binding(0) var y_texture: texture_2d<f32>;
|
||||
@group(0) @binding(1) var uv_texture: texture_2d<f32>;
|
||||
@group(0) @binding(2) var texture_sampler: sampler;
|
||||
@group(0) @binding(3) var<uniform> rgb_primaries: mat4x4<f32>;
|
||||
@group(0) @binding(3) var<uniform> rgb_primaries: mat3x3<f32>;
|
||||
|
||||
@fragment
|
||||
fn fs_main(input: VertexOutput) -> @location(0) vec4<f32> {
|
||||
let y = textureSample(y_texture, texture_sampler, input.tex_coords).r;
|
||||
let uv = textureSample(uv_texture, texture_sampler, input.tex_coords).rg;
|
||||
let yuv = vec4f(y, uv, 0);
|
||||
let rgb = rgb_primaries * yuv;
|
||||
return vec4f(rgb.r, rgb.g, rgb.b, 1.0);
|
||||
// let rgb = rgb_primaries * yuv;
|
||||
// return vec4f(rgb, 1.0);
|
||||
let yuv = vec3f(y, uv);
|
||||
return vec4f(yuv * rgb_primaries, 1.0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user