2013-10-07 14:02:24 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2013-10-07 14:02:24 +00:00
|
|
|
|
|
|
|
// all constant buffer attributes must be 16 bytes aligned, so this are the only allowed components:
|
|
|
|
typedef float float4[4];
|
|
|
|
typedef u32 uint4[4];
|
2013-10-07 17:04:03 +00:00
|
|
|
typedef s32 int4[4];
|
2013-10-07 14:02:24 +00:00
|
|
|
|
|
|
|
struct PixelShaderConstants
|
|
|
|
{
|
2013-10-10 18:26:41 +00:00
|
|
|
int4 colors[4];
|
|
|
|
int4 kcolors[4];
|
2013-10-10 18:36:55 +00:00
|
|
|
int4 alpha;
|
2013-10-07 14:02:24 +00:00
|
|
|
float4 texdims[8];
|
2013-11-23 19:58:24 +00:00
|
|
|
int4 zbias[2];
|
2013-10-07 14:02:24 +00:00
|
|
|
float4 indtexscale[2];
|
2013-10-10 19:09:00 +00:00
|
|
|
int4 indtexmtx[6];
|
2013-10-27 12:10:00 +00:00
|
|
|
int4 fogcolor;
|
|
|
|
float4 fog[2];
|
2013-10-07 14:02:24 +00:00
|
|
|
|
|
|
|
// For pixel lighting
|
2013-10-27 12:57:40 +00:00
|
|
|
int4 plight_colors[8];
|
|
|
|
float4 plights[32];
|
2013-10-27 13:07:13 +00:00
|
|
|
int4 pmaterials[4];
|
2013-10-07 14:02:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct VertexShaderConstants
|
|
|
|
{
|
|
|
|
float4 posnormalmatrix[6];
|
|
|
|
float4 projection[4];
|
2013-10-27 13:07:13 +00:00
|
|
|
int4 materials[4];
|
2013-10-27 12:57:40 +00:00
|
|
|
int4 light_colors[8]; // 8 lights
|
|
|
|
float4 lights[32]; // 8 lights * 4 parameters
|
2013-10-07 14:02:24 +00:00
|
|
|
float4 texmatrices[24];
|
|
|
|
float4 transformmatrices[64];
|
|
|
|
float4 normalmatrices[32];
|
|
|
|
float4 posttransformmatrices[64];
|
|
|
|
float4 depthparams;
|
|
|
|
};
|