summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl
diff options
context:
space:
mode:
Diffstat (limited to 'hlsl')
-rw-r--r--hlsl/bloom.fx11
-rw-r--r--hlsl/post.fx10
2 files changed, 11 insertions, 10 deletions
diff --git a/hlsl/bloom.fx b/hlsl/bloom.fx
index db23995d55b..42c65e6a45b 100644
--- a/hlsl/bloom.fx
+++ b/hlsl/bloom.fx
@@ -273,14 +273,11 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Color = Input.Color;
- float2 TexCoord = Input.TexCoord;
- TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
+ Output.TexCoord = Input.TexCoord;
+ Output.TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
- Output.TexCoord = TexCoord.xy;
-
- TexCoord += 0.5f / SourceDims;
-
- Output.BloomCoord = TexCoord.xy;
+ Output.BloomCoord = Output.TexCoord;
+ Output.BloomCoord += 0.5f / SourceDims;
return Output;
}
diff --git a/hlsl/post.fx b/hlsl/post.fx
index 6d8077e2037..717c919d8a7 100644
--- a/hlsl/post.fx
+++ b/hlsl/post.fx
@@ -253,9 +253,13 @@ float4 ps_main(PS_INPUT Input) : COLOR
float ColorBrightness = 0.299f * BaseColor.r + 0.587f * BaseColor.g + 0.114 * BaseColor.b;
float ScanlineCoord = SourceCoord.y;
- ScanlineCoord += QuadDims.y <= SourceDims.y * 2.0f
- ? 0.5f / QuadDims.y // uncenter scanlines if the quad is less than twice the size of the source
- : 0.0f;
+ ScanlineCoord += SwapXY
+ ? QuadDims.x <= SourceDims.x * 2.0f
+ ? 0.5f / QuadDims.x // uncenter scanlines if the quad is less than twice the size of the source
+ : 0.0f
+ : QuadDims.y <= SourceDims.y * 2.0f
+ ? 0.5f / QuadDims.y // uncenter scanlines if the quad is less than twice the size of the source
+ : 0.0f;
ScanlineCoord *= SourceDims.y * ScanlineScale * PI;