Your code is applying the shader to all objects in the scene. It seems like you should be applying the shader to the quad that is rendering the rendered texture instead:
Code:
quad1.apply(InvShader)
quad1.apply(viz.addUniformInt('InputTex',0))
Also, you might want to consider using the
vizfx.postprocess library. For example, here is your script converted to use the library with the built-in inverse color effect applied:
Code:
import viz
viz.go()
#Adding WebCam
video = viz.add('VideoCamera.dle')
cam = video.addWebcam()
#Adding piazza environment to Scene2
piazza = viz.addChild('piazza.osgb')
#Adding & setting quad to Scene 2
quad2 = viz.addTexQuad()
quad2.setScale(2,1.5)
quad2.setPosition(0,2,6)
quad2.texture(cam)
#Apply inverse post-process effect
import vizfx.postprocess
from vizfx.postprocess.color import InvertColorEffect
vizfx.postprocess.addEffect(InvertColorEffect())