Some video SW clean up and bug fixes. Did a hacky fix for bad light data. Add fog rendering. Add some offsets to make rasterized pixel locations and texture coordinates more accurate.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5361 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
donkopunchstania 2010-04-14 03:27:45 +00:00
parent bfe6e92c15
commit c2ac9be9b2
14 changed files with 179 additions and 78 deletions

View file

@ -85,13 +85,13 @@ namespace HwRasterizer
void DrawColorVertex(OutputVertexData *v)
{
glColor3ub(v->color[0][0], v->color[0][1], v->color[0][2]);
glVertex3f(v->screenPosition[0] / efbHalfWidth - 1.0f, 1.0f - v->screenPosition[1] / efbHalfHeight, v->screenPosition[2]);
glVertex3f(v->screenPosition.x / efbHalfWidth - 1.0f, 1.0f - v->screenPosition.y / efbHalfHeight, v->screenPosition.z);
}
void DrawTextureVertex(OutputVertexData *v)
{
glTexCoord2f(v->texCoords[0][0] * texWidth, v->texCoords[0][1] * texHeight);
glVertex3f(v->screenPosition[0] / efbHalfWidth - 1.0f, 1.0f - v->screenPosition[1] / efbHalfHeight, v->screenPosition[2]);
glTexCoord2f(v->texCoords[0].x * texWidth, v->texCoords[0].y * texHeight);
glVertex3f(v->screenPosition.x / efbHalfWidth - 1.0f, 1.0f - v->screenPosition.y / efbHalfHeight, v->screenPosition.z);
}
void DrawTriangleFrontFace(OutputVertexData *v0, OutputVertexData *v1, OutputVertexData *v2)