diff --git a/zoneb/bin/data/shaders/bound.frag b/zoneb/bin/data/shaders/bound.frag index d346851..00bd4e3 100644 --- a/zoneb/bin/data/shaders/bound.frag +++ b/zoneb/bin/data/shaders/bound.frag @@ -176,20 +176,21 @@ void main() { vec3 dispColor = vec3(0, 0, 0); vec4 pointCloudColor = texture(u_ofcam, st); - float maxVal = 0; - float minVal = 1; - for (int i=0; i < 9; i++){ - float tmp = texture(u_buffer1, st2 + offset[i]/2).r > 0.5 ? 1 : 0; - maxVal = max(maxVal, tmp); - minVal = min(minVal, tmp); - } + // float maxVal = 0; + // float minVal = 1; + // for (int i=0; i < 9; i++){ + // float tmp = texture(u_buffer1, st2 + offset[i]/2).r > 0.5 ? 1 : 0; + // maxVal = max(maxVal, tmp); + // minVal = min(minVal, tmp); + // } - if(maxVal - minVal >= 0.5) { - dispColor.rgb = vec3(1); - } + // if(maxVal - minVal >= 0.5) { + // dispColor.rgb = vec3(1); + // } - gl_FragColor = vec4(dispColor, 1.0); - gl_FragColor.rgb += pointCloudColor.rgb; // not good + // gl_FragColor = vec4(dispColor, 1.0); + // gl_FragColor.rgb += pointCloudColor.rgb; // not good + gl_FragColor = vec4(mix(vec3(0), pointCloudColor.rgb, pointCloudColor.a), 1.0); #endif diff --git a/zoneb/src/ofApp.cpp b/zoneb/src/ofApp.cpp index 6def3fc..a803809 100644 --- a/zoneb/src/ofApp.cpp +++ b/zoneb/src/ofApp.cpp @@ -259,10 +259,7 @@ void ofApp::drawMain() boundShader.setUniform1i("u_init", 1); boundShader.render(); boundShader.setUniform1i("u_init", 0); - for (int i = 0; i < 30; i++) - { - boundShader.render(); - } + boundShader.render(); } void ofApp::drawDebug()