Skip to content

Head culling is applied to shadows #474

@Nestorboy

Description

@Nestorboy

Describe the bug?

Currently the local player model's head doesn't have any shadow. This is a common issue with similar platforms and I've seen various solutions arise. On a higher level, the head should only be shrunk down when rendering the main camera, not shadows or additional cameras.

Unity 2022+ has provided us with the ability to retrieve the GPU buffer that contains bone weights. This could be paired up with a compute shader in order to to copy the vertex buffer of the player model and then perform the compute step in order to shrink down the head

https://docs.unity3d.com/ScriptReference/Mesh.GetBoneWeightBuffer.html

Steps to Reproduce

  1. Load into the game with a model that casts shadows.
  2. In a world with realtime shadows, look down at the ground.
  3. Notice the shadow of the head being missing.

The expected behavior

The head should cast a shadow.

Screenshots

No response

BasisVR Release Version

Any

What VR headsets are being used during this issue?

No response

Log Files

No log file necessary

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions