long time no commits :).

fixed one of the last graphic problems in smg, now the glow in the plants and planets must be correct.
the error was caused by a error in lighting calculations. so it must affect other games.
please test and let me know the results.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6103 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2010-08-16 22:37:04 +00:00
parent 963ece2017
commit fb1c14e2cc
3 changed files with 38 additions and 17 deletions

View File

@ -260,18 +260,19 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE api_type)
if (alpha.matsource) {// from vertex
if (components & (VB_HAS_COL0<<j))
WRITE(p, "mat.w = color%d.w;\n", j);
else WRITE(p, "mat.w = 1;\n");
else WRITE(p, "mat.w = 1.0f;\n");
}
else // from color
WRITE(p, "mat.w = "I_MATERIALS".C%d.w;\n", j+2);
}
if (alpha.enablelighting && alpha.ambsource != color.ambsource) {
if (alpha.enablelighting)
{
if (alpha.ambsource) {// from vertex
if (components & (VB_HAS_COL0<<j) )
WRITE(p, "lacc.w = color%d.w;\n", j);
else
WRITE(p, "lacc.w = 0;\n");
WRITE(p, "lacc.w = 0.0f;\n");
}
else // from color
WRITE(p, "lacc.w = "I_MATERIALS".C%d.w;\n", j);