Commit 39df439e authored by Martins Upitis's avatar Martins Upitis Committed by Dalai Felinto
Browse files

More GLSL fix (correct vertical scale)

parent 6570e738
Loading
Loading
Loading
Loading
+4 −4
Changes for space_view3d_virtual_reality/oculus_dk2.glsl: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
// Oculus DK2 lens distortion shader for single eye
// shader is adapted from Oculus DK1 distortion shader by
// Lubosz Sarnecki(lubosz.wordpress.com/)a
// Lubosz Sarnecki(lubosz.wordpress.com/)

uniform sampler2D bgl_RenderedTexture;
uniform float bgl_RenderedTextureWidth;
@@ -54,9 +54,9 @@ void main()
	tcR = hmdWarp(texCoord, Scale, ScaleIn, eta.r );
	tcG = hmdWarp(texCoord, Scale, ScaleIn, eta.g );
	tcB = hmdWarp(texCoord, Scale, ScaleIn, eta.b );
    color.r = texture2D(bgl_RenderedTexture, tcR).r;
    color.g = texture2D(bgl_RenderedTexture, tcG).g;
    color.b = texture2D(bgl_RenderedTexture, tcB).b;
	color.r = texture2D(bgl_RenderedTexture, tcR*vec2(0.5,1.0)+vec2(0.25,0.0)).r;
	color.g = texture2D(bgl_RenderedTexture, tcG*vec2(0.5,1.0)+vec2(0.25,0.0)).g;
	color.b = texture2D(bgl_RenderedTexture, tcB*vec2(0.5,1.0)+vec2(0.25,0.0)).b;
	color = color * edges(tcR);

	gl_FragColor = color;