Merge pull request #134 from fisherdarling/patch-1

Fixed small typo in beginner/tutorial8-depth
pull/136/head
sotrh 3 years ago committed by GitHub
commit 1fda21eb6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -12,7 +12,7 @@ There are two ways to solve this: sort the data from back to front, use what's k
This is the go to method for 2d rendering as it's pretty easier to know what's supposed to go in front of what. You can just use the z order. In 3d rendering it gets a little more tricky because the order of the objects changes based on the camera angle.
A simple way of doing this is to sort all the objects by their distance to the cameras position. There are flaws with this method though as when a large object is behind a small object, parts of the large object that should be in front of the small object will be rendered behind. We'll also run into issues with objects that that overlap *themselves*.
A simple way of doing this is to sort all the objects by their distance to the cameras position. There are flaws with this method though as when a large object is behind a small object, parts of the large object that should be in front of the small object will be rendered behind. We'll also run into issues with objects that overlap *themselves*.
If want to do this properly we need to have pixel level precision. That's where a *depth buffer* comes in.

Loading…
Cancel
Save