#ifndef _vp2BlinnShader
#define _vp2BlinnShader
// ==========================================================================
// Copyright 2015 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.
// ==========================================================================
#include <maya/MPxHardwareShader.h>
#include <maya/MRenderProfile.h>
class vp2BlinnShader : public MPxHardwareShader
virtual ~vp2BlinnShader();
virtual MStatus compute( const MPlug&, MDataBlock& );
// VP1 profile. Just leave as unsupported hardware profile
// as sample code.
virtual const MRenderProfile & profile()
static MRenderProfile sProfile;
if(sProfile.numberOfRenderers() == 0)
return sProfile;
// Swatch rendering. Called irregardless of VP1 or VP2.
virtual MStatus renderSwatchImage( MImage & image );
static void * creator();
static MStatus initialize();
static MTypeId id;
// Attributes
static MObject aColor;
static MObject aTransparency;
static MObject aDiffuse;
static MObject aDiffuseColor;
static MObject aSpecularColor;
static MObject aSpecularRolloff;
static MObject aEccentricity;
static MObject aNonTexturedColor;
static MObject aNonTexturedTransparency;
#endif /* _vp2BlinnShader */