-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make SkinnedMeshes of the local player cast shadows:
- The SkinnedMeshes of the local player that reference any bone under the Head bone should now cast shadows onto the world and other players. - SkinnedMeshes placed directly under the Head bone without any bone reference are not supported in this version. - MeshRenderers placed directly under the Head bone are not supported in this version. - This implementation: - Evaluates at runtime. - Creates a copy of all the transforms under the Head hierarchy. - Creates copies of SkinnedMeshes that reference any bone under the Head. - Bones under Head will reference the aforementionned copy. - Bones not under Head will reference a zero-scale bone under the neck. - Those SkinnedMeshes are set to Shadow Only. - This implementation currently uses "Update When Offscreen" OFF and an off-world "Bounds" value to prevent the shadow from displaying when rendering the local player avatar in third person. - This implementation was chosen because it's currently unclear how to manage the camera layers, and should be discussed further. - Just before any camera is rendered, once per frame, we copy the transforms, SkinnedMesh component enabled-ness, and blendshapes, so that the shadow reflects the visual state of the original SkinnedMesh.
- Loading branch information
Showing
8 changed files
with
310 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace Basis.Scripts.Avatar | ||
{ | ||
public class BasisLayer | ||
{ | ||
// TODO: These eventually need to be configurable, with values to be chosen by the framework consumer. | ||
public const int LocalPlayerAvatar = 6; | ||
public const int RemotePlayerAvatar = 7; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.