Skip to content

Distortion#30

Merged
rpavlik merged 3 commits intoOSVR:masterfrom
DuFF14:Distortion
Mar 20, 2015
Merged

Distortion#30
rpavlik merged 3 commits intoOSVR:masterfrom
DuFF14:Distortion

Conversation

@DuFF14
Copy link
Copy Markdown
Member

@DuFF14 DuFF14 commented Mar 16, 2015

Added Distortion effect. Will work with Unity 4 Pro or Unity 5 (free or pro).
Will look further into free workarounds, but this works for now...

- Changed Near camera property from .3 to .01 on VRDisplayTracked prefab.
- Changed default screen dimensions to 1920x1080 in Project Settings.
- VRHead: Made private variables private. Added Property for Camera. Added Distortion effect.
- VREye: Added Property for Camera. Added Distortion effect.
- Changed Quality Settings: Turned on 4x AA, turned off Shadows, set default to "Good"
- Changed Fixed Timestep from 0.2 to 0.016667. This should improve camera movement.
- Added a new demo scene and a sky material... just wanted another scene to work in.
- Added OsvrDistortion.shader, OsvrDistortion.cs, and OsvrPostEffectsBase.cs which are modified versions of Unity's Image Effect shaders/scripts. Requires Pro or Unity 5.
@rpavlik
Copy link
Copy Markdown
Member

rpavlik commented Mar 16, 2015

I'm guessing from the apparently overlapping commits that this request depends on #24?

@rpavlik
Copy link
Copy Markdown
Member

rpavlik commented Mar 16, 2015

Oh, and what happens if you use this on unity 4 free? Any way we can easily "gracefully degrade" to no distortion shader in that case?

@DuFF14
Copy link
Copy Markdown
Member Author

DuFF14 commented Mar 17, 2015

My first pull request should address the rolling issue, though I don't have an HMD to test that at the moment.

If Unity 4 free is being used, it will simply not use distortion. It shouldn't crash. It will show a warning or error in the debug console, but tracking will still work.

On Mar 16, 2015, at 6:35 PM, Ryan Pavlik notifications@github.com wrote:

Oh, and what happens if you use this on unity 4 free? Any way we can easily "gracefully degrade" to no distortion shader in that case?


Reply to this email directly or view it on GitHub.

DuFF14 added 2 commits March 19, 2015 18:08
Switched order of code in VRHead to fix distortion.
Updated VRDisplayTracked prefab in OSVRDemo.unity
@rpavlik
Copy link
Copy Markdown
Member

rpavlik commented Mar 20, 2015

Once I merge this please update the news file to describe the Unity 4 free limitations.

rpavlik added a commit that referenced this pull request Mar 20, 2015
Distortion correction (requires Unity 5 or Unity 4 Pro - warns but still runs in Unity 4 free) and improvements to display json
@rpavlik rpavlik merged commit 8cec90a into OSVR:master Mar 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants