aboutsummaryrefslogtreecommitdiff
path: root/mayaPlug/shaveBackgroundShader.h
blob: 0e32a5af70481955734a44d4611448c18f097f12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#ifndef shaveBackgroundShader_h
#define shaveBackgroundShader_h
// Shave and a Haircut
// (c) 2019 Epic Games
// US Patent 6720962

#include <maya/MPxNode.h>
#include <maya/MString.h>
#include <maya/MTypeId.h>


class shaveBackgroundShader : public MPxNode
{
	//******************************************************
	//
	//	Creation & Initialization Methods
	//
	//******************************************************
public:
						shaveBackgroundShader();
	virtual				~shaveBackgroundShader();
	static  void *		creator();
	static  MStatus		initialize();


	//******************************************************
	//
	//	Overloaded MPxNode Methods
	//
	//******************************************************
public:
	virtual MStatus		compute(const MPlug&, MDataBlock&);
	virtual void		postConstructor();
#if MAYA_API_VERSION >= 201600
	virtual SchedulingType	schedulingType() const { return kUntrusted; }
#endif


	//******************************************************
	//
	//	Member Variables
	//
	//******************************************************
	public:
	static  MTypeId			id;
	static  const MString	nodeTypeName;


	//******************************************************
	//
	//	Attributes
	//
	//******************************************************
public:
	static	MObject	aBackgroundSampler;
	static	MObject	aIncludeBackfacing;

	static	MObject	aLightDataArray;
	static	MObject		aLightDirection;
	static	MObject		aLightIntensity;
	static	MObject		aLightAmbient;
	static	MObject		aLightDiffuse;
	static	MObject		aLightSpecular;
	static	MObject		aLightShadowFraction;
	static	MObject		aPreShadowIntensity;
	static	MObject		aLightBlindData;

	static	MObject	aMatrixEyeToWorld;
	static	MObject	aNormalCamera;
	static	MObject	aObjectId;
	static	MObject	aOldShader;
	static	MObject	aOutColor;
	static	MObject	aOutMatteOpacity;
	static	MObject	aOutTransparency;

#ifdef _DEBUG
	static	MObject	aPixelCenter;
	static	MObject		aPixelCenterX;
	static	MObject		aPixelCenterY;
#endif

	static	MObject	aPointWorld;
	static	MObject	aRayDepth;
	static	MObject	aRayDirection;
	static	MObject	aRayOrigin;
};

#endif