diff --git a/Assets/Website/projection.frag.glsl b/Assets/Website/projection.frag.glsl index 6ad1fb2..cf93949 100644 --- a/Assets/Website/projection.frag.glsl +++ b/Assets/Website/projection.frag.glsl @@ -1,12 +1,9 @@ uniform sampler2D map; uniform float cameraIndex; - uniform float numCameras; - uniform mat4 c2wm; varying vec2 vUv; - varying float paintfordiscard; diff --git a/Assets/Website/projection.vert.glsl b/Assets/Website/projection.vert.glsl index a6fe945..946e1fd 100644 --- a/Assets/Website/projection.vert.glsl +++ b/Assets/Website/projection.vert.glsl @@ -15,11 +15,10 @@ uniform mat4 c2wm; varying vec2 vUv; - varying vec2 vUv1pxOffset; - varying float paintfordiscard; + void main() { vUv = vec2( position.x / width, position.y / height ); // -> vec2(0, 0) @@ -30,12 +29,12 @@ void main() { for (float xoff = -1.0; xoff < 2.0; xoff++) { for (float yoff = -1.0; yoff < 2.0; yoff++) { - vec2 thisUv = vUv + (vec2 (xoff, yoff) * vUv1pxOffset); - vec4 color = texture2D( map, thisUv*vec2(1.0/numCameras,(1.0/3.0))+vec2(cameraIndex/numCameras,(1.0/3.0))); - float depth = ( color.r + color.g + color.b ) / 3.0; - if (depth < 0.01) { - skipctr++; - } + vec2 thisUv = vUv + (vec2 (xoff, yoff) * vUv1pxOffset); + vec4 color = texture2D(map, thisUv*vec2(1.0/numCameras,(1.0/3.0))+vec2(cameraIndex/numCameras,(1.0/3.0))); + float depth = ( color.r + color.g + color.b ) / 3.0; + if (depth < 0.01) { + skipctr++; + } } }