WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 04-05-2013, 11:37 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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())
Reply With Quote
 

Tags
multi pass, multi-pass, multipass, rendering

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rendering order? vOliver Vizard 3 09-29-2010 02:07 PM
rendering level shahramy Vizard 1 07-26-2010 12:12 PM
how to control vizard rendering shahramy Vizard 0 07-23-2010 10:50 PM
Any way to increase rendering resolution v-Salik Vizard 3 09-12-2007 04:57 PM
Texture map rendering problem JRichizzle Vizard 4 03-04-2004 07:20 AM


All times are GMT -7. The time now is 12:02 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC