|
|
|
@ -706,9 +706,13 @@ bool CDriverD3D::setupMaterial(CMaterial &mat)
|
|
|
|
|
// Set the texture states
|
|
|
|
|
if (text || (stage == 0))
|
|
|
|
|
{
|
|
|
|
|
// Doesn't use a pixel shader ? Set the textures stages
|
|
|
|
|
if (pShader->PixelShader == NULL)
|
|
|
|
|
if (matShader == CMaterial::Program)
|
|
|
|
|
{
|
|
|
|
|
// Do nothing for user pixel shader
|
|
|
|
|
}
|
|
|
|
|
else if (!pShader->PixelShader)
|
|
|
|
|
{
|
|
|
|
|
// Doesn't use a pixel shader ? Set the textures stages
|
|
|
|
|
if (pShader->RGBPipe[stage])
|
|
|
|
|
{
|
|
|
|
|
setTextureState (stage, D3DTSS_COLOROP, pShader->ColorOp[stage]);
|
|
|
|
@ -1145,7 +1149,7 @@ bool CDriverD3D::setupMaterial(CMaterial &mat)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case CMaterial::Cloud:
|
|
|
|
|
case CMaterial::Cloud:
|
|
|
|
|
{
|
|
|
|
|
H_AUTO_D3D(CDriverD3D_setupMaterial_setupCloudShader)
|
|
|
|
|
activeShader (&_ShaderCloud);
|
|
|
|
@ -1167,7 +1171,7 @@ bool CDriverD3D::setupMaterial(CMaterial &mat)
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case CMaterial::Water:
|
|
|
|
|
case CMaterial::Water:
|
|
|
|
|
{
|
|
|
|
|
H_AUTO_D3D(CDriverD3D_setupMaterial_setupWaterShader)
|
|
|
|
|
activeShader(mat.getTexture(3) ? &_ShaderWaterDiffuse : &_ShaderWaterNoDiffuse);
|
|
|
|
@ -1296,7 +1300,14 @@ bool CDriverD3D::setupMaterial(CMaterial &mat)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// CMaterial::Water
|
|
|
|
|
break; // CMaterial::Water
|
|
|
|
|
case CMaterial::Program:
|
|
|
|
|
{
|
|
|
|
|
H_AUTO_D3D(CDriverD3D_setupMaterial_setupProgramshader)
|
|
|
|
|
// No material shader
|
|
|
|
|
activeShader(NULL);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// New material setuped
|
|
|
|
|