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
VideoCommon: normalize light direction #394
Conversation
Screenshots from galop1n: bug - http://i.imgur.com/xVYxgVl.png |
Can we have a hwtest for this? |
Apart from fixing the SMG2 issue this also fixes issue 6125. |
And a fifolog please :) On Fri, May 23, 2014 at 4:18 PM, Tony Wasserka notifications@github.comwrote:
Pierre "delroth" Bourdon delroth@gmail.com |
Perhaps Issue 6269 is also relevant? |
This also seems to fix issue 6269. I can no longer reproduce it after applying the patch. |
It'll also fix Network Transmission, 6543 |
Can someone (including myself) remember to close these issues when this PR is pushed? |
@delroth Just pick any fifo log of this issue reports ;) @neobrain Do you think we should move this normalization to the CPU? It's easy to implement at https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/VideoCommon/VertexShaderManager.cpp#L272 |
Any point to move that to the CPU? Trading CPU load for GPU load here On Mon, May 26, 2014 at 1:22 PM, Markus Wick notifications@github.comwrote:
Pierre "delroth" Bourdon delroth@gmail.com |
@delroth This won't be a 1:1 trade. It can be done once per vertex (or pixel) on the gpu or once per lighting parameter changes on the cpu. |
Good point, I should think before replying :) On Mon, May 26, 2014 at 1:52 PM, Markus Wick notifications@github.comwrote:
Pierre "delroth" Bourdon delroth@gmail.com |
It would be possible to do the normalize on the cpu as it is bare constant, but it is not like we are suffering of gpu issues, and we cannot say the same of cpu. |
@degasus Should be normalized on the CPU indeed. If not for performance reasons, then for the sake of keeping the shader code a bit cleaner. |
By the way, is the software renderer already normalizing this properly? |
@neobrain yeah, we need some hw test for this issue. All current fifologs should also play fine on videosw as it has the same overflow result. |
As #439 is merged, I've updated this PR to normalize on the CPU. |
LGTM; the dffs of the glitchy lighting show up fine now. |
Please change the PR summary to be an actual summary rather than a novel squeezed into a single line. |
It seems that the lighting direction must be normalized. This fixes lots of lighting issues mostly shown in the d3d backend.
PR summary and commit msg changed. |
LGTM, but I suggest against merging this before a hwtest is written. We have no real policy for this, but maybe we can start having one. |
VideoCommon: normalize light direction
It seems that the lighting direction must be normalized. This fixes lots of lighting issues mostly shown in the d3d backend.