diff options
author | 2016-04-19 21:18:16 +0200 | |
---|---|---|
committer | 2016-04-19 21:18:16 +0200 | |
commit | cd4dfca43e81533b6b204e37ec016dda924c004b (patch) | |
tree | 9e7f388508ab4610db0d52556789d72962f7def1 /hlsl | |
parent | 8ed3a7d94a65ee01bf1adce3ea8118c04d41a18d (diff) |
Refactored BGFX distortion pass (nw)
- also removed vector hack
Diffstat (limited to 'hlsl')
-rw-r--r-- | hlsl/distortion.fx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hlsl/distortion.fx b/hlsl/distortion.fx index f683397b17a..bd78efde8c5 100644 --- a/hlsl/distortion.fx +++ b/hlsl/distortion.fx @@ -212,7 +212,7 @@ float2 GetDistortedCoords(float2 centerCoord, float amount, float amountCube) : 1.0f + r2 * (k + kcube * sqrt(r2)); // fit screen bounds - f /= 1.0f + amount * 0.25 + amountCube * 0.125f; + f /= 1.0f + amount * 0.25f + amountCube * 0.125f; // apply cubic distortion factor centerCoord *= f; @@ -237,9 +237,9 @@ float2 GetCoords(float2 coord, float distortionAmount, float cubicDistortionAmou float4 ps_main(PS_INPUT Input) : COLOR { float distortionAmount = DistortionAmount; - float cubicDistortionAmount = CubicDistortionAmount > 0 - ? CubicDistortionAmount * 1.1 // cubic distortion need to be a little higher to compensate the quartic distortion - : CubicDistortionAmount * 1.2; // negativ values even more + float cubicDistortionAmount = CubicDistortionAmount > 0.0f + ? CubicDistortionAmount * 1.1f // cubic distortion need to be a little higher to compensate the quartic distortion + : CubicDistortionAmount * 1.2f; // negativ values even more float2 TexelDims = 1.0f / TargetDims; |