Texture ID in postprocess
When working with shaders in Vizard outside of the postprocess library I can set the Texture ID using viz.setUniformInt('texture',0).
How is this done when I define a class derived from postprocess effect library? Also at what texture ID does vizpp_InputTex sit at? Seems with the postprocess examples there's never any reference to the texture ID. I need to know what the IDs of vizpp_InputTex, redTex, greenTex, and blueTex are. Beginning of my class below class warp(vizfx.postprocess.BaseShaderEffect): def _getFragmentCode(self): return """ #version 120 uniform sampler2D vizpp_InputTex; uniform sampler2D redTex; uniform sampler2D blueTex; uniform sampler2D greenTex; etc... |
You can add textures through the uniforms attribute of the effect class within the _createUniforms method. Here is a simple example:
Code:
class WarpEffect(vizfx.postprocess.BaseShaderEffect): Have a look at the Post-Process basics page in the documentation for more info: http://docs.worldviz.com/vizard/postprocess_basics.htm |
All times are GMT -7. The time now is 07:39 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC