Week 7
Although I implemented the outline shader last week, for some reason when I tried it out on the VR headset, the effect didn’t show up at all. I ended up spending many hours this week researching why a post processing effect would work in the Unity editor but not in the headset. After many failed attempts to fix this problem, I finally figured out that Unity didn’t include the shader when building the project, and I build and run the project each time I play it on the headset, which is why it wasn’t showing up in the built version. To fix this, I had to add the shader to a list of shaders in the graphics settings that are always stored with the project.
Once the outline shader was showing up in the headset, there was another problem—each of the objects in the scene appeared twice, which was very disorienting and definitely not going to prevent cybersickness! Since VR uses two images, one for the left eye and one for the right eye, the perspective for each of these images is slightly different. I think that the post processing effect was not adjusting for this, causing the objects to appear in different locations for each eye. I eventually figured out to change a camera setting to “monoscopic”, so that both eyes see the same image rendered from the center eye pose.
I also realized I can record videos from the headset! Here is a ride through the rollercoaster with the outline filter on. Although there is much to improve in the shader, it’s exciting to finally be able to experience it in VR!