mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-05 02:32:45 +00:00
Fix pixel lighting.
This commit is contained in:
parent
1f8a8268c6
commit
ca7e8a9e88
5 changed files with 36 additions and 18 deletions
|
@ -21,6 +21,21 @@
|
|||
|
||||
#define WRITE p+=sprintf
|
||||
|
||||
int GetLightingShaderId(u32* out)
|
||||
{
|
||||
for (int i = 0; i < xfregs.numChan.numColorChans; ++i)
|
||||
{
|
||||
out[i] = xfregs.color[i].enablelighting ?
|
||||
(u32)xfregs.color[i].hex :
|
||||
(u32)xfregs.color[i].matsource;
|
||||
out[i] |= (xfregs.alpha[i].enablelighting ?
|
||||
(u32)xfregs.alpha[i].hex :
|
||||
(u32)xfregs.alpha[i].matsource) << 15;
|
||||
}
|
||||
_assert_(xfregs.numChan.numColorChans <= 2);
|
||||
return xfregs.numChan.numColorChans;
|
||||
}
|
||||
|
||||
// coloralpha - 1 if color, 2 if alpha
|
||||
char *GenerateLightShader(char *p, int index, const LitChannel& chan, const char* lightsName, int coloralpha)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue