ExtendRealityLtd / VRTK

An example of how to use the Tilia packages to create great content with VRTK v4.
https://www.vrtk.io/
MIT License
3.69k stars 993 forks source link

VRTK_SimplePointer receives shadows, creating undesirable shadow cascades in scene #552

Closed getwilde closed 8 years ago

getwilde commented 8 years ago

Whenever SimplePointer is aimed at a nearby collider, realtime shadows are crisp. When NO collider is hit, shadow quality degrades noticeably. This appears to be related to shadow cascades.

To Replicate _(or I can send a sample scene):

  1. Add VRTK_SimplePointer to a controller.
  2. Add a directional light: Realtime shadows, Soft shadows
  3. Add a few boxes nearby with colliders that cast shadows on one another.
  4. Set Project Settings > Quality > Shadows: Hard and Soft, Very High Resolution, Close Fit, Two cascades. (May not be necessary but makes issue more obvious).
  5. Run. Notice that shadows are blurred/aliased whenever pointer hits nothing, and sharpen when pointer hits a nearby collider._

Solution: Change the cube primitive to not receive shadows in VRTK_SimplePointer.cs (~line 75): pointer.GetComponent<MeshRenderer>().receiveShadows = false;

thestonefox commented 8 years ago

would this be the same for the bezier pointer objects too?

getwilde commented 8 years ago

It does not seem to be an issue with VRTK_BezierPointer.

thestonefox commented 8 years ago

should be fixed with https://github.com/thestonefox/SteamVR_Unity_Toolkit/commit/0aafda0782ed8fdd4265a0a84996d4d53d95deb5