diff options
| author | Rodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com> | 2010-08-16 22:37:04 +0000 |
|---|---|---|
| committer | Rodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com> | 2010-08-16 22:37:04 +0000 |
| commit | fb1c14e2ccd147a17ebaac2d162ce063cd0ca756 (patch) | |
| tree | 6f09d496c8844818f47752e9a45b09374b648104 /Source/Core/VideoCommon/Src/VertexShaderGen.cpp | |
| parent | 963ece2017bbbd8a8148e9f368cc3432dd988868 (diff) | |
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
Diffstat (limited to 'Source/Core/VideoCommon/Src/VertexShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/VertexShaderGen.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp index dfda6c1673..4efeecd123 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp @@ -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); |
