summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/downsample.fx
diff options
context:
space:
mode:
Diffstat (limited to 'hlsl/downsample.fx')
-rw-r--r--hlsl/downsample.fx28
1 files changed, 6 insertions, 22 deletions
diff --git a/hlsl/downsample.fx b/hlsl/downsample.fx
index b7579fc24ed..18eaa8313c0 100644
--- a/hlsl/downsample.fx
+++ b/hlsl/downsample.fx
@@ -50,11 +50,7 @@ struct PS_INPUT
uniform float2 ScreenDims;
uniform float2 TargetSize;
-uniform float2 Prescale = float2(8.0f, 8.0f);
-
-uniform float BloomRescale;
-
-uniform bool PrepareVector = false;
+uniform float2 Prescale = float2(1.0f, 1.0f);
VS_OUTPUT vs_main(VS_INPUT Input)
{
@@ -71,22 +67,10 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Color = Input.Color;
float2 TexCoord = Input.Position.xy / ScreenDims;
-
- // Vector graphics is not prescaled it has the size of the screen
- if (PrepareVector)
- {
- Output.TexCoord01.xy = TexCoord + float2(-0.5f, -0.5f) * TargetTexelSize;
- Output.TexCoord01.zw = TexCoord + float2( 0.5f, -0.5f) * TargetTexelSize;
- Output.TexCoord23.xy = TexCoord + float2(-0.5f, 0.5f) * TargetTexelSize;
- Output.TexCoord23.zw = TexCoord + float2( 0.5f, 0.5f) * TargetTexelSize;
- }
- else
- {
- Output.TexCoord01.xy = TexCoord + float2(-0.5f, -0.5f) * TargetTexelSize * Prescale;
- Output.TexCoord01.zw = TexCoord + float2( 0.5f, -0.5f) * TargetTexelSize * Prescale;
- Output.TexCoord23.xy = TexCoord + float2(-0.5f, 0.5f) * TargetTexelSize * Prescale;
- Output.TexCoord23.zw = TexCoord + float2( 0.5f, 0.5f) * TargetTexelSize * Prescale;
- }
+ Output.TexCoord01.xy = TexCoord + float2(-0.5f, -0.5f) * TargetTexelSize * Prescale;
+ Output.TexCoord01.zw = TexCoord + float2( 0.5f, -0.5f) * TargetTexelSize * Prescale;
+ Output.TexCoord23.xy = TexCoord + float2(-0.5f, 0.5f) * TargetTexelSize * Prescale;
+ Output.TexCoord23.zw = TexCoord + float2( 0.5f, 0.5f) * TargetTexelSize * Prescale;
return Output;
}
@@ -102,7 +86,7 @@ float4 ps_main(PS_INPUT Input) : COLOR
float4 texel2 = tex2D(DiffuseSampler, Input.TexCoord23.xy);
float4 texel3 = tex2D(DiffuseSampler, Input.TexCoord23.zw);
- float4 outTexel = (texel0 + texel1 + texel2 + texel3) / 4.0 * BloomRescale;
+ float4 outTexel = (texel0 + texel1 + texel2 + texel3) / 4.0;
return float4(outTexel.rgb, 1.0f);
}