OpenGL Renderer:

- Change toon highlight blending to match SoftRasterizer. Fixes the “Shadows of Almia” logo in the Pokemon Ranger: Shadows of Almia title screen. (Addresses one of the issues noted in bug #1253.)
This commit is contained in:
rogerman 2015-07-31 20:46:00 +00:00
parent 8c68f22165
commit ee1a489dc7
3 changed files with 3 additions and 2 deletions

View File

@ -317,7 +317,7 @@ static const char *fragmentShader_100 = {"\
else if(polyMode == 2) \n\
{ \n\
vec3 toonColor = vec3(texture1D(texToonTable, vtxColor.r).rgb); \n\
newFragColor.rgb = (stateToonShadingMode == 0) ? mainTexColor.rgb * toonColor.rgb : min((mainTexColor.rgb * vtxColor.rgb) + toonColor.rgb, 1.0); \n\
newFragColor.rgb = (stateToonShadingMode == 0) ? mainTexColor.rgb * toonColor.rgb : min((mainTexColor.rgb * vtxColor.r) + toonColor.rgb, 1.0); \n\
} \n\
else if(polyMode == 3) \n\
{ \n\

View File

@ -211,7 +211,7 @@ static const char *GeometryFragShader_150 = {"\
else if (polyMode == 2u) \n\
{ \n\
vec3 newToonColor = state.toonColor[int((vtxColor.r * 31.0) + 0.5)].rgb;\n\
newFragColor.rgb = (state.toonShadingMode == 0) ? mainTexColor.rgb * newToonColor.rgb : min((mainTexColor.rgb * vtxColor.rgb) + newToonColor.rgb, 1.0); \n\
newFragColor.rgb = (state.toonShadingMode == 0) ? mainTexColor.rgb * newToonColor.rgb : min((mainTexColor.rgb * vtxColor.r) + newToonColor.rgb, 1.0); \n\
} \n\
else if (polyMode == 3u) \n\
{ \n\

View File

@ -532,6 +532,7 @@ public:
if (gfx3d.renderState.shading == GFX3D_State::HIGHLIGHT)
{
// Tested in the "Shadows of Almia" logo in the Pokemon Ranger: Shadows of Almia title screen.
dst.r = modulate_table[mainTexColor.r][src.r];
dst.g = modulate_table[mainTexColor.g][src.r];
dst.b = modulate_table[mainTexColor.b][src.r];