aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-05-01 15:03:10 +0200
committerdec05eba <dec05eba@protonmail.com>2020-05-01 15:03:10 +0200
commit479d55de50906464fa993859ec877ef652131236 (patch)
treed362bc7c4128ca8fc74e9078e1b6b8162d610038 /src
parent106472071d1777ca0907c72424fbcb47784ce717 (diff)
Show video forward as set by steamvr, instead of showing it backwards
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 8f53ade..09151f6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1129,8 +1129,9 @@ bool CMainApplication::CreateAllShaders()
"out vec2 v2UVcoords;\n"
"void main()\n"
"{\n"
- " v2UVcoords = v2UVcoordsIn * vec2(0.5, 1.0) + vec2(texture_offset_x, 0.0);\n"
- " gl_Position = matrix * (position + vec4(position_offset, 0.0));\n"
+ " v2UVcoords = vec2(1.0 - v2UVcoordsIn.x, v2UVcoordsIn.y) * vec2(0.5, 1.0) + vec2(texture_offset_x, 0.0);\n"
+ " vec4 inverse_pos = vec4(position.x, position.y, -position.z, position.w);\n"
+ " gl_Position = matrix * (inverse_pos + vec4(position_offset, 0.0));\n"
"}\n",
// Fragment Shader