GLSL - 立体视图的透视校正
GLSL - perspective correction for stereo view
我正在尝试修复 GLSL 中的视角 不正确
到正确
我在VS中添加了:
float gradient = 0.5;
mat4 transformGeometry = mat4(1.0, 0.0, gradient, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0);
gl_Position = mvp_matrix * transformGeometry * a_position;
我觉得结果还可以
但是向右旋转90度后,和我想象的不一样
下一次旋转90度后,看起来更糟
已解决 - 应该是
projectionMatrix * transformGeometry * modelView
而不是
MVP * transformGeometry
我正在尝试修复 GLSL 中的视角 不正确
到正确
我在VS中添加了:
float gradient = 0.5;
mat4 transformGeometry = mat4(1.0, 0.0, gradient, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0);
gl_Position = mvp_matrix * transformGeometry * a_position;
我觉得结果还可以
但是向右旋转90度后,和我想象的不一样
下一次旋转90度后,看起来更糟
已解决 - 应该是
projectionMatrix * transformGeometry * modelView
而不是
MVP * transformGeometry