SampleViewportFilter/SampleViewportFilter.h

SampleViewportFilter/SampleViewportFilter.h
//**************************************************************************/
// Copyright (c) 2008 Autodesk, Inc.
// All rights reserved.
//
// Use of this software is subject to the terms of the Autodesk license
// agreement provided at the time of installation or download, or which
// otherwise accompanies this software in either electronic or hard copy form.
//
//**************************************************************************/
// DESCRIPTION:
// CREATED: October 2008
//**************************************************************************/
#if defined(JAMBUILD)
#include <Mudbox/mudbox.h>
#else
#include "../../include/Mudbox/mudbox.h"
#endif
#include <Cg/cg.h>
#include <Cg/cgGL.h>
#include <vector>
using namespace mudbox;
class SampleViewPortFilter : public ViewPortFilter
{
public:
SampleViewPortFilter();
~SampleViewPortFilter();
void SetVisible( bool bVisible );
RequirementValue Requirement( void ) const { return eHDR | ePosition32 | eNormal16; };
void Process( ViewPortState & );
virtual QString Name( const ClassDesc * ) const { return "Sample Filter"; };
void OnNodeEvent(const Attribute &cAttribute, NodeEventType eType);
private:
CGcontext m_CGContext;
Texture* m_pResultTexture;
CGprogram m_BlurProgram;
CGprofile m_FragmentProfile;
CGparameter m_BlurColorTextureParam;
CGparameter m_BlurWidthParam;
CGparameter m_GaussianBlurParam;
abool m_aGaussianBlur;
afloatr m_aBlurWidth;
};