Forum Discussion
Infinite
12 years agoHonored Guest
Depth Of Field 34 (not working in stereo)
Hi Unity 4 Integration devs!
I have a question about DOF image processing effects with the Rift. It doesn't seem to work at all, I get weird masking shift effect on each eye. Does anyone know how to solve this? either DOF script does not work.
It works in mono fine.
Mono

Stereo

Thanks, Lee
I have a question about DOF image processing effects with the Rift. It doesn't seem to work at all, I get weird masking shift effect on each eye. Does anyone know how to solve this? either DOF script does not work.
It works in mono fine.
Mono

Stereo

Thanks, Lee
18 Replies
Replies have been turned off for this discussion
- InfiniteHonored GuestJust to clarify, I'm not using DOF for focus adjustment on near objects, useless for VR. The idea is to use it on the backgrounds to add in some good looking bokeh hexagonal lens effects.
Yes I could bake them into the background HDRI image but we would loose all the cool fading, occlusion, rotation and exposure effects we get with bokeh.
Just looking for a solve on with Stereo which seems to be busted! :) - InfiniteHonored GuestHas anybody else has noticed this bug?
- cyberealityGrand ChampionYes, I have seen it happen. I am not sure if there is a fix, but I will ask.
- cyberealityGrand ChampionAh, I found the fix.
You need to move the DOF script to be above the OVRCamera script. You can do this by right-clicking the little gear button on the right-hand side and choosing "Move up" a few times. - InfiniteHonored Guest
"cybereality" wrote:
Ah, I found the fix.
You need to move the DOF script to be above the OVRCamera script. You can do this by right-clicking the little gear button on the right-hand side and choosing "Move up" a few times.
Thanks Cybereality! I tried that first thing but the script skips right back down to the bottom again when I run the game. Do you know why? - cyberealityGrand ChampionSorry, I was wrong. This "trick" only seems to work in Play mode. If you do it in Edit mode it will drop down to the bottom when you play the scene. Unfortunately, this seems to be a quirk of how Unity works. I'm hoping there is a work-around, but I don't have the answer just yet.
- InfiniteHonored Guest
"cybereality" wrote:
Sorry, I was wrong. This "trick" only seems to work in Play mode. If you do it in Edit mode it will drop down to the bottom when you play the scene. Unfortunately, this seem to be a quirk of how Unity works. I'm hoping there is a work-around, but I don't have the answer just yet.
OK thanks. I hope a fix for this bug might become available from Unity. - AnonymousAny progress? Have you found a way to get DOF working with the Rift?
Thanks! - cyberealityGrand ChampionSorry, no progress.
The issue is that the DOF effect works on the original depth (before the warp shader runs). If we could re-order the effects so DOF ran before the warp then it would work (and you can do this in test mode). However it seems Unity likes to re-order the objects how it sees fit. Not sure how to fix this. - drashHeroic ExplorerOne workaround could be to put in another pair of Rift cameras. Pair #1 will render the scene normally and this is where you put the DOF effect. Pair #2 renders nothing and does nothing except apply lens correction and chromatic aberration correction to the scene rendered so far. This approach doesn't universally work on all image effects though, but perhaps it is worth a shot.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 month ago