Floor's normal may be inverted#277
Open
Pierce-qiang wants to merge 5 commits intoJoeyDeVries:masterfrom
Open
Conversation
Owner
|
Hey! Default culling mode is back face culling. When you call the front face the floor is indeed expected to dissapear as the top part of the floor is its front face. |
Contributor
Author
|
Oh! I'm sorry for saying wrong, I mean cull the back face!!! |
Contributor
Author
|
Oh, I see. You invert normal to reserve floor's depth when using the method which culls the front face to solve Peter panning problem. |
Owner
|
Ahh, forgot about that for the shadow mapping; indeed, not necessary for gamma correction and advanced lighting. You can commit these separately if you want, but I won't commit the changes for shadow mapping tutorials. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dear Author,
I noticed that in your chapter 5 advanced_lighting ->
1.advanced_lighting && 2.gamma_correction && 3. shadow_mapping_depth
In your code, the floor data's normal is inverted, that is Clockwise, notice cross(x, z) = -y
When I cull the front face, the floor disappears. While moving the camera under the floor I can see it