Posted: Mon Nov 03, 2008 12:05 am
Nice to know you're going to polish the bloom and DOF code. I'd like to play around with the HDR code I added recently and see if I can get HDR postprocess working on XEffects. That'd be cool.
By the way, not sure if touching the following code will do any good, tho. Do you have any opinion about changing the FVF definition for EVT_TANGENTS?
By the way, not sure if touching the following code will do any good, tho. Do you have any opinion about changing the FVF definition for EVT_TANGENTS?
Code: Select all
void CD3D9Driver::setVertexShader(E_VERTEX_TYPE newType)
{
if (newType != LastVertexType)
{
LastVertexType = newType;
HRESULT hr = 0;
switch(newType)
{
case EVT_STANDARD:
hr = pID3DDevice->SetFVF(D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX1);
break;
case EVT_2TCOORDS:
hr = pID3DDevice->SetFVF(D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX2);
break;
case EVT_TANGENTS:
hr = pID3DDevice->SetFVF(D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_TEX3 |
D3DFVF_TEXCOORDSIZE2(0) | // real texture coord
D3DFVF_TEXCOORDSIZE3(1) | // misuse texture coord 2 for tangent
D3DFVF_TEXCOORDSIZE3(2) // misuse texture coord 3 for binormal
);
break;
}
if (FAILED(hr))
{
os::Printer::log("Could not set vertex Shader.", ELL_ERROR);
return;
}
}
}