D3D: Fix 8-bit signed normals. Fixes lighting problems in Super Smash Bros Melee. misc tiny things

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4265 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-09-13 21:18:04 +00:00
parent 2dc3f2c762
commit c7431401be
13 changed files with 186 additions and 28 deletions

View File

@ -68,8 +68,9 @@ D3DDECLTYPE VarToD3D(VarType t, int size)
static const D3DDECLTYPE lookup3[5] = {
D3DDECLTYPE_UNUSED, D3DDECLTYPE_UNUSED, D3DDECLTYPE_UNUSED, D3DDECLTYPE_UNUSED, D3DDECLTYPE_FLOAT3,
};
// Sadly, D3D9 has no SBYTE4N. D3D10 does, though.
static const D3DDECLTYPE lookup4[5] = {
D3DDECLTYPE_UBYTE4N, D3DDECLTYPE_UBYTE4N, D3DDECLTYPE_SHORT4N, D3DDECLTYPE_USHORT4N, D3DDECLTYPE_FLOAT4,
D3DDECLTYPE_UNUSED, D3DDECLTYPE_UBYTE4N, D3DDECLTYPE_SHORT4N, D3DDECLTYPE_USHORT4N, D3DDECLTYPE_FLOAT4,
};
D3DDECLTYPE retval = D3DDECLTYPE_UNUSED;
switch (size) {
@ -84,9 +85,6 @@ D3DDECLTYPE VarToD3D(VarType t, int size)
return retval;
}
// TODO: Ban signed bytes as normals - not likely that ATI supports them natively.
// We probably won't see much of a speed loss, and any speed loss will be regained anyway
// when we finally compile display lists.
void D3DVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl)
{
vertex_stride = _vtx_decl.stride;