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

Shade mapping fix #5612

Merged
merged 2 commits into from
Mar 22, 2014
Merged

Shade mapping fix #5612

merged 2 commits into from
Mar 22, 2014

Conversation

dbz400
Copy link
Contributor

@dbz400 dbz400 commented Mar 6, 2014

@hrydgard
Copy link
Owner

hrydgard commented Mar 6, 2014

Ah, this might be right. Why do you say "partially"? How does it look with this change?

@thedax
Copy link
Collaborator

thedax commented Mar 6, 2014

I'd guess "partially" because it still leaves the cars with a slight blue in weird areas:

Screenshot 01
Screenshot 02
Screenshot 03

@unknownbrackets
Copy link
Collaborator

Hmm, well, if this is correct, wouldn't software transform need the change too?

Also, it seems like the software renderer does actually do + for both, but it still doesn't look right according to the bug. So if this is wrong, maybe the software renderer is wrong.

-[Unknown]

@thedax
Copy link
Collaborator

thedax commented Mar 6, 2014

Yeah, software transform would need the change too:

uv[1] = (1.0f + Dot(lightpos1, normal))/2.0f;

instead of

uv[1] = (1.0f - Dot(lightpos1, normal))/2.0f;

@dbz400
Copy link
Contributor Author

dbz400 commented Mar 7, 2014

Yep , i think it is partially correct but sometimes reflection is not right.At least it is better than 1.0f minus

@dbz400
Copy link
Contributor Author

dbz400 commented Mar 7, 2014

For SW transform , if do the changes as @thedax mentioned above , it seems to be no blue color issue and renders correct.

-SW T&L
ulus10064_00008

-HW T&L
ulus10064_00009

@dbz400 dbz400 closed this Mar 22, 2014
@hrydgard
Copy link
Owner

Why close this? I plan to merge this later today, after I'm done with the release.

@hrydgard hrydgard reopened this Mar 22, 2014
@dbz400
Copy link
Contributor Author

dbz400 commented Mar 22, 2014

I see. That's would be good.

hrydgard added a commit that referenced this pull request Mar 22, 2014
@hrydgard hrydgard merged commit 98da514 into hrydgard:master Mar 22, 2014
@hrydgard
Copy link
Owner

I believe this is right, but hard to be 100% sure without a good test.

@solarmystic
Copy link
Contributor

@hrydgard @unknownbrackets
It's a bit late, I know, but this pull request actually improves the car reflections in Gran Turismo. Most easily noticeable during replays and when the camera pans over the car at the start of races.

Before (only the bottom portion of the car had reflections):-
ucus98632_00000

After (the whole car is covered, even the windshleld):-
ucus98632_00001

This pull request is definitely the right way to go. Thanks to @zschigi2 for the initial discovery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Outrun 2006 Lighting Bug: Every cars' colours are wrong
5 participants