Pixel Shader Asset

From COD Engine Research
Jump to: navigation, search

Modern Warfare 3 & Ghosts

struct MaterialPixelShaderProgram
{
	CgBinaryProgram *ps;	// size = size
	int size;
	const char *data;	// size = size2
	int size2;
	int unknown[2];
};
 
struct MaterialPixelShader
{
	const char *name;
	MaterialPixelShaderProgram prog;
};

Call of Duty 4 & World at War & Modern Warfare 2

struct MaterialPixelShaderProgram
{
	CgBinaryProgram *ps;
	int size;
#ifdef MW2
	char unknown[0xC];
#else
	char unknown[8];
#endif
};
 
struct MaterialPixelShader 
{
	const char *name;
	MaterialPixelShaderProgram prog;
};

Black Ops

struct MaterialPixelShaderProgram
{
	char *data;	// size = size << 2
	char unknown[2];
	unsigned __int16 size;
};
 
struct MaterialPixelShader
{
	const char *name;
	MaterialPixelShaderProgram prog;
};

Black Ops 2

struct MaterialPixelShaderProgram
{
	char *data1;	// if flag2 & 0x80: size = (size1 << 4) + 0x10
			// else: size = 0
	char *data2;	// if flag2 & 0x80:
			// 	if flag1 & 0x80: size = size1 + 0x11
			//	else: size = (size1 << 2) + 0x14
			// else: size = 0x10
	unsigned __int16 size1;
	char flag1;
	char flag2;
};
 
struct MaterialPixelShader
{
	const char *name;
	MaterialPixelShaderProgram prog;
};