summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-07-12 23:28:38 +0200
committer ImJezze <jezze@gmx.net>2015-07-12 23:28:38 +0200
commit9ce28641419f62fe8f95fca1dad6563cef0d995f (patch)
tree5c374dc0d1f940f294730cd2fde5ea9e39bc499e /hlsl
parent6e5f7f5d943c3cacee4de7f0bdd618ee96c83557 (diff)
Post Pass effects for Vector rendering
- added support for post pass effects for vector rendering (does not work properly in full screen mode, yet) - made texture_info::compute_size_subroutine() function public static
Diffstat (limited to 'hlsl')
-rw-r--r--hlsl/post.fx8
1 files changed, 6 insertions, 2 deletions
diff --git a/hlsl/post.fx b/hlsl/post.fx
index 63e3aa9f5ce..615b8a2956c 100644
--- a/hlsl/post.fx
+++ b/hlsl/post.fx
@@ -78,7 +78,9 @@ uniform float2 Prescale = float2(8.0f, 8.0f);
uniform bool OrientationSwapXY = false; // false landscape, true portrait for default screen orientation
uniform bool RotationSwapXY = false; // swapped default screen orientation due to screen rotation
+
uniform bool PrepareBloom = false; // disables some effects for rendering bloom textures
+uniform bool PrepareVector = false;
VS_OUTPUT vs_main(VS_INPUT Input)
{
@@ -106,7 +108,7 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Position.xy -= 0.5f; // center
Output.Position.xy *= 2.0f; // zoom
- Output.TexCoord = Input.TexCoord;
+ Output.TexCoord = PrepareVector ? (Input.Position.xy / ScreenDims) : Input.TexCoord;
Output.Color = Input.Color;
@@ -377,7 +379,9 @@ float4 ps_main(PS_INPUT Input) : COLOR
}
// Output
- float4 Output = BaseColor * Input.Color;
+ float4 Output = PrepareVector
+ ? BaseColor * (Input.Color + float4(1.0f, 1.0f, 1.0f, 0.0f))
+ : BaseColor * Input.Color;
Output.a = 1.0f;
// Light Reflection Simulation (may not affect bloom)