summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-05-24 17:46:34 +0200
committer ImJezze <jezze@gmx.net>2015-05-24 17:46:34 +0200
commitfe71f92dd24270ae7c5621166b096c665ca0e4f5 (patch)
treee4c397b01ca0baac56797c377ce6a22536d0d3b5 /hlsl
parent4c04a362e2c50dd2a9c4db9e11fe4afdf568a66c (diff)
Quick fix
- something was messed up on the last commit
Diffstat (limited to 'hlsl')
-rw-r--r--hlsl/post.fx3
1 files changed, 3 insertions, 0 deletions
diff --git a/hlsl/post.fx b/hlsl/post.fx
index 8b4c9d05be2..54bc0b6d6bb 100644
--- a/hlsl/post.fx
+++ b/hlsl/post.fx
@@ -218,16 +218,19 @@ float GetRoundCornerFactor(float2 coord, float amount)
float2 SourceTexelDims = 1.0f / SourceDims;
// base on the default ratio of 4:3
+ float2 RoundCoordScale = (SourceDims / SourceArea / SourceRatio) * ScreenRatio;
float2 RoundCoord = coord;
// hint: alignment correction
RoundCoord -= SourceTexelDims * SourceArea;
RoundCoord *= SourceTexelDims * SourceArea + 1.0f;
// hint: roundness correction
+ RoundCoord *= RoundCoordScale;
float radius = amount * 50.0f;
// compute box (base on the default ratio of 4:3)
+ float box = RoundBox(RoundCoord.xy, (RoundCoordScale * 0.5f), radius);
// // apply blur
// float blurAmount = 1.0f / max(1.0f, amount * 25.0f);