summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/distortion.fx
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-12-26 12:27:07 +0100
committer ImJezze <jezze@gmx.net>2015-12-26 12:27:07 +0100
commitff77b7897bcf0a967f7e275b289a1f8fd18ecd7e (patch)
treeaeb9666f35abd4c843a8011af426b6dd4c8243b9 /hlsl/distortion.fx
parent1b373eb812d11dfeb0fead627f7df4e827e27f8f (diff)
Cleanup (nw)
- renamed shadow_mask_type to shadow_mask_tile_mode - renamed bloom_type to bloom_blend_mode - implemented "Source" shadow mask tile mode for artwork_support/post.fx
Diffstat (limited to 'hlsl/distortion.fx')
-rw-r--r--hlsl/distortion.fx6
1 files changed, 2 insertions, 4 deletions
diff --git a/hlsl/distortion.fx b/hlsl/distortion.fx
index 1524f27757c..77c7ddcd3e1 100644
--- a/hlsl/distortion.fx
+++ b/hlsl/distortion.fx
@@ -181,7 +181,7 @@ float GetSpotAddend(float2 coord, float amount)
float SpotRadius = amount * 0.75f;
float Spot = smoothstep(SpotRadius, SpotRadius - SpotBlur, length(SpotCoord));
- float SigmoidSpot = normalizedSigmoid(Spot, 0.75) * amount;
+ float SigmoidSpot = amount * normalizedSigmoid(Spot, 0.75);
// increase strength by 100%
SigmoidSpot = SigmoidSpot * 2.0f;
@@ -215,8 +215,6 @@ float GetRoundCornerFactor(float2 coord, float radiusAmount, float smoothAmount)
// www.francois-tarlier.com/blog/cubic-lens-distortion-shader/
float2 GetDistortedCoords(float2 centerCoord, float amount)
{
- amount *= 0.25f; // reduced amount
-
// lens distortion coefficient
float k = amount;
@@ -266,7 +264,7 @@ float4 ps_main(PS_INPUT Input) : COLOR
float2 BaseCoord = TexCoord;
// Screen Curvature
- BaseCoord = GetCoords(BaseCoord, CurvatureAmount);
+ BaseCoord = GetCoords(BaseCoord, CurvatureAmount * 0.25f); // reduced amount
float2 BaseCoordCentered = BaseCoord;
BaseCoordCentered -= 0.5f;