OSVR / OSVR-Unity

Package for authoring OSVR experiences with Unity.
Apache License 2.0
99 stars 38 forks source link

Point lights cause "whiteout" with RenderManager in some scenes. #105

Closed DuFF14 closed 8 years ago

DuFF14 commented 8 years ago

With RenderManager (directmode or not), point lights are causing the screen to burn-out white. It also appears that the framebuffer is not cleared and each new image draws on top of the previous one.

This is apparent only in some scenes, and only if pixel light count in Quality Settings is nonzero.

I was seeing this issue in the Palace demo awhile back, and it was fixed by changing some materials, but I can't reproduce it in the Palace scene anymore. That issue was first mentioned here: https://github.com/OSVR/OSVR-Unity-Palace-Demo/issues/10

This bug is obvious in minigame.unity and VRFirstPerson.unity. In minigame, you'll notice it only occurs when looking at one of the swords, indicating that it has something to do with the material. Changing materials from Legacy Diffuse to Particles/Alpha Blended Premultiply, for example, makes the whitewash effect go away. Changing materials to Standard, however, does not fix it, although Standard shader doesn't cause the issue in other scenes.

I don't understand why the bug doesn't occur in OSVRDemo.unity or OSVRDemo2.unity. Both of these scenes have point lights and are very similar to the others. I can't reproduce it in Palace despite many attempts playing with lights in the scene. Could use some help in figuring out exactly what's causing this.

DuFF14 commented 8 years ago

Still not sure why I can't reproduce it in every scene, but this PR should fix it https://github.com/OSVR/OSVR-Unity/pull/108

DuFF14 commented 8 years ago

Fixed by https://github.com/OSVR/OSVR-Unity/pull/108