clean syntax in shader files
This commit is contained in:
parent
c20caf803c
commit
f19ce6219c
@ -1,12 +1,9 @@
|
||||
uniform sampler2D map;
|
||||
uniform float cameraIndex;
|
||||
|
||||
uniform float numCameras;
|
||||
|
||||
uniform mat4 c2wm;
|
||||
|
||||
varying vec2 vUv;
|
||||
|
||||
varying float paintfordiscard;
|
||||
|
||||
|
||||
|
@ -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)
|
||||
@ -31,7 +30,7 @@ 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)));
|
||||
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++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user