Update Cel shading. Note, RageDisplay_D3D will need to be fixed for this.

This commit is contained in:
Colby Klein
2011-03-08 11:00:32 -08:00
parent bcd87f8c17
commit 704c7bff1d
8 changed files with 90 additions and 89 deletions
+10 -9
View File
@@ -289,18 +289,19 @@ bool Model::EarlyAbortDraw() const
void Model::DrawCelShaded()
{
// TODO: use shell shader for outline.
this->SetZWrite( true );
// First pass: outline/shell
// DISPLAY->SetCelShaded(1);
// First pass: shell. We only want the backfaces for this.
DISPLAY->SetCelShaded(1);
DISPLAY->SetCullMode(CULL_FRONT);
this->SetZWrite(false); // XXX: Why on earth isn't the culling working? -Colby
this->Draw();
// Second pass: normal shading
// DISPLAY->SetCelShaded(2);
// this->Draw();
// Second pass: cel shading
DISPLAY->SetCelShaded(2);
DISPLAY->SetCullMode(CULL_BACK);
this->SetZWrite(true);
this->Draw();
// DISPLAY->SetCelShaded(0)
DISPLAY->SetCelShaded(0);
}
void Model::DrawPrimitives()