Skip to content

Commit

Permalink
softgpu: Correct decal doubling without alpha.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed Jan 9, 2022
1 parent 72aa4be commit b915a82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion GPU/Software/Rasterizer.cpp
Expand Up @@ -236,7 +236,10 @@ Vec4IntResult SOFTRAST_CALL GetTextureFunctionOutput(Vec4IntArg prim_color_in, V
else
out_rgb /= 256;
} else {
out_rgb = texcolor.rgb();
if (gstate.isColorDoublingEnabled())
out_rgb = texcolor.rgb() * 2;
else
out_rgb = texcolor.rgb();
}
out_a = prim_color.a();
break;
Expand Down
2 changes: 2 additions & 0 deletions GPU/Software/SamplerX86.cpp
Expand Up @@ -1578,6 +1578,8 @@ bool SamplerJitCache::Jit_ApplyTextureFunc(const SamplerID &id) {
PSRLW(resultReg, 7);
else
PSRLW(resultReg, 8);
} else if (id.useColorDoubling) {
PSLLW(resultReg, 1);
}
useAlphaFrom(primColorReg);
break;
Expand Down

0 comments on commit b915a82

Please sign in to comment.