Only blit useful part of the stream

With odd image size, encoders may add black borders. We need to properly
ignore it on the headset side
This commit is contained in:
Patrick Nicolas
2022-11-28 22:35:10 +01:00
committed by Guillaume Meunier
parent 21311baf8e
commit b1cb28200d
3 changed files with 26 additions and 6 deletions
+6 -2
View File
@@ -20,6 +20,10 @@
#version 450
#ifdef VERT_SHADER
layout (constant_id = 0) const float useful_size_x = 1.0;
layout (constant_id = 1) const float useful_size_y = 1.0;
vec2 positions[3] = vec2[](
vec2(-1.0, -1.0),
vec2(3.0, -1.0),
@@ -27,8 +31,8 @@ vec2 positions[3] = vec2[](
vec2 uvs[3] = vec2[](
vec2(0.0, 0.0),
vec2(2.0, 0.0),
vec2(0.0, 2.0));
vec2(2.0 * useful_size_x, 0.0),
vec2(0.0, 2.0 * useful_size_y));
layout(location = 0) out vec2 outUV;