summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/primary.fx
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-07-11 20:01:24 +0200
committer ImJezze <jezze@gmx.net>2015-07-11 20:01:24 +0200
commit6e5f7f5d943c3cacee4de7f0bdd618ee96c83557 (patch)
tree6439a6397654d17a9f568c2bc64bb22a6e94ace6 /hlsl/primary.fx
parent35ad49dd032969062083e3db8637f9557727b60a (diff)
Refactoring
- separated downsample pass and bloom pass into two function calls - removed/replaced simple.fx by using primary.fx to render on screen - changed PostPass parameter of primary.fx to boolean - simplified bloom.fx and downsample.fx, Prescale parameter is now set correctly from outside depending on raster/vector rendering
Diffstat (limited to 'hlsl/primary.fx')
-rw-r--r--hlsl/primary.fx11
1 files changed, 5 insertions, 6 deletions
diff --git a/hlsl/primary.fx b/hlsl/primary.fx
index fd53bf572e8..ed73750185d 100644
--- a/hlsl/primary.fx
+++ b/hlsl/primary.fx
@@ -47,8 +47,7 @@ struct PS_INPUT
//-----------------------------------------------------------------------------
uniform float2 ScreenDims;
-uniform float PostPass;
-uniform float FixedAlpha;
+uniform bool PostPass;
uniform float Brighten;
VS_OUTPUT vs_main(VS_INPUT Input)
@@ -59,9 +58,11 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Position.xy /= ScreenDims;
Output.Position.y = 1.0f - Output.Position.y;
Output.Position.xy -= 0.5f;
- Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f);
+ Output.Position.xy *= 2.0f;
+
+ Output.TexCoord = PostPass ? (Input.Position.xy / ScreenDims) : Input.TexCoord;
+
Output.Color = Input.Color;
- Output.TexCoord = lerp(Input.TexCoord, Input.Position.xy / ScreenDims, PostPass);
return Output;
}
@@ -86,8 +87,6 @@ technique TestTechnique
{
Lighting = FALSE;
- //Sampler[0] = <DiffuseSampler>;
-
VertexShader = compile vs_2_0 vs_main();
PixelShader = compile ps_2_0 ps_main();
}