2013-10-07 16:02:24 +02:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2014-02-10 13:54:46 -05:00
|
|
|
#pragma once
|
2013-10-07 16:02:24 +02: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 19:04:03 +02:00
|
|
|
typedef s32 int4[4];
|
2013-10-07 16:02:24 +02:00
|
|
|
|
|
|
|
struct PixelShaderConstants
|
|
|
|
{
|
2013-10-10 20:26:41 +02:00
|
|
|
int4 colors[4];
|
|
|
|
int4 kcolors[4];
|
2013-10-10 20:36:55 +02:00
|
|
|
int4 alpha;
|
2013-10-07 16:02:24 +02:00
|
|
|
float4 texdims[8];
|
2013-11-23 20:58:24 +01:00
|
|
|
int4 zbias[2];
|
2014-01-29 15:52:24 +01:00
|
|
|
int4 indtexscale[2];
|
2013-10-10 21:09:00 +02:00
|
|
|
int4 indtexmtx[6];
|
2013-10-27 13:10:00 +01:00
|
|
|
int4 fogcolor;
|
2014-03-03 19:23:46 +01:00
|
|
|
int4 fogi;
|
2013-12-16 13:08:09 +01:00
|
|
|
float4 fogf[2];
|
2013-10-07 16:02:24 +02:00
|
|
|
|
|
|
|
// For pixel lighting
|
2013-10-27 13:57:40 +01:00
|
|
|
int4 plight_colors[8];
|
|
|
|
float4 plights[32];
|
2013-10-27 14:07:13 +01:00
|
|
|
int4 pmaterials[4];
|
2013-10-07 16:02:24 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct VertexShaderConstants
|
|
|
|
{
|
|
|
|
float4 posnormalmatrix[6];
|
|
|
|
float4 projection[4];
|
2013-10-27 14:07:13 +01:00
|
|
|
int4 materials[4];
|
2013-10-27 13:57:40 +01:00
|
|
|
int4 light_colors[8]; // 8 lights
|
|
|
|
float4 lights[32]; // 8 lights * 4 parameters
|
2013-10-07 16:02:24 +02:00
|
|
|
float4 texmatrices[24];
|
|
|
|
float4 transformmatrices[64];
|
|
|
|
float4 normalmatrices[32];
|
|
|
|
float4 posttransformmatrices[64];
|
|
|
|
float4 depthparams;
|
|
|
|
};
|