Skip to content

Commit

Permalink
VR: Fixed rejection falloff with single-pass stereo.
Browse files Browse the repository at this point in the history
  • Loading branch information
keijiro committed Jul 27, 2017
1 parent 9628e16 commit 8785215
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Assets/MiniEngineAO/AmbientOcclusion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ void PushRenderCommands(CommandBuffer cmd, RTHandle source, RTHandle dest, float
// Note about the "2.0f * ": Diameter = 2 * Radius
var ThicknessMultiplier = 2 * TanHalfFovH * ScreenspaceDiameter / source.width;
if (!source.isTiled) ThicknessMultiplier *= 2;
if (singlePassStereoEnabled) ThicknessMultiplier *= 2;

// This will transform a depth value from [0, thickness] to [0, 1].
var InverseRangeFactor = 1 / ThicknessMultiplier;
Expand Down

0 comments on commit 8785215

Please sign in to comment.