Skip to content

Commit e0b21ca

Browse files
committed
Apply MaxUV after operations according to issue 10.
1 parent 8871241 commit e0b21ca

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

source/plugins/AddSubtract/AddSubtract.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ static CFFGLPluginInfo PluginInfo(
3030
);
3131

3232
static const char _vertexShaderCode[] = R"(#version 410 core
33-
uniform vec2 MaxUV;
3433
3534
layout( location = 0 ) in vec4 vPosition;
3635
layout( location = 1 ) in vec2 vUV;
@@ -40,7 +39,7 @@ out vec2 uv;
4039
void main()
4140
{
4241
gl_Position = vPosition;
43-
uv = vUV * MaxUV;
42+
uv = vUV;
4443
}
4544
)";
4645

source/plugins/AddSubtract/Reprojection.hlsl

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ uniform sampler2D InputTexture;
44
uniform vec3 Rotation;
55
66
in vec2 uv;
7+
uniform vec2 MaxUV;
78
out vec4 fragColor;
89
uniform int inputProjection, outputProjection, width, height;
910
uniform float fovOut, fovIn;
@@ -237,6 +238,9 @@ void main()
237238
fragColor = TRANSPARENT_PIXEL;
238239
return;
239240
}
241+
// Applying the MaxUV after our opterations fixes the "seam" from
242+
// https://github.com/DanielArnett/360-VJ/issues/10
243+
sourcePixel *= MaxUV;
240244
// Set the color of the destination pixel to the color of the source pixel
241245
fragColor = texture( InputTexture, sourcePixel );
242246
}

0 commit comments

Comments
 (0)