From cc8599e8f183a2b08a1320d474cffc5526e4253b Mon Sep 17 00:00:00 2001 From: Darius Goad Date: Mon, 16 Mar 2015 20:56:41 -0500 Subject: [PATCH] Pica/Rasterizer: Add SecondaryFragmentColor --- src/video_core/pica.h | 2 ++ src/video_core/rasterizer.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/video_core/pica.h b/src/video_core/pica.h index fe20cd77d..9263732b9 100644 --- a/src/video_core/pica.h +++ b/src/video_core/pica.h @@ -217,7 +217,9 @@ struct Regs { struct TevStageConfig { enum class Source : u32 { PrimaryColor = 0x0, + PrimaryFragmentColor = 0x1, + SecondaryFragmentColor = 0x2, Texture0 = 0x3, Texture1 = 0x4, diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index dd46f0ec3..265000bab 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp @@ -384,10 +384,13 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0, auto GetSource = [&](Source source) -> Math::Vec4 { switch (source) { - // TODO: What's the difference between these two? + // TODO: Implement fragment lighting. The following is a bunch of hacks. case Source::PrimaryColor: case Source::PrimaryFragmentColor: return primary_color; + + case Source::SecondaryFragmentColor: + return 0; case Source::Texture0: return texture_color[0];