Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lighting Attenuation Fixes #1941

Merged
merged 2 commits into from Jan 22, 2015
Merged

Conversation

NanoByte011
Copy link
Contributor

Fixes a lot of Specular Highlight issues such as Issue 6398, 6169, 7693 and possibly more!

Would like to find a real game case for the Spot Light Attenuation and test if that's ok too.

@magumagu
Copy link
Contributor

@NanoByte011 are you seriously having trouble finding a game that uses LIGHTATTN_SPOT? I tried a few games, and every one of them used it somewhere...

@Linktothepast
Copy link
Contributor

It seems to fix car reflections in the need for speed series too, issue 8072.

@NanoByte011
Copy link
Contributor Author

The FifoCI thing is cool... is there a threshold setting? Because some of these look like they don't have a diff, even though it thinks there is.

@Sonicadvance1
Copy link
Contributor

Yea, the threshold is if there is a different pixel value anywhere in the image then it is different.

@JMC47
Copy link
Contributor

JMC47 commented Jan 22, 2015

@NanoByte011 Did you notice some of the lighting stuff in Mario tennis isn't fixed? Like the scores and whatnot? Are those another lighting glitch?

@NanoByte011
Copy link
Contributor Author

@JMC47 Yeah, I did notice, those seem to be a different issue, the preview court before you start the match is dark too. :(
@magumagu yeah, that code is hit in different games for spot, but I'm looking for a good test case were you can tell it's a spot light and there is an issue or if it works ok... I just want to verify the results are correct! :)
@Sonicadvance1 well there may be slight pixel differences because the lighting calc was off, but on my laptop here I can't see which pixel is different on some, does the "Bright" feature work? Could be hard to see on my laptop... just want to make sure the diff is working correctly.

@JMC47
Copy link
Contributor

JMC47 commented Jan 22, 2015

@NanoByte011: Figures on the Mario Tennis thing. Dolphin's Lighting tends to be bad at doing stuff.

@magumagu
Copy link
Contributor

Hmm... the Wind Waker title screen seems like a decent example?

@NanoByte011
Copy link
Contributor Author

@magumagu hmmm... it's more like a game where it's a spotlight and there is incorrect specular highlights... ie a flash light and then there is no shine on a door knob for example... maybe Luigi's Mansion might have lighting like this. But yeah any ideas on a game with lighting like that, where we can check to determine if Dolphin is doing it right would be good.

@JMC47
Copy link
Contributor

JMC47 commented Jan 22, 2015

This also seems to finish off the remaining lighting quirks in MegaMan Network Transmission.

@NanoByte011
Copy link
Contributor Author

Good stuff, feeling pretty good about killing multiple bugs in one shot! lol
magumagu did show me that in SMG, the Mii faces on the file select screen do show up brighter with this PR, so not sure what's up with that... Mii rendering seems to be problematic at any rate... I wonder if the data coming in for them is correct or if they have some special stuff to them that we aren't doing right.

Fixed Directional Attenuation (assumed, data was light dir vector already, but it was not!)
@NanoByte011
Copy link
Contributor Author

All should be good now, let me know if anyone finds any lighting issues this PR causes

@degasus
Copy link
Member

degasus commented Jan 22, 2015

Wow, how could it be that our lighting code was just /so/ wrong...

@FioraAeterna
Copy link
Contributor

Yeah, wow, that's /embarrassing/ levels of bad. Awesome work!

delroth added a commit that referenced this pull request Jan 22, 2015
@delroth delroth merged commit 4984215 into dolphin-emu:master Jan 22, 2015
@neobrain
Copy link
Member

Did you happen to take a quick look into the software renderer and check, if that one has similar issues? At least the mario tennis fifolog looks suspiciously similar.

@dolphin-emu-bot
Copy link
Contributor

FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:

  • chibi-robo-zfighting on ogl-lin-mesa: diff
  • fifa-street on ogl-lin-mesa: diff
  • mario-tennis-menu on ogl-lin-mesa: diff
  • melee-lighting on ogl-lin-mesa: diff
  • mtennis-zfreeze on ogl-lin-mesa: diff
  • rs2-zfreeze on ogl-lin-mesa: diff
  • sms-bubbles on ogl-lin-mesa: diff
  • chibi-robo-zfighting on ogl-lin-nv: diff
  • mario-tennis-menu on ogl-lin-nv: diff
  • melee-lighting on ogl-lin-nv: diff
  • mtennis-zfreeze on ogl-lin-nv: diff
  • rs2-zfreeze on ogl-lin-nv: diff
  • sms-bubbles on ogl-lin-nv: diff

automated-fifoci-reporter

@NanoByte011
Copy link
Contributor Author

Thanks all, there are still some lighting issues to solve (ie Mario Tennis preview court and the Score are still dark and confirmation that spot light specular is working in any games).

@neobrain yeah I did briefly see the same problems in the SW Renderer with Mario Tennis in a test... so I assume it's broken as well. I can have a look at it for more future fixes on lighting.

@NanoByte011 NanoByte011 deleted the lighting_attn branch January 26, 2015 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
10 participants